Connecting Devices in Computer Networks
Connecting Devices in Computer Networks
Connecting devices are used to connect computers within a network and to connect different networks to form an internetwork. They operate at different layers of the Internet protocol model depending on their functions.
There are three main types of connecting devices:
Repeaters or Hubs — Physical layer
Link-layer Switches — Physical and data-link layers
Routers — Physical, data-link, and network layers
1. Repeater or Hub
A repeater is a physical-layer device that regenerates and retimes signals before they become too weak to be received reliably. It helps extend the distance over which signals can travel.
A hub is a multiport repeater used to connect multiple devices in a LAN.
How a hub works:
It receives a signal through one port.
It regenerates the signal to restore its strength and timing.
It forwards the signal through all other ports, except the port through which it arrived.
All connected stations receive the transmission, but only the intended recipient keeps and processes the frame.
Important characteristics:
Operates at the physical layer.
Does not examine MAC addresses.
Has no filtering capability.
Does not have a link-layer address of its own in the textbook's description.
Example: If computer A sends a frame to computer B through a hub, the hub forwards the signal to all other connected computers.
2. Link-Layer Switch
A link-layer switch, also called a two-layer switch, operates at both the physical layer and the data-link layer. It regenerates signals and examines MAC addresses to decide where frames should be forwarded.
How a switch works:
It receives a frame and examines its source and destination MAC addresses.
It consults its switching table to identify the outgoing port.
If the destination port is known, it forwards the frame only through that port.
If the destination is unknown, it floods the frame through the other ports.
Learning in a switch
A transparent switch builds its switching table automatically by examining the source MAC address of incoming frames and recording the port on which each source is found.
For example, if computer A sends a frame through port 1, the switch learns that A is reachable through port 1. Later, frames destined for A can be forwarded through that port.
Important characteristics:
Operates at the physical and data-link layers.
Uses MAC addresses for filtering and forwarding.
Learns MAC-address-to-port mappings automatically.
Does not change the source and destination MAC addresses of a forwarded frame.
- Transparent switches are designed to prevent loops.
3. Router
A router, also called a three-layer device , operates at the physical, data-link, and network layers. It connects different networks and forwards IP datagrams toward their destinations.
How a router works:
It receives a frame through one of its interfaces.
It removes the data-link header and examines the IP datagram.
It checks the destination IP address and consults its forwarding table.
It determines the next hop and selects the outgoing interface.
It encapsulates the datagram in a new frame with appropriate link-layer addresses.
It sends the new frame over the next link.
Important characteristics:
Operates at three layers: physical, data-link, and network.
Uses IP addresses to make routing decisions.
Has IP and link-layer addresses for each interface.
Changes the link-layer source and destination addresses when forwarding a datagram to the next link.
Connects different networks to form an internetwork.
Comparison of Connecting Devices
Feature | Repeater / Hub | Link-layer Switch | Router |
|---|---|---|---|
Layers | Physical | Physical + Data-link | Physical + Data-link + Network |
Main function | Regenerates and forwards signals | Filters and forwards frames | Routes datagrams between networks |
Address examined | None | MAC address | MAC and IP addresses |
Forwarding decision | Sends to all other ports | Uses switching table | Uses forwarding table |
Changes MAC addresses when forwarding | Not applicable to its signal regeneration | No | Yes |
Connects | LAN segments or devices | Devices within a LAN | Different networks |
Summary
Repeater / Hub
Regenerates signals and forwards them to other ports without examining MAC addresses.
Switch
Uses MAC addresses and a switching table to forward frames through appropriate ports.
Router
Uses IP addresses and a forwarding table to send datagrams between networks.
Easy way to remember: A hub forwards signals, a switch forwards frames, and a router forwards IP datagrams between networks.







Comments
Post a Comment