Hi and welcome to cyber dot i t. My name's Anthony and I'm your local subject matter expert here for Network Plus and today we're gonna be talking about the purpose and properties of routing and switching.
So what is switching and routing? Well,
when we have network data that we need to transfer to other devices when we're trying to send or receive files from another device or navigate through the Internet or connect out to the Internet, we can't just take a cable and connect it from our computer to wherever we want to go. That'd be very inconvenient, to say the least.
Every time we're trying to connect to another computer or connect to another server.
If it wasn't for routing and switching, we would have to take our computer and plug in a cable and go around the world to whatever server we were trying to connect to and plug in there and that be very inconvenient. Even in that, even in that case, we would still need some devices like repeaters in order to boost our signal so we could actually
travel that far distance over our cable,
to prevent us from having to do that. We have devices that allow us to rout in switch. What is routing and switching back to our original question. Routing and switching allows us to connect, allows us to connect devices and communicate over a network. Whether this network is our own internal network
or it's across multiple networks around the world.
Routing and switching is what allows us to take a packet, take a take a piece of data and transmit it from one network
to another computer, whether it's right next to us or around the world without having to individually take cables and plug a cable directly from one computer to another. This allows us to connect two devices, such as routers and switches and hubs and repeaters and bridges, and get our signal wherever it needs to go.
So when we hear the term switching, we're talking about
transmitting data on the same network. We're taking data, and we're transmitting it to a computer that eyes right next to us or is in the same office, essentially a computer that's on our same I P address network or computer that we can reach directly by its Mac address. These we're going to be computers that we can reach by devices such as hubs
When we're talking about routing, we're talking about our layer three of roos. I model
when we're routing data. We're actually taking data, and we're moving it from one network to a different network. Different networks may have different apologies, and different networks may move data different ways. So we need to be ableto have devices which know what our internal network looks like. It is able to receive and send data
two other networks in a standardized way so that that other networks
device that other networks router can take that standardized data and send it across its network topology. So that's what routing allows us to d'oh. So
switching would be our same network. Our local network was routing would be sending it around on different on the different networks or traversing different networks.
So we need to understand our devices that move our data. We need to know what devices perform these functions are switching in our routing. Well, our major devices that we're gonna talk about and then our one big device that we're gonna talk about are a lot
So we have our hubs, switches, routers, multilayer switches, bridges and repeaters.
We're gonna talk about our hubs, switches, multilayer switches, bridges and repeaters
right now. And our routers
are going to be the ones that were going to spend a long time on. Some of the topics we mentioned with our routers may also apply to some other other components. But routers are very complex, and the way they talk and they move, data is very complex.
We will also mention in this section will talk about spanning tree protocol
for bridges, mostly, but spanning tree protocol will come up a little bit later. While we're talking about routers, we'll just we'll talk about will mention it now. And even though it applies, mostly two bridges will also talk about it more in depth. Then our first device that we're gonna talk about is a hub now. Ah, Hub is a device that
sins and that receives from anyone that's connected to it,
and it sends out to anybody we typically refer to hubs as being dumped there essentially just glorified repeaters. All they do is they take data from one port. So if we have our hub here
and our computer. And no idea why I drew a triangle.
And we have our first computer here,
another computer here
and 1/3 computer here.
And we send a data packet from Computer A wanting it to get to computer, be with computer, See over here.
Not really. In the mix
computer A will send a packet to the hub
and the Hubble. Then take that packet and it may do some signal regeneration on it and may do some amplification. And
amplification may amplify the signal a little bit, which will talk about with repeaters, the difference there. But essentially, that help is going to take that packet and then say
Okay, here you go and give everybody that's connected to it except the port that sent it to it. So the hub is going to send its data, the data that a sends and it's gonna send it to be, and it's gonna send it to see
now that packet was meant for B.
Why did it send it to see? Well, like we said, hubs are dumb. They don't inspect the packet. They don't inspect which Mac addresses for they don't inspect, which I P address. It's four. They just take the pack it and send it to every port except with one that it's on.
When we talk about, we mentioned that our hubs also may perform functions as a Peter. I'm said that hubs Air simply almost glorified repeaters because repeaters all they do is they take data. They take a signal and they
change it in some way so that it can keep going down the same the same path.
It can keep going. It's completely unmodified. Other than the signal itself doesn't change the packet, it doesn't change the data. It just either cleans it up. It makes it stronger so it can keep going down. The cable
hubs kind of do the same thing, except they pushed the date of the data in multiple directions. We may send a packet to Ah, Hub may clean it up, and they clean up the signal a little bit. It may amplify it so it can keep going down links of cable, but it's just going to send it to everybody that it's connected to accept the
party that originally sent the packet. It's not going to send it back out. The same port that it came in.
So with our hubs, it's up for our individual computers
who are connected to the hub to decide
if they're going to take that data and use it or not.
Now this is insecure, and it's very easy to see why.
If we have anyone in our network who wants to know or wants to listen in on what we're doing and we're using a hub,
all they have to do is plug into the hub.
If we don't have any security on it. If we we don't have any additional lockdowns in place to prevent people from just listening in on our data, if our data isn't encrypted in any way that this is all open in the clear anything we send to our hub, our hub is gonna send anybody that's connected to it. So if an intruder comes in and just
plugs a computer into our hub
or someone who's already connected to our hub just starts and launches a program such as wire shark, which captures these packets and listens in on our traffic, they'll be able to hear everything that's going to anybody.
They just have to sit there and they just listen to it.
So hubs are not very not very secure, especially when we're comparing them with our with our switching our switches in our multilayer switches. Eso Typically, if we have hubs in our environment and we can replace them, we may want to look at replacing them because they are devices which
I have severe limitations when we compare them with our other devices, such as our switches and our multilayer switches.
Now we have our icon up here.
This is our typical icon that we may see when we are using. We're creating a network diagram or when we're viewing a network diagram our network diagrams being some of those little diagrams which you've seen me drawn draught already, where we can see what, what computers connect to, what devices and how our network talks. Well,
rather than labeling every single one of those devices, if we're sketching it out or doing it on a white board or
sketching it on a sheet of paper, what we typically want to do is we want to use different indicators. We want to use different icons for those devices, so we know sort of in a shorthand way. What those devices are our hubs. If you see a box with an arrow, a single arrow pointed in a single direction,
that's typically going to be our hubs.
So keep an eye on those. And if you're looking at a network diagram and you see that, then that typically maybe what that particular icon means is it's a hub.
Now, our next devices a switch now are switches are a step up from our hubs and that our switches are a smart hub. Our switches actually track Mac addresses and which port their own. So if we have
our diagram from earlier, But this time we have our switch. Computer A is plugged into our switch. Computer B is plugged into our switch and computer see is plugged into our switch the first couple seconds the first minute that are switched, that our computers are plugged into our switch.
Our switch operates as if it's a hub,
because when we first plug in our switch to our devices are switch doesn't know who anybody is. It it doesn't know what Mac addresses assigned toe which port.
So the first couple of seconds it's turned on our switches listening to all the data which is being sent to it by these different ports and then is it's starting to receive data and it's starting to notice. Okay,
computer A with this particular Mac address is sending to this port. It I'm getting data from Mac address A coming onto this port. So that means that I'm going to assign Computer is plugged into port one. So in my table here, I'm going to link
port one with computer, eh?
Listens for a couple a couple more. Hundreds of a second notices that Computer B is sending to port, too. So it's gonna listen. It's record that port to corresponds with Mac address be,
and then computer See
it seizes plugged into
port three. So it recognizes that port three is Mac address. See,
after it's developed this table, then our switch will begin to send data to those corresponding ports when packets are being sent to those particular computers.
So if computer a sens a packet that's specifically designated for computer be
after our if our switch has recognized and has made those assignments, those port assignments are switch will receive the packet and say OK, this packet is meant to go to computer. Be Let me look at my table. Okay. Oh, this packet is meant to go to this Mac address in this mag. Addresses for computer be
And I have this Mac addresses being on port to. So I'm going to send this packet on the report, too.
Now, we can immediately see how our switches air going to mean more secure than our hubs because we can still plug in all of our devices. But now our switch is sending the are sending our packets on lee to the devices that need tohave. It are only sending the packets to the devices that correspond with those ports.
So not only is this more secure,
but this also helps with our network traffic. That's hopes with mitigating, sending out too much network traffic and reducing the number of collisions that we that happen. Collisions are events that occur when
we have more than one device trying to talk at the same time. And we have collisions that occur in packets can't get what they where they need to go. With Hubbs. There's a lot more chance for collisions because the hugs are constantly just spewing information out to everybody as soon as they receive a packet in there just pushing it out to everybody
switches, reduce the amount of collisions and increase our security
because our switches are only going to sin packets to who they need to be directed to. So it reduces the amount of talk on our network. It reduces the amount of collisions and increases our security because we can't just have a computer,
a computer d plug in here
and start listening in
after our switch has figured out that this Mac addresses with this port and
there are ways that Mac addresses can be spooked, So this is 100% foolproof. But as soon as
our computer are sorry, our switch has determined that, Okay, this computer, this Mac addresses on this port, then
this computer D is running wire shark. And hey, I don't seem to be seeing old the traffic that I used to when this enterprise used to have a hub here. Well, that's because
the switch is smart and this switches on Lee sending you the packets that you that need to be your thio to your attention. This switches on Lee sending you packets that are either broadcast packets or packets directly meant for you broadcast our packages meant directly for you
things that would goto either everybody or just to you. So you're gonna see a lot less traffic
on a switch if you're running something like a wire shark program than you would if you were connected to a hub. But if we're doing this, if we're listening in on a port on a switch for
Dar, if we're listening in for actual diagnostic purposes, if we're trying to listen into traffic on a switch in order to figure out what's going on on our network, there are ways that we can set up ports on switches called mirrored ports. We can set up port mirroring, or what we do is we're telling our switch. Okay,
I'm plugging in a device onto this particular port
that I want you to send the data from. These other specific ports are all of these ports, and I want you to send all the traffic that you're sending
between all of these ports, and I want you to copy that traffic and also send it over here.
These mirrored ports provide these mirrored ports provide us with a mirror of what's going on on the other ports so that we can see what's going on and see if we can diagnose some network issues. But we'll also talk about port mirroring a little bit later, but it's good to get into that. It's good to mention it now so that we understand that just because
we're using a switch doesn't mean that we can't plug in computers
and use diagnostic devices in order to see network data that's going on on her switch.