 Hello, my name is Jonathan Davis and I'm with the National Consortium for Mission Critical Operations. Today we're going to talk about the differences between a hub, a switch, and a router. Now I've got three examples here. First we'll start with a hub. And you know if I hold up a hub and you look at it you've got ports that you connect wires into. And if I hold up a switch you're seeing the same thing. You've got a bunch of ports that you connect wires into. So when you look at a hub and you look at a switch you don't really see a difference. The difference is in what's inside. So the basic difference between a hub and a switch is that a hub operates at layer one of the OSI model. That's the physical layer. If we have two computers connected into each one of these ports here and one computer is sending a signal to another computer the signal that the sending computer sends will be broadcast out every port on a hub. It doesn't matter if two computers are connected or 24 computers are connected to this hub. When a computer sends a signal it is broadcast out every single port. So there's some things to keep in mind with that. For example when that happens we are broadcasting every packet to every computer which means that every computer receives every packet that is sent on the network. So it's inefficient it's going to slow things down because we're handling that many packets and the more computers we have the more packets we're going to be receiving. It's not secure because any private information that is sent through a hub is sent to every computer. So if I'm a hacker and I have a packet sniffing application on my computer I'm going to be able to pick up all the packets on the network that are intended for anybody. A switch on the other hand operates at layer two of the OSI model and that's the MAC layer. The MAC layer is a switch operating at layer two is capable of keeping track of MAC addresses using what's called a MAC address table or MAC table. Each computer connects to a port on the switch. The switch remembers the MAC address of the computer connected to which port. So when a computer sends a signal to another computer the computer always says which MAC address the packet is intended for. So once the switch receives it it's going to look at that packet or that frame and it's going to see it's going to look for the sending MAC address or the destination MAC address. What MAC address was this frame intended for? It's then going to look that MAC address up in its MAC address table and see which port is designated for that MAC address. The switch then forwards that frame to that specific port so that only the computer with that MAC address only the computer that the frame was intended for receives that packet. This is with modern switches that have full duplets. An added advantage is that with a hub you have one collision domain meaning that all the computers connected to this device if there is a collision then all computers are affected not just the computers that are connected to one port whereas on a switch each port on a switch represents a different collision domain. So what is a collision? A collision is when two computers or two devices on the network try to send a packet at the exact same time. In a full duplet switch each port is capable of designating four wires for sending and four for receiving meaning that there is never an opportunity for a collision on a switch on a modern switch whereas with a hub any computer that's connected that tries to send a packet or a frame at the exact same time as another computer we are going to have a collision. So collisions are way more abundant when we're talking about hubs than they are when we're talking about switches and in modern switches the thread of a collision is basically eliminated. The last thing we're going to talk about is a router. A router operates at layer three of the OSI model or the network layer. That layer operating at that layer means that the router is capable of looking at the IP address the destination and the source and destination IP address in a packet and forwarding information or forwarding that packet based on an IP route table that the router keeps track of. Also the router has a built-in switch and has two ports that can connect to a local area network that operate at layer two meaning that it can communicate on a local area network and a wide area network through its serial interface. So the serial interface is for the wide area connection and these two CAT5 interfaces are RJ45 connectors here Ethernet connections are meant for a local area connection. So these two ports operate at layer two and these two ports the serial ports operate at layer three. So what that means is that this router can accept frames from a local area network then look at an IP address determine which serial port it needs to go out of in order to reach another server or another computer that may be out on the internet. Because it can look at the IP address and it keeps track of IP address tables it can reach devices that are outside of this network it becomes known as the default gateway for that network. That's the basic difference between a hub, a switch and a router.