WEBVTT

0:00:05.120000 --> 0:00:09.340000
 So in the previous video, I talked about
 why we would need to have routing

0:00:09.340000 --> 0:00:12.960000
 in a network if you want to break it
 up into multiple broadcast domains.

0:00:12.960000 --> 0:00:17.360000
 And I talked about the concept of what
 is a routable address and that

0:00:17.360000 --> 0:00:20.620000
 a device needs to be able to identify
 its routable address.

0:00:20.620000 --> 0:00:24.560000
 It needs to be able to figure out from
 that address what network it belongs

0:00:24.560000 --> 0:00:30.260000
 to and it do with packets that
 don't belong to my network.

0:00:30.260000 --> 0:00:31.860000
 What do I do with them?

0:00:31.860000 --> 0:00:35.940000
 So I want to show you something here
 with Windows 10 and this will be

0:00:35.940000 --> 0:00:38.280000
 the same thing with
 Windows 7 as well.

0:00:38.280000 --> 0:00:44.680000
 If you go to your DOS prompt, so just
 click on start and then type in

0:00:44.680000 --> 0:00:51.540000
 CMD for commands, CMD or any other way
 you have to get to your DOS prompt.

0:00:51.540000 --> 0:00:54.040000
 I'll make this a little
 bit larger here.

0:00:54.040000 --> 0:00:58.140000
 So first of all, how do you see what
 the routable address is that your

0:00:58.140000 --> 0:01:03.440000
 laptop has? You can type
 in the CMD IP config.

0:01:03.440000 --> 0:01:06.280000
 Let me just see real quickly if there's
 a way I can make this a little

0:01:06.280000 --> 0:01:12.880000
 bit larger. Oh, font, here we go.

0:01:12.880000 --> 0:01:16.100000
 This will help. There we go.

0:01:16.100000 --> 0:01:19.300000
 Okay, so you can type IP config.

0:01:19.300000 --> 0:01:22.880000
 I'm going to go to my wireless adapter
 because that's why I'm connected

0:01:22.880000 --> 0:01:25.600000
 to via right now.

0:01:25.600000 --> 0:01:30.840000
 So with IP config, you can see here,
 here's my wireless adapter and IP

0:01:30.840000 --> 0:01:34.440000
 is a layer three routable
 protocol.

0:01:34.440000 --> 0:01:35.480000
 So we said IP config.

0:01:35.480000 --> 0:01:37.860000
 So this is dealing with
 our routable protocol.

0:01:37.860000 --> 0:01:43.140000
 So this is the routable address
 that that protocol has given me.

0:01:43.140000 --> 0:01:48.700000
 So my laptop says, okay, in addition
 to my layer two non routable address,

0:01:48.700000 --> 0:01:51.640000
 which is my MAC address, here's
 my routable address.

0:01:51.640000 --> 0:01:57.780000
 And by using that in combination with
 the subnet mask, by pairing these

0:01:57.780000 --> 0:02:02.940000
 two up together, it can extract from
 that what network it belongs to.

0:02:02.940000 --> 0:02:08.600000
 In this particular case, it knows that
 it belongs to the 10.7.1 network.

0:02:08.600000 --> 0:02:14.380000
 So every other device in my room, in my
 network, has an IP address belonging

0:02:14.380000 --> 0:02:19.320000
 or beginning with 10.7.1.

0:02:19.320000 --> 0:02:23.960000
 Without the subnet mask, this routable
 address would be useless.

0:02:23.960000 --> 0:02:29.020000
 There'd be no way to extract from
 it what network it belongs to.

0:02:29.020000 --> 0:02:34.700000
 And this particular case, the .11,
 that is my unique serial number.

0:02:34.700000 --> 0:02:39.980000
 That is my unique name
 in the 10.7.1 network.

0:02:39.980000 --> 0:02:43.680000
 So that answers the question of what
 is my routable address and how do

0:02:43.680000 --> 0:02:47.420000
 I extract from that
 what network I'm on.

