3.6 Router & Switches

The Brains and Brawn of the Network

If cables are the roads of your data center, switches and routers are the intersections and highway ramps. A common mistake for beginners is using the terms interchangeably because a home "Wi-Fi Router" actually contains both. In the enterprise world, these are strictly separated, highly specialized pieces of hardware that operate at completely different layers of the OSI model.

1. The Switch: The Local Neighborhood (Layer 2)

A network switch is designed to do one thing: move massive amounts of data incredibly fast between computers that are in the exact same physical location (or the same VLAN).

2. The Router: The Post Office (Layer 3)

A switch is blind to the outside world. If a computer on a switch asks for a Google server, the switch drops the packet because Google is not plugged into one of its 48 ports. That is where the Router comes in.

3. Layer 3 Switches: The Enterprise Hybrid

In modern data centers, engineers face a problem: What if you have 100 VLANs inside the same building? Sending all that internal traffic up to a single physical Router just to cross a VLAN boundary creates a massive traffic jam.

4. (Addition) ARP: The Translator Between Layers

Stuff to add: If a switch only speaks MAC, and a router only speaks IP, how does your computer know how to send a packet? It uses ARP (Address Resolution Protocol).

Before your computer can send an IP packet to your router, it needs the router's physical MAC address to put on the outer envelope.

  1. The computer sends an ARP Broadcast shout to the entire switch: "Who has the IP address 192.168.1.1? Tell me your MAC address!"

  2. The router hears the shout and replies: "That is my IP. My MAC address is AA:BB:CC:DD:EE:FF."

  3. The computer saves this in its "ARP Cache," constructs the packet, and the switch delivers it perfectly. If ARP fails, your entire network stops functioning.

Powered by Forestry.md