IP packet
IP packet format
The IP packet format is shown in Figure 25. An IP header without the option field is 20 bytes in length.
Figure 25: The format and fields of an IP datagram
![](images/image25.png)
The protocol field in the header is 8-bit long. The protocol field value indicates the protocol type of the data.
Table 4 lists the recognizable protocol field values and protocols.
Table 4: Protocols corresponding to the protocol field values
Protocol field value | Protocol |
---|---|
1 | ICMP |
2 | IGMP |
4 | IPinIP |
6 | TCP |
8 | EGP |
17 | UDP |
47 | GRE |
50 | ESP |
51 | AH |
88 | EIGRP |
Flags field for fragmentation in the IP header
Figure 26 shows the format of the 3-bit flags in an IP packet.
Figure 26: Format of the 3-bit flags
![](images/image26.png)
The lower 2 bits of the flags field control IP packet fragmentation. The 3 bits in the flags field are defined as follows:
Reserved—Must be 0.
Do not fragment—0 indicates fragmentation is allowed, and 1 indicates fragmentation is forbidden.
More fragments—0 indicates the packet is the last fragment, and 1 indicates it is not the last fragment.
The 3-bit flags field 001 indicates the IP packet is an IP fragment. The 3-bit flags field 000 indicates the IP packet is the last IP fragment.