GateAI
IPv4, CIDR and NAT

GATE CSE 2017 Set 2 · Q20

NAT1 markMedium

Time

The maximum number of IPv4 router addresses that can be listed in the record route (RR) option field of an IPv4 header is _________.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 9 (±0)

IPv4, CIDR and NAT

To determine the maximum number of IPv4 addresses that can be accommodated in the Record Route (RR) option:

  1. Maximum IPv4 Header Size: The Internet Header Length (IHL) field in the IPv4 header is 4 bits, representing the header length in 32-bit (4-byte) words. The maximum value of IHL is 1515, which corresponds to a maximum header size of:

    15×4=60 bytes15 \times 4 = 60\text{ bytes}
  2. Base Header Size: The standard base header (without options) is 20 bytes20\text{ bytes}.

  3. Maximum Options Field Size:

    Max Options Size=60−20=40 bytes\text{Max Options Size} = 60 - 20 = 40\text{ bytes}
  4. Overhead of the Record Route Option: The Record Route option has a 3-byte overhead:

    • Option Type / Code: 1 byte (value 77)

    • Option Length: 1 byte

    • Pointer: 1 byte

  5. Space Available for IPv4 Addresses:

    Available space=40−3=37 bytes\text{Available space} = 40 - 3 = 37\text{ bytes}
  6. Maximum Number of IPv4 Addresses: Since each IPv4 address occupies 4 bytes:

    ⌊374⌋=9 addresses\left\lfloor \frac{37}{4} \right\rfloor = 9\text{ addresses}

    Total option size used =3+(9×4)=39 bytes= 3 + (9 \times 4) = 39\text{ bytes} (plus 1 byte of NOP / padding to align to a 4-byte boundary).

Therefore, the maximum number of IPv4 router addresses that can be listed is 9 [20.0].

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This IPv4, CIDR and NAT previous year question is Q20 of the GATE CSE 2017 Set 2 paper. Find more GATE CSE PYQs on IPv4, CIDR and NAT in Computer Networks, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related IPv4, CIDR and NAT PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

IPv4, CIDR and NAT in GATE CSE

IPv4, CIDR and NAT has 14 GATE CSE PYQs across 10 papers from 2012 to 2025. This is the only 1-mark NAT question among them, and it is the only one in GATE CSE 2017 Set 2.

How GATE tests IPv4, CIDR and NAT

More from GATE CSE 2017 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2017 Set 2 · Q20 · NAT

The maximum number of IPv4 router addresses that can be listed in the record route (RR) option field of an IPv4 header is …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.