The Structure of an IP Packet

LAN cables in routers, used an nodes in IP networks
LAN cables in routers, used an nodes in IP networks. Mongkol Nitirojsakul/EyeEm/Getty

Most network data transmission technologies use packets to transmit data from a source device to a destination device. The IP protocol is not an exception. IP packets are the most important and fundamental components of the protocol. They are structures that carry data during transmission. They also have a header that contains information helping them to find their way and to reassemble after transmission.


The two main functions of the IP protocol are routing and addressing. To route packets to and from machines on a network, IP (the Internet Protocol) uses IP addresses which are carried along in the packets. 

The brief descriptions in the picture are meaningful enough to give you an idea of the function of the header elements. However, some might not be clear:

  • The identification tag is used to help reassemble the packet from several eventual fragments. When data is sent over a network, it is broken down into small sections which are enveloped in these packets. IP networks, such as the Internet, are normally not secure, so packets can be lost, can be delayed, and can arrive in the wrong order. Once they arrive at the destination, the identification tag helps to identify the packet and to reassemble the data back to its original form. 
  • The fragmented flag states whether the packet can be fragmented or not.
  • The fragment offset is a field to identify which fragment this packet is attached to.
  • Time to Live (TTL) is a number that indicates how many hops (router passes) the packet can make before it dies. Normally, at each router, a packet is analyzed and based on the information present at that router on other neighboring routers, a choice is made as to which route is best. The packet is then forwarded to that next router. In this configuration, a packet may well go round. There is also flooding as another method, which implies sending a copy of the packet to each neighboring router; then only the target machine consumes the packet. Other packets will keep roaming. TTL is a number, normally 255, which decreases each time a packet passes a router. This way, redundant packets will ultimately die once the TTL reaches zero. 
  • The header checksum is a number used for error detection and correction during packet transmission. The data in the packet is fed into a mathematical algorithm that results in a sum, which is sent along with the data in the packet. Upon reception, this sum is calculated again using the same algorithm. If it is the same as the original sum, the data is good, else it is considered corrupt and the packet discarded. 
  • The payload which is the actual data being carried. Notice that data payload can be up to 64 KiloBytes, which is huge compared to the totality of the header bits.