WEBVTT

0:00:08.400000 --> 0:00:12.320000
 In the last video, when I introduced
 you to the concept of configuring

0:00:12.320000 --> 0:00:16.600000
 OSPF and showed you most of the commands
 you would need, I verbally introduced

0:00:16.600000 --> 0:00:18.920000
 the concept of OSPF cost.

0:00:18.920000 --> 0:00:22.120000
 But I want to have a special video just
 dedicated to that because I think

0:00:22.120000 --> 0:00:25.480000
 it's very important that for each routing
 protocol that you learn about,

0:00:25.480000 --> 0:00:31.540000
 that you're able to understand the way
 you can compare and contrast them

0:00:31.540000 --> 0:00:35.440000
 along the way. So hopefully by this
 point you've learned about RIP and

0:00:35.440000 --> 0:00:42.260000
 the routing metric for RIP is Hopcount
 and you've learned about EIGRP

0:00:42.260000 --> 0:00:48.540000
 and the routing metric for EIGRP is
 called Distance and now the routing

0:00:48.540000 --> 0:00:53.480000
 metric that we're going to deal with
 with OSPF is called OSPF cost.

0:00:53.480000 --> 0:00:58.220000
 So like spanning tree, if you've learned
 about spanning tree, this should

0:00:58.220000 --> 0:01:02.180000
 be easy because just like spanning tree,
 cost is a value that's derived

0:01:02.180000 --> 0:01:05.020000
 from the interface bandwidth.

0:01:05.020000 --> 0:01:08.260000
 And just like spanning tree, the greater
 the bandwidth, the faster the

0:01:08.260000 --> 0:01:10.700000
 interface, the lower the cost.

0:01:10.700000 --> 0:01:14.420000
 And just like in spanning tree, if I
 have two paths to a particular place,

0:01:14.420000 --> 0:01:17.860000
 the lower cost is the better path.


0:01:17.860000 --> 0:01:22.700000
 Now OSPF does not use the same
 formula as spanning tree.

0:01:22.700000 --> 0:01:26.240000
 So you don't have to worry about that
 so the numbers are not going to

0:01:26.240000 --> 0:01:29.460000
 be the same. As an example,
 review question.

0:01:29.460000 --> 0:01:33.360000
 In land switching with spanning tree,
 what was the spanning tree cost

0:01:33.360000 --> 0:01:39.180000
 of a fast ethernet interface, a 100 megabit
 per second fast ethernet interface?

0:01:39.180000 --> 0:01:43.480000
 Hopefully you answered
 the number 19.

0:01:43.480000 --> 0:01:46.400000
 Fast ethernet is 19 in the
 world of spanning tree.

0:01:46.400000 --> 0:01:51.460000
 Well in OSPF, the cost of a fast
 ethernet interface is one.

0:01:51.460000 --> 0:01:56.260000
 So different formula.

0:01:56.260000 --> 0:02:00.860000
 And the cost of an OSPF interface will
 default to being whatever, you

0:02:00.860000 --> 0:02:03.340000
 know, derived from the bandwidth,
 but you can change that.

0:02:03.340000 --> 0:02:07.680000
 You can explicitly configure the cost
 of an interface or if you modify

0:02:07.680000 --> 0:02:12.460000
 the bandwidth of an interface that implicitly
 changes the cost as well.

0:02:12.460000 --> 0:02:14.580000
 So there are two ways that
 you can change it.

0:02:14.580000 --> 0:02:19.360000
 You can go onto an interface and use
 the IP OSPF cost command and then

0:02:19.360000 --> 0:02:22.100000
 explicitly set the value
 to whatever you want.

0:02:22.100000 --> 0:02:28.000000
 Or like I said, by changing the bandwidth,
 that will also affect it.

0:02:28.000000 --> 0:02:32.960000
 And you can use the command show IP
 OSPF interface to actually see what

0:02:32.960000 --> 0:02:35.340000
 the cost is of any
 given interface.

0:02:35.340000 --> 0:02:38.440000
 And certainly when you look at an OSPF
 route in the routing table with

0:02:38.440000 --> 0:02:43.280000
 the command show IP route or show IP
 route OSPF, you'll see what the total

0:02:43.280000 --> 0:02:47.000000
 cumulative cost is to reach
 any given destination.

0:02:47.000000 --> 0:02:48.840000
 So let's see an example of this.

0:02:48.840000 --> 0:02:54.900000
 So on our whiteboard here, we can see
 that if we look from switch 3's

0:02:54.900000 --> 0:02:59.700000
 perspective and we look at his way
 of getting to the 3.23 network, he

0:02:59.700000 --> 0:03:02.520000
 actually has two equal cost paths.


0:03:02.520000 --> 0:03:08.080000
 He can get to there via switch 2
 or he can get there via router 3.

0:03:08.080000 --> 0:03:10.940000
 So if we actually go into switch 3 and
 we take a look at his routing table,

0:03:10.940000 --> 0:03:13.180000
 that confirms that.

0:03:13.180000 --> 0:03:17.900000
 We can see right here, 3.23 and
 he's got two equal cost paths.

0:03:17.900000 --> 0:03:20.780000
 They both have a cost of 2.

0:03:20.780000 --> 0:03:24.200000
 And that makes sense because this is
 a fast ethernet link, so that's a

0:03:24.200000 --> 0:03:27.580000
 cost of 1. And this is a fast ethernet
 link, so that gives us another

