Networking Devices: Repeaters, Hubs, Bridges, Switches, Routers & Gateways
---
1. Repeater (Layer 1 — Physical Layer)
A repeater is the simplest networking device — it operates purely at the physical layer.
Function
- Regenerates and amplifies a weakened/distorted signal
- Extends the maximum transmission distance of a cable segment
- Does not examine any addressing information — it blindly forwards every bit
Characteristics
| Feature | Detail |
|---|---|
| OSI Layer | Layer 1 (Physical) |
| Addressing | None — works on raw signal bits |
| Collision domain | Same as input — all connected segments form one collision domain |
| Filtering | None |
| Purpose | Extend cable distance (e.g., beyond 100m Ethernet limit) |
---
2. Hub (Layer 1 — Physical Layer)
A hub is a multi-port repeater — every signal received on any port is retransmitted on all other ports.
Why Hubs Are Inefficient
- Shared collision domain: All ports compete for the same bandwidth
- Half-duplex: Only one device can transmit at a time
- Wasted bandwidth: Every device receives every frame, even if not addressed to it
- Security risk: All devices can see all traffic (eavesdropping trivial)
Hubs are now obsolete — replaced entirely by switches in modern networks.
---
3. Bridge (Layer 2 — Data Link Layer)
A bridge connects two or more LAN segments and filters traffic based on MAC addresses.
How a Bridge Works
- When a frame arrives, the bridge records
{source MAC → incoming port}in its MAC address table - It checks if the destination MAC is in its table:
- If destination MAC is on the same side → drop the frame (no need to forward)
- If destination MAC is on the other side → forward the frame
- If destination MAC is unknown → flood (forward out all ports except incoming)
- Each port is in its own collision domain — eliminates inter-segment collisions
Bridge vs Switch
| Feature | Bridge | Switch |
|---|---|---|
| Ports | 2–4 | 24–48+ |
| Speed | Software-based MAC lookup | Hardware-based ASICs |
| Performance | Lower | Much higher |
| Use | Legacy segment joining | Modern LAN backbone |
---
4. Switch (Layer 2 — Data Link Layer)
A switch is a multi-port bridge with hardware-accelerated MAC address table lookups.
Switch Operation
- Learning: Records
{source MAC → port}for each frame received - Filtering: Drops frames destined for the same segment they came from
- Forwarding: Sends frame only to the correct destination port
- Flooding: If destination MAC unknown or broadcast → sends to all ports
Key Switch Features
| Feature | Detail |
|---|---|
| Collision domain | One per port (full duplex possible) |
| Broadcast domain | One per VLAN (all ports by default) |
| Addressing | MAC address table (CAM table) |
| Speed | Wire-speed forwarding via hardware ASICs |
| VLANs | Can segment network logically without physical rewiring |
Layer 3 Switches
Modern "Layer 3 switches" can perform IP routing in hardware — combining switch speed with router functionality. Used in enterprise LAN cores.
---
5. Router (Layer 3 — Network Layer)
A router routes IP packets between different networks using routing tables.
Router Operation
- Receives an IP packet, examines the destination IP address
- Looks up the destination in the routing table (longest prefix match)
- Determines the next hop and outgoing interface
- Decrements TTL by 1; if TTL reaches 0, drops packet and sends ICMP Time Exceeded
- Forwards packet out the appropriate interface
Router Key Features
| Feature | Detail |
|---|---|
| OSI Layer | Layer 3 (Network) |
| Addressing | IP addresses (logical, 32-bit IPv4 or 128-bit IPv6) |
| Collision domain | Separate per interface |
| Broadcast domain | Separate per interface — routers do NOT forward broadcasts |
| Routing decisions | Based on routing table (static, RIP, OSPF, BGP) |
| NAT/PAT | Can translate private IPs to public IPs |
| Firewall | Often combined with basic packet filtering |
How Routers Differ from Switches
| Feature | Switch (Layer 2) | Router (Layer 3) |
|---|---|---|
| Forwarding basis | MAC address | IP address |
| Broadcast domain | One (all ports) | Separate per interface |
| Routing protocol | None | RIP, OSPF, BGP |
| Cross-network | No (same network only) | Yes (different networks) |
| Speed | Hardware (ASIC) | Historically slower; now fast too |
---
6. Gateway (Layer 4–7)
A gateway provides protocol translation between two networks that use fundamentally different protocols.
| Type | Function | Example |
|---|---|---|
| Protocol gateway | Translates between protocols (TCP/IP ↔ IPX/SPX) | Legacy NetWare integration |
| Email gateway | Converts between email protocols (SMTP ↔ X.400) | Enterprise email systems |
| Voice gateway | Converts VoIP (SIP/RTP) ↔ PSTN (analogue/digital voice) | VoIP to telephone line |
| Default gateway | The router a host sends packets to when destination is outside its subnet | Home router |
Exam Tip (High Frequency): Repeater/Hub = Layer 1 (no addressing). Bridge/Switch = Layer 2 (MAC address). Router = Layer 3 (IP address). Gateway = Layer 7 (application protocol translation). The phrase "default gateway" in networking refers to the router that handles traffic to other networks — it is NOT a true application-layer gateway in the strict sense.
---
Study Deep: Switch vs Router in Modern Networks
- VLANs blur the line: With VLANs, a single switch can segment a network into multiple broadcast domains — something only routers could do in the past. But inter-VLAN routing still requires a router (or Layer 3 switch).
- Spanning Tree Protocol (STP): Networks with multiple switches create redundant paths. STP prevents broadcast storms (infinite loops) by blocking redundant paths and activating them only on failure.
- SDN (Software-Defined Networking): Modern data centres separate the control plane (routing decisions) from the data plane (packet forwarding), allowing centralised, programmable control of all switches and routers.