GATE / CS ARCHIVE

GATE CSE 2016 SET 1 / QUESTION 53

GATE CSE 2016 Set 1 Q53

Computer Networks · IP Addressing, Fragmentation & Address Resolution · Full GATE CSE 2016 Set 1 paper

GATE 2016 Set 1, Q53 2 marks · NAT
Report issue

IP Addressing, Fragmentation & Address Resolution

Question 53, GATE 2016: A router receives a 1000-byte IP datagram, including a 20-byte IP header, and must forward it over a link of MTU 100 bytes. Find the number of fragments, assuming IPv 4 fragmentation is permitted and each fragment has a 20-byte header.
Tap to enlarge
Answer & solution

Official answer: 13.0 : 13.0

Our answer: 13

Step through it (4 steps)

The original datagram contains 1000−20=980 payload bytes. Each fragment can hold 100−20=80 payload bytes, already a multiple of 8 as required for nonfinal IPv 4 fragments. Twelve fragments carry 960 bytes and a thirteenth carries 20, so 13 fragments. This assumes IPv 4 fragmentation is permitted (DF=0); otherwise the router drops rather than fragments the datagram.

The MTU bounds each entire fragment, including its own header. Thus divide the 980-byte payload by 80, not the original 1000-byte datagram by 100. Each nonfinal fragment's payload must be a multiple of 8 for IPv 4 fragment offsets, and 80 already qualifies. The last fragment has 20 payload bytes plus its 20-byte header, for 40 bytes total; the other twelve total 100 bytes each. Repeated headers make aggregate transmitted bytes 1240, which is larger than the original datagram.

Original paper, page 20 · Answer key