1 00:00:00,000 --> 00:00:00,944 2 00:00:00,944 --> 00:00:03,776 [AUDIO LOGO] 3 00:00:03,776 --> 00:00:07,090 4 00:00:07,090 --> 00:00:12,640 And now we're finally up to the lowest path cost, which, 5 00:00:12,640 --> 00:00:17,530 of course, is rule number 4 in our OSPF path selection 6 00:00:17,530 --> 00:00:18,640 criteria. 7 00:00:18,640 --> 00:00:21,940 Now, I'm sure we've all seen lowest path 8 00:00:21,940 --> 00:00:24,380 cost wins numerous times. 9 00:00:24,380 --> 00:00:26,470 So in this video, we're not going 10 00:00:26,470 --> 00:00:28,990 to really be focusing so much on proving 11 00:00:28,990 --> 00:00:31,160 that the lowest cost wins. 12 00:00:31,160 --> 00:00:34,840 We're going to be more focusing on what is done with the cost 13 00:00:34,840 --> 00:00:38,740 automatically on Cisco routers, how can we change 14 00:00:38,740 --> 00:00:40,520 what's done automatically. 15 00:00:40,520 --> 00:00:44,380 And we'll take a quick look at setting those costs manually 16 00:00:44,380 --> 00:00:46,570 just to make sure we're clear on how to do it 17 00:00:46,570 --> 00:00:49,600 even though we have done it on a few of our paths 18 00:00:49,600 --> 00:00:52,280 already in our lab environment. 19 00:00:52,280 --> 00:00:55,690 So that said, once again, let's take a quick look 20 00:00:55,690 --> 00:00:58,070 at our topology although, in this case, 21 00:00:58,070 --> 00:01:00,850 we're going to be doing most of our work on router 8. 22 00:01:00,850 --> 00:01:03,100 And then, of course, we'll jump into the command line 23 00:01:03,100 --> 00:01:08,970 and take a look at how cost works on the Cisco routers. 24 00:01:08,970 --> 00:01:10,640 So we're going to be starting off 25 00:01:10,640 --> 00:01:14,570 by examining the existing cost on an interface. 26 00:01:14,570 --> 00:01:16,670 And as I said during the introduction, 27 00:01:16,670 --> 00:01:19,310 we will be focusing on router 8, particularly 28 00:01:19,310 --> 00:01:22,080 on this gigabit-1 interface. 29 00:01:22,080 --> 00:01:25,940 And what we're going to see is the defaults 30 00:01:25,940 --> 00:01:28,700 for setting the cost automatically. 31 00:01:28,700 --> 00:01:31,310 And then we're going to change that. 32 00:01:31,310 --> 00:01:35,570 This is handled by a command called auto-cost reference 33 00:01:35,570 --> 00:01:36,410 bandwidth. 34 00:01:36,410 --> 00:01:40,730 And the default value for this is actually 100. 35 00:01:40,730 --> 00:01:42,920 Now, the interesting thing about this 36 00:01:42,920 --> 00:01:46,160 is what that 100 actually means. 37 00:01:46,160 --> 00:01:49,250 100 actually means that the bandwidth 38 00:01:49,250 --> 00:01:54,110 is going to be calculated as 10 to the eighth divided 39 00:01:54,110 --> 00:01:58,620 by the interface bandwidth in bits per second. 40 00:01:58,620 --> 00:02:01,430 Now, given these defaults, 10 to the eighth 41 00:02:01,430 --> 00:02:03,300 is actually 100 million. 42 00:02:03,300 --> 00:02:05,480 So that would be 100 million bits 43 00:02:05,480 --> 00:02:07,820 per second, which is what we generally 44 00:02:07,820 --> 00:02:14,150 call 100 megabits per second or, of course, fast ethernet. 45 00:02:14,150 --> 00:02:17,660 So this corresponds to the number 46 00:02:17,660 --> 00:02:20,390 after the auto-cost reference bandwidth. 47 00:02:20,390 --> 00:02:25,370 Now, the big problem with this is that we can't go to decimals 48 00:02:25,370 --> 00:02:28,490 and we can't go to fractions. 49 00:02:28,490 --> 00:02:33,170 The unfortunate side effect of that is, fast ethernet 50 00:02:33,170 --> 00:02:38,640 has a cost of 1 because it's 100 million divided by 100 million. 51 00:02:38,640 --> 00:02:42,020 However, since we can't go to fractions in decimals, 52 00:02:42,020 --> 00:02:45,970 that means the gigabit is also going to be a cost of 1. 53 00:02:45,970 --> 00:02:48,200 10 gig, a cost of 1. 54 00:02:48,200 --> 00:02:51,600 100 gig, 400 gig, and so on. 55 00:02:51,600 --> 00:02:55,340 So this number is going to have to be adjusted to account 56 00:02:55,340 --> 00:02:57,133 for higher speed interfaces. 57 00:02:57,133 --> 00:02:58,550 And that's one of the things we're 58 00:02:58,550 --> 00:03:01,500 going to be looking at here in this video. 59 00:03:01,500 --> 00:03:03,530 Now, of course, as we go along and we 60 00:03:03,530 --> 00:03:05,600 change to different values, we'll, 61 00:03:05,600 --> 00:03:09,000 of course, be observing what's happening here. 62 00:03:09,000 --> 00:03:12,320 So let's jump over to the command line on router 8. 63 00:03:12,320 --> 00:03:13,940 Let's look at some of the defaults. 64 00:03:13,940 --> 00:03:15,770 And then we'll start changing things 65 00:03:15,770 --> 00:03:18,400 and see what the results are. 66 00:03:18,400 --> 00:03:21,060 So if we start off by looking at our interface-- 67 00:03:21,060 --> 00:03:24,930 we'll just say show IP OSPF interface gigabit 1-- 68 00:03:24,930 --> 00:03:29,490 we can see that, as predicted, this has a cost of 1. 69 00:03:29,490 --> 00:03:31,740 And we can also take a look at that default 70 00:03:31,740 --> 00:03:34,980 value of the auto-cost reference bandwidth. 71 00:03:34,980 --> 00:03:39,890 If we say show run all and then we include-- 72 00:03:39,890 --> 00:03:41,300 we'll just do auto-cost. 73 00:03:41,300 --> 00:03:44,990 We can see that that default value of auto-cost reference 74 00:03:44,990 --> 00:03:46,520 bandwidth is 100. 75 00:03:46,520 --> 00:03:50,510 So now let's see what happens if we start changing the bandwidth 76 00:03:50,510 --> 00:03:52,820 on this interface. 77 00:03:52,820 --> 00:03:56,680 Now, as we start changing the bandwidth on this interface 78 00:03:56,680 --> 00:03:59,500 to see how it affects the calculation 79 00:03:59,500 --> 00:04:02,200 of the auto-cost reference bandwidth, 80 00:04:02,200 --> 00:04:05,380 keep in mind that bandwidth is just 81 00:04:05,380 --> 00:04:08,710 a reference number used by our routing protocols, 82 00:04:08,710 --> 00:04:10,870 in this case, OSPF. 83 00:04:10,870 --> 00:04:13,250 EIGRP looks at it as well. 84 00:04:13,250 --> 00:04:15,940 But it doesn't literally change the throughput 85 00:04:15,940 --> 00:04:17,089 of the interface. 86 00:04:17,089 --> 00:04:19,870 So although this is still a gigabit interface, 87 00:04:19,870 --> 00:04:23,870 we can have our routing protocol treat it as if it's not. 88 00:04:23,870 --> 00:04:26,080 And that's what we're going to do in order 89 00:04:26,080 --> 00:04:29,600 to look at how auto-cost reference bandwidth functions. 90 00:04:29,600 --> 00:04:31,930 So let's take a look. 91 00:04:31,930 --> 00:04:37,600 We'll go into configuration mode for interface gigabit 1. 92 00:04:37,600 --> 00:04:39,790 And if we type "bandwidth," notice 93 00:04:39,790 --> 00:04:41,860 that if we're going to hard-code a number, 94 00:04:41,860 --> 00:04:44,810 this is in kilobits per second. 95 00:04:44,810 --> 00:04:49,340 So remember, OSPF is looking at this in bits per second. 96 00:04:49,340 --> 00:04:53,950 So these numbers are going to be off by, well, 1,000. 97 00:04:53,950 --> 00:04:56,470 So let's go ahead and change the bandwidth here 98 00:04:56,470 --> 00:05:01,150 to 100,000, which is going to be the equivalent of 100 99 00:05:01,150 --> 00:05:02,780 megabits per second. 100 00:05:02,780 --> 00:05:07,240 And if we do our show IP OSPF interface for gigabit 1 again, 101 00:05:07,240 --> 00:05:10,120 we see that the cost hasn't changed 102 00:05:10,120 --> 00:05:14,410 because this is still 10 to the eighth over 10 to the eighth. 103 00:05:14,410 --> 00:05:18,370 So here, we can see that this 100-megabit-per-second 104 00:05:18,370 --> 00:05:22,000 interface has the same cost as gigabit. 105 00:05:22,000 --> 00:05:24,550 But what if we were to change the bandwidth one more time 106 00:05:24,550 --> 00:05:27,910 and just drop one 0, which would effectively 107 00:05:27,910 --> 00:05:32,530 make this 10 megabits per second or the equivalent of legacy 108 00:05:32,530 --> 00:05:33,400 ethernet? 109 00:05:33,400 --> 00:05:35,050 We'll look at our interface again. 110 00:05:35,050 --> 00:05:37,940 Notice that now the cost is 10. 111 00:05:37,940 --> 00:05:41,720 So once we get down to 10 megabits per second, 112 00:05:41,720 --> 00:05:45,080 now the cost starts to actually do something. 113 00:05:45,080 --> 00:05:49,180 So as we can see here, the default behavior 114 00:05:49,180 --> 00:05:54,980 of auto-cost reference bandwidth isn't ideal on most platforms. 115 00:05:54,980 --> 00:05:56,830 Now, one quick note on this. 116 00:05:56,830 --> 00:05:59,710 Cisco has begun to change the default 117 00:05:59,710 --> 00:06:03,010 value of auto-cost reference bandwidth 118 00:06:03,010 --> 00:06:05,170 on some of the newer platforms. 119 00:06:05,170 --> 00:06:07,690 So be sure to check on whatever routers 120 00:06:07,690 --> 00:06:11,080 you are dealing with to find out what the default value of this 121 00:06:11,080 --> 00:06:11,800 is. 122 00:06:11,800 --> 00:06:14,830 It may actually be set appropriately high 123 00:06:14,830 --> 00:06:18,970 on more modern equipment or higher-end equipment. 124 00:06:18,970 --> 00:06:23,620 As an example, NX-OS on the Nexus platforms 125 00:06:23,620 --> 00:06:26,770 actually sets this to a much higher number. 126 00:06:26,770 --> 00:06:28,690 Now, before we change the auto-cost, 127 00:06:28,690 --> 00:06:32,110 let's go ahead and take our artificial bandwidth number off 128 00:06:32,110 --> 00:06:33,700 of this interface. 129 00:06:33,700 --> 00:06:35,710 Then let's go over to OSPF. 130 00:06:35,710 --> 00:06:38,067 And we'll say auto-cost reference bandwidth. 131 00:06:38,067 --> 00:06:39,650 And if you hit the question mark here, 132 00:06:39,650 --> 00:06:42,400 we can see the value range for this. 133 00:06:42,400 --> 00:06:45,730 And we do put this in, in megabits per second. 134 00:06:45,730 --> 00:06:47,530 And as you can tell, that fits right 135 00:06:47,530 --> 00:06:51,010 into the example we did on our topology 136 00:06:51,010 --> 00:06:53,680 where we said that the 100 is the same as the 100 137 00:06:53,680 --> 00:06:55,900 megabits per second for fast ethernet 138 00:06:55,900 --> 00:06:58,760 because this is in megabits per second. 139 00:06:58,760 --> 00:07:00,490 Again, the default is 100. 140 00:07:00,490 --> 00:07:04,950 So what would happen if we made this, let's say, a million? 141 00:07:04,950 --> 00:07:06,900 So it tells us that the reference bandwidth 142 00:07:06,900 --> 00:07:08,400 has been changed. 143 00:07:08,400 --> 00:07:12,600 And it tells us to make this consistent across all routers. 144 00:07:12,600 --> 00:07:14,610 The reason it does this is, having 145 00:07:14,610 --> 00:07:18,660 a different view of the network and different interpretation 146 00:07:18,660 --> 00:07:22,140 of costs can create looping problems 147 00:07:22,140 --> 00:07:25,090 in routing protocols in general. 148 00:07:25,090 --> 00:07:26,880 So if you're going to change metrics, 149 00:07:26,880 --> 00:07:29,335 it's always a good idea to change it on everything. 150 00:07:29,335 --> 00:07:31,710 So now that we've changed it, let's look at our interface 151 00:07:31,710 --> 00:07:32,310 again. 152 00:07:32,310 --> 00:07:35,670 And we see now that we have a cost of 1,000. 153 00:07:35,670 --> 00:07:39,030 This is much more reasonable because this would clearly 154 00:07:39,030 --> 00:07:42,510 be able to handle at least 10-gig interfaces, 155 00:07:42,510 --> 00:07:46,510 100-gig interfaces, 400-gig interfaces. 156 00:07:46,510 --> 00:07:49,560 So this would probably cover us for quite some time 157 00:07:49,560 --> 00:07:51,820 before we had to adjust it again. 158 00:07:51,820 --> 00:07:54,900 So this isn't necessarily a bad value. 159 00:07:54,900 --> 00:07:57,510 But one thing that we do need to keep in mind 160 00:07:57,510 --> 00:08:01,110 is, as we turn up the auto-cost reference bandwidth 161 00:08:01,110 --> 00:08:04,350 to handle these faster interfaces, 162 00:08:04,350 --> 00:08:08,010 well, the problem that we had with the high-speed interfaces 163 00:08:08,010 --> 00:08:11,340 before all having a cost of 1, well, 164 00:08:11,340 --> 00:08:14,940 that exact same problem is now going to exist 165 00:08:14,940 --> 00:08:17,580 on the lower-speed interfaces. 166 00:08:17,580 --> 00:08:21,960 Those are all now going to go to maximum value, which, 167 00:08:21,960 --> 00:08:25,240 depending on your environment, may or may not be a problem. 168 00:08:25,240 --> 00:08:28,800 Maybe you don't have any slow-speed interfaces anymore 169 00:08:28,800 --> 00:08:31,500 in which case you don't have to worry about this. 170 00:08:31,500 --> 00:08:34,870 But let's take a look at what happens if we do. 171 00:08:34,870 --> 00:08:37,020 So let's go back into our interface again. 172 00:08:37,020 --> 00:08:39,990 And let's change this back to our 10 megs. 173 00:08:39,990 --> 00:08:42,820 174 00:08:42,820 --> 00:08:48,890 Notice the cost here has gone to 65,535, the maximum value. 175 00:08:48,890 --> 00:08:52,390 And if I were to make this ridiculously slow, 176 00:08:52,390 --> 00:08:55,630 let's drop it all the way down to a good, old 64k link. 177 00:08:55,630 --> 00:08:58,590 178 00:08:58,590 --> 00:08:59,550 Same thing. 179 00:08:59,550 --> 00:09:03,210 See, the cost is still 65,535. 180 00:09:03,210 --> 00:09:07,890 So what's happened now is, we've lost the resolution 181 00:09:07,890 --> 00:09:09,940 on the lower-speed interfaces. 182 00:09:09,940 --> 00:09:14,310 Now, the lower-speed interfaces all look alike to OSPF. 183 00:09:14,310 --> 00:09:18,150 Now, this, of course, could be very easily fixed by you 184 00:09:18,150 --> 00:09:19,470 as the administrator. 185 00:09:19,470 --> 00:09:21,750 If you did have this problem, you could just 186 00:09:21,750 --> 00:09:25,170 say IP OSPF cost, let's say. 187 00:09:25,170 --> 00:09:27,780 And by the way, the maximum for any individual interface 188 00:09:27,780 --> 00:09:35,290 is that 65,535, but we could, say, set it to 50,000. 189 00:09:35,290 --> 00:09:37,540 So we can see now that we've manually set it. 190 00:09:37,540 --> 00:09:42,340 So all we've done is override what the auto-cost reference 191 00:09:42,340 --> 00:09:44,810 bandwidth was trying to do on its own. 192 00:09:44,810 --> 00:09:47,800 Now, keep in mind that's not necessarily a problem. 193 00:09:47,800 --> 00:09:49,720 If I turn this back off-- 194 00:09:49,720 --> 00:09:52,520 we'll just go back to auto-cost reference bandwidth. 195 00:09:52,520 --> 00:09:56,470 So once again, we're just back to the 65,535. 196 00:09:56,470 --> 00:10:00,040 This does not in any way prevent routes from being used. 197 00:10:00,040 --> 00:10:03,220 If I do a show IP route OSPF, we're 198 00:10:03,220 --> 00:10:05,020 still using all these routes. 199 00:10:05,020 --> 00:10:08,290 Now, they're barely over the 65,535 200 00:10:08,290 --> 00:10:09,910 because the rest of our environment 201 00:10:09,910 --> 00:10:14,510 still has all 1s for all of those gigabit interfaces. 202 00:10:14,510 --> 00:10:17,440 So as suggested, we really should 203 00:10:17,440 --> 00:10:19,900 change the auto-cost reference bandwidth 204 00:10:19,900 --> 00:10:22,070 on all of our devices. 205 00:10:22,070 --> 00:10:25,150 So let's hop over to router 1. 206 00:10:25,150 --> 00:10:28,180 We simply go into router OSPF 1. 207 00:10:28,180 --> 00:10:30,610 And we set the auto-cost reference bandwidth 208 00:10:30,610 --> 00:10:31,690 to 1 million. 209 00:10:31,690 --> 00:10:33,010 Commit the changes. 210 00:10:33,010 --> 00:10:35,710 And we could verify one of our interfaces. 211 00:10:35,710 --> 00:10:39,130 And we see here that just like on IOS XE, 212 00:10:39,130 --> 00:10:41,320 the cost is now 1,000. 213 00:10:41,320 --> 00:10:44,290 You might have also noticed that the command is pretty much 214 00:10:44,290 --> 00:10:44,962 identical. 215 00:10:44,962 --> 00:10:47,170 So we're going to configure the rest of these routers 216 00:10:47,170 --> 00:10:50,170 to all have the same auto-cost reference bandwidth, 217 00:10:50,170 --> 00:10:51,940 but we'll do it very quickly. 218 00:10:51,940 --> 00:10:58,048 There's R2, R3, R4, R5, 6, 7. 219 00:10:58,048 --> 00:10:59,200 8 is done. 220 00:10:59,200 --> 00:11:01,510 And 9 is not running OSPF. 221 00:11:01,510 --> 00:11:02,980 So that just leaves 10. 222 00:11:02,980 --> 00:11:06,820 Now all of our costs should reference 1,000 223 00:11:06,820 --> 00:11:08,320 on all the interfaces. 224 00:11:08,320 --> 00:11:10,900 We can go back and verify this on router 8 225 00:11:10,900 --> 00:11:14,550 since that's the router we've been working on. 226 00:11:14,550 --> 00:11:17,340 So if we just generically look at the routing table again, 227 00:11:17,340 --> 00:11:23,400 we see that these are all values like 67,535 and so on. 228 00:11:23,400 --> 00:11:25,280 Now, this, of course, is because we still 229 00:11:25,280 --> 00:11:28,010 have that ridiculously low bandwidth 230 00:11:28,010 --> 00:11:29,720 on our gigabit-1 interface. 231 00:11:29,720 --> 00:11:30,920 Let's go ahead and fix that. 232 00:11:30,920 --> 00:11:34,670 233 00:11:34,670 --> 00:11:38,030 We'll just say no bandwidth, and it will go back to its default. 234 00:11:38,030 --> 00:11:40,010 We'll look at the routing table one more time. 235 00:11:40,010 --> 00:11:43,760 And we can see that these are more reasonable values given 236 00:11:43,760 --> 00:11:45,900 that all of our interfaces in our environment 237 00:11:45,900 --> 00:11:47,810 now count for 1,000. 238 00:11:47,810 --> 00:11:50,120 You may notice, by the way, as a side note 239 00:11:50,120 --> 00:11:53,570 that a lot of these values end in a 1, 240 00:11:53,570 --> 00:11:56,570 such as let's pick on router 1's loopback here 241 00:11:56,570 --> 00:11:59,180 with a cost of 2,001. 242 00:11:59,180 --> 00:12:03,230 That's because that by default, loopback interfaces always 243 00:12:03,230 --> 00:12:04,700 have a cost of 1. 244 00:12:04,700 --> 00:12:07,640 And that is a route to router 1's loopback. 245 00:12:07,640 --> 00:12:11,060 So it's 2,000 to get to router 1 and then 246 00:12:11,060 --> 00:12:14,350 1 to get to its loopback. 247 00:12:14,350 --> 00:12:19,810 So in this video, we really focused in on the cost value. 248 00:12:19,810 --> 00:12:22,360 We saw how auto-cost reference bandwidth 249 00:12:22,360 --> 00:12:25,930 works, how it calculates the default bandwidth 250 00:12:25,930 --> 00:12:29,830 for each interface based on an inverse proportion 251 00:12:29,830 --> 00:12:31,400 of its bandwidth. 252 00:12:31,400 --> 00:12:35,230 We also saw that we can manually set the cost on an interface, 253 00:12:35,230 --> 00:12:37,840 of course, to manipulate routing. 254 00:12:37,840 --> 00:12:41,320 You could really change the bandwidth 255 00:12:41,320 --> 00:12:44,650 to manipulate routing as well, although that's generally 256 00:12:44,650 --> 00:12:47,860 not recommended because other things actually 257 00:12:47,860 --> 00:12:52,240 do look at that bandwidth value, such as QoS. 258 00:12:52,240 --> 00:12:55,990 So it's really recommended that you change the cost 259 00:12:55,990 --> 00:12:58,810 if you want to manipulate OSPF. 260 00:12:58,810 --> 00:13:01,840 So don't forget that on most of our platforms, 261 00:13:01,840 --> 00:13:04,390 the value of auto-cost reference bandwidth 262 00:13:04,390 --> 00:13:09,280 defaults to 100, which is the equivalent of fast ethernet. 263 00:13:09,280 --> 00:13:13,450 So this does need to be changed on most of today's devices. 264 00:13:13,450 --> 00:13:16,690 But keep in mind Cisco is beginning to change that 265 00:13:16,690 --> 00:13:18,500 on some of their platforms. 266 00:13:18,500 --> 00:13:22,910 So always watch what your platform defaults to. 267 00:13:22,910 --> 00:13:25,000 I hope this has been informative for you. 268 00:13:25,000 --> 00:13:28,110 And I'd like to thank you for viewing. 269 00:13:28,110 --> 00:13:31,000