Internet Protocol

The third network-level protocol is the Internet Protocol (IP), which provides unreliable, connectionless packet delivery for the Internet.

IP is connectionless because it treats each packet of information independently. It is unreliable because it does not guarantee delivery, meaning, it does not require acknowledgments from the sending host, the receiving host, or intermediate hosts.

IP provides the interface to the network interface level protocols. The physical connections of a network transfer information in a frame with a header and data. The header contains the source address and the destination address. IP uses an Internet datagram that contains information similar to the physical frame. The datagram also has a header containing Internet Protocol addresses of both source and destination of the data.

IP defines the format of all the data sent over the Internet.

Figure 1. Internet Protocol packet header
Internet Protocol packet header
This illustration shows the first 32 bits of a typical IP packet header. Table below lists the various entities.

IP header field definitions

Item Description
Version Specifies the version of the IP used. The current version of the IP protocol is 4.
Length Specifies the datagram header length, measured in 32-bit words.
Type of Service Contains five subfields that specify the type of precedence, delay, throughput, and reliability desired for that packet. (The Internet does not guarantee this request.) The default settings for these five subfields are routine precedence, normal delay, normal throughput, and normal reliability. This field is not generally used by the Internet at this time. This implementation of IP complies with the requirements of the IP specification, RFC 791, Internet Protocol.
Total Length Specifies the length of the datagram including both the header and the data measured in octets. Packet fragmentation at gateways, with reassembly at destinations, is provided. The total length of the IP packet can be configured on an interface-by-interface basis with the ifconfig command, or the System Management Interface Tool (SMIT) fast path, smit chinet. Use SMIT to set the values permanently in the configuration database; use the ifconfig command to set or change the values in the running system.
Identification Contains a unique integer that identifies the datagram.
Flags Controls datagram fragmentation, along with the Identification field. The Fragment Flags specify whether the datagram can be fragmented and whether the current fragment is the last one.
Fragment Offset Specifies the offset of this fragment in the original datagram measured in units of 8 octets.
Time to Live Specifies how long the datagram can remain on the Internet. This keeps misrouted datagrams from remaining on the Internet indefinitely. The default time to live is 255 seconds.
Protocol Specifies the high-level protocol type.
Header Checksum Indicates a number computed to ensure the integrity of header values.
Source Address Specifies the Internet address of the sending host.
Destination Address Specifies the Internet address of the receiving host.
Options Provides network testing and debugging. This field is not required for every datagram.
End of Option List
Indicates the end of the option list. It is used at the end of the final option, not at the end of each option individually. This option should be used only if the end of the options would not otherwise coincide with the end of the IP header. End of Option List is used if options exceed the length of the datagram.
No Operation
Provides alignment between other options; for example, to align the beginning of a subsequent option on a 32-bit boundary.
Loose Source and Record Route
Provides a means for the source of an Internet datagram to supply routing information used by the gateways in forwarding the datagram to a destination and in recording the route information. This is a loose source route: the gateway or host IP is allowed to use any route of any number of other intermediate gateways in order to reach the next address in the route.
Strict Source and Record Route
Provides a means for the source of an Internet datagram to supply routing information used by the gateways in forwarding the datagram to a destination and in recording the route information. This is a strict source route: In order to reach the next gateway or host specified in the route, the gateway or host IP must send the datagram directly to the next address in the source route and only to the directly connected network that is indicated in the next address.
Record Route
Provides a means to record the route of an Internet datagram.
Stream Identifier
Provides a way for a stream identifier to be carried through networks that do not support the stream concept.
Internet Timestamp
Provides a record of the time stamps through the route.

Outgoing packets automatically have an IP header prefixed to them. Incoming packets have their IP header removed before being sent to the higher-level protocols. The IP protocol provides for the universal addressing of hosts in the Internet network.