0:02:47.420000 --> 0:02:51.820000
 So if I told my laptop, if I open up
 some programmer application that

0:02:51.820000 --> 0:02:58.800000
 said, okay, I want you to send
 some data to 10.7.1.5.

0:02:58.800000 --> 0:03:09.400000
 All right. So if I said 10.7.1.5, it
 would say, okay, first thing I'm

0:03:09.400000 --> 0:03:12.000000
 going to do is I'm going to answer the
 question, is that destination in

0:03:12.000000 --> 0:03:15.800000
 the same network as me or is it in a different
 network, a different broadcast

0:03:15.800000 --> 0:03:25.020000
 domain. So it'd say, okay, well,
 my IP address was 10.7.1.1.

0:03:25.020000 --> 0:03:28.600000
 And it took this, no, 10.7.1.11.

0:03:28.600000 --> 0:03:33.200000
 And it took the subnet mask
 and it put it underneath.

0:03:33.200000 --> 0:03:39.860000
 And anywhere there's a 255, that means
 that the entire digit right above

0:03:39.860000 --> 0:03:42.340000
 it belongs to your network.

0:03:42.340000 --> 0:03:47.000000
 So all of 10, all of
 7, and all of 1.

0:03:47.000000 --> 0:03:48.200000
 So that's how my device learned.

0:03:48.200000 --> 0:03:52.080000
 It said, okay, of my subnet mask, it's
 telling me that the first three

0:03:52.080000 --> 0:03:55.220000
 digits out of four belong
 to the network.

0:03:55.220000 --> 0:03:58.740000
 So now I'm saying, okay, well,
 I want you to go to 10.7.1.5.

0:03:58.740000 --> 0:04:01.560000
 Well, it does, it says,
 okay, I'm 10.7.1.

0:04:01.560000 --> 0:04:03.120000
 Let me compare the destination.

0:04:03.120000 --> 0:04:04.760000
 Oh, it's also 10.

0:04:04.760000 --> 0:04:05.820000
 It's also seven.

0:04:05.820000 --> 0:04:08.820000
 It's also one. I've got my answer.


0:04:08.820000 --> 0:04:13.700000
 This destination is in the
 exact same network as me.

0:04:13.700000 --> 0:04:15.740000
 So no routing is necessary.

0:04:15.740000 --> 0:04:18.840000
 So now he'll say, okay, well, let
 me shout out into the network.

0:04:18.840000 --> 0:04:22.820000
 Hey, 10.7.1.5. I know you're
 in the same room as me.

0:04:22.820000 --> 0:04:25.540000
 I know you're in the
 same network as me.

0:04:25.540000 --> 0:04:28.320000
 But I need what your non
-routable address is.

0:04:28.320000 --> 0:04:32.840000
 I need your layer two non-routable address,
 your name, your unique name.

0:04:32.840000 --> 0:04:34.360000
 So I can talk to you.

0:04:34.360000 --> 0:04:38.280000
 And the device would come back and say,
 oh, well, my non-routable address

0:04:38.280000 --> 0:04:40.200000
 is, and then it would
 give its MAC address.

0:04:40.200000 --> 0:04:43.040000
 And so now I can talk
 to it directly.

0:04:43.040000 --> 0:04:47.600000
 As opposed to if I had said, well,
 I want you to send instead a packet

0:04:47.600000 --> 0:04:57.220000
 going to 10.7.3.5.

0:04:57.220000 --> 0:05:00.660000
 It would say, okay, 10.7.0.3.

0:05:00.660000 --> 0:05:02.680000
 That's not the same as me.

0:05:02.680000 --> 0:05:05.480000
 Therefore, this is a
 different network.

0:05:05.480000 --> 0:05:06.740000
 I don't know where it is.

0:05:06.740000 --> 0:05:07.880000
 Could be five feet away.

0:05:07.880000 --> 0:05:09.660000
 Could be 5,000 miles away.

