WEBVTT

0:00:05.100000 --> 0:00:10.420000
 So in the last section, I showed you
 how as a packet or a piece of data,

0:00:10.420000 --> 0:00:13.180000
 we'll just call the packet,
 comes into a router.

0:00:13.180000 --> 0:00:17.020000
 Once the router strips off the layer
 2 header where he initially thought,

0:00:17.020000 --> 0:00:21.240000
 this is for me, and he sees the layer
 3 header behind that, that's where

0:00:21.240000 --> 0:00:24.560000
 he very first realizes, oh,
 this data is not for me.

0:00:24.560000 --> 0:00:28.880000
 Someone's just using me to forward
 this data to its final destination.

0:00:28.880000 --> 0:00:34.100000
 And he says, okay, I need to look somewhere
 within myself to see if I

0:00:34.100000 --> 0:00:37.500000
 know how to forward
 this information.

0:00:37.500000 --> 0:00:41.020000
 So now the question that's going to
 be answered in this section is, how

0:00:41.020000 --> 0:00:44.080000
 does he learn of where
 these destinations are?

0:00:44.080000 --> 0:00:47.940000
 What are the various ways that he has
 available to him to learn of all

0:00:47.940000 --> 0:00:51.600000
 the destinations a packet could
 possibly be going to?

0:00:51.600000 --> 0:00:55.380000
 And then secondly, once we look at how
 he could learn that information,

0:00:55.380000 --> 0:00:58.500000
 where does he store
 that information?

0:00:58.500000 --> 0:01:02.380000
 What component of the router is used
 to store these routes that he has

0:01:02.380000 --> 0:01:08.380000
 learned? So routes in the routing table
 could be learned in one of three

0:01:08.380000 --> 0:01:12.380000
 ways. The first way is a
 directly connected route.

0:01:12.380000 --> 0:01:17.300000
 For example, when I did the DOS command
 line on my laptop and we saw that

0:01:17.300000 --> 0:01:20.960000
 the vast majority of stuff in the route
 print command said on link, on

0:01:20.960000 --> 0:01:24.600000
 link, on link, that's another way
 of saying directly connected.

0:01:24.600000 --> 0:01:27.440000
 That means I am a host.

0:01:27.440000 --> 0:01:31.900000
 I have a routable address that is on
 this link that is connected to this

0:01:31.900000 --> 0:01:36.220000
 network. So every time you type an
 IP address into router's interface

0:01:36.220000 --> 0:01:40.760000
 and you give it a subnet mask and then
 that interface comes up, electrically

0:01:40.760000 --> 0:01:44.940000
 comes up, the router says, okay, the
 router does the exact same thing

0:01:44.940000 --> 0:01:45.900000
 that a laptop does.

0:01:45.900000 --> 0:01:49.340000
 He takes that IP address, he puts the
 subnet mask underneath it and he

0:01:49.340000 --> 0:01:52.740000
 says, okay, of this IP address,
 this portion is the network.

0:01:52.740000 --> 0:01:58.040000
 And this IP address was put on Ethernet
 zero or fast Ethernet one.

0:01:58.040000 --> 0:02:02.900000
 So Ethernet zero, fast Ethernet one is
 directly connected to this network.

0:02:02.900000 --> 0:02:07.920000
 So a router can route packets between
 its own directly connected networks

0:02:07.920000 --> 0:02:11.460000
 without any kind of fancy routing
 protocols whatsoever.

0:02:11.460000 --> 0:02:14.960000
 If a packet comes in one interface,
 the router looks at the destination

0:02:14.960000 --> 0:02:18.760000
 and he says, oh, this destination address
 is a host address that's on

0:02:18.760000 --> 0:02:22.980000
 this network right here that I'm
 connected to, he can route it.

0:02:22.980000 --> 0:02:26.040000
 We don't need to turn on any routing
 protocols or anything like that.

0:02:26.040000 --> 0:02:30.220000
 But now the question is, what if the
 packet comes in and the destination

0:02:30.220000 --> 0:02:33.320000
 address is not on link?

0:02:33.320000 --> 0:02:37.500000
 It belongs to some network that the
 router is not directly connected to.

0:02:37.500000 --> 0:02:41.740000
 So now he has to have a route for those
 off link connections and there's

0:02:41.740000 --> 0:02:46.020000
 two ways the routes of that type
 could be placed to a router.

0:02:46.020000 --> 0:02:47.960000
 One way is a static route.

0:02:47.960000 --> 0:02:51.720000
 This means that you as the human being,
 as a network administrator, log

0:02:51.720000 --> 0:02:56.260000
 onto that router and you typed in a
 command to tell the router, here's

0:02:56.260000 --> 0:02:59.200000
 a network I want you to know about,
 you're not connected to it.

0:02:59.200000 --> 0:03:02.500000
 Here's the subnet mask so you can tell
 what portion of this addresses

0:03:02.500000 --> 0:03:07.880000
 the network. Here's the IP address
 of someone who is on your network,

0:03:07.880000 --> 0:03:12.140000
 who's your next hop, who can
 get that packet on its way.

0:03:12.140000 --> 0:03:15.340000
 Just like in a laptop, how a laptop
 knows of a gateway and that gateway

0:03:15.340000 --> 0:03:19.900000
 is on link and the laptop says, okay,
 something that I don't know where

0:03:19.900000 --> 0:03:24.340000
 it's going, send it to this on-link
 destination of my laptop and he'll

0:03:24.340000 --> 0:03:28.860000
 get it there. The router has to have
 a next hop for its routes for the

0:03:28.860000 --> 0:03:30.220000
 exact same reason.

0:03:30.220000 --> 0:03:33.700000
 A route pointing to a remote network
 which could be 5000 miles away has

0:03:33.700000 --> 0:03:38.360000
 to have a next hop which is on link,
 which is directly connected so you

0:03:38.360000 --> 0:03:40.640000
 know where to forward the packet.

0:03:40.640000 --> 0:03:46.360000
 So you could type that in statically
 or we could use dynamic routes like

