Maximum IPv4 Header Length

CChNCChN Member Posts: 81 ■■□□□□□□□□
"The minimum length of the IP header is 20 octets, and the options may increase this size up to a maximum of 24 octets. This field describes the length of the header in terms of 32-bit words - five for the minimum 160-bit size and six for the maximum."

Jeff Doyle. Routing TCP/IP Volume 1


"Internet Header Length (IHL)
The second field (4 bits) is the Internet Header Length (IHL) telling the number of 32-bit words in the header. Since an IPv4 header may contain a variable number of options, this field specifies the size of the header (this also coincides with the offset to the data). The minimum value for this field is 5 (RFC 791), which is a length of 5×32 = 160 bits. Being a 4-bit value, the maximum length is 15 words (15×32 bits) or 480 bits."

IPv4 - Wikipedia, the free encyclopedia


Doyle says you can have a maximum header size of 6 x 32-bit words = 192 bits / 8 bytes = 24 bytes. You can't use all 4 bits?

Can someone shed some light on this please
RFCs: the other, other, white meat.

Comments

  • dynamikdynamik Banned Posts: 12,312 ■■■■■■■■■□
    Four bits just allows you to specify a value from 0-15, which includes more values than you need since six is the maximum. You also have four bits allocated for the version, and I don't think IP goes up to 15 (yet). It's just a little extra room that was included for flexibility. I believe that's what you're asking about.
  • CChNCChN Member Posts: 81 ■■□□□□□□□□
    I hear you, but I'm wondering why he thinks you can only have a maximum of 6 words. We need a minimum of 5 words for the standard header (with 0 options), but we can have a variable number of Options words. Doyle is saying a maximum of 6 words for the header which means only one word in the Options field is allowed. That's hardly "variable"


    Not sure if this is a credible source but it explains what I'm getting at:

    IP Packet Structure - Computer Science Now
    RFCs: the other, other, white meat.
  • billscott92787billscott92787 Member Posts: 933
    Quote: "header in terms of 32-bit words - five for the minimum 160-bit size and six for the maximum"


    He is getting it from the 160 / 32 = 5. minimum. But, the maximum IDK where that is coming from.

    According to Wikipedia:


    "Being a 4-bit value, the maximum length is 15 words (15×32 bits) or 480 bits."

    See it here: http://en.wikipedia.org/wiki/IPv4
  • CChNCChN Member Posts: 81 ■■□□□□□□□□
    Yes, I already quoted that. Doyle is wrong. It's an error in the text. Thanks
    RFCs: the other, other, white meat.
Sign In or Register to comment.