Skip to content
Official PYQ · 2017

GATE CS 2017 Set 2 Q20 — Fragmentation and IP Addressing, IPv4, CIDR

Explain with AI
The maximum number of IPv4\textsf{IPv4} router addresses that can be listed in the record route (RR) option field of an IPv4\textsf{IPv4} header is______.
View worked solution

Answer: 9

To find the maximum number of IPv4 router addresses that can be listed in the Record Route (RR) option, we analyze the constraints on the IPv4 header size:

  1. Maximum IPv4 Header Size: The Internet Header Length (IHL) field in the IPv4 header is 44 bits wide. The maximum value it can hold is 1515 (in 3232-bit words). Therefore, the maximum size of an IPv4 header is:Max Header Size=15×4 bytes=60 bytes\text{Max Header Size} = 15 \times 4 \text{ bytes} = 60 \text{ bytes}
  2. Base Header Size: The minimum (base) IPv4 header size without any options is 2020 bytes.
  3. Maximum Space for Options: Max Option Space=60 bytes−20 bytes=40 bytes\text{Max Option Space} = 60 \text{ bytes} - 20 \text{ bytes} = 40 \text{ bytes}
  4. Record Route (RR) Option Overhead: The Record Route option format contains 33 bytes of control information:
    • Type: 11 byte
    • Length: 11 byte
    • Pointer: 11 byte
    This leaves the remaining space for storing IPv4 addresses:Space for IP addresses=40 bytes−3 bytes=37 bytes\text{Space for IP addresses} = 40 \text{ bytes} - 3 \text{ bytes} = 37 \text{ bytes}
  5. Number of IPv4 Addresses: Each IPv4 address requires 44 bytes. Maximum number of addresses=⌊374⌋=9\text{Maximum number of addresses} = \left\lfloor \frac{37}{4} \right\rfloor = 9

Thus, the maximum number of IPv4 router addresses that can be listed is 9.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Fragmentation and IP Addressing, IPv4, CIDR questions