0:03:46.360000 --> 0:03:52.000000
 RIP or EIGR, peer OSPF which is basically
 routers talking to each other

0:03:52.000000 --> 0:03:55.580000
 and telling each other about
 networks they know about.

0:03:55.580000 --> 0:03:59.120000
 Networks they're directly connected to
 as well as networks that they learn

0:03:59.120000 --> 0:04:01.720000
 from other downstream routers.

0:04:01.720000 --> 0:04:05.420000
 Dynamic routing protocols
 can do that for us.

0:04:05.420000 --> 0:04:12.200000
 So let me do an example here just
 showing you some things of this.

0:04:12.200000 --> 0:04:17.800000
 So for example, take a look at this,
 I'm going to be using GNS3 for these

0:04:17.800000 --> 0:04:20.220000
 demonstrations in this case.

0:04:20.220000 --> 0:04:25.660000
 So notice router 4 right here in
 the lower right hand corner.

0:04:25.660000 --> 0:04:31.540000
 So he has a fast ethernet interface
 and I've configured him with the IP

0:04:31.540000 --> 0:04:38.720000
 address of 3.4.3.4 and a
 subnet mask of slash 24.

0:04:38.720000 --> 0:04:47.780000
 So what that means is that router is
 going to take 3.4.3.4 and we know

0:04:47.780000 --> 0:04:58.960000
 that if we convert subnet mask of slash
 24 it says these 8 bits, these

0:04:58.960000 --> 0:05:03.300000
 8 bits and these 8 bits
 belong to the network.

0:05:03.300000 --> 0:05:10.640000
 So it tells the router you are directly
 connected to the 3.4.3.0 network,

0:05:10.640000 --> 0:05:12.620000
 3.4.3.0 network.

0:05:12.620000 --> 0:05:15.960000
 So let's take a look at
 router 4 for a moment.

0:05:15.960000 --> 0:05:23.560000
 Okay, here we go.

0:05:23.560000 --> 0:05:32.100000
 So show IP route and show
 run fast ethernet 00.

0:05:32.100000 --> 0:05:35.720000
 Oops, show run interface
 fast ethernet 00.

0:05:35.720000 --> 0:05:40.960000
 So notice here my fast ethernet interface,
 here I put my IP address, my

0:05:40.960000 --> 0:05:46.260000
 32-bit number. Here I provided my subnet
 mask saying of that 32-bit number

0:05:46.260000 --> 0:05:52.240000
 you can extract from
 it that is 3.4.3.

0:05:52.240000 --> 0:05:56.460000
 Now that interface actually
 needs to be up.

0:05:56.460000 --> 0:05:59.180000
 In other words, let me shut
 it down for a moment.

0:05:59.180000 --> 0:06:05.380000
 When an interface is disabled, electrically
 shut down, you can put an

0:06:05.380000 --> 0:06:09.480000
 IP address on it all day long but he's
 going to say I don't know where

0:06:09.480000 --> 0:06:10.780000
 that network lives.

0:06:10.780000 --> 0:06:15.060000
 Show IP route. Notice the
 3.4.3 is not in here.

0:06:15.060000 --> 0:06:19.400000
 Even though I told him on this interface,
 here's your address and here's

0:06:19.400000 --> 0:06:24.540000
 your mask, he said, well, as
 a host, this host is dead.

0:06:24.540000 --> 0:06:27.760000
 This host is not doing anything right
 now because this interface is down.

0:06:27.760000 --> 0:06:29.540000
 It's electrically down.

0:06:29.540000 --> 0:06:34.840000
 And so if I as a host am not functioning
 here, there's really no point

0:06:34.840000 --> 0:06:37.260000
 in me figuring out what
 network this is.

0:06:37.260000 --> 0:06:40.640000
 Why should I figure out what network
 it is if I can't even use it anyway?

0:06:40.640000 --> 0:06:42.980000
 And so notice on the routing
 table, it's not there.

0:06:42.980000 --> 0:06:48.000000
 But when I bring that interface up
 and it becomes electrically active

0:06:48.000000 --> 0:06:51.380000
 or if we're talking about a fiber optic
 interface that's receiving laser

0:06:51.380000 --> 0:06:57.280000
 or LED light pulses, now he says, okay,
 I am a host on a physically connected

0:06:57.280000 --> 0:06:59.600000
 network that is functioning.

0:06:59.600000 --> 0:07:03.480000
 And so now my routing table says I can
 extract that I am directly connected

0:07:03.480000 --> 0:07:06.180000
 to the 3.4.3 network.

0:07:06.180000 --> 0:07:11.240000
 And of this number, the first 24 bits
 tell me the network that I belong

0:07:11.240000 --> 0:07:17.420000
 to. Now if I want to give him a static
 route, for example, if I want to

0:07:17.420000 --> 0:07:21.180000
 tell him, let's just say I'm going to
 do one, just make one up here for

0:07:21.180000 --> 0:07:25.720000
 a moment. Let's say that off of this
 router right here, there was the

0:07:25.720000 --> 0:07:33.300000
 99.99.0.1 network.

0:07:33.300000 --> 0:07:40.740000
 And of that network, let's say the
 actual network was this, 99.99.

0:07:40.740000 --> 0:07:44.260000
 So I'm going to go into router 4 and
 I'm going to tell him with commands,

0:07:44.260000 --> 0:07:47.320000
 I'm going to say, okay, if you want
 to send packets to anything starting

0:07:47.320000 --> 0:07:53.200000
 with 99.99, then the person in your room,
 the person in your network that

0:07:53.200000 --> 0:08:03.500000
 you need to forward those
 packets to is 343.3.3.

0:08:03.500000 --> 0:08:09.700000
 So the context of that or the command
 to do that would be IP route.

0:08:09.700000 --> 0:08:13.800000
 So IP route means I'm configuring an
 IP version 4 routing, putting a route

0:08:13.800000 --> 0:08:17.120000
 into his table. What's
 the network?

0:08:17.120000 --> 0:08:21.240000
 99.99. Can I leave it like that?