0:05:09.660000 --> 0:05:11.720000
 All I know is it's not in my room.


0:05:11.720000 --> 0:05:15.340000
 It's not my directly
 connected network.

0:05:15.340000 --> 0:05:17.920000
 So that brings us to the question
 of, well, what do you do then?

0:05:17.920000 --> 0:05:21.880000
 Well, a routable protocol like the Internet
 Protocol has to answer that

0:05:21.880000 --> 0:05:26.200000
 question. What do you do when the destination
 is not in your network?

0:05:26.200000 --> 0:05:32.620000
 You say, well, a host device, all a
 host device knows about your laptop,

0:05:32.620000 --> 0:05:34.980000
 your smartphone, your tablet.

0:05:34.980000 --> 0:05:39.580000
 All it knows about is its own network
 and how to talk to people in its

0:05:39.580000 --> 0:05:42.980000
 own network. It's like saying, okay,
 you're in a room full of people.

0:05:42.980000 --> 0:05:47.360000
 You know that to talk to people in
 the room, you talk to them directly

0:05:47.360000 --> 0:05:50.400000
 or you shout out, hey, is there anybody
 over here who's wearing a red

0:05:50.400000 --> 0:05:53.280000
 shirt? But you talk
 to them directly.

0:05:53.280000 --> 0:05:56.420000
 But now the question is, how do you talk
 to someone if you know what their

0:05:56.420000 --> 0:06:00.240000
 name is and you know they're
 not in your room?

0:06:00.240000 --> 0:06:02.700000
 You know you can't talk
 to them directly.

0:06:02.700000 --> 0:06:05.700000
 Well, the Internet Protocol says you're
 going to use an intermediary.

0:06:05.700000 --> 0:06:08.120000
 You're going to use a device.

0:06:08.120000 --> 0:06:12.520000
 You can talk to that device and that
 device will relay or convey your

0:06:12.520000 --> 0:06:17.140000
 information to who it is you want
 to talk to, to your destination.

0:06:17.140000 --> 0:06:19.740000
 And that's what we call a default gateway
 in the world of the Internet

0:06:19.740000 --> 0:06:22.560000
 Protocol. It's called a router
 or a default gateway.

0:06:22.560000 --> 0:06:26.660000
 So a default gateway is a device that
 sits in your room with you in your

0:06:26.660000 --> 0:06:30.680000
 network. You can talk to it directly
 just like you talk to everybody else

0:06:30.680000 --> 0:06:36.000000
 in your room. But what makes him unique
 is that he knows about other networks.

0:06:36.000000 --> 0:06:37.620000
 He knows about other rooms.

0:06:37.620000 --> 0:06:43.400000
 So if I need to talk to Pablo and I realize,
 oh, Pablo is not in my room.

0:06:43.400000 --> 0:06:44.560000
 He's somewhere else.

0:06:44.560000 --> 0:06:46.060000
 He's in some other network.

0:06:46.060000 --> 0:06:47.580000
 Then I'll send my information.

0:06:47.580000 --> 0:06:51.660000
 I'll talk at layer two to my default
 gateway and I'll say, hey, default

0:06:51.660000 --> 0:06:55.140000
 gateway. Yeah, Keith, I have some information
 here that needs to go to

0:06:55.140000 --> 0:07:00.120000
 Pablo. Can you get this to him
 and then he'll send it on.

0:07:00.120000 --> 0:07:04.760000
 So in the world of the Internet Protocol,
 we also need a default gateway.

0:07:04.760000 --> 0:07:06.540000
 And that's what we see right here.


0:07:06.540000 --> 0:07:11.420000
 Ten seven one one is
 my default gateway.

0:07:11.420000 --> 0:07:13.140000
 No, it's ten seven one.

0:07:13.140000 --> 0:07:16.760000
 It's in the exact same network as me
 ten seven one, which means I can

0:07:16.760000 --> 0:07:18.460000
 talk to him directly.

0:07:18.460000 --> 0:07:23.040000
 If a device had an IP address of a default
 gateway, but the default gateway

