GATE / CS ARCHIVE

GATE CSE 2017 SET 2 / QUESTION 20

GATE CSE 2017 Set 2 Q20

Computer Networks · IP Addressing, Fragmentation & Address Resolution · Full GATE CSE 2017 Set 2 paper

GATE 2017 Set 2, Q20 1 mark · NAT
Report issue

IP Addressing, Fragmentation & Address Resolution

Question 20, GATE 2017: What is the maximum number of IPv4 router addresses that can be listed in the Record Route (RR) option field of one IPv4 header?
Tap to enlarge
Answer & solution

Official answer: 9.0

Our answer: 9

1. The IPv4 IHL field can specify at most 15 words of 4 bytes, giving a 60-byte maximum header. The fixed header takes 20 bytes, leaving at most 40 for options and padding.

2. The Record Route option uses three control bytes: type, length and pointer. Therefore at most 40-3=37 bytes remain for recorded addresses. Each IPv4 address needs 4 bytes.

3. The maximum integer count is floor(37/4)=9. Nine addresses occupy 36 bytes plus 3 control bytes, and one padding byte brings the header options area to 40. Ten addresses would need 43 option bytes and cannot fit.

Original paper, page 8 · Answer key