0:08:21.240000 --> 0:08:22.980000
 Can I just say 99.99?

0:08:22.980000 --> 0:08:26.800000
 No, I can't because this is
 an IP version 4 network.

0:08:26.800000 --> 0:08:29.940000
 An IP version 4 network
 is a 32-bit number.

0:08:29.940000 --> 0:08:33.980000
 I can't just give it 16 bits,
 I got to give it all 32 bits.

0:08:33.980000 --> 0:08:36.620000
 So the remaining bits
 are just zeroed out.

0:08:36.620000 --> 0:08:40.900000
 Remember, in a network address, all the
 host bits after the network portion

0:08:40.900000 --> 0:08:42.460000
 are just all zeros.

0:08:42.460000 --> 0:08:45.460000
 That indicates this is an
 address for the network.

0:08:45.460000 --> 0:08:49.500000
 Not a particular host on the network,
 just the network in general.

0:08:49.500000 --> 0:08:52.440000
 And then I have to give him now, of
 that 32-bit number, he says, okay,

0:08:52.440000 --> 0:08:55.800000
 but that by itself,
 what's the network?

0:08:55.800000 --> 0:08:58.320000
 Is it the first byte, just 99?

0:08:58.320000 --> 0:08:59.680000
 Is it the first three bytes?

0:08:59.680000 --> 0:09:06.280000
 99.99.0? So I have to give him a subnet
 mask, which says, okay, only the

0:09:06.280000 --> 0:09:07.960000
 first two bytes are
 really relevant.

0:09:07.960000 --> 0:09:11.780000
 I had to give you the last two because
 IP version 4 forced me to do that.

0:09:11.780000 --> 0:09:15.740000
 But only the first two bytes, 255, 255
 says only the first two bytes are

0:09:15.740000 --> 0:09:17.260000
 what you have to match on.

0:09:17.260000 --> 0:09:20.760000
 Now if I just hit enter, it
 says incomplete command.

0:09:20.760000 --> 0:09:24.940000
 He says, look, a route that I'm not connected
 to does me no good whatsoever

0:09:24.940000 --> 0:09:31.060000
 unless you tell me about another router
 that is connected to me, a router

0:09:31.060000 --> 0:09:36.700000
 I can speak to directly who I can
 use to get to that network.

0:09:36.700000 --> 0:09:38.520000
 That's our next hop.

0:09:38.520000 --> 0:09:43.040000
 And so in this particular case,
 the next hop would be 343.3.

0:09:43.040000 --> 0:09:48.760000
 So 343.3.3. And that creates
 a static route.

0:09:48.760000 --> 0:09:53.860000
 And now I can look at my routing table
 and we can see here with the S,

0:09:53.860000 --> 0:09:59.220000
 it says 99.99 is reachable
 via 343.3.

0:09:59.220000 --> 0:10:04.480000
 Now remember I said that a next
 hop alone was not good enough.

0:10:04.480000 --> 0:10:08.680000
 A next hop has to be paired with an
 egress interface because the router

0:10:08.680000 --> 0:10:12.420000
 says I'm connected to many rooms, I'm
 connected to many networks, many

0:10:12.420000 --> 0:10:18.760000
 cables. Which cable, which network
 do I use to actually talk to this?

0:10:18.760000 --> 0:10:22.300000
 Well, that causes him to do what's
 called a recursive route.

0:10:22.300000 --> 0:10:26.560000
 He says, okay, to get to this
 remote network, I go to 343.3.

0:10:26.560000 --> 0:10:28.760000
 Well, how do I get to 343.3?

0:10:28.760000 --> 0:10:33.000000
 It causes him to go back in his routing
 table and he finds this entry

0:10:33.000000 --> 0:10:34.780000
 that matches it.

0:10:34.780000 --> 0:10:40.520000
 Says, oh 343.3 is directly connected
 via fast ethernet 00.

0:10:40.520000 --> 0:10:45.540000
 So even though we don't see it, this
 static route here is only usable

0:10:45.540000 --> 0:10:53.520000
 because it has the network, the mask, the
 next hop, and the egress interface.

0:10:53.520000 --> 0:10:57.840000
 Without the egress interface, this
 static route would do no good.

0:10:57.840000 --> 0:10:59.700000
 Now you might be wondering,
 well, wait a second.

0:10:59.700000 --> 0:11:02.420000
 Wouldn't he always have
 the egress interface?

0:11:02.420000 --> 0:11:03.760000
 Not necessarily.

0:11:03.760000 --> 0:11:09.780000
 For example, what if this interface
 was down, was electrically deactive?

0:11:09.780000 --> 0:11:13.180000
 Then he would say, well, wait a second,
 you're telling me to get to this,

0:11:13.180000 --> 0:11:14.900000
 I need to go 343.3.

0:11:14.900000 --> 0:11:19.440000
 But if this interface was down, he
 would have no way of knowing where

0:11:19.440000 --> 0:11:24.440000
 this is. Because remember, if I go into
 that interface and I shut it down,

0:11:24.440000 --> 0:11:29.420000
 I've now just basically told him, you
 are a host on a non-existent network,

0:11:29.420000 --> 0:11:32.000000
 a network that down,
 you're a host.

0:11:32.000000 --> 0:11:34.700000
 I says, okay, well, then I'm
 not really a host at all.

0:11:34.700000 --> 0:11:39.560000
 It's sort of like saying, I'm going to
 give you a name, but I'm not going

0:11:39.560000 --> 0:11:43.320000
 to, you're not allowed to write
 and you're not allowed to speak.

0:11:43.320000 --> 0:11:46.700000
 Well, what good is your name if you
 can't tell anybody at Verbalie, or

0:11:46.700000 --> 0:11:49.760000
 you can't write it down, then it's a
 piece of information that's useless

0:11:49.760000 --> 0:11:55.260000
 to you. So his IP address of 343, whatever
 it is, is useless because the

0:11:55.260000 --> 0:11:59.560000
 interface it sits on has just been electrically
 deactivated, which means

