The operation of devices is related to different layers as illustrated below:
Repeaters:
- The repeater operates in the physical layer.
- These are analog devices that work with signals on the cables to which they are connected.
- A signal appearing on one cable is regenerated and put out on another cable. Hence it extends the physical length of LAN.
- Repeaters do not understand frames, packets or headers. They understand the symbols that encode bit as volts.
- Classic Ethernet, for example, was designed to allow four repeaters that would boost the signal to extend the maximum cable length from 500 meters to 2500 meters.
Hub:
- A hub has a number of input lines that it joins electrically. Active hub and passive hub are two types of hubs.
- Frames arriving on any of the lines are sent out on all the others. It is broadcast device. If two frames arrive at the same time, they will collide, just as on a coaxial cable.
- All the lines coming into a hub must operate at the same speed. Hubs differ from repeaters in that they do not boost the incoming signals and are designed for multiple input lines, but the differences are slight.
- Like repeaters, hubs are physical layer devices that do not examine the link layer addresses or use them in any way. It is not an intelligent device.
Bridge:
- A bridge connects two or more LANs. It operates at data link layer.
- Like a hub, a modern bridge has multiple ports, usually enough for 4 to 48 input lines of a certain type. Unlike in a hub, each port is isolated to be its own collision domain.
- When a frame arrives, the bridge extracts the destination address (for Ethernet, it is 48 bit) from the frame header and looks it up in a table to see where to send the frame.
- The bridge only outputs the frame on the port where it is needed and can forward multiple frames at the same time.
- Filtering, forwarding and blocking of frames are functions of bridges.
- Bridges offer much better performance than hubs and the isolation between bridge ports also means that the input lines may run at different speeds, possibly even with different network types. A common example is a bridge with ports that connect to 10-, 100-, and 1000-Mbps Ethernet.
- Buffering within the bridge is needed to accept a frame on one port and transmit the frame out on a different port.
- Bridges were originally intended to be able to join different kinds of LANs, for example, an Ethernet and a Token Ring LAN. However, this never worked well because of differences between the LANs such as frame formats, maximum frame lengths, security and Quality of service.
Switch:
- Switches are modern bridges by another name. It acts as multiport bridge to connect devices or segments in a LAN. It operates at data link layer.
- It is point to point device.
- It is an intelligent device. It uses switching table to find the correct destination.
- Switches are of two types:
i. Store-and-forward switch: It stores the frame in the input buffer until the whole packet has arrived.
ii. Cut-through switch: It forwards the packet to the output buffer as soon as the destination address is received.
- Also there are layer 2 (bridge) and layer 3 switches (kind of router). It is sophisticated and expensive device.
Router:
- Routers are devices that connect two or more networks. It operates at network layer.
- They consist of a combination of hardware and software.
- The hardware can be a network server, a separate computer or a special device. The hardware includes the physical interfaces to the various networks in the internetwork.
- These interfaces can be Token Ring, Ethernet, T1, Frame Relay, ATM or any other technology.
- The software in a router are the operating system and the routing protocol. Management software can also be used.
- Routers use logical and physical addressing to connect two or more logically separate networks.
- The network address allows routers to calculate the optimal path to a workstation or computer.
- The two methods of route discovery are Distance vector routing and Link state routing.