In an ethernet network there are 4 devices that from the the outside look very similar. In this article we will look at and review the difference between hubs, switches, bridges, and routers.
A hub is the simplest of these devices. Any data packet coming from one port is sent to all other ports. That's the sole purpose of a hub. It is then up to the receiving computer to decide if the packet is for it. Imagine packets going through a hub as messages going into a mailing list. The mail is sent out to everyone and it is up to the receiving party to decide if it is of interest.
The biggest problem with hubs is their simplicity. Since every packet is sent out to every computer on the network, there is a lot of wasted transmission. This means that the network can easily become bogged down.
Hubs are typically used on small networks where the amount of data going across the network is never very high.
A bridge goes one step up on a hub in that it review the destination of the packet before sending. If the destination address is not on the other side of the bridge it will not transmit the data.
A bridge only has one incoming and one outgoing port.
To build on the email analogy above, the bridge is allowed to decide if the message should continue on. It reads the address firstname.lastname@example.org and decides if there is a email@example.com on the other side. If there isn't, the message will not be transmitted.
Bridges are typically used to separate parts of a network that do not need to communicate regularly, but still need to be connected.
A switch steps up on a bridge in that it has multiple ports. When a packet comes through a switch it is read to determine which computer to send the data to. I.E. one computer will be the sole receiver of the package.
This leads to increased efficiency in that packets are not going to computers that do not require them.
Now the email analogy has multiple people able to send email to multiple users. The switch can decide where to send the mail based on the address.
Most large networks use switches rather than hubs to connect computers within the same subnet.
A router is similar in a switch in that it forwards packets based on address. But, instead of the MAC address that a switch uses, a router can use the IP address. Before forwarding a packet the router will review the destination IP address. This allows the network to go across different protocols.
The most common home use for routers is to share a broadband internet connection. The router has a public IP address and that address is shared with the network. When data comes through the router it is forwarded to the correct computer.
This comparison to email gets a little off base. This would be similar to the router being able to receive a packet as email and sending it to the user as a fax.
Need some practice? Review your skills.
I just put up a new quiz site called EasyQuiz.info. As it works out, the first quiz I put online was a set of questions that I wrote on the "Connecting to the Network" chapter from the Cisco Discovery 1 curriculum, by S. Frazier. The Cisco Discovery 1 curriculum is a somewhat elliptical curriculum, that teaches general networking theory, for network administrators.
If you're needing a bit of practice with network addressing, I've just put up a new site at network-practice.info where you can review your knowledge, practice working with network addressing and binary to decimal conversions and back.