0:11:59.560000 --> 0:12:04.920000
 this static route is now useless because
 we can't reach the next hop.

0:12:04.920000 --> 0:12:09.580000
 So if I look at my routing table now,
 we'll see the static route is gone.

0:12:09.580000 --> 0:12:12.880000
 Not only is the connected route gone,
 but the static route is gone because

0:12:12.880000 --> 0:12:16.000000
 we can't reach the next hop.

0:12:16.000000 --> 0:12:19.860000
 So the next hop has to
 be a reachable address.

0:12:19.860000 --> 0:12:25.280000
 And now when that interface comes back
 up, the static route as well as

0:12:25.280000 --> 0:12:28.060000
 the connected route comes back.

0:12:28.060000 --> 0:12:31.320000
 So I'm going to go ahead and remove
 that for now because I don't want

0:12:31.320000 --> 0:12:38.280000
 too much extraneous junk in here.

0:12:38.280000 --> 0:12:41.180000
 So that is a static route.

0:12:41.180000 --> 0:12:46.660000
 So what are some general rules of routing
 routers will only accept routes

0:12:46.660000 --> 0:12:49.900000
 that match their own
 active protocols?

0:12:49.900000 --> 0:12:51.660000
 What is that talking about?

0:12:51.660000 --> 0:12:57.680000
 Well, let's say I have my router right
 here and here is on this interface,

0:12:57.680000 --> 0:13:01.840000
 we'll just stick with fast ethernet 00
 since that's what we've been talking

0:13:01.840000 --> 0:13:04.700000
 about. He has an IP address.

0:13:04.700000 --> 0:13:05.960000
 Doesn't really matter what it is.

0:13:05.960000 --> 0:13:09.820000
 Let's just say it's 1111 slash 24.


0:13:09.820000 --> 0:13:14.680000
 Great. Now all of a sudden there's another
 router out here who sends him

0:13:14.680000 --> 0:13:33.960000
 a message. He says, you can get to
 2001 colon a a a colon b b b colon

0:13:33.960000 --> 0:13:41.600000
 colon 64. Well, this is an IPV six route
 and this router would say, um,

0:13:41.600000 --> 0:13:43.080000
 I don't even know what that is.

0:13:43.080000 --> 0:13:45.540000
 That doesn't match
 IP version four.

0:13:45.540000 --> 0:13:48.760000
 So whatever that is,
 I can't use it.

0:13:48.760000 --> 0:13:52.940000
 So the router will only accept routes
 that match its own active protocols

0:13:52.940000 --> 0:13:53.800000
 on this interface.

0:13:53.800000 --> 0:13:56.820000
 The only active protocol he
 has is IP version four.

0:13:56.820000 --> 0:14:00.340000
 So there's no way he can do IP version
 six routing because he's not running

0:14:00.340000 --> 0:14:07.540000
 that protocol. A router will only use
 routes with reachable next hops.

0:14:07.540000 --> 0:14:12.300000
 And I showed you that in the previous
 static route that I gave you where

0:14:12.300000 --> 0:14:14.440000
 the next hop became unreachable.

0:14:14.440000 --> 0:14:15.340000
 Another example.

0:14:15.340000 --> 0:14:16.900000
 Now that was an extreme example.

0:14:16.900000 --> 0:14:20.920000
 Let me show you another example of
 where this could be a problem.

0:14:20.920000 --> 0:14:23.900000
 Let's go back to my
 GNS three topology.

0:14:23.900000 --> 0:14:28.520000
 So at the CCNA level, one of the things,
 if you haven't already learned

0:14:28.520000 --> 0:14:30.540000
 about it, that you're
 going to learn is BGP.

0:14:30.540000 --> 0:14:37.420000
 They just put some real basic BGP stuff
 into the CCNA version three.0

0:14:37.420000 --> 0:14:42.540000
 exams. And one of the things about BGP
 that you'll learn is that there's

0:14:42.540000 --> 0:14:46.300000
 a concept of interior
 and exterior BGP.

0:14:46.300000 --> 0:14:51.180000
 Interior BGP is when two routers are
 speaking BGP and they belong to the

0:14:51.180000 --> 0:14:55.480000
 same company. They belong to
 the same autonomous system.

0:14:55.480000 --> 0:14:57.620000
 Exterior BGP is just the opposite.


0:14:57.620000 --> 0:15:01.400000
 Two routers are talking to each other,
 but they belong in different autonomous

0:15:01.400000 --> 0:15:05.140000
 systems. So they're not
 in the same company.

0:15:05.140000 --> 0:15:07.780000
 Was this have to do with next hop?


0:15:07.780000 --> 0:15:13.080000
 Well, in the world of BGP, when you
 receive an update from an external

0:15:13.080000 --> 0:15:15.900000
 peer, so in other words, when router
 two learns from router one, let's

0:15:15.900000 --> 0:15:19.080000
 say router one is telling him about
 this network right here, the 11 11

0:15:19.080000 --> 0:15:22.560000
 11 network. Router one will say, hey,
 buddy, you're in the same room as

0:15:22.560000 --> 0:15:29.300000
 me. So here's 11 11 11 0 slash 24.


0:15:29.300000 --> 0:15:37.560000
 And I am your next top, which
 is one two one one.

0:15:37.560000 --> 0:15:43.900000
 Okay, so an external update router
 one put himself as a next hop.

0:15:43.900000 --> 0:15:48.340000
 But here's what's kind of interesting
 and this is all CCNA level here.

0:15:48.340000 --> 0:15:55.120000
 If router two sends that to router three,
 this is an IBGP update because

0:15:55.120000 --> 0:15:58.500000
 router two and router three are
 in the same autonomous system.

0:15:58.500000 --> 0:16:00.540000
 So when he sends this
 update, guess what?

0:16:00.540000 --> 0:16:04.160000
 He does not change the next hop.

0:16:04.160000 --> 0:16:08.640000
 Router two says, hey, buddy, let me tell
 you about the 11 11 11 0 network

