An IP packet has arrived with the first 8 bits as 00000010 . Which of the…
2022
An IP packet has arrived with the first 8 bits as 00000010 . Which of the following is correct?
Answer: D. The receiver rejects the packet — In an IPv4 packet, the header's first byte packs two 4-bit fields: Version (bits 0-3) and IHL — Internet Header Length (bits 4-7). A valid IPv4 packet must…
- A.
The number of hops this packet can travel is 2
- B.
The total no. of bytes in header is 16 bytes
- C.
The upper layer protocol is ICMP
- D.
The receiver rejects the packet
Attempted by 759 students.
Show answer & explanation
Correct answer: D
In an IPv4 packet, the header's first byte packs two 4-bit fields: Version (bits 0-3) and IHL — Internet Header Length (bits 4-7). A valid IPv4 packet must have Version = 4, and the header length in bytes equals IHL × 4; since a header always carries at least its fixed 20-byte set of fields, the minimum valid IHL is 5 (20 bytes).
Split the given first 8 bits, 00000010, into two 4-bit fields: Version = 0000 and IHL = 0010.
Version = 0000 = 0, but IPv4 requires Version = 4 (binary 0100) — this value is invalid.
IHL = 0010 = 2, so header length = 2 × 4 = 8 bytes, which is below the minimum valid header length of 20 bytes — this value is also invalid.
Both checks fail independently — the Version check and the minimum-header-length check — so this cannot be a well-formed IPv4 packet; the receiver rejects it.