🎓 BookMCQ
← Back to 18. Introduction to Network Layer

📝 Network Layer Services (9 MCQs)

Logical Delivery Across Multiple Networks

The network layer provides host-to-host delivery across interconnected networks, allowing a source on one link to reach a destination beyond the local network. It uses logical addressing and routing information to move packets through intermediate routers. Its service may be connectionless and best-effort, as with IP, so delivery, ordering, and recovery are not guaranteed by the network layer itself. These responsibilities connect separate IP networks while preserving a consistent addressing framework for end systems.

Addressing, Routing and Packet Handling

Core functions include logical addressing, packetizing transport data into network-layer packets, route selection, and forwarding. Routers examine network-layer information, especially the destination IP address, while hosts use their subnet information and a default gateway to reach remote networks. Related control messages can report selected delivery problems without turning IP into a reliable transport service.

From Source Host to Destination Network

A source determines whether the destination is local by applying its subnet mask. For a remote destination, it sends the packet to a next-hop router. Each router examines the destination address, selects an outgoing interface and next hop, updates link-specific information, and forwards the packet until it reaches the destination network.

Example of Communication Between Two IP Networks

A computer at 192.168.1.10 sends data to 192.168.2.20, using 255.255.255.0 on its local network. Because the destination is remote, it sends the packet to its default gateway, 192.168.1.1. Routers then forward it toward the 192.168.2.0 network, where the destination host receives it. This illustrates how the stated network information controls the packet's treatment at that stage.

Relationship with Transport and Data Link Layers

The transport layer supplies segments or datagrams to the network layer, which adds an IP header. The data link layer then encapsulates the IP packet in a frame for the next link. At each router, the incoming frame is removed and a new link-layer frame is created for the next hop, while the IP destination normally remains unchanged.

Clarifying What Network Layer Services Guarantee

'IP guarantees packet delivery' is incorrect because ordinary IP service is best-effort. 'A router forwards using TCP port numbers' is incorrect because basic IP forwarding uses network-layer destination information. 'The network layer always corrects transmission errors' is incorrect because link technologies provide local checks, while IP does not perform end-to-end error correction.

Network-Layer Concepts to Trace in Examinations

Be prepared to distinguish logical addressing, routing, and forwarding, and to trace a packet across multiple networks. Identify the source and destination IP addresses, subnet decision, default gateway, and router next hop. Also distinguish IP services from transport-layer reliability and data-link framing, and explain why each router handles a separate link.

Network-Layer Service and Delivery Terms

  • IP - connectionless packet delivery protocol
  • Logical address - identifies a network interface
  • Routing - selects paths to networks
  • Forwarding - moves packets between interfaces
  • Default gateway - routes traffic beyond subnet
  • Best effort - provides no delivery guarantee
2
Easy
4
Medium
3
Hard

📝 All Network Layer Services MCQs

Q1. If a router receives an IP datagram whose destination address is not present in any of its routing table entries and it has no default route configured, what is the most likely outcome?

A.Drop the datagram and send an ICMP Destination Unreachable ✅
B.Broadcast the datagram to all interfaces
C.Forward to the next‑hop with the highest metric
D.Store the datagram in a queue awaiting route discovery
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: When no matching entry exists and no default route is configured, the router cannot determine a next hop. The standard behavior defined by the IP protocol is to discard the packet and generate an ICMP Destination Unreachable message back to the source. This prevents endless looping and informs the sender of the failure.

Q2. Which of the following best describes the primary responsibility of the network layer in the TCP/IP model?

A.Providing end‑to‑end reliable byte streams
B.Encrypting data for confidentiality
C.Routing packets and providing logical addressing ✅
D.Controlling access to the physical medium
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The network layer’s chief role is to move packets from the source host to the destination host across multiple networks. It does this by assigning logical addresses (IP addresses) and making routing decisions based on those addresses. Reliability and encryption are responsibilities of higher layers, while media access is handled by the data‑link layer.