0:16:08.640000 --> 0:16:14.040000
 and you can you can get there
 via one two one one.

0:16:14.040000 --> 0:16:18.460000
 Well, router three needs to be
 able to reach one two one one.

0:16:18.460000 --> 0:16:22.540000
 If he can't reach this, that
 route is useless to him.

0:16:22.540000 --> 0:16:24.600000
 He can't reach the next hop.

0:16:24.600000 --> 0:16:26.520000
 Let's actually see if we've
 got that going right now.

0:16:26.520000 --> 0:16:29.920000
 Let's see if router one and router two
 are speaking BGP if they've already

0:16:29.920000 --> 0:16:31.640000
 learned of routes.

0:16:31.640000 --> 0:16:34.200000
 So let's take a look
 at router two.

0:16:34.200000 --> 0:16:39.500000
 Show IP route. Okay, and we can see
 that router two has learned about

0:16:39.500000 --> 0:16:45.400000
 that BGP route 11 11 11 0 via his directly
 connected neighbor of one two

0:16:45.400000 --> 0:16:49.640000
 one one. Now let's see did he
 send that to router three?

0:16:49.640000 --> 0:16:55.060000
 Well, in BGP it says his router three
 says, hey, my neighbor router two

0:16:55.060000 --> 0:16:59.920000
 is up. I am speaking BGP with my interior
 neighbor two three two two.

0:16:59.920000 --> 0:17:06.060000
 But when I look in the routing table,
 notice that 11 11 11 network?

0:17:06.060000 --> 0:17:12.680000
 It's not here. And yet if I look in
 the BGP table, he did learn of it.

0:17:12.680000 --> 0:17:14.420000
 This is a classic example.

0:17:14.420000 --> 0:17:18.180000
 He says, look, I learned of this route
 from my BGP peer, but the next

0:17:18.180000 --> 0:17:21.020000
 topic gave me of one two one one.

0:17:21.020000 --> 0:17:23.360000
 I have no idea where that is.

0:17:23.360000 --> 0:17:28.240000
 I can only use next hops
 that are connected to me.

0:17:28.240000 --> 0:17:30.340000
 And this is not connected to me.

0:17:30.340000 --> 0:17:34.780000
 That's why I did not show up in the routing
 table because it is an unusable

0:17:34.780000 --> 0:17:39.320000
 next hop. So in order to get this route
 to work, if I actually wanted

0:17:39.320000 --> 0:17:44.580000
 router three to be able to send packets
 to the 11 11 11 0 network, I would

0:17:44.580000 --> 0:17:46.060000
 have to do one of two things.

0:17:46.060000 --> 0:17:47.880000
 One of two things has to happen.

0:17:47.880000 --> 0:17:52.820000
 Either I could tell router two, hey,
 when you learn stuff from router

0:17:52.820000 --> 0:17:55.980000
 one, actually it doesn't matter
 where you learn it from.

0:17:55.980000 --> 0:17:59.840000
 When you send when you send routes
 to router three, change yourself to

0:17:59.840000 --> 0:18:04.660000
 the next hop. Put yourself two three
 two three or two three two two as

0:18:04.660000 --> 0:18:07.200000
 the next hop. And then router
 three will be happy.

0:18:07.200000 --> 0:18:10.320000
 They'll say, oh, okay, I can use those
 routes because my directly connected

0:18:10.320000 --> 0:18:12.960000
 neighbor is telling me he's
 the next top next hop.

0:18:12.960000 --> 0:18:16.440000
 I can use that. Now at the CCNA level,
 you're not expected to know how

0:18:16.440000 --> 0:18:18.820000
 to do that, but that's one
 thing you could do in BGP.

0:18:18.820000 --> 0:18:22.180000
 You could say change the next hop
 to yourself to solve that problem.

0:18:22.180000 --> 0:18:26.120000
 Or we could say, look, I'm not going
 to change router two at all.

0:18:26.120000 --> 0:18:30.420000
 So I'm going to have router two sending
 all these BGP routes with the

0:18:30.420000 --> 0:18:35.800000
 next hop of one two one one.

0:18:35.800000 --> 0:18:39.960000
 But if I want router three to be able
 to use that next hop, I need to

0:18:39.960000 --> 0:18:41.540000
 give him a route to that.

0:18:41.540000 --> 0:18:44.900000
 So while we, for example, I could
 create a static route in there.

0:18:44.900000 --> 0:18:52.520000
 I could say IP route one dot two dot
 one dot, let's just do a host route

0:18:52.520000 --> 0:18:57.600000
 one. And then give him a subnet mask
 that says pay attention to all of

0:18:57.600000 --> 0:18:59.240000
 the bits in that address.

0:18:59.240000 --> 0:19:02.940000
 255 255 255 255.

0:19:02.940000 --> 0:19:10.500000
 And then tell him your next hop to
 get here is two, three, three, two,

0:19:10.500000 --> 0:19:16.020000
 two. So now when he gets these BGP
 routes with a next hop of one, two,

0:19:16.020000 --> 0:19:19.120000
 one, one, he'll say, oh, I can use those
 because I actually know how to

0:19:19.120000 --> 0:19:20.540000
 get to that guy.

0:19:20.540000 --> 0:19:25.280000
 I can get to him because I'm directly
 connected to two, three, two, two.

0:19:25.280000 --> 0:19:27.520000
 He is in the same room as me.

0:19:27.520000 --> 0:19:31.080000
 I've now given him reachability
 to his next hop.

0:19:31.080000 --> 0:19:35.380000
 That's all to say that if you receive a
 route and the next hop is unreachable,

0:19:35.380000 --> 0:19:37.740000
 that route itself is useless.

0:19:37.740000 --> 0:19:39.360000
 You cannot use it.

0:19:39.360000 --> 0:19:46.440000
 The next hop must be paired with
 a usable layer two address.

0:19:46.440000 --> 0:19:48.680000
 Let me show you an
 example of this.

0:19:48.680000 --> 0:19:50.380000
 Here's what I'm going to do.

0:19:50.380000 --> 0:19:53.260000
 I'm going to go here
 into router four.

