The internet layer (IP) - finding the way by address
How do you cross many networks to reach a destination host? IP as a hierarchical address, routing that picks the next step at every hop, and the best-effort design that promises no delivery.
Recap
Part two came down to the scope of the link layer. A MAC address identifies a device uniquely but is a flat address with no location information, so the link layer can only deliver one hop within the same network.
This part’s question is what comes next. How do you cross many networks to reach the destination host?
IP addresses: hierarchical addresses that carry location
An IP address is a 32-bit value (IPv4), written like 203.0.113.10. The decisive difference from a MAC address is that it is hierarchical. The address splits into a network part and a host part, and two addresses with the same network part belong to the same network.
The boundary is expressed in CIDR notation. 192.168.0.0/24 means the leading 24 bits are the network part, and this network holds hosts from 192.168.0.1 through 192.168.0.254. A network carved out this way is called a subnet.
Because the address carries location, a router does not need to know billions of individual hosts. It only has to remember routes at network granularity — “anything toward 203.0.113.0/24 goes this way”. This is where the scalability that MAC addresses could never provide comes from.
Routing: choosing the next step at every hop
The sending host first decides whether the destination is on the same subnet. If it is, it delivers directly using ARP from part two; if not, it hands the packet to the preconfigured default gateway — the router.
A router holds a routing table. It compares the packet’s destination IP against the table, picks the most specific matching entry (longest prefix match), and passes the packet to the next router in that direction. If nothing matches, it sends it along the default route.
The important part is that no router knows the whole path. Each router decides only the next hop, and the packet converges on its destination hop by hop. So when a failure occurs mid-route, only the routers at that point need to update their tables; the rest of the internet does not have to know.
Here the picture from part two completes itself. Every time a packet passes through a router, the frame is stripped off and built anew.
Destination IP address: kept all the way to the end
MAC address: replaced at every hop (source/destination for this leg)
If IP is the address for the whole journey, MAC is the handoff address rewritten each time the courier changes.
Best-effort design: no promise of delivery
IP provides best-effort delivery only. If a packet is lost, duplicated, or arrives out of order, IP does not repair it. The problem we deferred in part one as the price of packet switching is one the IP layer deliberately declines to take on.
This is design, not defect. By leaving reliability to the layer above as a choice, routers can concentrate on forwarding packets fast rather than storing and tracking them, and applications that do not need reliability do not pay for it.
NAT and ICMP
IPv4 addresses are 32 bits — about 4.3 billion — which is not enough to give every device a public address. NAT (Network Address Translation) lets homes and offices use private addresses internally (192.168.x.x and friends) while the router translates outbound traffic to a single public address. It is the stopgap that extended IPv4’s life by decades and the default structure of virtually every home network today.
ICMP (Internet Control Message Protocol) is the IP layer’s diagnostic tool. ping uses ICMP echo request/reply to measure whether a host answers and how long the round trip takes; traceroute increases a packet’s TTL (Time To Live) from 1 upward to reveal the routers along the path, one hop at a time.
Summary
| Internet layer (IP) | |
|---|---|
| Unit of delivery | packet |
| Address | IP address (32-bit, hierarchical: network part + host part) |
| Route selection | routing table; only the next hop is decided at each step |
| Delivery guarantee | none (best-effort) |
| Scope | host to host |
The core point is this.
IP finds the way to the host, but promises nothing about arrival.
Coming up next
The packet has arrived at the destination host. But on that host a browser, a messenger, and a game are all communicating at once. Which process does this packet belong to? And who guarantees the reliability IP never promised? The next part covers TCP and UDP in the transport layer.