LAN Topologies

Star Topology: All devices connect to a central switch or hub; reliable and scalable but a single point of failure.

Bus Topology: Devices share a single cable backbone; cost-efficient but prone to collisions and difficult troubleshooting.

Ring Topology: Each device is connected to two others in a closed loop; less cabling, but one failure brings down the whole network.

  • Devices

Switch:

switch is a device used in computer networks (especially LANs) to connect multiple devices—such as computers, printers, and servers—within the same network.
Key Functions:

  • Forwarding Data: Receives incoming data packets and intelligently forwards them only to the specific device (MAC address) intended, rather than broadcasting to all devices.

  • MAC Address Table: Maintains a table of all connected devices’ MAC addresses, allowing efficient and secure communication.

  • Network Segmentation: Divides the network into segments, reducing traffic and minimizing collision domains compared to older devices like hubs.

Hub:

Dumb version of switch, it sends the packets to all the devices in the network.

Router:

Key Functions:

  • Network Interconnection: Connects multiple networks—most commonly, a local area network (LAN) to the internet (a wide area network, WAN).
  • Routing Packets: Determines the best path for data packets to travel from source to destination across networks, using routing tables and protocols.
  • Assigns IP Addresses: Often functions as a DHCP server, assigning IP addresses to devices on the network.
  • Network Address Translation (NAT): Converts private internal IP addresses to a public IP address, allowing multiple devices to share a single internet connection.
  • Security Features: Basic firewalls and filtering to limit unwanted traffic.
Difference from a Switch:
  • router operates at the network layer (Layer 3 of the OSI Model), making decisions based on IP addresses.

  • switch operates at the data link layer (Layer 2), forwarding data based on MAC addresses and remains within a single network.