How Routers Work
- Networking Fundamentals & OSI Model
- TCP/IP Model
- Network Topologies
- IP Addressing & Subnetting
- Routing Algorithms & Protocols
- Switching Concepts
- Transport Layer Protocols (TCP & UDP)
- Application Layer Protocols
- Network Security & Firewalls
- Wireless Networking & Wi-Fi
- Network Address Translation (NAT)
- DNS Deep Dive
- Congestion Control & Flow Control
- Error Detection & Correction
- Network Devices
- VPN & Tunneling
- Load Balancing & CDN Networking
- Socket Programming
- Network Troubleshooting Tools
- Physical Layer & Transmission Media
- Data Link Layer & MAC Addressing
- Ethernet Protocol
- ARP (Address Resolution Protocol)
- ICMP Protocol
- Unicast, Multicast, Broadcast and Anycast
- Proxy Servers
- Port Numbers Reference
- Network Performance Metrics
- Quality of Service (QoS)
- Software-Defined Networking (SDN)
- HTTP/2 and HTTP/3 Overview
- 5G and Mobile Networks
- IoT Networking Basics
- VoIP Networking Basics
A Router's One Job: Connecting Different Networks
While a switch forwards traffic within one local network based on MAC addresses, a router forwards traffic between different networks entirely, based on IP addresses - it's the device that actually connects a home network to the wider internet.
The Routing Table: A Router's Map
A router maintains a routing table listing known destination networks and which direction (which outgoing interface, or which next-hop router) to send traffic toward for each one.
Destination Network Next Hop
192.168.1.0/24 Directly connected (local network)
0.0.0.0/0 (everything else) Send to ISP's router (the "default route")The Default Route: What Handles "Everything Else"
The special entry 0.0.0.0/0 is a catch-all: any destination not explicitly matched by a more specific route in the table gets sent this way instead - typically toward the ISP, for anything beyond the local network. This is exactly what lets a home router send all outbound internet traffic somewhere sensible without needing a specific rule for every possible destination on earth.
Making a Forwarding Decision, Step by Step
- A packet arrives with a destination IP address.
- The router checks its routing table for the most specific matching entry.
- The packet is forwarded out the corresponding interface toward the next hop.
- This repeats at every router the packet passes through, until it reaches a router directly connected to the destination network.
Router vs Switch: The Core Distinction
A switch operates within one local network (Layer 2, MAC addresses); a router operates between separate networks (Layer 3, IP addresses). This is precisely why routers are the devices that make the internet's interconnected structure of countless independent networks actually possible.