IP Header

2009 Mar 07


4 bit -
Version
4 bit -
Header Length
8 bit - TOS
Type Of Service
16 bit - Total Length
16 bit - identification R
F
D
F
M
F
13 bit - fragment offset
8 bit - Time To Live (TTL) 8 bit - Protocol 16 bit - Header Checksum
32 bit - Destination IP Address
32 bit - Source IP Address
...
Options (if any)
...
...
Data
...

Because of the particular nature of a transmission media in some cases long packets are better (e.g. large latency between ground and satellite), while for low latency cases shorter packets are better, the IP layer can break up longer Transport Layer packets into smaller fragments and is responsible for reassembly at the other end. This is called fragmentation.

IP Header Fields and Flags
  • Version : 4 is in common use today.
  • IHL : the Internet header length is the total length of the IP header
  • Type Of Service (TOS) : indicates how sensitive the traffic is to delays
  • UDP Total Length : total length of IP packet in bytes including header and data
  • Identification : used to assign a unique value to aid in fragment reassembly
  • RF : 0 reserved flag
  • DF : 0 means may fragment, 1 means don't fragment
  • MF : 0 means last fragment, 1 means more fragments
  • Fragment Offset : used to tell a system where the contents of this fragment
    should be put in the larger original packet
  • Time to Live (TTL) : Specifies the maximum number of router hops the packet
    should take as it crosses the network - and is decremented by each router
  • Protocol : describes the protocol being contained in this IP packet - typically TCP or UDP
  • Header Checksum : used to make sure the header is not corrupted - reclculated at each router
  • Source IP Address : specifies the network and host the packet is from
  • Destination IP Address : specifies the network and host the packet is for
  • Options : variable length fields containing extended information for the IP layer,
    in particular for source routing
  • Padding : used to round up the header length to be a multiple of 32 bits

2005-2009