GATE 2021 CS (CS1) – Question 55
Consider two hosts $P$ and $Q$ connected through a router $R$. The maximum transfer unit (MTU) value of the link between $P$ and $R$ is 1500 bytes, and between $R$ and $Q$ is 820 bytes. A TCP segment of size 1400 bytes was transferred from $P$ to $Q$ through $R$, with IP identification value as 0x1234. Assume that the IP header size is 20 bytes. Further, the packet is allowed to be fragmented, i.e., Don't Fragment (DF) flag in the IP header is not set by $P$. Which of the following statements is/are correct?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) Two fragments are created at $R$ and the IP datagram size carrying the second fragment is 620 bytes.; (C) If the second fragment is lost, $P$ is required to resend the whole TCP segment.
Explanation
IP payload (the TCP segment) $=1400$ bytes; IP header $=20$ bytes, so the datagram is 1420 bytes. The $P$–$R$ link (MTU 1500) carries it whole. The $R$–$Q$ link has MTU 820.
**Fragmentation at R.** Data per fragment $\le820-20=800$ bytes, and 800 is a multiple of 8. So the data splits as $800+600$:
- Fragment 1: 800 bytes data + 20 header $=820$ bytes.
- Fragment 2: 600 bytes data + 20 header $=\mathbf{620}$ bytes.
- **(A) True:** two fragments, the second datagram is 620 bytes.
- **(B) False:** IP does not retransmit. $R$ never resends a lost fragment.
- **(C) True:** if a fragment is lost, the destination cannot reassemble the datagram and drops it. TCP at $P$ times out and resends the whole segment.
- **(D) False:** the TCP header (with the ports) is in the first bytes of the data, which are in the first fragment only. The second fragment has no TCP header.
Answer: A, C.
More IPv4: Addressing, CIDR, Fragmentation and NAT questions
- GATE 2020 CS Q25
- GATE 2020 CS Q48
- GATE 2019 CS Q38
- GATE 2018 CS Q64
- GATE 2015 CS (CS1) Q26
- GATE 2016 CS (CS1) Q34
All IPv4: Addressing, CIDR, Fragmentation and NAT questions →