๐ Networking Devices (Part 2) โ Bridges, Switches, and Routers | CN#5

In CN4, we explored cables, repeaters, and hubs. Now, letโs move to smarter devices that donโt just forward blindly โ they actually analyze and decide how data flows.
๐น Bridge
๐ธ What is a Bridge?
A bridge is a device that connects two or more LAN segments. Unlike hubs (which broadcast data everywhere), a bridge can look at the MAC address of each frame and decide whether to forward it or not.
Works at Layer 2 (Data Link Layer).
Introduced to reduce collisions and unnecessary traffic.

๐ธ How it Works
When a frame comes in:
The bridge checks the destination MAC address.
If the destination is on the same segment โ it filters (doesnโt forward).
If the destination is on another segment โ it forwards the frame only there.
Over time, it builds a MAC address table (like a memory map of which devices are connected to which port).
๐ธ Technical Details
Number of Ports: Usually 2 (but can be more).
Forwarding? โ Yes, based on MAC address.
Filtering? โ Yes, prevents unnecessary traffic.
Collision Domains: 1 per port (so if a bridge has 2 ports, it has 2 separate collision domains).
Broadcast Domains: Still 1 (doesnโt break broadcasts).
๐ธ Real World Example
Imagine an apartment building with two wings. A security guard (bridge) only lets residents cross wings if they actually need to go there, instead of allowing everyone to run around.
๐น Switch
๐ธ What is a Switch?
A switch is essentially a multi-port bridge, but much smarter and faster. It connects multiple devices and forwards frames only to the specific port where the destination device is.
Works at Layer 2 (some advanced ones at Layer 3 = โLayer 3 switchesโ).
Reduces both collisions and unnecessary traffic.

๐ธ How it Works
Maintains a MAC Address Table for all connected devices.
When a frame arrives, the switch looks up the MAC address.
Forwards only to the correct port, not to everyone.
Operates in full-duplex mode (no collisions).
๐ธ Technical Details
Number of Ports: 4โ48 (common), can be stacked for hundreds.
Forwarding? โ Yes, MAC-based.
Filtering? โ Yes, blocks irrelevant frames.
Collision Domains: 1 per port (so a 24-port switch = 24 collision domains).
Broadcast Domains: Still 1 (unless VLANs are configured).
๐ธ Real World Example
Think of a post office clerk who knows which desk each employee sits at. Instead of shouting, the clerk quietly hands your parcel to the right person.
๐น Router
๐ธ What is a Router?
A router is the brain of networking. Unlike bridges and switches, which only look at MAC addresses, a router looks at IP addresses and decides the best path to forward packets across different networks.
Works at Layer 3 (Network Layer).
Used to connect LANs to WAN (e.g., home network to the Internet).

๐ธ How it Works
Reads the destination IP address in the packet.
Uses a routing table (like a map) to determine where to forward it.
Can perform Network Address Translation (NAT), firewall filtering, and traffic prioritization.
Separates both collision and broadcast domains.
๐ธ Technical Details
Number of Ports: Typically 2+ (LAN + WAN), enterprise routers can have dozens.
Forwarding? โ Yes, based on IP addresses.
Filtering? โ Yes, applies access control and routing policies.
Collision Domains: 1 per port.
Broadcast Domains: Each interface is a separate broadcast domain (unlike switches).
๐ธ Real World Example
Think of Google Maps: It doesnโt just tell you which street is nearby (like a switch), it figures out the best route across cities to get you to your destination.
๐ Comparison Table
| Device | Ports | Forwarding | Filtering | Collision Domains | Broadcast Domains | Works At |
| Bridge | 2+ | โ MAC | โ Yes | Per port | 1 | Layer 2 |
| Switch | 4โ48+ | โ MAC | โ Yes | Per port | 1 (unless VLAN) | Layer 2 |
| Router | Multiple | โ IP | โ Yes | Per port | Per interface | Layer 3 |
โ
Stay tuned for CN #6: Exploring the OSI Model!
๐งต Follow the entire CN series to master networking step-by-step.




