1.6. The Forwarding Decision: How Devices Choose Paths
💡 First Principle: The fundamental difference between switches and routers is what address they look at to make forwarding decisions. Switches look at the destination MAC address (Layer 2) and forward within a broadcast domain. Routers look at the destination IP address (Layer 3) and forward between networks. The exam tests this distinction constantly—every "which device should you use?" question relies on understanding this.
Consider this troubleshooting scenario: A user can ping devices on their local subnet but can't reach a server on another subnet. Is this a switch problem or a router problem? The local pings work—so the switch is forwarding frames correctly. The cross-subnet traffic fails—so the router either doesn't have a route, has the wrong route, or isn't reachable. Knowing which device handles which traffic immediately narrows your troubleshooting.
What happens when the wrong device makes the decision: Imagine connecting two networks with just a switch (no router). Devices in network A can't reach network B—the switch only understands MACs, not IPs. Or imagine putting a router between devices on the same subnet—unnecessary latency and complexity. Right tool, right job.
Think of a switch as a mail sorter within an office building (routes to desks using employee IDs), while a router is the postal service (routes between buildings using street addresses).
Loading diagram...
Forwarding Decision Comparison:
| Device | Looks At | Decision Table | If Not Found | Scope |
|---|---|---|---|---|
| Switch | Dest MAC | MAC address table | Flood frame | Single VLAN |
| Router | Dest IP | Routing table | Drop or default route | Between networks |
| L3 Switch | Both | Both tables | Depends on traffic | Both |
The Switch Learning Process:
- Frame arrives on port
- Switch reads source MAC and adds to table (learning)
- Switch reads destination MAC and looks up in table
- If found: forward to that port. If not: flood to all ports except source.
The Router Lookup Process:
- Packet arrives
- Router reads destination IP
- Performs longest prefix match against routing table
- Forwards to next-hop IP or drops if no match
⚠️ Exam Trap: Switches flood unknown unicast, broadcast, and multicast frames. Routers do not forward broadcasts by default (this is why you need DHCP relay). This is a critical distinction for understanding broadcast domains.
Reflection Question: Why can a switch forward traffic immediately after power-on, while a router might need time before it can forward traffic?