Q3. How does the network layer’s encapsulation process affect the end‑to‑end reliability guarantees provided by the transport layer?

A.It adds its own retransmission mechanism
B.It hides link‑layer errors from transport
C.It ensures packets are delivered in order
D.It does not alter reliability; transport still handles it ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Encapsulation at the network layer simply packages the transport‑layer segment into an IP datagram, adding a header with source and destination addresses. It does not provide reliability features such as acknowledgment, retransmission, or ordering. Those guarantees remain the responsibility of the transport layer (e.g., TCP), which operates above the network layer.

Q4. If two consecutive network segments have MTU values of 1500 bytes and 900 bytes respectively, what is the maximum size of an IP payload that can be transmitted without fragmentation?

A.1500 bytes
B.900 bytes
C.880 bytes ✅
D.1480 bytes
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The payload must fit within the smallest MTU after accounting for the IP header (typically 20 bytes). Therefore, the maximum payload size is 900 bytes − 20 bytes = 880 bytes. Any larger payload would exceed the 900‑byte MTU on the second segment and trigger fragmentation.

Q5. An IP packet’s TTL field is set to 5 when it leaves Alice’s host. The packet traverses routers R2, R4, R5, and R7 before reaching Bob. What is the TTL value when the packet arrives at Bob?

A.1 ✅
B.0
C.2
D.5
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The TTL (Time‑to‑Live) field is decremented by one at each router hop. Starting at 5, after passing through four routers the value becomes 5 − 4 = 1. The packet arrives at Bob with a TTL of 1, indicating it has traversed four hops.

Q6. Why does the network layer use logical (IP) addresses instead of physical (MAC) addresses for end‑to‑end communication?

A.Logical addresses change at each hop
B.MAC addresses are only unique within a broadcast domain ✅
C.IP addresses provide encryption
D.Physical addresses are larger
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: MAC addresses are only guaranteed to be unique within a single LAN or broadcast domain and are not routable across multiple networks. Logical IP addresses are hierarchical and globally unique, enabling routers to forward packets across disparate networks. Hence, the network layer relies on IP addresses for scalable end‑to‑end communication.

Q7. How does the network layer facilitate host mobility in an IP network when a device moves from one subnet to another?

A.By changing the MAC address automatically
B.By using a static routing table
C.By allowing the host to obtain a new IP address and updating routing via protocols such as DHCP and Mobile IP ✅
D.By encapsulating data in a new transport protocol
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: When a host moves to a new subnet, it typically obtains a new IP address via DHCP or a similar mechanism. Mobility protocols such as Mobile IP inform the network of the host’s new location, enabling routers to forward packets to the updated address. The network layer thus adapts routing information without altering the payload.

Q8. Which factor most directly influences the choice between a distance‑vector routing protocol and a link‑state routing protocol for a large ISP backbone?

A.Number of routers
B.Convergence speed and scalability ✅
C.Encryption requirements
D.Physical cable type
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Large ISP backbones require rapid convergence and the ability to scale to thousands of routers. Link‑state protocols (e.g., OSPF) provide faster convergence and more granular knowledge of the network topology, making them preferable for large, complex networks. Distance‑vector protocols converge more slowly and can suffer from routing loops in extensive environments.

Q9. Consider a packet that passes through routers R2, R4, R5, and R7. If the packet’s initial TTL is 3, what will happen?

A.It will reach Bob with TTL 0
B.It will be discarded at the router where TTL becomes 0 and an ICMP Time‑Exceeded message will be sent ✅
C.TTL will wrap around to 255
D.The packet will be forwarded indefinitely
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The TTL field is decremented at each router. After the first three routers (R2, R4, R5), the TTL reaches 0. At that point the packet is dropped, and the router that decremented TTL to 0 generates an ICMP Time‑Exceeded message back to the source, indicating that the packet could not reach its destination.

🔗 Related Topics (MCQs)