IP Packet

hassantalal785hassantalal785 Member Posts: 47 ■■□□□□□□□□
I read in a book that "Header Length" in IP packet indicates the header length in 32 bit words. Does this mean that if packet size is 60 octets the value in Header Length would be 15(1111 in binary) ?
There is also a field "Padding" it was written that padding is used as a filler to guarantee that the data starts on a 32 bit boundary.What does this mean ?

Comments

  • zrockstarzrockstar Member Posts: 378
    I think you might be confusing header length with total length. Total Length is the field that indicates the packet size. Header Length refers to how long the header is so the receiving host knows where the header ends and the data begins. The header gets padded with 0s to bring the header size up to a 32 bit boundary since the Header Length field is referring to the length in 32 bit words.
  • hassantalal785hassantalal785 Member Posts: 47 ■■□□□□□□□□
    What about my first question ?
  • NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    What about my first question ?

    I read in a book that "Header Length" in IP packet indicates the header length in 32 bit words. Does this mean that if packet size is 60 octets the value in Header Length would be 15(1111 in binary) ?
    No, even if the total length is 60 octets, the header length would still normally be 20 octets--in other words, "5" 32-bit words in decimal or hex. "0101" if you're in a binary mood!
Sign In or Register to comment.