0:07:23.040000 --> 0:07:27.280000
 was not in the same network,
 that wouldn't work.

0:07:27.280000 --> 0:07:29.120000
 That would break the rules of IP.

0:07:29.120000 --> 0:07:30.660000
 There's no point in
 having a default.

0:07:30.660000 --> 0:07:34.580000
 It's sort of like saying, okay,
 you're in the basement.

0:07:34.580000 --> 0:07:38.880000
 And if you want to talk to anybody in
 the outside world, you have to talk

0:07:38.880000 --> 0:07:42.160000
 to John who's on the
 who's in the attic.

0:07:42.160000 --> 0:07:44.340000
 But I'm not going to tell you
 how to get to the attic.

0:07:44.340000 --> 0:07:45.780000
 I'm not going, you know,
 you're in the basement.

0:07:45.780000 --> 0:07:47.460000
 You know how to walk around the basement,
 but I'm not going to tell you

0:07:47.460000 --> 0:07:48.560000
 how to get to the attic.

0:07:48.560000 --> 0:07:51.060000
 But that's where John lives who can
 get to the rest of the world.

0:07:51.060000 --> 0:07:52.260000
 What good would that do you?

0:07:52.260000 --> 0:07:53.460000
 It would do you no
 good whatsoever.

0:07:53.460000 --> 0:07:57.380000
 So your default gateway has to
 be in the same room as you.

0:07:57.380000 --> 0:08:01.160000
 Otherwise, he can't serve
 his role, his function.

0:08:01.160000 --> 0:08:08.100000
 Now, one other thing I want to show
 you here is in your output, you can

0:08:08.100000 --> 0:08:11.060000
 type route print.

0:08:11.060000 --> 0:08:17.260000
 And what this shows you is you can
 see here you're, and I'm just going

0:08:17.260000 --> 0:08:22.320000
 to focus in right now on IP version
 four, is your routing table of your

0:08:22.320000 --> 0:08:25.840000
 laptop. Now, I want to, I'm going to
 get back to that for a second because

0:08:25.840000 --> 0:08:29.740000
 saying that this is a routing table
 is a little bit of a misnomer.

0:08:29.740000 --> 0:08:34.660000
 But the way you would read this is this
 says, okay, for any packet that

0:08:34.660000 --> 0:08:40.980000
 this device creates, any time my laptop
 creates a packet, going to x.x

0:08:40.980000 --> 0:08:43.360000
.x.x is the destination.

0:08:43.360000 --> 0:08:46.180000
 So that's the destination
 IP address.

0:08:46.180000 --> 0:08:50.400000
 It's going to say, okay, I'm going to
 look in this table and this table

0:08:50.400000 --> 0:08:53.020000
 is going to tell me what
 to do with that.

0:08:53.020000 --> 0:09:03.100000
 So for example, if I create a packet
 going to 10.7.1.30, well, it would

0:09:03.100000 --> 0:09:04.680000
 go through this table
 and find a match.

0:09:04.680000 --> 0:09:11.060000
 It says, okay, here's 10.7.1, and this
 subnet mask says match the first

0:09:11.060000 --> 0:09:14.060000
 three numbers. Okay,
 that would match.

0:09:14.060000 --> 0:09:17.180000
 Is there anything even more
 specific than that?

0:09:17.180000 --> 0:09:19.080000
 Well, let's see here.

0:09:19.080000 --> 0:09:24.820000
 Not that matches this, 10.7
.1.11, no, 10.7.1.255, no.

0:09:24.820000 --> 0:09:28.140000
 So this is my most specific
 match right here.

0:09:28.140000 --> 0:09:33.900000
 So my route table in my laptop says, okay,
 if my packet matches this entry,

0:09:33.900000 --> 0:09:42.340000
 then I need to send it to 10
.7.1.11, which is on my link.

0:09:42.340000 --> 0:09:43.860000
 It's on my ethernet cable.