0:03:27.580000 --> 0:03:33.040000
 cost of 1. So 1 plus 1 is 2 going this
 way, 1 plus 1 is 2 going this way.

0:03:33.040000 --> 0:03:39.500000
 So let me start by saying, OK, well,
 maybe I want switch 3 only to use

0:03:39.500000 --> 0:03:47.680000
 this path. So what I'm going to do
 is I'm going to go on to switch 2.

0:03:47.680000 --> 0:03:51.760000
 I'm going to go on to his fast ethernet
 0 slash 3 interface and I'm going

0:03:51.760000 --> 0:03:53.580000
 to raise the cost.

0:03:53.580000 --> 0:03:59.060000
 I'm going to set the cost
 to 5 on that interface.

0:03:59.060000 --> 0:04:02.260000
 So then this path will
 not be as preferable.

0:04:02.260000 --> 0:04:04.660000
 That will be a total cost of 6.

0:04:04.660000 --> 0:04:06.860000
 This will be a cost of 2.

0:04:06.860000 --> 0:04:10.200000
 And so switch 3 will now only have
 1 route in his routing table.

0:04:10.200000 --> 0:04:13.820000
 So I'm going to go to switch 3.

0:04:13.820000 --> 0:04:17.340000
 We'll have a single route in his
 routing table going this way.

0:04:17.340000 --> 0:04:18.620000
 So now I'm going to
 go on to switch 2.

0:04:18.620000 --> 0:04:20.660000
 I'm going to go on to fast
 ethernet 0 slash 3.

0:04:20.660000 --> 0:04:27.840000
 I'm going to artificially
 increase the cost to 5.

0:04:27.840000 --> 0:04:33.720000
 OK, so interface fast ethernet
 0 slash 3 IP OSPF cost.

0:04:33.720000 --> 0:04:39.980000
 Actually, before I do it, do show IP
 OSPF interface fast ethernet 0 slash

0:04:39.980000 --> 0:04:46.480000
 3. And you can see by default, it's cost
 of 1 because it's fast ethernet.

0:04:46.480000 --> 0:04:51.400000
 And I'm going to type
 IP OSPF cost 5.

0:04:51.400000 --> 0:04:56.820000
 And now when I take a look at the output
 of that command, now we can verify

0:04:56.820000 --> 0:04:59.180000
 that the cost is 5.

0:04:59.180000 --> 0:05:03.440000
 So at this point, if I go back to switch
 3, he should now see a total

0:05:03.440000 --> 0:05:08.320000
 cost of 6 going this way and
 a cost of 2 going this way.

0:05:08.320000 --> 0:05:12.840000
 So only this path, the path via router
 3, should now be the only path

0:05:12.840000 --> 0:05:16.200000
 to get to the 3 to 3 network.

0:05:16.200000 --> 0:05:23.780000
 And that's what we see.

0:05:23.780000 --> 0:05:28.700000
 Now there's only one path
 and it's via router 3.

0:05:28.700000 --> 0:05:30.920000
 Now let's just change
 it one more time.

0:05:30.920000 --> 0:05:36.740000
 So now what I want to do is I want
 to have switch 3 prefer this path.

0:05:36.740000 --> 0:05:38.700000
 I want this to be the better path.


0:05:38.700000 --> 0:05:42.220000
 So what I'm going to do is I'm going
 to go on to router 3's fast ethernet

0:05:42.220000 --> 0:05:46.900000
 interface. I'm going to take the bandwidth
 and I'm going to lower it to

0:05:46.900000 --> 0:05:50.380000
 some really small number, make this
 interface look like it's incredibly

0:05:50.380000 --> 0:05:53.880000
 slow by giving it a really
 low bandwidth.

0:05:53.880000 --> 0:05:57.760000
 And by making the bandwidth number really
 small, that will make the cost

0:05:57.760000 --> 0:06:02.500000
 really big. Because remember, the larger
 the cost, the less preferable

0:06:02.500000 --> 0:06:08.660000
 it is. So let's go on to router 3 now
 and change its interface bandwidth.

0:06:08.660000 --> 0:06:18.400000
 Interface fast ethernet 00, do show
 interface fast ethernet 00, so we

0:06:18.400000 --> 0:06:24.900000
 can see right now his current bandwidth
 is 100,000 kilobits per second.

0:06:24.900000 --> 0:06:29.260000
 So if you actually do the math, that's
 100 million bits per second.

0:06:29.260000 --> 0:06:35.240000
 So now I'm going to say bandwidth and
 how about we say 2,000 kilobits

0:06:35.240000 --> 0:06:42.020000
 per second? Really slow, only
 2,000 bits per second.

0:06:42.020000 --> 0:06:49.400000
 So now if I type show IPOS PF interface
 fast ethernet 00, look at his

0:06:49.400000 --> 0:06:52.000000
 cost now, 50,000.

0:06:52.000000 --> 0:06:55.760000
 It was one before and
 now it's 50,000.

0:06:55.760000 --> 0:07:01.240000
 So we can see how modifying the bandwidth
 clearly affects the OSPF cost.

0:07:01.240000 --> 0:07:08.240000
 And lastly, if I go over to switch
 3, now we can see that the 3, 2, 3

0:07:08.240000 --> 0:07:09.960000
 route has switched over.

0:07:09.960000 --> 0:07:16.020000
 It's now pointing at switch 2, 2, 3,
 2, 22 as the next top because a cost

0:07:16.020000 --> 0:07:20.080000
 of 6 is certainly better than
 a cost of 50,000 and 1.

