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 size of datagram?
- A.
64 bytes
- B.
74 bytes
- C.
84 bytes
- D.
104 bytes
Attempted by 259 students.
Show answer & explanation
Correct answer: C
Step 1: Write the header bytes in sequence45 00 00 54 00 03 00 00 20 06 …
Step 2: Recall IPv4 header format (first few fields)
Byte Position | Field Name |
|---|---|
1st byte | Version + IHL |
2nd byte | Type of Service |
3rd & 4th bytes | Total Length |
5th & 6th bytes | Identification |
7th & 8th bytes | Flags + Fragment Offset |
9th byte | TTL |
10th byte | Protocol |
Step 3: Identify the Total Length field
From the given header:
45 | 00 | 00 54 | 00 03 | 00 00 | 20 | 06
So,
Total Length = 00 54 (Hexadecimal)
Step 4: Convert Hexadecimal to Decimal
00 54 (Hex) = 0x54
Now convert:
0x54 = (5 × 16) + 4= 80 + 4= 84
Step 5: Interpret the Meaning
The Total Length field specifies the size of the entire IP datagram, including:
IP Header
Data (Payload)
Final Answer:
The size of the IP datagram = 84 bytes.
A video solution is available for this question — log in and enroll to watch it.