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?

Choose every correct option
Official answer and solution
Official answer
A and C
From
Official GATE 2024 answer key

Solution

Identify which IPv4 header fields change when an outbound packet's private source IP address is translated to a public IP address by a NAT router.

When an outbound IP packet passes through a NAT device from an internal (private) network to an external (public) network:

  • (A) Source IP is modified: The private Source IP address is replaced by the NAT router's public IP address.
  • (B) Destination IP is not modified: The external destination server's IP remains the same.
  • (C) Header Checksum is modified: Because the IPv4 Header Checksum covers the entire IPv4 header (including Source IP), modifying the Source IP requires recomputing and updating the Header Checksum.
  • (D) Total Length is not modified: Replacing a 32-bit IPv4 address (and 16-bit TCP/UDP port) does not change the packet's length.
Final answer

Options (A), (C)

Common trap

Forgetting that modifying the Source IP address in the IPv4 header invalidates the existing IPv4 Header Checksum.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2024 Computer Science and Information Technology - Set 1 (CS1)
Question
31 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.