edited by
16,324 views
44 votes
44 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______.
edited by

3 Answers

Best answer
63 votes
63 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
44 votes
44 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 

–2 votes
–2 votes
Option field of ipv4 header is of 20  B= 20*8=160b

1 ip address is of 32 b

Total ip addresses possible= 160/32=20

There'll be some gap also so it should be 19
Answer:

Related questions