switches_and_hubs - dwilson2547/wiki_demo GitHub Wiki
- A switch is a Layer 2 (Data Link Layer) device that intelligently forwards data between devices in a Local Area Network (LAN).
- It uses MAC addresses to determine where to send data, ensuring efficient and secure communication.
- MAC Address Learning: Switches build a MAC address table by learning which devices are connected to which ports.
- Frame Forwarding: When a device sends data (e.g., an Ethernet frame), the switch checks the destination MAC address and forwards the frame only to the correct port.
- Collision Domains: Each port on a switch operates in its own collision domain, reducing network congestion.
- Full-Duplex Communication: Switches allow devices to send and receive data simultaneously, improving performance.
- A hub is a Layer 1 (Physical Layer) device that broadcasts all incoming data to every connected device.
- It does not use MAC addresses or make forwarding decisions.
- All devices connected to a hub share the same collision domain, leading to inefficiencies and congestion.
Feature | Switch | Hub |
---|---|---|
Layer | Operates at Layer 2 (Data Link) | Operates at Layer 1 (Physical) |
Forwarding | Forwards data only to the intended port | Broadcasts data to all ports |
Collision Domains | Each port is its own collision domain | All ports share one collision domain |
Performance | Faster, more efficient | Slower, prone to collisions |
Intelligence | Learns MAC addresses | No intelligence; just repeats signals |
Duplex Mode | Supports full-duplex communication | Only supports half-duplex |
Security | More secure (data only sent to intended recipient) | Less secure (data broadcasted to all devices) |
- Efficiency: Switches reduce unnecessary traffic by sending data only where it’s needed.
- Performance: Switches support full-duplex communication, doubling bandwidth.
- Scalability: Switches handle more devices without degrading performance.
- Security: Switches isolate traffic, reducing the risk of eavesdropping.
- Hub: If Device A sends data to Device B, all devices (C, D, E) receive the data, even if it’s not for them.
- Switch: If Device A sends data to Device B, only Device B receives it.
- Switches: Used in all modern networks (home, office, data centers).
- Hubs: Obsolete in most applications but may still be found in legacy systems or simple setups.
- Unmanaged Switches: Plug-and-play, no configuration.
- Managed Switches: Allow advanced features like VLANs, QoS, and monitoring.
- Smart Switches: A middle ground with limited management features.