0:19:53.260000 --> 0:19:58.880000
 And I'm going to give him a static
 route to that network.

0:19:58.880000 --> 0:20:06.000000
 11 11 11 0 slash 24.

0:20:06.000000 --> 0:20:12.620000
 And instead of an actual IP address,
 I'm going to say via fast ethernet

0:20:12.620000 --> 0:20:18.220000
 0 0. When you create a static route
 in a router, you have this option.

0:20:18.220000 --> 0:20:22.180000
 Normally a static route, you should
 put an IP address as the next hop.

0:20:22.180000 --> 0:20:24.960000
 It should be some other router's IP
 address that's in the same network

0:20:24.960000 --> 0:20:27.960000
 as you, that you're going to
 hand this packet off to.

0:20:27.960000 --> 0:20:31.480000
 But alternatively, you could actually
 tell it what the egress interface

0:20:31.480000 --> 0:20:35.380000
 is. Now let me tell you in advance
 what's going to happen here.

0:20:35.380000 --> 0:20:36.800000
 Actually, let me not
 tell you in advance.

0:20:36.800000 --> 0:20:37.400000
 Let's just do it.

0:20:37.400000 --> 0:20:37.840000
 And I'll show you.

0:20:37.840000 --> 0:20:38.620000
 It's going to be a problem.

0:20:38.620000 --> 0:20:40.060000
 It's not going to work.

0:20:40.060000 --> 0:20:41.700000
 And I'll show you why.

0:20:41.700000 --> 0:20:44.360000
 So let's go into router four.

0:20:44.360000 --> 0:20:53.260000
 IP route 11 11 11 0.

0:20:53.260000 --> 0:20:59.460000
 And then instead of an IP address, I'm actually
 going to give him an interface.

0:20:59.460000 --> 0:21:01.320000
 Fast ethernet 0 0.

0:21:01.320000 --> 0:21:04.700000
 Okay, so is it in
 the routing table?

0:21:04.700000 --> 0:21:10.420000
 Yes, it is. So you might think,
 oh, okay, no problem, right?

0:21:10.420000 --> 0:21:14.720000
 It's in the routing table, so he should
 be able to send packets there.

0:21:14.720000 --> 0:21:21.780000
 And yet if I try to create a packet,
 going to that, it fails.

0:21:21.780000 --> 0:21:26.300000
 Now there's a multitude of reasons why this
 could be failing, but I intentionally

0:21:26.300000 --> 0:21:30.640000
 did this demonstration because I want
 to illustrate this bullet point.

0:21:30.640000 --> 0:21:36.020000
 The next hop must be paired with
 a usable layer two address.

0:21:36.020000 --> 0:21:41.380000
 If I do debug IP packet, and now be very
 careful with this debug, because

0:21:41.380000 --> 0:21:46.940000
 this will show you any and all IP packets
 coming in and going out of the

0:21:46.940000 --> 0:21:50.160000
 router, you do not want to do this
 debug in a live production network.

0:21:50.160000 --> 0:21:52.700000
 As a matter of fact, let me show
 you the best way to do this.

0:21:52.700000 --> 0:21:57.800000
 So you say no logging
 console debug.

0:21:57.800000 --> 0:22:03.060000
 What that command said is whenever I
 turn on a debug, and in case you're

0:22:03.060000 --> 0:22:06.500000
 not familiar with what a debug is, a debug
 basically means look, the router's

0:22:06.500000 --> 0:22:09.680000
 brain at CPU is doing a
 lot of things, right?

0:22:09.680000 --> 0:22:12.440000
 It's monitoring the state
 of routing protocols.

0:22:12.440000 --> 0:22:15.740000
 It's doing all kinds of,
 it's forwarding packets.

0:22:15.740000 --> 0:22:19.660000
 And a debug says, hey router,
 tell me what you're thinking.

0:22:19.660000 --> 0:22:24.320000
 Show on the screen display for me in
 textual form, what's going on, what

0:22:24.320000 --> 0:22:28.200000
 you're doing. In real time,
 that's what a debug does.

0:22:28.200000 --> 0:22:31.520000
 Now some debug that the router's, if
 you debug something that he's not

0:22:31.520000 --> 0:22:35.740000
 doing very often, you get a little snippet
 of information, which is fine.

0:22:35.740000 --> 0:22:40.060000
 Other debug like this one here says,
 look, show me every single IP packet

0:22:40.060000 --> 0:22:41.800000
 that's coming in and going out.

0:22:41.800000 --> 0:22:44.540000
 That could completely overwhelm
 your console screen.

0:22:44.540000 --> 0:22:47.680000
 You could actually end up crashing your
 router by doing a debug like that.

0:22:47.680000 --> 0:22:52.100000
 So now what I typed in, I said no logging
 console debug, because I'm telling

0:22:52.100000 --> 0:22:57.480000
 the router, look, when I turn on a
 debug, any debug, don't display it

0:22:57.480000 --> 0:23:00.520000
 on the console. Now you might be thinking,
 well, if you don't display

0:23:00.520000 --> 0:23:02.940000
 in the console, what's the point?

0:23:02.940000 --> 0:23:05.620000
 You want to see the debug, how are
 you going to see if it's not on the

0:23:05.620000 --> 0:23:10.080000
 console? Well, we're going to say,
 look, instead redirect that output

0:23:10.080000 --> 0:23:15.380000
 to memory, put it in a memory buffer,
 and then I'll just read it at my

0:23:15.380000 --> 0:23:23.920000
 leisure. So to do that, I'll
 type logging buffer debug.

0:23:23.920000 --> 0:23:28.860000
 That now says any debug I turn on, put
 it in the logging buffer so I can

0:23:28.860000 --> 0:23:34.340000
 read it. So these two commands taken
 together enable you to safely turn

0:23:34.340000 --> 0:23:39.340000
 on debug without fear of
 overwhelming the router.

0:23:39.340000 --> 0:23:43.500000
 So now I'm going to
 do debug IP packet.

