IP datagram has arrived with following partial information in the header (in…
2023
IP datagram has arrived with following partial information in the header (in hexadecimal)
45000054000300002006……
What is the efficiency of datagram?
- A.
76.19%
- B.
80.50%
- C.
82.24%
- D.
85.45%
Attempted by 278 students.
Show answer & explanation
Correct answer: A
Concept
An IPv4 header packs a 4-bit Version field and a 4-bit IHL (Internet Header Length) field into its first byte. IHL states the header size in 32-bit (4-byte) words, and the following 16-bit Total Length field states the entire datagram size in bytes.
Payload (useful data) = Total Length − Header Length, and the transmission efficiency of the datagram = (Payload ÷ Total Length) × 100.
Application
First byte =
45(hex) =0100 0101(binary): Version =0100= 4, IHL =0101= 5.Header Length = IHL × 4 bytes =
5 × 4 = 20 bytes.Total Length field (next two bytes) =
00 54(hex) =0x54 = 84(decimal).Payload = Total Length − Header Length =
84 − 20 = 64 bytes.Efficiency = (Payload ÷ Total Length) × 100 =
(64 ÷ 84) × 100 ≈ 76.19%.
Cross-check
Header share of the datagram = 100% − 76.19% = 23.81%, i.e. 20 ÷ 84 × 100 ≈ 23.81%. The header and payload shares add back to 20 + 64 = 84 bytes, matching the Total Length field, which confirms the split.
Final Answer:
Efficiency of the datagram ≈ 76.19% (≈ 76%).
A video solution is available for this question — log in and enroll to watch it.