An IP packet is the smallest message entity exchanged via the Internet Protocol across an IP network.
IP packets consist of a header for addressing and routing, and a payload for user data.
The payload of an IP packet is typically a datagram or segment of the higher-level transport layer protocol, but may be data for an internet layer (e.g., ICMP or ICMPv6) or link layer (e.g., OSPF) instead.
Two different versions of IP are used in practice today: IPv4 and IPv6.
[1][non-primary source needed] The IPv4 header includes thirteen mandatory fields and is as small as 20 bytes.