📝 Forwarding of IP Packets (10 MCQs)
Moving IP Packets Through a Router
IP packet forwarding is the network-layer action by which a router sends a received packet toward its destination. The router examines the destination IP address, consults forwarding information, selects an output interface and next hop, and transmits the packet over the next link. Forwarding is performed for individual packets using locally available state. Network-layer decisions remain independent of the particular cable or wireless link carrying each packet.
Forwarding Table and Next-Hop Resolution
A forwarding table stores destination prefixes and associated outgoing interfaces or next hops. Once a route is selected, the router may need to resolve the next-hop link-layer address, for example through ARP on an IPv4 Ethernet network. It then creates an appropriate outgoing frame for the chosen medium. Every device must interpret the relevant fields consistently to preserve correct packet delivery.
Processing the Incoming IP Header
On receipt, a router removes the incoming link-layer frame and examines the IP packet. For IPv4 forwarding it normally decreases TTL and updates the header checksum, then performs the destination lookup. If a usable route exists, the packet is encapsulated in a new frame; otherwise, it is dropped and an error may be reported.
Delivering a Packet to a Distant Subnet
A packet for 198.51.100.25 reaches a router on its 192.0.2.0/24 interface. The router looks up the destination prefix, selects an outgoing interface toward the next hop, decreases TTL, and sends a new link-layer frame. The IP source and destination addresses remain end-to-end addressing fields. Following the same steps with different addresses or rates produces a different forwarding result.
Relationship Between Forwarding and Routing
Routing protocols and configuration determine which destination prefixes are reachable and install forwarding information. Forwarding uses that information to handle each packet quickly. The two functions interact, but routing is a control activity while forwarding is the data-transfer operation on the router. These functions work together, but each protocol layer retains its own data unit and responsibility.
Misconceptions About IP Forwarding
'A router forwards using the destination MAC address across the Internet' is incorrect because MAC addresses are link-local and change at each hop. 'TTL increases at each router' is incorrect because IPv4 TTL decreases. 'A router always forwards every packet' is incorrect because no-route, policy, or resource conditions can cause a drop.
Tracing Packet Forwarding Decisions
Given a packet and forwarding table, identify the matching destination prefix, next hop, and output interface. Track the TTL change and new link-layer encapsulation at each router. Distinguish IP addresses from MAC addresses, and explain how routing updates alter forwarding entries without changing the forwarding operation itself. State the relevant rule first, then apply it systematically to the supplied network information.
IP Forwarding Terminology
- Forwarding table - maps prefixes to actions
- Next hop - immediate forwarding destination
- Outgoing interface - router transmission port
- TTL - limits packet lifetime
- ARP - resolves IPv4 link addresses
- Header checksum - checks IPv4 header integrity
📝 All Forwarding of IP Packets MCQs
Q1. When an IP packet is forwarded using the traditional destination‑address method, which of the following statements is true?
📖 Explanation: The router examines the destination IP address of the incoming datagram, searches its forwarding table for a matching network prefix, and then uses the associated next‑hop information to forward the packet. This process is the core of destination‑address based forwarding, whereas source IP, transport layer, or direct delivery are not used for the routing decision.
Q2. Given the classless entry 180.70.65.192/26 in a forwarding table, which of the following destination IP addresses would match this entry?
📖 Explanation: A /26 mask keeps the first 26 bits of the address fixed. The network portion 180.70.65.192 spans from .192 to .255. Only addresses whose first 26 bits equal the network prefix fall within this block. Among the choices, 180.70.65.210 shares the same 26‑bit prefix, while the others differ, so it matches the entry.
Q3. A router has three overlapping entries: 10.0.0.0/8 via Interface 1, 10.1.0.0/16 via Interface 2, and 10.1.2.0/24 via Interface 3. For a packet destined to 10.1.2.45, which interface will the router select?
📖 Explanation: The router applies the longest‑prefix‑match algorithm, preferring the most specific network that includes the destination address. The /24 prefix (10.1.2.0/24) is more specific than the /16 and /8 entries, and 10.1.2.45 lies within that /24 block, so the packet is forwarded out Interface 3.
Q4. Which statement correctly distinguishes classful from classless forwarding tables?
📖 Explanation: Classful forwarding tables rely on fixed class boundaries (A, B, C) and therefore contain entries that implicitly define the mask based on the class of the network address. In contrast, classless tables explicitly store a variable‑length mask with each prefix, allowing arbitrary subnet sizes and more efficient routing.
Q5. If a router’s forwarding table omits the mask for each entry, what is the most likely consequence?
📖 Explanation: Without a mask, the router cannot differentiate between overlapping or adjacent networks, because it lacks the information needed to apply the correct prefix length. Consequently, when two entries share the same network prefix but differ in size, the router may choose the wrong next hop, leading to misrouting of packets.
Q6. Why does a router employ the longest‑prefix‑match rule when selecting a forwarding entry?
📖 Explanation: The longest‑prefix‑match rule selects the route with the most specific network prefix that still covers the destination address. This specificity ensures that the packet follows the intended subnet rather than a broader, less accurate route, preventing ambiguous forwarding and preserving correct traffic engineering.
Q7. In a NAT device, which fields from the translation table are used to map an incoming packet to the correct internal host?
📖 Explanation: NAT translation tables map external (public) address‑port pairs to internal (private) address‑port pairs. When a packet arrives from the Internet, the router looks up the external IP address and port in the table to retrieve the corresponding private IP and port, thereby directing the packet to the correct internal host.
Q8. A router has interfaces I1 (192.168.1.0/24), I2 (10.0.0.0/8), I3 (172.16.0.0/12). Which entry correctly represents the route for traffic destined to the 10.0.0.0 network?
📖 Explanation: The forwarding entry must associate the destination network 10.0.0.0/8 with the interface that directly connects to that network. Interface I2 is assigned the 10.0.0.0/8 subnet, so the correct table line records the network prefix 10.0.0.0/8 and specifies I2 as the outgoing interface.
Q9. When IP forwarding uses a label (as in MPLS), how does the router determine the outgoing interface?
📖 Explanation: In label‑switching architectures like MPLS, the incoming label is swapped for an outgoing label that encodes the next‑hop information, often including the egress interface identifier. The router therefore does not perform a traditional IP prefix lookup; it simply uses the label to determine the appropriate egress interface.
Q10. What is the primary purpose of a forwarding table in a router?
📖 Explanation: A forwarding table stores mappings from destination network prefixes to the corresponding outgoing interface and next‑hop IP address. When a router receives a packet, it consults this table to decide where to forward the datagram, enabling efficient packet switching across the network.