The Gateway to Computer Science Excellence
+9 votes

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
in Computer Networks by Boss (13.8k points)
edited by | 3.2k views

5 Answers

+15 votes
Best answer

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

The Receiver rejects the packet

by Boss (45.4k points)
selected by
correct...0100 defines version 4 and next 0010...defines 4*2 = 8 bytes...which is less then 20 bytes..
IP has arrived with "first" 8 bit as __. Here only first 8 bit is mentioned.
yes...only first 8 bit...r enough 2 check whether 2 accept it or reject it..
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?
+4 votes

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.Image result for format of IP4 header

by Boss (10.2k points)
+2 votes
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)
y are we multiplying header length by 4 ??
0 votes

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

0100 0010

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)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,741 questions
57,243 answers
104,606 users