GATE CS 2024 Set 2 — Question 23

MSQ+1 / -0MediumEthernet & MACMedium Access & LANsComputer NetworksIPv4 AddressingNetwork Layer: Addressing

Computer Networks → Medium Access & LANs → Ethernet & MAC

Last updated

Question

Node X has a TCP connection open to node Y. The packets from X to Y go through an intermediate IP router R. Ethernet switch S is the first switch on the network path between X and R. Consider a packet sent from X to Y over this connection.
Which of the following statements is/are TRUE about the destination IP and MAC addresses on this packet at the time it leaves X?
A.
The destination IP address is the IP address of R
B.
The destination IP address is the IP address of Y
C.
The destination MAC address is the MAC address of S
D.
The destination MAC address is the MAC address of Y

Correct answer

(B) The destination IP address is the IP address of Y

Solution

When a packet is sent from a source host (X) to a destination host (Y) on a different network (implied by the presence of intermediate router R):
1.Destination IP Address: The IP header contains the logical address of the final destination. Therefore, the destination IP address is the IP address of Y.
2.Destination MAC Address: The Ethernet frame header contains the physical address of the next hop device. Since X is connected to R (via switch S), and R is the gateway/router to reach Y, X will resolve the MAC address of R's interface. The switch S is a Layer 2 device and is transparent to IP routing; it does not change the MAC addresses and is not the destination MAC (unless the frame is management traffic for S, which is not the case here). Therefore, the destination MAC address is the MAC address of Router R.
Evaluating the options:
(A) False. Destination IP is Y.
(B) True. Destination IP is Y.
(C) False. Destination MAC is R, not S.
(D) False. Destination MAC is R, not Y (since Y is not on the local link).
Thus, only statement (B) is true.

More questions on Medium Access & LANs

Practice GATE CS PYQs with adaptive difficulty

Timed practice, skill tracking, and AI explanations — free to start.

Start practicing free