GATE | GATE-CS-2017 (Set 2) | Question 20

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

Note: This question appeared as Numerical Answer Type.
(A) 8
(B) 9
(C) 10
(D) 11


Answer: (B)

Explanation: 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 address is of 4 bytes
Thus maximum IPV4 address that can be hold <= 38/4 = 9 This solution is contributed by Abhishek Kumar

Quiz of this Question



My Personal Notes arrow_drop_up

Improved By : kshitijishere