OSI Layer 3: Network Layer
You'll learn: How the network layer routes packets across multiple networks using logical addressing to find the best path from source to destination.
The Routing Challenge
At Layer 2 (Data Link), frames travel between devices on the same local network using physical MAC addresses. But what happens when you need to send data across the internet to a server thousands of miles away, crossing dozens of different networks? That's where Layer 3 steps in.
The Network Layer is responsible for logical addressing and routing. It determines how to get packets from any source device to any destination device across interconnected networks—even when they're not directly connected.
Logical Addressing
Instead of physical hardware addresses, Layer 3 uses logical addresses like IP addresses (e.g., 192.168.1.10). These addresses are hierarchical and location-aware, making routing decisions possible. Think of it like a postal address: the country, city, and street structure helps mail carriers decide which direction to send your letter at each step.
How Routing Works
Routers operate at Layer 3. When a packet arrives, the router examines the destination IP address and consults its routing table—a map of known networks and the best next hop toward each one. The router doesn't need to know the complete path; it just forwards the packet to the next appropriate router, which repeats the process. This hop-by-hop forwarding continues until the packet reaches its destination network.
Analogy: Interstate Highway System
Imagine driving cross-country. You don't need to know every turn—just which highway to take at each major junction. Each junction (router) reads your destination and points you toward the next segment. That's exactly how Layer 3 routing works.
Key Takeaway: The Network Layer routes packets across multiple networks using logical IP addresses and routing tables, enabling global internetwork communication through hop-by-hop forwarding decisions.