Where packets are stamped with IP addresses and routed across network borders.
PDU: Packet
Focus: Inter-Network Routing
Hardware: Routers / Layer 3 Switches
Core Purpose & Function
The Network Layer is where the boundaries of local networks (LANs) are crossed. While Layer 2 can only talk to immediate neighbors on the same cable or switch, Layer 3 is what allows packets to travel across routers, ISPs, and undersea cables to reach a server on the other side of the globe.
Key Responsibilities
Logical Addressing: Wrapping segments in IP packets, stamping them with source and destination IP addresses.
Routing & Path Selection: Routers calculate the optimal path through the global mesh using routing tables and algorithms (e.g. OSPF, BGP, RIP).
Packet Fragmentation: Splitting large packets into smaller fragments if they exceed the MTU of a router interface, and setting flags to enable reassembly.
Congestion Avoidance: Dropping or throttling packets when router queues fill up.
Common Protocols at Layer 3
| Protocol | Full Name | Purpose |
|---|---|---|
| IPv4 | Internet Protocol version 4 | 32-bit logical addressing system (most common) |
| IPv6 | Internet Protocol version 6 | 128-bit next-generation addressing system |
| ICMP | Internet Control Message Protocol | Sends diagnostic messages and error reports (used by ping) |
| IPSec | Internet Protocol Security | Provides authentication and encryption for Layer 3 packets (VPN tunnels) |