TCP/IP Model·Lesson 5 of 8
Internet Layer
Getting Packets Across the World
The internet layer sits below the transport layer, and it has one big job: move data across network boundaries — out of your local network, through many others in between, and on to a destination that could be anywhere on Earth. It does this by giving every device an and wrapping each chunk of data into a stamped with a source and destination address. The name says it all: this is the layer that makes the inter-net — a network of networks — actually work.
The core idea
The internet layer adds source and destination IP addresses to every packet, then lets routers pass it along, hop by hop, toward its destination. It's best-effort — it tries hard but makes no promise the packet arrives.
The postal sorting office
Picture a letter passing through a chain of postal sorting offices. No single office knows the whole route. Each one just reads the destination address, decides the best next office to send it to, and passes it on. Eventually the letter arrives. Routers work exactly like those sorting offices: each reads a packet's destination IP address and forwards it one hop closer, without needing to know the entire path.
IP Addresses: Logical Addressing
An IP address is called a logical address because it's assigned by software and can change — unlike the permanent hardware address burned into a device. There are two versions in use. uses 32 bits, written as four numbers like 192.168.1.10, giving about 4.3 billion addresses. Because the world ran short of those, was introduced with 128 bits, written in hexadecimal groups like 2001:0db8:85a3::8a2e:0370:7334, giving a practically unlimited supply.
Routing: Choosing the Path
Getting a packet across the world is the job of — deciding which way to send it at each step. The devices that do this are : specialized machines that connect different networks together. When a packet reaches a router, the router reads its destination IP address, consults its routing table, and forwards the packet one closer to the target. A packet might pass through a dozen or more routers on its way across the internet.
Best-Effort Delivery
Here's something that surprises beginners: the internet layer does not guarantee delivery. IP is connectionless and best-effort, meaning it forwards each packet independently and does its best, but packets can be lost, duplicated, or arrive out of order. That's on purpose — it keeps the layer simple and fast. When reliability is needed, the above (specifically TCP) is the one that notices losses and asks for the missing pieces again.
Key Protocols Here
A handful of protocols do the work at this layer. IP itself handles addressing and packet delivery, while a few companions handle diagnostics and path-finding:
IP (IPv4 / IPv6)
The core protocol. Adds source and destination addresses to each packet and defines how packets are structured and delivered.
ICMP
The Internet Control Message Protocol carries error and status messages. The ping command uses it to test whether a host is reachable.
Routing protocols
Protocols like OSPF and BGP let routers share what they know so they can build routing tables and pick good paths.
IGMP
The Internet Group Management Protocol manages membership in multicast groups, used for sending one stream to many receivers.
“"Once my data reaches the internet layer, delivery is guaranteed."”
Q:What does the internet layer do, in a sentence?
A: It addresses each packet with source and destination IP addresses and routes it across networks, hop by hop, toward its destination — using IP for addressing and delivery, and helpers like ICMP for diagnostics. It's connectionless and best-effort, leaving reliability to the transport layer.
Quick Revision Cheat Sheet
Job: Address and route packets across networks
Addressing: IP addresses (IPv4 = 32-bit, IPv6 = 128-bit)
Key device: Router — forwards packets hop by hop
Delivery: Connectionless and best-effort (no guarantee)
Key protocols: IP, ICMP, IGMP, routing protocols
Data unit: Packet