0:23:43.500000 --> 0:23:46.160000
 I'm going to clear that logging buffer
 because it might have a whole bunch

0:23:46.160000 --> 0:23:48.480000
 of junk in it, and I just want to clear
 it out and start from scratch

0:23:48.480000 --> 0:23:54.200000
 so it's empty. And now let's do my
 ping again to get some clues to why

0:23:54.200000 --> 0:23:58.460000
 it didn't work. So there actually is
 a debug going on right now, even

0:23:58.460000 --> 0:23:59.860000
 though I don't see it.

0:23:59.860000 --> 0:24:05.200000
 Ping is done. Let's turn off
 the debug on debug all.

0:24:05.200000 --> 0:24:08.120000
 That turns off all possible
 debugks you could have.

0:24:08.120000 --> 0:24:13.340000
 And now show log, that'll show
 me that logging buffer.

0:24:13.340000 --> 0:24:14.940000
 And look at this.

0:24:14.940000 --> 0:24:18.640000
 Here's me. Here's the destination.


0:24:18.640000 --> 0:24:20.660000
 It says I'm sending it.

0:24:20.660000 --> 0:24:22.140000
 It says I routed it.

0:24:22.140000 --> 0:24:23.540000
 I found a route.

0:24:23.540000 --> 0:24:25.200000
 So I knew what to do with it.

0:24:25.200000 --> 0:24:30.800000
 And that route said send it on fast ethernet
 00, but then we have encapsulation

0:24:30.800000 --> 0:24:34.020000
 failed. What does that mean?

0:24:34.020000 --> 0:24:35.660000
 Encapsulation failed.

0:24:35.660000 --> 0:24:39.600000
 What that means is router
 four right here.

0:24:39.600000 --> 0:24:46.480000
 I told him create a packet going
 to 11, 11, 11, dot one.

0:24:46.480000 --> 0:24:51.400000
 And I explicitly told him in the static
 route, you need to go out fast

0:24:51.400000 --> 0:24:57.660000
 ethernet 00. So I told him put
 the packet on this wire.

0:24:57.660000 --> 0:25:03.480000
 But remember every wire you put a packet
 on is running some sort of layer

0:25:03.480000 --> 0:25:06.480000
 two protocol. In this
 case, it's ethernet.

0:25:06.480000 --> 0:25:10.000000
 Every layer two protocol says, okay,
 I got to take this packet and put

0:25:10.000000 --> 0:25:13.220000
 it inside of a layer two frame.

0:25:13.220000 --> 0:25:15.780000
 In this case, an ethernet frame.

0:25:15.780000 --> 0:25:18.360000
 Ethernet as a protocol says, if I'm
 going to put something inside of an

0:25:18.360000 --> 0:25:21.300000
 ethernet frame, I need to
 have a source MAC address.

0:25:21.300000 --> 0:25:21.920000
 Well, no problem.

0:25:21.920000 --> 0:25:24.360000
 He knows what his own
 source MAC address is.

0:25:24.360000 --> 0:25:27.380000
 And I need a destination
 MAC address.

0:25:27.380000 --> 0:25:29.900000
 And here lies the problem.

0:25:29.900000 --> 0:25:33.200000
 I told him the egress
 interface to use.

0:25:33.200000 --> 0:25:37.880000
 But now I've left it up to him on his own
 to figure out what's the destination

0:25:37.880000 --> 0:25:40.180000
 MAC address supposed to be?

0:25:40.180000 --> 0:25:42.500000
 I didn't give him an IP
 address of a next hop.

0:25:42.500000 --> 0:25:44.500000
 I just told him the
 egress interface.

0:25:44.500000 --> 0:25:50.200000
 So the way the static route is going
 to work is router four, they'll say,

0:25:50.200000 --> 0:25:53.540000
 well, I need to resolve a
 destination MAC address.

0:25:53.540000 --> 0:25:57.380000
 And I'm just going to assume
 that this lives here.

0:25:57.380000 --> 0:26:02.260000
 That 11, 11, 11, 1 actually resides
 on lives directly on fast ethernet

0:26:02.260000 --> 0:26:05.860000
 zero, zero. So if he's in the same room
 as me, how am I going to resolve

0:26:05.860000 --> 0:26:07.440000
 his layer two address?

0:26:07.440000 --> 0:26:09.960000
 I'm going to ARP for him.

0:26:09.960000 --> 0:26:12.600000
 And so actually that
 is what's going on.

0:26:12.600000 --> 0:26:18.980000
 If I type debug ARP,
 I do my ping again.

0:26:18.980000 --> 0:26:24.640000
 Now, as soon as this ping is over, we
 will see that he's actually sending

0:26:24.640000 --> 0:26:31.540000
 ARP requests onto that wire saying,
 hey, I've been told that you live

0:26:31.540000 --> 0:26:35.680000
 here with me. Can you send
 me your MAC address?

0:26:35.680000 --> 0:26:39.340000
 Here we go. Sent request.

0:26:39.340000 --> 0:26:40.920000
 Hey, 11, 11, 11, 1.

0:26:40.920000 --> 0:26:41.600000
 Are you out there?

0:26:41.600000 --> 0:26:43.720000
 Sent request, sent request,
 sent request.

0:26:43.720000 --> 0:26:45.000000
 He's sending all these
 ARP requests.

0:26:45.000000 --> 0:26:50.280000
 But clearly when we look at our diagram,
 11, 11, 11, 1 does not live right

0:26:50.280000 --> 0:26:55.900000
 here. So he's not getting
 any ARP replies back.

0:26:55.900000 --> 0:26:59.320000
 So I gave him an egress interface,
 but it was not paired with a usable

0:26:59.320000 --> 0:27:01.220000
 layer two address.

0:27:01.220000 --> 0:27:04.900000
 He could not figure out what the layer
 two address was to actually use

0:27:04.900000 --> 0:27:11.980000
 that route. And routers will
 only use the best route.

0:27:11.980000 --> 0:27:14.960000
 So in other words, let's say that
 all the above is taken care of.

