ITPEC FE Morning October 2022 Question 30

Topic: Networks

In an IP network consisting of four (4) hosts, two (2) L2 switches, and a router shown below, a packet is transmitted from PC01 to PC03. Which of the following is an appropriate combination of the source and destination addresses of this packet when it leaves Switch1?

PC01PC02Switch1RouterSwitch2PC03PC04IP: 192.168.1.31MAC: aa:aa:aa:aa:aa:aaRouter port 01IP: 192.168.1.11MAC: cc:cc:cc:cc:cc:ccRouter port 02IP: 192.168.2.11MAC: dd:dd:dd:dd:dd:ddIP: 192.168.2.31MAC: ee:ee:ee:ee:ee:eeIP: 192.168.1.32MAC: bb:bb:bb:bb:bb:bbIP: 192.168.2.32MAC: ff:ff:ff:ff:ff:ff
OptionDestination MACSource MACDestination IPSource IP

Explanation

Router port 01's MAC with PC03's IP — MAC addresses name the next hop on the segment, IP addresses name the two endpoints.

PC03 (192.168.2.31) is on the other side of the router, so PC01 sends the packet to its default gateway, Router port 01.

  • •IP header, unchanged end to end: source 192.168.1.31 (PC01), destination 192.168.2.31 (PC03)
  • •Ethernet header on the Switch1 segment: source aa:aa:aa:aa:aa:aa (PC01), destination cc:cc:cc:cc:cc:cc (Router port 01, found by ARP for the gateway's IP)
  • •An L2 switch forwards the frame without rewriting any address, so the packet leaves Switch1 exactly like this; only the router rewrites the MACs, to dd:dd:dd:dd:dd:dd → ee:ee:ee:ee:ee:ee, for the Switch2 segment

Answer (b)

Why not others:

  • •(a) — right MACs, but the destination IP 192.168.1.11 is the router's own address; the router is only the next hop, so it appears as the destination MAC, never as the destination IP
  • •(c) — both destinations swapped: PC03's MAC with the router's IP
  • •(d) — right IPs, but ee:ee:ee:ee:ee:ee belongs to PC03 on the far segment; a frame on Switch1's segment cannot be addressed to it, and that MAC appears only after the router re-frames the packet

Key rule: IP addresses identify the endpoints and stay the same end to end; MAC addresses identify the next hop and are rewritten at every router, while switches pass them through unchanged.

Networks · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.