What a router actually does
When a device on your network wants to communicate with something outside its own network — a website, a server in another office, a cloud service — the traffic has to cross network boundaries. That's the router's job.
A router receives a packet, reads the destination IP address, looks up that address in its routing table, and forwards the packet out of the appropriate interface toward the destination. It does this for every single packet, millions of times per second in enterprise environments.
The key distinction to understand for the exam: switches use MAC addresses and operate at Layer 2. Routers use IP addresses and operate at Layer 3. A switch keeps traffic within a network; a router moves traffic between networks.
1. Packet arrives → Router receives packet on an interface 2. Read destination IP → Router inspects Layer 3 header for destination address 3. Check routing table → Finds best matching route (longest prefix match wins) 4. Forward packet → Sends packet out the correct interface toward next hop 5. Decrement TTL → Reduces Time To Live by 1 — prevents infinite loops
The routing table
The routing table is the router's map of the network. It stores known routes — destination networks, the next-hop router to send traffic to, and which interface to use. When a packet arrives, the router finds the most specific matching route and forwards accordingly.
Destination Next Hop Interface Source 192.168.1.0/24 directly connected eth0 Connected 10.0.0.0/8 192.168.1.1 eth0 Static 172.16.0.0/12 192.168.1.254 eth0 OSPF 0.0.0.0/0 203.0.113.1 eth1 Default route
When multiple routes match a destination, the router always uses the most specific route — the one with the longest subnet mask (highest prefix length). A /28 route beats a /24 route beats the default route /0.
The default route (0.0.0.0/0) matches everything and is used as a last resort when no more specific route exists — typically pointing toward the internet gateway.
Default gateway
The default gateway is the IP address of the router interface that a device uses to reach destinations outside its own subnet. When your laptop wants to load a website, it sends the traffic to the default gateway — the router — which then forwards it toward the internet.
If a device has no default gateway configured, it can only communicate with other devices on its own subnet. Any traffic destined for a different network simply has nowhere to go and is dropped. This is one of the most common causes of connectivity problems and appears regularly in troubleshooting scenarios on both A+ and Network+.
Static vs dynamic routing
NAT — Network Address Translation
NAT is one of the most important functions a router performs. It allows multiple devices on a private network to share a single public IP address when communicating with the internet.
Without NAT, every device would need its own public IP address — and with only around 4 billion IPv4 addresses available globally, this would have been exhausted long ago. NAT is why your home network can have 20 devices all using 192.168.x.x addresses while appearing to the internet as a single public IP.
| NAT Type | How it works | Use case |
|---|---|---|
| Static NAT | One private IP maps to one public IP — permanently | Hosting a server that needs a consistent public IP |
| Dynamic NAT | Private IPs mapped to a pool of public IPs as needed | Multiple users sharing a small pool of public IPs |
| PAT / NAT Overload | Many private IPs share one public IP using unique port numbers | Standard home/office internet connection — most common type |
Port Address Translation (PAT), also called NAT Overload, is the type of NAT used in virtually every home and small office router. All devices share one public IP, and the router tracks which internal device initiated each connection by assigning unique port numbers. When the reply comes back, the router uses the port number to route the response to the correct internal device.
Router vs wireless router vs access point
| Device | What it does | OSI Layer |
|---|---|---|
| Router | Forwards packets between networks based on IP addresses — connects networks | Layer 3 |
| Wireless Router | Router + switch + access point combined — the typical home device | Layer 2 / 3 |
| Access Point (AP) | Connects wireless clients to a wired network — does not route traffic between networks | Layer 2 |
| Switch | Connects devices within the same network using MAC addresses | Layer 2 |
Exam scenarios
Studying for A+ or Network+?
The study guides, practice exams, and free courses worth your time for both exams.