Hub is the simplest networking device. It connects many PCs in a star topology network. However all the PCs get all the data because the packets received by a hub are broadcasted for all machines connected in the network.
Switches are a little smarter than hubs. Instead of just broadcasting packets, switches maintain a list of MAC addresses of all machines connected to them. This list is called switching table and is stored in the memory of switches.
When a packet arrives to a switch, it checks its destination’s MAC and then by consulting the switching table it delivers the packet to the targeted machine.
Router is the most important device about networks. Generally a router is a device that connects many discrete networks altogether. In its systematic approach, a router checks the destination of a packet and provides the shortest route for the packet to reach to its destination. In all this workout, routers use a routing table which consists of all network addresses (IP addresses) connected to the router. This table can be updated either manually or automatically.
Bridges are like traffic isolators in a LAN. Usually in a bigger LAN, we construct two or more physical sub networks in order to avoid excess traffic across the entire network.
All the sub networks are connected to a bridge. Packets departing from any of the PC, arrives on the bridge and bridge then decides whether they should cross the bridge to move into other subnet or not.
Here in this diagram we see that Sub Net 1 and Sub Net 2 are connected through a bridge. If the PC ‘b’ wants to send something to PC ‘2’ the bridge will let the packets move across. Similarly if ‘b’ wants to send something to ‘d’, the bridge will not allow packets to move across.
A gateway is a device that connects two heterogeneous networks. Heterogeneous here refers to totally dissimilar things. Thus two or more totally dissimilar networks are connected together using gateway. The task that a gateway performs is ‘protocol conversion’. It works on all seven layers of OSI since on every layer there are some protocols.
Repeaters are devices that work for regenerating the signal that gets weakened as it travels long distance. The power in a signal is characterized by the amplitude in its waveform. This amplitude gets a continuous decrement with the distance. Repeater, on a significant point, restores the original signal level.
For digital signals we use: Repeater / Signal regenerating repeater.
For analog signals we use: Amplifier.