GATE / CS ARCHIVE

GATE CSE 2025 SET 2 / QUESTION 23

GATE CSE 2025 Set 2 Q23

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

GATE 2025 Set 2, Q23 1 mark · MCQ
Report issue

IP Addressing, Fragmentation & Address Resolution

Question 23, GATE 2025: Ethernet can carry at most 1500 bytes in its data field. IPv4 uses a 20-byte header with no options. A UDP datagram has 7488 bytes of application data. After IPv4 fragmentation, how many fragments are sent, and what is the total size of the last fragment including its IPv4 header?
Options: A. 5 and 1488 bytes; B. 6 and 88 bytes; C. 6 and 108 bytes; D. 6 and 116 bytes.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Step through it (4 steps)

UDP adds one 8-byte header to its 7488 data bytes. The payload of the original IPv4 datagram is therefore 7496 bytes. Each fragment must fit the 1500-byte Ethernet data field, and each has its own 20-byte IPv4 header. A full fragment can consequently carry 1500−20=1480 payload bytes.

Except for the last fragment, IPv4 fragment payload lengths must be multiples of 8 because fragment offsets are in 8-byte units. Here 1480=185·8, so the full payload size is usable. Divide the original payload: 7496=5·1480+96. There are five full fragments and one final fragment, hence six in total. The last has 96 payload bytes plus a 20-byte IPv4 header, or 116 bytes.

The UDP header is part of the original payload and appears only in the first fragment, not in every fragment. Omitting it would incorrectly give 88 bytes of last payload and 108 bytes including IP; 88 alone would additionally omit the final IP header. Answer: D.

Original paper, page 20 · Answer key