Join Martin Guidry for an in-depth discussion in this video Using hubs, switches, routers, and modems, part of Setting Up a Small-Office Network.
I'd like to talk about some of the devices you find in a modern network. Right now, multi-function devices are becoming very popular. So most of the physical devices produced by vendors right now, serve multiple purposes. One device might act as a modem, a router and a switch. However, for this discussion, I'd like to define each of these separately and talk about what each one does individually, and then at the end we'll talk about maybe using some of them together.
First we'll talk about a hub, and a hub is a very simple device. It physically connects computers together via ports. The hub will typically have between four and 24 ports. Into each port, we plug a computer, and those computers can now communicate with each other via the ports. Data received on one port in the hub is sent out all of the other ports. So for example, if we have 10 computers plugged into the same port, one of the computers would like to send out some information.
The hub will receive data on that one port and then send the exact same data out on all other nine ports. This is a bit of a security risk. It means that everyone connected to that hub could potentially spy on the data going to the other computers. It also creates a large number of Ethernet collisions. A hub essentially only supports one conversation at a time. So we can have one computer speaking, but because that data goes out of all the other ports, none of the other computers could broadcast information at the same time.
If they attempted to, we would have a collision, and Ethernet would have to implement its collision resolution techniques. The next device we'll talk about is a switch. A switch has some similarities to a hub. It is similar in that it physically connects computers via ports. Again between four and maybe 24 or 48 ports on a switch and we can plug computers into all of them. However, a switch is a little smarter than a hub.
A switch will monitor the traffic that comes in from every port and will learn which computers are connected to which ports. It will do this based on the Ethernet MAC address. So switches are constantly monitoring all the traffic to see which MAC address is sending on a particular port. Once it has learned which computers are connected to which port, then it doesn't have to behave like a hub. It doesn't have to send data out on every port. It can send data out on only one port, which means things are going to be more secure.
Data destined for a particular computer will only go out of the one port that computer is connected to, and the rest of the network will not see the traffic. This also means significantly less Ethernet collisions. All switches can support multiple conversations. So if we have four machines connected to a switch, the machine in port number one could communicate with the machine in port number 2, and at the exact same time, the machine in port number 3 could communicate with the machine in port number 4.
Because the data is only sent out to the appropriate machine, we get much less Ethernet collisions, and therefore, get better performance on the network. Both hubs and switches are providing communication between machines on the same network, the same IP version 4 network. If we want to send information between two separate IP4 networks, we will need a router. And the point of a router is to transmit data between different IP4 networks.
Obviously it does this based on the IP address. Routers are sometimes called gateways. That's a little bit of an older term. The more modern term is router, but we still sometimes hear the word gateway to describe a router. The last device I want to talk about is a modem. A modem is sort of a combination of an acronym and abbreviation. It actually stands for modulator-demodulator, a device that converts digital signals to analog signals, or it converts analog signals to digital signals.
And in the history of networking, this was a very important task. However, most modern networks are digital end to end. So we don't actually do a digital to analog conversion very often. You still hear the word modem used, even though it's a bit of a misnomer. Modem is often used for the device that receives Internet data from your provider. So if you have data from your cable TV provider, or from a phone company over an ISDN line, they probably gave you a device that they call a modem that will receive data from them.
The data coming into that device is probably digital and the data going out of that device is probably digital. And therefore, calling it a modem is a bit of a misnomer. A better name would be a residential gateway. And also remember, as this device receives data from the internet, we need it to send data into our network. And when we cross networks like that, we need a router to accomplish that. So almost all modern modems also have a router built into them and it's one device that provides both pieces of functionality.
- Understanding IPv4
- Using hubs, switches, routers, and modems
- Dividing your network
- Building a hybrid network with wired and wireless clients
- Working with servers
- Connecting Windows and Mac computers to Active Directory
- Choosing between DSL and cable Internet connections
- Backing up to local and cloud-based storage
- Using encryption and authentication
- Monitoring your network