Networking Devices: Hub, Switch, and Router

Jun 30, 2024

Lecture on Networking Devices: Hub, Switch, and Router

Introduction

  • Purpose: Explain the differences between a hub, a switch, and a router.
  • Overview: All three devices connect networked devices but handle data differently.

Hub

  • Function: Connects network devices within an internal network.
  • Structure: Has multiple ports for Ethernet connections.
  • Operation:
    • Non-intelligent device; does not filter data.
    • Rebroadcasts incoming data packets to all ports.
    • All devices receive the data, creating unnecessary traffic and security concerns.

Switch

  • Function: Similar to a hub but more efficient.
  • Structure: Also has multiple ports for Ethernet connections.
  • Operation:
    • Intelligent device; learns physical (MAC) addresses of connected devices.
    • Directs incoming data packets to the intended destination port.
    • Reduces unnecessary traffic on the network.
  • Comparison to Hub:
    • Hub: Only detects physical connection, rebroadcasts data to all ports.
    • Switch: Detects specific devices using MAC addresses, directs data to specific ports.

Local Area Networks (LAN)

  • Usage: Hubs and switches are used for data exchange within a LAN, such as home or business networks.
  • Limitation: Cannot exchange data outside their own network (e.g., on the Internet) as they do not read IP addresses.

Router

  • Function: Routes or forwards data from one network to another.
  • Operation:
    • Inspects data packets' IP addresses.
    • Determines if packets are meant for its own network or another network.
    • Forwards packets to the intended network or rejects them if not.
  • Example:
    • Private network (red network) accepts only red data packets, rejects others like yellow, blue, green, etc.

Internet Networking

  • Expansion: Multiple networks with routers connecting over the internet.
  • Intra-network Communication: Networks exchange data within their own network using hubs or switches.
  • Inter-network Communication: Data packets leave one network, are routed through the internet, and reach another network's router, which then forwards them to the intended destination.

Conclusion

  • Summary:
    • Hubs and switches are used to create and manage local networks.
    • Routers connect these networks to other networks (e.g., the internet).