3.2k views

An IP packet has arrived with the first 8 bits as 0100 0010. Which of the following is correct?

1. The number of hops this packet can travel is 2.
2. The total number of bytes in header is 16 bytes
3. The upper layer protocol is ICMP
4. The receiver rejects the packet

edited | 3.2k views

There must be an error in it because See this figure

It is given in Question that arrived packet has 8 bits and a/c to the given figure  4 bits is for Header Length .That must be invalid because the min header length in Bytes must be 20. So

Answer : It must be Option D

by Boss (45.4k points)
selected
+4
correct...0100 defines version 4 and next 0010...defines 4*2 = 8 bytes...which is less then 20 bytes..
0
IP has arrived with "first" 8 bit as __. Here only first 8 bit is mentioned.
0
yes...only first 8 bit...r enough 2 check whether 2 accept it or reject it..
+1
If instead of 0100 0010 we have 0100 1001 then in this case first 4 bit indicates version i.e 4 and last 4 bit means 9 ie 4*9 =36. which is between 20 & 60. so should we accept it?
0
yes,,

It is clear from below diagram that max bits in header is=4bits;So how it can be 8bits.Therefore Option -D will be correct answer.

by Boss (10.2k points)
As the HLEN is of 4 bit but (0000 to 0100) is treated as don't care condition and receiver accepts when HLEN (0101 to 1111) The HLEN indicates the rows and each row has 4 bytes (IPV4) so header ranges(5*4 to 15*4) i.e (20 to 60)
by (187 points)
+1 vote

There is an error in this packet. The 4 left-most bits (0100) show the version, which is correct. The next 4 bits (0010) show the wrong header length (2 × 4 = 8). The minimum number of bytes in the header must be 20. The packet has been corrupted in transmission.and receiver will reject the packet

by Loyal (8.7k points)
0
y are we multiplying header length by 4 ??

IP Packet header length = 20B to 60B. Given:

 0100 0010 VER HLEN

Version = 4. So IPv4. This is all right.

Header length = 2. HLEN is actually scaled down by the factor of 4.

So, actual HLEN = $2*4=8$. This specifies that the header is of length 8B, which is invalid.

So, Option D

by Loyal (6k points)