GATE CS 2024 Set 1 — Question 31

MSQ+1 / -0MediumNATNetwork Layer: AddressingComputer Networks

Computer Networks → Network Layer: Addressing → NAT

Last updated

Question

Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?
A.
Source IP
B.
Destination IP
C.
Header Checksum
D.
Total Length

Correct answer

(A) Source IP; (C) Header Checksum

Solution

When a packet goes from an internal network to an external network through a NAT device (specifically Source NAT or NAPT):
1.Source IP: The NAT device replaces the private source IP address of the internal host with its own public IP address (or one from a pool). Thus, the Source IP is modified.
2.Header Checksum: Since the IP header contains the Source IP address, changing the Source IP invalidates the existing checksum. The NAT device must recalculate and update the Header Checksum.
3.Destination IP: For an outgoing packet, the destination is an external host, so the Destination IP is typically not modified (unless it is a specific destination NAT scenario, which is not the default for internal-to-external traffic).
4.Total Length: The size of the packet usually remains the same, so the Total Length field is not modified.
Therefore, the fields modified are Source IP and Header Checksum.

More questions on Network Layer: Addressing

Practice GATE CS PYQs with adaptive difficulty

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

Start practicing free