lasted for our segment. We have port mirroring. So what is port mirroring? D'oh! Well,
port mirrors are also known as switch port analyzers, also known as you'll hear them referred to his span ports
switch port analyzers
Switchboard analyzers span Ports are just gonna be on. Ah will be on a switch, But we can set up port mirroring not just on switches, but we can also set up Port Maring on our other devices. We could set it up on our routers or bridges in order to view data that's going across our devices.
But span port is what you'll hear when we're talking about switches.
And very often, port nearing is done on switches because switches are very good at managing data and they're very good at down from routers. They're very good at sending data and managing where it come came from and where it needs it needs to go.
when we're sending data on our devices other than a hub, our devices were just going to send the data to the port that they need to.
So in the case of our switches,
when we have, we've set up a switch for the first couple for the first couple seconds or switch will act like a hub and send data to everyone connected to it. But after our switch starts to make up its tables and it determines that Okay, on port number one, I have computer A port number two. I have computer be
port three. I have computer, see,
our switch is going to determine that
when computer A sends a packet to computer E,
our switch is just going to take that packet and send it directly to computer E.
The only the only packets that you're going to hear our packets that are just being sent to you and packets that are being sent broadcast to everybody.
this puts us at a disadvantage. If we're trying to do diagnostics on a switch, Our sorry diagnostics on our network. If for some reason we need to sit down and we need to capture the data that's going across our network and view it and analyze it,
we can't do that on a switch like we can on the hub or on a
braid Jonah router, because the data is only going to go to the the ports that they need to go to
so port nearing and for switches span ports allow us to set up ports that have all the data mirrored to it.
Now we say all the data here because all of the data can be the max data that we capture. And then we can also capture
Onley certain ports if we're trying to isolate and diagnose on Lee traffic on certain ports.
this captures network data and it's very useful for diagnostics research or setting up I. D. S is
Now when I b s stands for an intrusion detection system, An intrusion detection system is a device that we put on our network or a computer that we connect to a network running a program that sits there and it analyzes network. And it says what? That looks bad. I need to flag this. I need to report it
intrusion detection system. That D is very important because the D standing for detection means that that device isn't going to do anything about it other than reported.
An intrusion detection system isn't an anti virus, it isn't a malware remover. It isn't going to see bad data going across our network and say what I need to take that.
So that's why we can set up I. D. S is on mirrored ports because if it was an I. P. S an intrusion prevention system, an intrusion prevention system actually stops those attacks
that would have to actually be in between us and wherever the date is coming from.
If we're just having the data merely mirrored to us, it's just a copy of the data. We can't take that packet and say, Oh, I'm going to discard that because it's already gotten to where it needs to go.
So when I d s just sits and watches and raises warning flags, an I. P. S actually needs to be on the location, work in its taking traffic, and if there's something bad, it stops it.
So a little bit of an introduction I D. S is an I P. S is which you don't need for this particular particular module, but it's good to know.
But anyway, port nearing allows us to capture that data and have it sent to different ports. But we also need to know that devices can't talk on this port now. Why is that. Well, these devices can't talk on this port because many reports are set up just to have data sent to it at capturing it from all of our other ports.
If we start sending our If we tried to start sending data on a mirrored port
and we tried to use a mirrored port as an access port. Then when we're sending data out and then receiving responses, we don't know the difference between data that's being sent. Just tow us or data just to that mirrored port or data that's being sent to that mirror report because copies of other data
so mirrored ports are going to be set up just as capture ports.
So let's take a look at our diagram to better understand port nearing because I just blasted off a whole bunch of information that you may not even understand. So let's actually take a look at this in practice.
So we have a we have a switch here. We have our network diagram.
We have a switch and we have a router
we have on our network diagram seven computers and a router
on ports one through seven.
Now, one of our computers is blue because that computers set up on a mirrored port
on a span port on our switch.
So we're not gonna label this computer with a letter. We're just gonna label this computer with an M for our for our mirrored computer. Actually,
Our port Port seven is going to be
seven em for our mirrored port. And this computer is going to be computer W for wire shark. We're gonna have wire shock running on this computer.
So sorry for the little bit of confusion there.
all of these computers are set up
on a standard port on a standard switch to be able to talk to each other and be able to talk out to the Internet through a router.
They're all set up on ports one through six in our routers set up on port eight.
So we have a couple of different computers over here. We have computer ease, a server, the rest of our computers or workstations, and we ran. And we're running into some problems where we're having some data going on, having data traversing our network. That's causing some problems. Maybe this is malicious data. Maybe we just want to capture and see if we can
check and see why our network is so slow.
There's some reason where we need to do some diagnostics on our switch,
so we set up Port 7 a.m. as a mirrored port.
Now, when we go into our switch configuration will be asked for a sore sport and a destination port.
We need to know what the source for this mirrored port is going to be.
So we say Okay, I only want to see the data that's going over Port number five because Port number five's connected to my server,
So I only want to see the data that's going to Port number five. So we'll go and are. We'll go on our switch configuration and will say Under are under our mirror are span port settings or mirror our port mirroring settings depending on what our outer configuration looks like and say, I want source port to be five,
and I wanted to send to Port seven.
So now 0.7 is a mirrored port.
We're running wire shock on this computer, and this computer can't connect to the Internet because it's on Lee connected to a mirrored port so it's only going to be receiving data
receiving mirrored copies of that data from Port five.
So we have all of our configuration set up. Our source port is Port five that our service connected to and our destination port is port seven.
So let's take a look inside a router now
and remove some of our route and remove our router symbols.
So we have our little router control chip here that's going to direct traffic, direct data where it needs to go.
And our server is going to send a packet
to go to computer, See?
So it's going to send its going to send the data to its port,
and then our switch brain is going to say, OK, I need to send this packet to computer, see, because that's where its destination is.
But I have a rule here that says I need to mirror all this data also over to port seven, where my mirrored port is.
So I'm going to send this packet onto Port three.
But I'm also going to send
a copy of the data, the packet that I'm sending over to port seven
so that my device on Port seven can read it.
Same thing if I have Port three talking to Port five.
Any data that's being sent from or to Port five will also be copied to port seven.
Now, let's say I need to find all my network traffic. I need to determine what all my computers were saying. Well, then all right, rules in my switch that say port 6 45 Port for port three. Port 2.1 in port eight. I want all that data
to be copied over to my workstation. Here, to my wire Shark capture again. What does this do for us? Why don't we want all of these these copies of data in our switch to be sent over to this workstation here?
Well, again, this workstation could be running wire shark. It could be looking at these packets and look, and we can search through it manually and see if there's any irregularities. It could be running an I. D. S. It could be running an intrusion detection system where checks all of our packets and sees. Okay. Is any of this data
malicious? Is any of this data bad? Should I raise any alarms?
port nearing is very useful for these diagnostics and for doing this read in doing our research.
So port nearing also known a span ports take all of our data
and they send it to where it needs to go.
But they also make a copy of the data and they send it to our SPAN port. They send it to whatever devices connected to our span port, and this all has to be configured it within our switch.
just because we're setting up a span port doesn't mean that our network is going to slow down our If we have a lot of traffic going to our span port, they only limitation. The only downside that will really see in network traffic is our span. Port may drop some packets.
If it's having too much data, push to it. So if our switches making copies of all the data from one through six and then port eight and sending it to span port number seven and our span port says I can't handle this data and just drop some of the packets,
then the only thing that will be affected is our capture going on on our workstation.
Because this data is just copies of data.
None of our other data packets going anywhere else. They're going to have any problems.
than our last thing for Spam Port. Let's say that this idea yes. This intrusion detection system
that we put on Spann Port put on sports seven are mirrored, mirrored port span port.
We need this data to be able to be sent out to the Internet are sent over the Internet, Tow us, or we need this day to be to be able to send to our workstation. Our admin work station is workstation A,
which I wrote again.
what what can we do? We can't send data back over this mirrored port. This mirrored port is received on Lee.
what we're going to do is we're going to have
to network interface cards in this device. Here.
One network interface card is going to be for capturing, and the other network interface card is going to be used for actual network activity.
So we need a second network interface card in our computer,
plug in a second Internet cable to our computer and plug that into a different port. So we have port nine
and that port we may also we may even want to set up Port nine also sins copies of its data to port seven.
But now our computer, our wire shark workstation or our I. D. S. Whichever we have set up here, not only receives all of the copies of data that's being sent around our switch but is also sending sending out informational packets or sending out alerts are able to connect to the Internet
over except second network interface card
So if you've never set up a mirrored port, never set up a span port before and you have the you have the resource is too, and you have the chance to. It's a great way. Just thio set up a span port and be able to again with permission. And if you're using the right resource is you don't want to disrupt your network activities. Just tow
just to play around. Essentially,
this will give you, and this will let you see the traffic going over your network. You'll be able to look at all the traffic and say, Wow, you know, I recognize this packet are recognized this port number or this protocol and check out all that different data that's going on on your network and see if you can identify anything.
So thank you for joining us here today on cyber dot i t. Today we talked about routing and switching. We talked about everything from all of our different switching devices, like our bridges or switches or hubs are repeaters and all of the different concepts. And, well, not all of the different concepts, but a lot of the different concepts related to routing and a lot of the different routing properties
how they've set up their dynamic routing tables and, essentially, how our routers talk to each other and find the best routes and the best pass to other networks.
So hopefully this information is helpful, and hopefully this information will help you in your journey to be able to better work on your networks and better diagnosis your networks and know how networking works. And we have to see you again here next time on separate at I t