OSI Model·Lesson 6 of 12
Layer 3 — Network
Getting Across Networks
Layer 2 can deliver data between two devices on the same local network. But the internet is millions of separate networks joined together — so how does data get from your home network to a server on the other side of the planet? That's the Network layer (Layer 3). Its job is to give every device a network-wide address and to figure out a route that carries data across all the networks in between.
The one-liner
Layer 3 handles logical addressing and routing across networks. It gives each device an IP address and decides the path a packet should take across multiple networks to reach its destination.
The postal sorting network
When you post a letter across the country, no single postal worker carries it the whole way. Instead, a chain of sorting centers each reads the address and decides the next center to send it to, until it reaches the right town. The Network layer is that chain of sorting centers: each router along the way reads the destination address and picks the next hop toward it.
What It's Responsible For
The Network layer's tasks all revolve around one goal: getting a packet from a source network to a destination network, however far apart they are.
Network layer responsibilities
- Logical addressing — giving every device an IP address that identifies it across networks, not just locally
- Routing — choosing a path from the source network to the destination network across many possible routes
- Forwarding — moving each packet from the incoming link to the correct outgoing link at every router
- Fragmentation — splitting a packet into smaller pieces when a link can't carry its full size, and reassembling later
IP Addresses
The address that makes this possible is the . Unlike a MAC address, which is fixed to your hardware, an IP address is a logical address assigned to a device based on the network it's on — so it can change when you move to a different network. An IPv4 address looks like 192.168.1.10: four numbers separated by dots. It's the address routers read to decide where to send your data.
So the two addresses work as a team. The IP address (Layer 3) says which network and device the data is ultimately headed for, while the MAC address (Layer 2) handles each individual hop along the way. At every router, the packet keeps its final IP address but gets a fresh MAC address for the next leg of the trip.
Routing and Routers
The device that does the work at this layer is the . A router sits at the boundary between networks. When a packet arrives, the router looks at the destination IP address, consults its list of known routes, and forwards the packet toward the next network on the path. Your home router is the first one your data meets — it connects your local network to your internet provider.
“"The Network layer guarantees your data arrives safely and in order."”
Q:What is the role of the Network layer?
A: It moves packets across multiple networks from source to destination. It assigns logical IP addresses, routes packets by choosing a path, forwards them hop by hop, and fragments them when a link's size limit requires it. Its PDU is the packet, its main protocol is IP, and the router is its device. It offers best-effort delivery, not guaranteed delivery.
Quick Revision Cheat Sheet
Layer number: 3
Job: Route packets across networks, source to destination
PDU (data unit): Packet
Addressing: IP (logical) address
Key tasks: Logical addressing, routing, forwarding, fragmentation
Main protocol: IP (Internet Protocol)
Device: Router
Delivery type: Best-effort (no guarantee)