edited by
27,011 views
66 66 votes
The maximum number of $\textsf{IPv4}$ router addresses that can be listed in the record route (RR) option field of an $\textsf{IPv4}$ header is______.

8 Answers

Best answer
82 82 votes

A record-route (RR) option is used to record the Internet routers that handle the datagram. It is listed in OPTIONS of $\textsf{IPv4}.$

According to $\textsf{RFC 791},$ there are two cases for the format of an option:

  • Case $1:$ A single octet of option-type.
  • Case $2:$ An option-type octet, an option-length octet, and the actual option-data octets.

In both the cases, first $16$ bits of OPTIONS field is used. Therefore, out off $40$ Bytes only $38$ Bytes are remaining for storing $\textsf{IPv4}$ addresses. In $38$ Bytes we can store $9\;\textsf{ IPv4}$ addresses as each $\textsf{IPv4}$ address is of $4$ Bytes.

$\therefore 9$ should be answer.

Reference: https://tools.ietf.org/html/rfc791

$\large \textbf{Fig: Option format}$
edited by
63 63 votes

Record Route is an optional field used to record address. 
In IPv4 header, 40 bytes are reserved for OPTIONS. For Record Route to stores, 1 byte is used to store type of option, 1 byte for length and 1 byte for pointer. Out of 40, 37 bytes are left. 
An IP4 address takes 32 bits or 4 bytes. 
We can store at most floor(37/4) = 9 router addresses. 

Alternate Solution
In IPV4 frame format there are 40 bytes of option field, out of which only 38 bytes can be used, 2 bytes are reserved . Also one IPV4 adress is of 4 bytes 
Thus maxmimum IPV4 address that can be hold <= 38/4 = 9 

3 3 votes
  1. IPv4 Header:

    • An IPv4 header has a variable-length section called the Options field. This field is used for special purposes, such as recording route information, security parameters, or timestamps.
    • The entire IPv4 header, including options, must not exceed 60 bytes. Typically, the base IPv4 header is 20 bytes, leaving 40 bytes for the Options field.
  2. Record Route (RR) Option:

    • The RR option is used to record the IP addresses of routers along the path of a packet.
    • The RR option has a fixed overhead of 4 bytes:
      • 1 byte for the option type.
      • 1 byte for the option length.
      • 1 byte for the pointer (indicating the next location for recording).
      • 1 byte reserved for padding.
    • The remaining space in the Options field is used to store the IP addresses of routers.
  3. IP Address Size:

    • Each IPv4 address is 4 bytes (32 bits).

Calculating the Maximum Number of Router Addresses:

  • Maximum size of the Options field: 40 bytes.
  • Fixed overhead for the RR option: 4 bytes.
  • Remaining space for IP addresses: 40−4=36 bytes.
  • Each IP address takes 4 bytes.

Thus, the maximum number of router addresses that can be recorded is:

Maximum addresses=Remaining space/Size of one IP address=36/4=9.


Answer:

The maximum number of router addresses that can be listed in the RR option field of an IPv4 header is 9.

1 1 vote
Record Routing Information Is Stored In The Option Field of the IPV4 Header .

The Option Field At Max Is of 40B . In It , The First 2B are reserved for option type(8 bits) and the length(8 bits) , hence leaving 38B for storing IPV4 Addresses.

Each IPV4 Address Is of 4B , Hence in the available 38B , we can store ONLY 9 IPV4 addresses .
0 0 votes

 sd ..

reshown by
Answer:
Position:
Show:

Related questions

35 35 votes
6 answers 6 answers
13.6k
13.6k views
Madhav asked Feb 14, 2017
13,580 views
Consider two hosts $X$ and $Y$, connected by a single direct link of rate $10^6\; \text{bits/sec}$. The distance between the two hosts is $10,000\;\text{km}$ and the prop...
59 59 votes
8 answers 8 answers
28.1k
28.1k views
Arjun asked Feb 14, 2017
28,080 views
Consider the binary code that consists of only four valid codewords as given below:$00000, 01011, 10101, 11110$Let the minimum Hamming distance of the code $p$ and the ma...
59 59 votes
5 answers 5 answers
19.9k
19.9k views
khushtak asked Feb 14, 2017
19,878 views
Consider the following statements about the routing protocols. Routing Information Protocol (RIP) and Open Shortest Path First (OSPF) in an $\textsf{IPv4}$ network.RIP us...
73 73 votes
7 answers 7 answers
25.0k
25.0k views
Madhav asked Feb 14, 2017
25,049 views
Consider socket API on a Linux machine that supports connected UDP sockets. A connected UDP socket is a UDP socket on which connect function has already been called. Whic...