WEBVTT

00:00.640 --> 00:02.110
Everybody look to the next video.

00:02.110 --> 00:05.980
So in this video we're going to be briefly talking about routers and gateways.

00:05.980 --> 00:10.120
Now a router is a core component to a network.

00:10.150 --> 00:14.320
This is the mastermind that that really does a lot of the routing.

00:14.500 --> 00:17.560
I've talked about it which is sort of routing.

00:17.560 --> 00:21.730
Now they they root in terms of do I know is it attached to me.

00:21.880 --> 00:26.290
So is this host attached to me on a port if I'm the switch.

00:26.410 --> 00:33.280
If I don't know what that is I send it upstream to my gateway which will go over in the next next few

00:33.280 --> 00:42.280
slides but routers on the other hand have an idea of what switches or what destinations a packet needs

00:42.280 --> 00:42.680
to go.

00:42.820 --> 00:50.250
So for example if you have a router on your network it's configured to have entire network segments

00:50.250 --> 00:54.240
or entire network ranges on a single one of its ports.

00:54.300 --> 01:00.240
So if it knows that this packet is supposed to go into this particular network range if it fits in that

01:00.240 --> 01:04.350
network range as its destination it'll just send it there and then all the switches will eventually

01:04.380 --> 01:07.930
make its way it will get the packet to the destination.

01:07.950 --> 01:13.760
Now it's also important understand that if it doesn't know the switch or the router doesn't know it'll

01:13.770 --> 01:15.840
send it to its upstream gateway.

01:16.260 --> 01:21.510
So in this case it might be the Internet service provider which will then make sure it gets to whatever

01:21.930 --> 01:26.130
domain it's supposed to or IP address it's supposed to land at.

01:26.370 --> 01:33.570
Now when you hit a when a packet hits a router it's also considered a hop switches won't show up in

01:33.570 --> 01:36.930
your trace route which we'll talk about later.

01:36.930 --> 01:46.290
However understand that the what you see in a trace route which shows every hop so every host that it

01:46.290 --> 01:52.560
connects to you're going to see routers not switches you most likely have one of these at home if you're

01:52.560 --> 01:54.000
watching this from home.

01:54.000 --> 02:01.860
Now whether that's your phone acting as a router to handle the traffic or if you've got something like

02:01.860 --> 02:12.870
Comcast or google fiber or anything at home or AT&amp;T any of the home devices or ISP or Internet service

02:12.870 --> 02:21.960
providers you most likely have something called a combination box which is a modem router and Wi-Fi

02:22.440 --> 02:24.810
box all in one.

02:24.810 --> 02:29.580
Some of you might have already replaced that with your own parts where you have your modem your own

02:30.150 --> 02:33.130
router and your own switch which is fine.

02:33.230 --> 02:38.610
And if that's the case you already know which which device I'm referring to now for everybody else it's

02:38.610 --> 02:43.500
most likely that same box that has a combination of everything which will tape make sure that the traffic

02:43.500 --> 02:48.580
on your machine reaches the internet or your machine reaches another machine on the same network.

02:48.600 --> 02:55.880
Now as far as virtual box goes it has a internal router to itself to make sure when you talk to.

02:55.890 --> 03:01.680
For example if you make your connection and that connection is that of a bridge connection you're going

03:01.680 --> 03:03.400
to be connecting to.

03:03.660 --> 03:07.710
I'm sorry you make a bridge connection in stead of in that you're connecting to the actual network which

03:07.710 --> 03:09.800
mean you're gonna be using the router here.

03:09.810 --> 03:12.870
However virtual box has its own router.

03:12.870 --> 03:19.020
So when you talk to like when we set it up we set up a network where the two machines the two windows

03:19.020 --> 03:24.240
machines can talk to each other that it set up a virtual router inside of there that they all had the

03:24.240 --> 03:27.390
same Gateway which was the machine itself.

03:27.390 --> 03:28.780
That was the router.

03:28.860 --> 03:35.640
The next thing is is the routers have a heavy set of rules as well as the destinations like I mentioned.

03:35.640 --> 03:41.730
Now the rules can can vary so some routers have built in Firewall some don't.

03:41.820 --> 03:43.950
It entirely depends.

03:44.730 --> 03:50.520
So in this case just think of the router as a set of rules that allows it to route traffic based on

03:50.520 --> 03:53.330
certain parameters.

03:53.420 --> 03:59.940
So if you want traffic from this network to go across the Internet for whatever reason you can do that.

04:00.230 --> 04:03.430
So long as it's a not a private IP space.

04:03.470 --> 04:08.330
Now if a router does not know where it's supposed to go and it has a gateway set up it will send it

04:08.330 --> 04:11.980
to its upstream gateway.

04:12.000 --> 04:17.820
Now this is important to understand that a network device most network devices have some sort of upstream

04:17.850 --> 04:19.200
Gateway configured to them.

04:19.260 --> 04:21.060
So it doesn't know where something goes.

04:21.060 --> 04:23.430
It sends it to the next network device.

04:23.430 --> 04:26.100
Eventually it'll land where it's supposed to.

04:27.030 --> 04:27.740
Now a gateway.

04:28.170 --> 04:29.570
We've talked about it a little bit.

04:29.580 --> 04:34.410
Gateway is just the upstream network device of a network device.

04:34.410 --> 04:38.640
So you can have a switch that's connected to a switch that's connected to a switch.

04:38.640 --> 04:46.860
All three of those switches from the top going up have the one above it as a as a gateway and then the

04:46.860 --> 04:53.580
very top switch or the tour of the top of rack switches connected to its gateway as the router.

04:53.580 --> 04:58.690
Just as a common setup there so that's how you can understand what a gateway is or where someone's referring

04:58.690 --> 05:03.730
to Gateway it's whatever the upstream device is where it's sending its where it's sending data

05:06.290 --> 05:12.120
so a gateway is used when it doesn't know where the data's supposed to be.

05:12.290 --> 05:16.940
And then in an example of this is our workstation or Windows machine.

05:16.940 --> 05:24.470
When we looked at IP config as an example we saw gateway that in turn was referring to the local router

05:25.100 --> 05:27.460
on that network which was our option gateway.

05:27.480 --> 05:34.310
If Windows doesn't know where to send traffic it sends it everything to the Gateway in windows in Linux.

05:34.310 --> 05:39.770
You can have multiple network devices but you can have one gateway per network device.

05:39.770 --> 05:45.080
We'll get into that a little bit more when we start playing around with some of the windows in VM components

05:45.320 --> 05:46.420
a little bit more.

05:46.610 --> 05:51.830
But understand that you can have multiple network cards on a machine at once which will in turn give

05:51.830 --> 05:56.750
you you can have multiple gateways and have it sent to different places depending on where the traffic

05:56.750 --> 06:01.910
was being rude and in that case windows will do a little bit of routing to know does the destination

06:01.910 --> 06:04.160
IP resolve in this network or not.

06:04.160 --> 06:08.530
And then if it doesn't resolve in any it'll just send it to whatever the default has been set to.
