Skip to main content
IP

Internet Protocol

Active

The principal communications protocol in the Internet Protocol suite for relaying datagrams across network boundaries.

Network LayerRFC 7911981Internet Standard

In one line

IP is the fundamental protocol of the internet, defined in RFC 791 (IPv4) and RFC 8200 (IPv6). It provides logical addressing (IP addresses) and best-effort packet routing across interconnected networks. IP operates at the network layer, fragmenting packets when needed, but provides no guarantees of delivery, ordering, or error correction – those are left to higher-layer protocols.

Quick Reference

FieldSizeDescription
Version4 bitsIP version (4 or 6)
IHL4 bitsInternet Header Length (IPv4 only, in 32-bit words, min 5)
DSCP/ECN8 bitsDifferentiated Services + Explicit Congestion Notification
Total Length16 bitsTotal datagram size including header (max 65,535 bytes)
TTL / Hop Limit8 bitsDecremented at each hop. Packet dropped at 0.
Protocol8 bitsNext-layer protocol (6=TCP, 17=UDP, 1=ICMP)
Header Checksum16 bitsError detection for header (IPv4 only)
Source IP32/128 bitsSender IP address
Destination IP32/128 bitsReceiver IP address

Key Characteristics

Routing

Routers forward packets hop-by-hop based on destination IP.

Best-effort

No delivery guarantees. Packets may be dropped at any router.

Fragmentation

IPv4 routers may fragment oversized packets. IPv6 requires source fragmentation.

Addressing

32-bit (IPv4) or 128-bit (IPv6) hierarchical address space.

Implementations

linuxbuilt-in
macosbuilt-in
windowsbuilt-in
freebsdbuilt-in
androidbuilt-in
iosbuilt-in

Edge cases

  • IPv4 exhaustion drove IPv6 adoption – IANA assigned the last /8 blocks in 2011.
  • IP fragmentation causes significant overhead and is avoided via PMTUD.
  • TTL=0 drops are reported via ICMP Time Exceeded – basis of traceroute.
  • IP spoofing (forged source addresses) is mitigated by BCP38 network ingress filtering.
  • IPv4-IPv6 transition mechanisms include NAT64, 6to4, Teredo.

History

IP was designed by Vint Cerf and Bob Kahn, first described in RFC 675 (1974) and standardized as IPv4 in RFC 791 (1981). IPv6 was standardized in 1998 (RFC 2460) and updated in 2017 (RFC 8200) to address IPv4 exhaustion.

Related protocols