0:09:43.860000 --> 0:09:47.140000
 So this is where I would
 forward that packet.

0:09:47.140000 --> 0:09:54.240000
 Now, if I gave it another address of,
 let's say, eight, eight, eight,

0:09:54.240000 --> 0:09:59.060000
 eight, he'd look through here and he'd
 say, well, of that, this is the

0:09:59.060000 --> 0:10:00.580000
 only one that matches.

0:10:00.580000 --> 0:10:04.300000
 This says you don't have to
 match any of these bits.

0:10:04.300000 --> 0:10:07.380000
 This basically is like a
 match any or a match all.

0:10:07.380000 --> 0:10:11.000000
 It says, okay, if something doesn't specifically
 match down here, it matches

0:10:11.000000 --> 0:10:14.820000
 this. This is called
 the default route.

0:10:14.820000 --> 0:10:20.280000
 And once again, send
 it to the gateway.

0:10:20.280000 --> 0:10:22.800000
 Actually, I'm sorry, let
 me take a step back here.

0:10:22.800000 --> 0:10:27.340000
 When I said 10.7.1.30, all of these entries
 right here, all these entries

0:10:27.340000 --> 0:10:34.120000
 that say on link, that says I can
 talk to that device directly.

0:10:34.120000 --> 0:10:38.540000
 So all of these things mean if I have
 a packet that matches any of these

0:10:38.540000 --> 0:10:43.360000
 entries, I can put it into an ethernet
 frame and I can speak directly

0:10:43.360000 --> 0:10:45.900000
 to it. I don't need
 to use a router.

0:10:45.900000 --> 0:10:47.540000
 He is on my network.

0:10:47.540000 --> 0:10:51.580000
 The only entry here that matches the
 router is this first one, the default

0:10:51.580000 --> 0:10:59.040000
 gateway. So if my laptop creates a broadcast,
 well, a broadcast is right

0:10:59.040000 --> 0:11:02.280000
 here. This says match
 all these bits.

0:11:02.280000 --> 0:11:03.480000
 That means it's on link.

0:11:03.480000 --> 0:11:06.320000
 That means put that broadcast
 on the wire.

0:11:06.320000 --> 0:11:15.900000
 If my laptop creates a multicast, well,
 a multicast in binary, 1, 1, 1,

0:11:15.900000 --> 0:11:23.500000
 0, x, x, x, x. So any IP address where
 the first four bits start out with

0:11:23.500000 --> 0:11:26.840000
 this, that is a class D address.

0:11:26.840000 --> 0:11:29.340000
 Class D is in David.

0:11:29.340000 --> 0:11:32.020000
 And class D addresses were
 reserved for multicast.

0:11:32.020000 --> 0:11:37.380000
 So these first four bits
 come out to 224.

0:11:37.380000 --> 0:11:43.100000
 So right here, anything that begins
 with 224 that says put on my wire,

0:11:43.100000 --> 0:11:44.520000
 it's in my network.

0:11:44.520000 --> 0:11:53.400000
 But if I gave it, like I said, 888
 or 70.111 or anything else, all of

0:11:53.400000 --> 0:11:58.760000
 that is going to match this entry right
 here, which says send it to the

0:11:58.760000 --> 0:12:00.840000
 gateway. It's not on my network.

0:12:00.840000 --> 0:12:05.160000
 I don't know where it is, but hopefully
 he will know where it is.

0:12:05.160000 --> 0:12:11.860000
 And once again, the command to view
 all that in DOS was route print.

0:12:11.860000 --> 0:12:14.320000
 Route print gave us that.

0:12:14.320000 --> 0:12:19.780000
 So that's just a little overview there
 of how your laptop identifies its

0:12:19.780000 --> 0:12:25.120000
 routable address, how it extracts from
 the route old address, what network

0:12:25.120000 --> 0:12:30.660000
 it's on, and how it knows what to do with
 packets that are going to destinations

0:12:30.660000 --> 0:12:32.900000
 that are not on your network.

