Data encapsulation simply means adding the IP header to the data. The IP header consists of five or six 32-bit words; the sixth word is attributed to the IP options field.
Internet Header Length (IHL) IP determines the length of the header by the contents of the IHL.
The version field It refers to the version of the IP protocol in use. The current version of IP is 4.
The service type field It refers to any of the type of services that IP supports. Desired service type is normally specified by user-level applications. Examples of service type include minimum and maximum throughput, requested by applications such as the File Transfer Protocol (FTP) and Simple Mail Transfer Protocol (SMTP).
The total length field If it is subtracted from the IHL field, it indicates to IP the actual length of the data field.
The identification and the fragment fields These provide the necessary elements on which IP’s capability to fragment and reassemble data depends.
Header checksum field IP supports a header checksum field in its header though it is an unreliable protocol. IP uses this field to check the integrity of its own header only. If it does not pass the integrity check, the entire datagram is discarded. It is worth noting that IP does not report such failures to the protocol service users. Instead, it is the responsibility of the latter to detect them mainly by employing a suitable timeout mechanism.
The Time-To-Live (TTL) field TTL is employed by IP to prevent a lost datagram from endlessly looping around the network. IP achieves this objective by initializing the TTL field to the maximum number of routers that the packet can traverse on the network. Every time the datagram traverses a router, IP decrements the TTL field by 1.
The Source and destination IP addresses These provide the identification for the receiving and communicating hosts across the inter-network.
IP Options field On its presence, it includes optional control information. An example of optional information includes the route record, which includes a record of every router that the datagram traversed during its trip around the network.