The Internet Protocol (IP) is the network-layer protocol that gives every host a numeric address and moves self-contained units of data, called packets or datagrams, from a source to a destination across interconnected networks. It is the common layer beneath all other Internet protocols: HTTP, QUIC, SSH, NTP and MQTT all ride on IP, whether through TCP or UDP. Two versions are in use, IPv4 defined in RFC 791 and IPv6 defined in RFC 8200.
IP deliberately offers a best-effort, connectionless service. It does not guarantee delivery, ordering or freedom from duplication, and it leaves those duties to transport protocols and applications. This minimal design, often called the end-to-end principle, is the main reason the Internet scaled to billions of devices.
How the Internet Protocol delivers packets
The Internet Protocol delivers data by hop-by-hop forwarding. A sending host wraps a transport segment in an IP header that carries the source and destination addresses, then hands the packet to the next router. Each router looks up the destination in its forwarding table using longest-prefix match, decrements a hop counter, and passes the packet on until it reaches the destination network.
Routers keep no per-connection state, so packets of the same conversation may take different paths and arrive out of order. If a router cannot forward a packet, it discards it and may send an error message through ICMP. The hop counter, called TTL in IPv4 and Hop Limit in IPv6, prevents packets from circulating forever in a routing loop.
The table shows how responsibilities are divided between IP and the layers around it.
| Layer | Example protocols | Responsibility |
|---|---|---|
| Application | HTTP, SSH, NTP | Meaning of the data |
| Transport | TCP, UDP, QUIC | Ports, reliability, ordering |
| Internet | IPv4, IPv6, ICMP | Addressing and routing |
| Link | Ethernet, Wi-Fi | Delivery on one local segment |
IPv4 and IPv6 header structure
Both versions place a fixed set of control fields in front of the payload, but IPv6 simplified the header to speed up forwarding. The IPv4 header is 20 to 60 bytes long because of optional fields, while the IPv6 base header is a constant 40 bytes, with optional features moved into extension headers.
| Function | IPv4 field | IPv6 field |
|---|---|---|
| Version | Version = 4 | Version = 6 |
| Loop protection | Time to Live | Hop Limit |
| Payload type | Protocol | Next Header |
| Traffic class | DSCP and ECN | Traffic Class and ECN |
| Integrity | Header checksum | None, left to other layers |
| Fragmentation | Identification, flags, offset | Fragment extension header |
| Flow handling | Not available | 20-bit Flow Label |
Removing the header checksum in IPv6 spares every router a recalculation at each hop, since link layers and transport protocols already detect corruption. The Next Header chain lets IPv6 add routing, fragmentation or security options without changing the base format.
Addressing, prefixes and fragmentation
An IP address identifies a network interface, not a person or device as a whole. Addresses are split into a network prefix and a host part, written in CIDR notation such as 192.0.2.0/24 or 2001:db8::/32. Routers advertise prefixes, not individual addresses, which keeps global routing tables manageable.
| Property | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Address space | About 4.3 billion | About 3.4 × 10^38 |
| Notation | Dotted decimal | Hexadecimal groups with colons |
| Typical subnet | /24 or smaller | /64 per link |
| Configuration | DHCP or manual | SLAAC, DHCPv6 or manual |
| Address sharing | NAT is common | Global addresses are normal |
Every link has a maximum transmission unit (MTU), commonly 1,500 bytes on Ethernet. IPv4 routers may fragment oversized packets unless the DF (do not fragment) flag is set, while IPv6 routers never fragment and only the sender may do so. Senders therefore rely on Path MTU Discovery, which depends on ICMP Packet Too Big messages reaching them; filtering those messages causes the familiar black-hole connection symptom.
How IP relates to neighboring protocols
IP is often confused with the protocols that run on top of it or alongside it. The comparison below clarifies what each one adds and why IP remains intentionally minimal.
| Protocol | Layer | What it adds to IP |
|---|---|---|
| ICMP | Internet | Error reporting and diagnostics |
| TCP | Transport | Reliable ordered byte stream |
| UDP | Transport | Ports and an optional checksum only |
| QUIC | Transport over UDP | Encrypted multiplexed streams |
| TLS | Above transport | Authentication and encryption |
| IPsec | Internet | Packet-level security for IP itself |
The common shorthand TCP/IP names the whole suite, not a single protocol. Tools such as ping and traceroute work at the IP and ICMP level, which is why they can reveal routing problems even when no application is running.
Limitations and common misconceptions
Because IP is best effort, many expectations attached to it are incorrect. The most frequent misconceptions and their corrections are:
- An IP address is not a precise location. Geolocation databases estimate it and are often wrong at city level.
- IP does not guarantee delivery. Loss, reordering and duplication are normal and handled above IP.
- NAT is not a security control. It hides addresses as a side effect, while a firewall enforces policy.
- IPv6 is not an extension of IPv4. The versions are not wire-compatible and need dual stack, translation or tunneling.
- The source address is not authenticated. Spoofing is possible unless networks apply ingress filtering.
Operationally, the biggest challenge remains the long IPv4 to IPv6 transition. Most networks run dual stack for years, and clients use Happy Eyeballs logic to try both versions and keep the faster connection.
In everyday language
The Internet Protocol works like the address system of a postal service. Every device gets an address, and data is cut into small envelopes that each carry the sender and recipient addresses.
Sorting centers, which are routers, read only the destination and pass each envelope one step closer. They do not promise that every envelope arrives or arrives in order; other protocols check that later. That simple job is what lets the whole Internet work.
Seen in the real world
A mid-sized university enables IPv6 on its campus network, which already uses IPv4 with NAT for about 18,000 students and staff. The network team assigns a /48 prefix from its provider, gives every building a /56 and every VLAN a /64, and lets laptops configure themselves through SLAAC while servers keep static addresses.
Shortly after rollout, some users report that large file downloads stall while small web pages load. The team traces the problem to a firewall that drops ICMPv6 Packet Too Big messages on a tunneled link with a 1,480-byte MTU, so Path MTU Discovery fails. Allowing those ICMPv6 messages resolves the stalls immediately.
After six months, more than half of campus traffic runs over IPv6, mostly to large content and cloud providers, and the load on the IPv4 NAT gateways drops accordingly.