Just got an simple question.Its abt reading a plane IP packet. In a standard IP packet RFC 791, there are multiple fields, the IP packet header size is 20 bytes. Now when i look at following packet and see the highlighted sections i see Version is IPv4 and header length is 20 bytes (which is true and we ack that).However the binary values on the left side are confusing . For the version the binary value is 0100 which is decimal is 4 and is true (IPv4) but for Header length the binary is 0101 which should be 5 but it shows 20 bytes!!!! How? Also since the IHL (IP header length) field in IP header is only 4 bits the max decimal value can only be 15 (if 1111). Now how come it can show the header length as 20. Now sure what u am missing but i request experts to take a moment to answer this. IPpacket

  • RFC 791, p.11 -- You didn't read.
    – Ricky
    Apr 14 '16 at 12:34
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Aug 14 '17 at 1:15

The unit used in the Length field is not bit nor even byte but 32bits words.

So the value 5 correspond to five 32 bits words = 160 bits = 20 bytes.

And the max value is then 15 x 32 bits = 60 bytes (40 for options).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.