What are Hubs and Switches?
I have written several posts in the past about connecting multiple computers to the Internet. In those posts I usually talk about connecting a router to your modem, and then your computers to the router. Since many routers also include a hardware firewall, this has the added benefit of securing your local network, while allowing multiple computers to use one Internet connection.
What if you have more computers than the number of ports on your router? You could just connect a second router, but the easier method is to simply connect either a hub or switch to the router. In this post I’ll talk about hubs and switches and how they are used in a network.
A hub is a piece of hardware that contains several ethernet ports that connects several computers. Connecting a hub to a network is very easy. You can simply connect a hub to your router, and then several computers to the hub. The IP addresses of the computers that are connected to the hub are assigned by the router it is connected to.
Hubs work by broadcasting data to all computers that are connected to it. When a computer or program makes a request for information from another computer, the originating computer sends (broadcasts) the request to the hub. The hub will then brodcast the request to all computers that are connect to it. When the destination computer receives the request, it sends the information back to the hub. Once again the hub broadcasts the information to all computers, with only the requesting computer acting on the information.
The downside to this type of connection is that the bandwidth is subdivided between the number of computers that are connected to the hub. If you have a 100Mbps connection, and 2 computers connected to the hub, then the bandwidth available to each computer is 50Mbps. With 4 computers, the bandwidth drops to 25Mbps.
An alternative to hubs are switches.
Switches are similar to hubs in that they allow you to connect multiple computers together on a network. You can also connect switches to routers in the same way you connect hubs.
There are several differences between hubs and switches, however, that can boost the performance of your network. The performance increase has to do with how data is transmitted between the computers on your network.
While hubs transmit data via broadcasting the data to all computers that are connected to it, switches establish a direct connection between the transmitting and receiving computers. The added benefit of this is that the bandwidth is not subdivided. If you have a 100Mbps bandwidth on your network with 2 computers connected to a switch, the total bandwidth available to both computers is 100Mbps. This means that each port on the switch has the full bandwidth dedicated to it.
Many switches also have the ability to either use half- or full-duplex (receive and transmit at the same time). Hubs are half-duplex, which means they can either receive or transmit, but not both at the same time.
As you can see you can replace existing hubs on your network with switches to increase the effective speed of your network.
Connecting a Hub of Switch to a Router
Many people currently connect their computer to a router, which in turn, is connected to their high-speed modem. If you have more computers than ports on your router, you can simply connect a hub or switch to the router as well. Both are connected to the router the exact same way.
I have both a Linksys hub and switch. I have used both in the past, and am currently using the switch. Each one has 5 ports, with the fifth port also used as the uplink port. On your switch or hub, find the uplink port. This is the port that your router will connect into. For my switch, because the fifth port is also the uplink port, I can’t connect a computer to it when I connect the router. This means I can have a maximum of 4 computers connected with the router.
To connect a hub or switch to your router, use the following steps:
- Determine the uplink port of your hub or switch.
- Connect the router (any port) to the uplink port of your hub or switch.
- Connect a computer to any of the unused ports on your hub or switch.
- When you turn on the computer, your router will then assign an IP address to each computer connected to the hub or switch.
One thing to keep in mind when connecting many computers to a router this way is the number of computers that can be managed by the router. Each router has a limit to the number of computers that can connect to it. I’m not sure of the numbers, but you can always inquire with the manufacturer.
Hubs and switches allow you to easily increase the number of computers on your network, without having to worry about setup. They are easy to setup and require very little effort to maintain. Switches will provide much better network performance over hubs, so it may be more beneficial to use switches instead of hubs.