IP header


An IP header is header information at the beginning of an IP packet which contains information about IP version, source IP address, destination IP address, time-to-live, etc.
Two different versions of IP are used in practice today: IPv4 and IPv6. The IPv6 header uses IPv6 addresses and thus offers a much bigger address space but is not backwards compatible with IPv4.

IPv4

is the fourth version in the development of the Internet Protocol, and routes most traffic on the Internet. The IPv4 header includes thirteen mandatory fields and is as small as 20 bytes. A fourteenth optional and infrequently used options field can increase the header size.

IPv6

, the successor to IPv4, has been defined and is in various stages of production deployment, and has a different header layout.
An IPv6 packet is the smallest message entity exchanged via the Internet Protocol across an IPv6 network. Packets consist of control information for addressing and routing, and a payload consisting of user data. The control information in IPv6 packets is subdivided into a mandatory fixed header and optional extension headers. The payload of an IPv6 packet is typically a datagram or segment of the higher-level transport layer protocol, but may be data for an internet layer or link layer instead.