0:27:14.960000 --> 0:27:19.940000
 In other words, I received a route on
 an interface for protocol that I'm

0:27:19.940000 --> 0:27:20.660000
 actually running.

0:27:20.660000 --> 0:27:22.520000
 I'm running IP version four.

0:27:22.520000 --> 0:27:24.740000
 Boop, here comes in an
 IP version four route.

0:27:24.740000 --> 0:27:27.880000
 Great. Okay. Check that off.

0:27:27.880000 --> 0:27:31.880000
 Number two, that route
 has a next hop address.

0:27:31.880000 --> 0:27:33.440000
 And hey, I can use it.

0:27:33.440000 --> 0:27:34.920000
 It's directly connected to me.

0:27:34.920000 --> 0:27:39.240000
 Or maybe I've got another route that
 shows me where that next hop is.

0:27:39.240000 --> 0:27:41.760000
 Either way, I can use
 that next hop address.

0:27:41.760000 --> 0:27:42.860000
 Boop, check that off.

0:27:42.860000 --> 0:27:47.720000
 Okay. Number three, oh that next hop
 address, I was able to figure out

0:27:47.720000 --> 0:27:51.680000
 what the outbound interface is,
 what the egress interface is.

0:27:51.680000 --> 0:27:52.860000
 Okay, check that off.

0:27:52.860000 --> 0:27:56.820000
 Check. Boop. And lastly, okay, now that
 I've got the outbound interface

0:27:56.820000 --> 0:28:01.360000
 and the next hop, I was able to figure
 out what the layer two address

0:28:01.360000 --> 0:28:04.480000
 is I should use to reach
 that next hop.

0:28:04.480000 --> 0:28:08.620000
 So if all that is true, now
 I can use that route.

0:28:08.620000 --> 0:28:14.560000
 Now let's say I get that same route
 from a different next hop.

0:28:14.560000 --> 0:28:17.860000
 Somebody else, a different router in
 a different room, or maybe even the

0:28:17.860000 --> 0:28:21.860000
 same room, maybe in this network I'm
 connected to, there's five other

0:28:21.860000 --> 0:28:25.340000
 routers out there besides
 me in that same network.

0:28:25.340000 --> 0:28:29.840000
 Either way, I get multiple routes
 for the exact same network.

0:28:29.840000 --> 0:28:32.600000
 Well, the way routers like to do is they
 like to say, look, I'm only going

0:28:32.600000 --> 0:28:33.620000
 to choose the best one.

0:28:33.620000 --> 0:28:36.380000
 I'm not going to clutter my routing
 table with a whole bunch of routes

0:28:36.380000 --> 0:28:39.820000
 to the same destination of one of them
 is clearly the best and the other

0:28:39.820000 --> 0:28:41.420000
 ones are terrible.

0:28:41.420000 --> 0:28:43.600000
 I'm only going to select the best.


0:28:43.600000 --> 0:28:47.420000
 So the router is going to use the best
 route only and we'll talk about

0:28:47.420000 --> 0:28:51.040000
 how that process takes place.

0:28:51.040000 --> 0:28:54.360000
 And then lastly, once I've selected
 the best route and I've put that in

0:28:54.360000 --> 0:28:59.140000
 my routing table so I can use it, now
 we have the question of, well, how

0:28:59.140000 --> 0:29:00.940000
 do I know it's still believable?

0:29:00.940000 --> 0:29:06.160000
 In other words, my next top neighbor
 gave me that route three hours ago.

0:29:06.160000 --> 0:29:07.720000
 Is it still good?

0:29:07.720000 --> 0:29:10.380000
 Is he even still there and alive?

0:29:10.380000 --> 0:29:15.740000
 Can I use him? If he is alive, is that
 network itself way out there somewhere?

0:29:15.740000 --> 0:29:18.060000
 Is it still alive and reachable?

0:29:18.060000 --> 0:29:21.960000
 Routing protocols have to have some
 way of answering that question.

0:29:21.960000 --> 0:29:25.240000
 And each routing protocol
 answers that differently.

0:29:25.240000 --> 0:29:28.440000
 Rip answers that question differently
 than OSPF does it differently than

0:29:28.440000 --> 0:29:34.100000
 EIGRP does it. But that's another component
 of the routing protocol itself.

0:29:34.100000 --> 0:29:37.800000
 Is once I learn a route, I have to
 have some way of knowing it's still

0:29:37.800000 --> 0:29:42.240000
 good. Now if I statically type
 one in, it's good forever.

0:29:42.240000 --> 0:29:45.380000
 Right? As long as that router is up,
 as long as that interface is up,

0:29:45.380000 --> 0:29:47.400000
 that static route's not
 going to go away.

0:29:47.400000 --> 0:29:50.300000
 They assume, hey, look, if some human
 being got on the router and typed

0:29:50.300000 --> 0:29:52.560000
 it in, it must be good.

0:29:52.560000 --> 0:29:54.100000
 We're just going to
 assume it's good.

0:29:54.100000 --> 0:29:56.520000
 We're not going to do
 any checks on it.

0:29:56.520000 --> 0:30:04.600000
 Okay. So now the question is,
 I've learned about a route.

0:30:04.600000 --> 0:30:08.520000
 If I've learned it from multiple places,
 I've selected the best route.

0:30:08.520000 --> 0:30:12.000000
 And in the next video, we'll talk about
 how do I select the best route?

0:30:12.000000 --> 0:30:13.540000
 We'll get to that.

0:30:13.540000 --> 0:30:16.700000
 But now the question is, where
 do I store that best route?

0:30:16.700000 --> 0:30:20.040000
 Where do I actually put it so that
 when packets come in, I know where

0:30:20.040000 --> 0:30:22.860000
 to look. And I can say,
 ah, there it is.

0:30:22.860000 --> 0:30:24.840000
 Okay. There's a whole
 bunch of routes.

0:30:24.840000 --> 0:30:26.700000
 That's where my table is.

0:30:26.700000 --> 0:30:27.420000
 I'm going to look through there.

