1 00:00:00,000 --> 00:00:00,954 2 00:00:00,954 --> 00:00:04,293 [CBT NUGGETS THEME MUSIC] 3 00:00:04,293 --> 00:00:07,160 4 00:00:07,160 --> 00:00:09,950 So the next thing we want to talk about with OSPF 5 00:00:09,950 --> 00:00:11,870 is optimizing it. 6 00:00:11,870 --> 00:00:14,030 And probably the best way to optimize 7 00:00:14,030 --> 00:00:17,060 it is to start with looking at some of its timers 8 00:00:17,060 --> 00:00:21,110 that we can adjust to make it respond faster to errors 9 00:00:21,110 --> 00:00:22,950 and to converge faster. 10 00:00:22,950 --> 00:00:25,730 So let's start by jumping in and looking at the different timers 11 00:00:25,730 --> 00:00:26,750 we can adjust. 12 00:00:26,750 --> 00:00:28,670 And then we'll jump into the command line 13 00:00:28,670 --> 00:00:32,890 and see some of those timers in action. 14 00:00:32,890 --> 00:00:35,550 So as we said, one of the easiest ways-- 15 00:00:35,550 --> 00:00:38,430 and you could argue probably one of the best ways as well-- 16 00:00:38,430 --> 00:00:42,750 to increase OSPF performance is to adjust 17 00:00:42,750 --> 00:00:45,300 some of those default timers. 18 00:00:45,300 --> 00:00:47,670 Some of the default timers are fine, and some of them 19 00:00:47,670 --> 00:00:48,850 need to be adjusted. 20 00:00:48,850 --> 00:00:50,550 So let's go through and take a look 21 00:00:50,550 --> 00:00:53,310 at what we can and should change. 22 00:00:53,310 --> 00:00:58,500 Keep in mind as we go through this that the default timers 23 00:00:58,500 --> 00:01:00,360 for many protocols-- 24 00:01:00,360 --> 00:01:02,550 I'm not just picking on OSPF here-- 25 00:01:02,550 --> 00:01:06,270 but of course, including OSPF, these 26 00:01:06,270 --> 00:01:09,450 have been around for a long time, decades. 27 00:01:09,450 --> 00:01:13,170 And at that time, we had different networking 28 00:01:13,170 --> 00:01:17,640 technologies in place, and possibly even more importantly, 29 00:01:17,640 --> 00:01:19,260 different equipment. 30 00:01:19,260 --> 00:01:22,200 I remember when I first started doing Cisco routing. 31 00:01:22,200 --> 00:01:24,840 A lot of the routers back then couldn't even 32 00:01:24,840 --> 00:01:27,510 run full-blown OSPF. 33 00:01:27,510 --> 00:01:31,020 They could run OSPF if it was a stub area, 34 00:01:31,020 --> 00:01:34,320 but they couldn't run full-blown OSPF. 35 00:01:34,320 --> 00:01:36,360 The equipment just couldn't handle it. 36 00:01:36,360 --> 00:01:39,270 Now, of course, it's no problem. 37 00:01:39,270 --> 00:01:42,330 All of the devices can run full-blown OSPF. 38 00:01:42,330 --> 00:01:44,760 And since the equipment is so much better, 39 00:01:44,760 --> 00:01:49,590 that's going to change how quickly they can process OSPF. 40 00:01:49,590 --> 00:01:53,500 A lot of these timers were there to throttle these routers 41 00:01:53,500 --> 00:01:58,210 so that they could handle OSPF on lesser equipment. 42 00:01:58,210 --> 00:02:01,140 So the first of these timers that we should really look at 43 00:02:01,140 --> 00:02:05,430 are the timers that determine how quickly we detect 44 00:02:05,430 --> 00:02:07,800 the failure of a neighbor. 45 00:02:07,800 --> 00:02:09,720 Now, the reason we have to do this 46 00:02:09,720 --> 00:02:13,980 is to find a route around that neighbor if possible, 47 00:02:13,980 --> 00:02:17,010 assuming that there is redundant links. 48 00:02:17,010 --> 00:02:19,270 The two timers involved in this-- 49 00:02:19,270 --> 00:02:21,420 so the two things we have to be concerned about-- 50 00:02:21,420 --> 00:02:24,570 are the Hello and Dead timers. 51 00:02:24,570 --> 00:02:28,200 It is recommended to keep these at a 4 to 1 52 00:02:28,200 --> 00:02:33,030 ratio, where the Dead timer is four times the Hello timer. 53 00:02:33,030 --> 00:02:36,150 Now, note that the default for these values 54 00:02:36,150 --> 00:02:40,110 is based on the OSPF network type. 55 00:02:40,110 --> 00:02:43,530 Most modern networks-- this would include things 56 00:02:43,530 --> 00:02:46,500 like ethernet, point-to-point lengths. 57 00:02:46,500 --> 00:02:48,750 So most of our modern network types 58 00:02:48,750 --> 00:02:51,750 are going to default to 10 and 40. 59 00:02:51,750 --> 00:02:56,910 Again, that's a 10-second Hello with a 40-second Dead timer. 60 00:02:56,910 --> 00:02:59,700 Some traditional WAN network types-- 61 00:02:59,700 --> 00:03:02,730 and one that we might still have to be concerned with today-- 62 00:03:02,730 --> 00:03:05,100 would be network type point-to-multipoint. 63 00:03:05,100 --> 00:03:07,620 The reason we still might be concerned with this today 64 00:03:07,620 --> 00:03:11,790 is it does still fit on technologies such as DMVPN. 65 00:03:11,790 --> 00:03:16,990 Honestly, OSPF isn't really recommended on DMVPN anyway, 66 00:03:16,990 --> 00:03:20,070 but if you're going to run it, point-to-multipoint 67 00:03:20,070 --> 00:03:22,150 might be a good solution for you. 68 00:03:22,150 --> 00:03:26,160 However, we probably don't want those default timers 69 00:03:26,160 --> 00:03:28,170 of 30 and 120. 70 00:03:28,170 --> 00:03:30,450 These timers were traditionally used 71 00:03:30,450 --> 00:03:34,110 because these were supposed to be WAN network types, 72 00:03:34,110 --> 00:03:36,450 and the WAN was traditionally slower, 73 00:03:36,450 --> 00:03:40,320 so it was better to have slower timers on the slower links. 74 00:03:40,320 --> 00:03:42,570 Now in case, it's not clear by the fact 75 00:03:42,570 --> 00:03:45,150 that we're saying that the timers are set by network type 76 00:03:45,150 --> 00:03:48,180 and such, that does mean that the timers are 77 00:03:48,180 --> 00:03:51,190 going to be set per interface. 78 00:03:51,190 --> 00:03:53,400 So I can absolutely have one interface 79 00:03:53,400 --> 00:03:56,010 set one way, one interface set a different way 80 00:03:56,010 --> 00:03:57,180 on the same router. 81 00:03:57,180 --> 00:03:58,710 It's done all the time. 82 00:03:58,710 --> 00:04:01,770 These default values that we mentioned here, 83 00:04:01,770 --> 00:04:04,680 these really should rarely be used. 84 00:04:04,680 --> 00:04:08,460 When I say rarely, I sort of mean never. 85 00:04:08,460 --> 00:04:10,800 You really shouldn't use the default timers. 86 00:04:10,800 --> 00:04:14,070 I just don't really like to use words like never because there 87 00:04:14,070 --> 00:04:18,180 may be a situation somewhere where the default timers are 88 00:04:18,180 --> 00:04:20,279 still something somebody wants to use. 89 00:04:20,279 --> 00:04:22,330 There's nothing wrong with using them. 90 00:04:22,330 --> 00:04:24,720 It's just, again, on today's networks, 91 00:04:24,720 --> 00:04:28,020 having 40 seconds of downtime before we 92 00:04:28,020 --> 00:04:32,560 detect the failure of a neighbor is almost never acceptable. 93 00:04:32,560 --> 00:04:34,230 So we're probably hardly ever going 94 00:04:34,230 --> 00:04:36,510 to use these default timers. 95 00:04:36,510 --> 00:04:38,940 So now let's take a look at some of the other timers we 96 00:04:38,940 --> 00:04:40,800 can adjust. 97 00:04:40,800 --> 00:04:44,420 So the other timers we're going to look at have to do with how 98 00:04:44,420 --> 00:04:46,970 the Shortest Path First algorithm is run, 99 00:04:46,970 --> 00:04:51,230 as well as how quickly or how often we send link-state 100 00:04:51,230 --> 00:04:53,540 advertisements or LSAs-- 101 00:04:53,540 --> 00:04:55,050 to our neighbors. 102 00:04:55,050 --> 00:05:00,480 Now, these timers can be optimized either manually, 103 00:05:00,480 --> 00:05:02,780 which means you simply go in and manually change 104 00:05:02,780 --> 00:05:05,660 the timers using the commands in the IOS, 105 00:05:05,660 --> 00:05:08,810 or on most of today's equipment, these 106 00:05:08,810 --> 00:05:12,770 will be set automatically using a feature called 107 00:05:12,770 --> 00:05:16,190 routing-default-optimize. 108 00:05:16,190 --> 00:05:21,590 This is actually on by default, starting in IOS XE version 109 00:05:21,590 --> 00:05:24,800 16.5.1b. 110 00:05:24,800 --> 00:05:28,340 It's also on by default in IOS XR. 111 00:05:28,340 --> 00:05:31,040 So we'll be taking a look at this at the command line. 112 00:05:31,040 --> 00:05:34,800 Well, that's great, but what does this actually do for us? 113 00:05:34,800 --> 00:05:36,470 Well, what it's going to do is it's 114 00:05:36,470 --> 00:05:39,350 going to change the default values 115 00:05:39,350 --> 00:05:41,580 for these different options. 116 00:05:41,580 --> 00:05:46,220 So first, for timers throttle spf, 117 00:05:46,220 --> 00:05:50,390 it's going to change the initial, the secondary, 118 00:05:50,390 --> 00:05:56,284 and the max timers from their defaults of 5,000, 10,000, 119 00:05:56,284 --> 00:06:00,740 and 10, to be 50, 200, and 5. 120 00:06:00,740 --> 00:06:05,840 For timers throttle lsa all, once again, the same three 121 00:06:05,840 --> 00:06:06,560 timers. 122 00:06:06,560 --> 00:06:08,990 It has initial, secondary, and max. 123 00:06:08,990 --> 00:06:14,930 These are going to change from 0, 5000, and 5, to 50, 200, 124 00:06:14,930 --> 00:06:15,890 and 5. 125 00:06:15,890 --> 00:06:18,290 You can see these are pretty much the same timers 126 00:06:18,290 --> 00:06:21,080 that it uses for timers throttle spf. 127 00:06:21,080 --> 00:06:23,360 In other words, it's going to run shortest path 128 00:06:23,360 --> 00:06:26,330 first the same way it's sending updates. 129 00:06:26,330 --> 00:06:29,870 As far as timers for lsa arrival, 130 00:06:29,870 --> 00:06:32,210 these don't really have a category. 131 00:06:32,210 --> 00:06:37,140 It's just it changes the default from 1,000 to 100. 132 00:06:37,140 --> 00:06:38,610 Now, there's a lot of information 133 00:06:38,610 --> 00:06:42,030 out there on how you can tweak these timers to get the best 134 00:06:42,030 --> 00:06:44,820 possible performance out of OSPF, 135 00:06:44,820 --> 00:06:47,130 but Cisco has done a lot of research, 136 00:06:47,130 --> 00:06:51,540 and these new optimized values actually work really, really 137 00:06:51,540 --> 00:06:53,980 well in most environments. 138 00:06:53,980 --> 00:06:55,950 So in most environments, you're probably 139 00:06:55,950 --> 00:06:57,960 not going to have to change these settings. 140 00:06:57,960 --> 00:07:00,720 You just want to make sure that this feature is actually 141 00:07:00,720 --> 00:07:01,810 enabled. 142 00:07:01,810 --> 00:07:05,640 So now what we want to do is jump into the command line 143 00:07:05,640 --> 00:07:09,750 and just take a look at how do we change the neighbor timers, 144 00:07:09,750 --> 00:07:11,647 as well as we'll take a look at this feature, 145 00:07:11,647 --> 00:07:13,230 we'll turn it on and off, and just see 146 00:07:13,230 --> 00:07:14,680 how it changes the numbers. 147 00:07:14,680 --> 00:07:17,658 So let's start by jumping over to our topology, 148 00:07:17,658 --> 00:07:19,200 just take a look at where we're going 149 00:07:19,200 --> 00:07:21,180 to change the neighbor timers, and then we'll 150 00:07:21,180 --> 00:07:23,440 jump on to the command line. 151 00:07:23,440 --> 00:07:25,020 So for a neighborships, we're just 152 00:07:25,020 --> 00:07:26,640 going to focus on this neighborship 153 00:07:26,640 --> 00:07:31,690 up here in area 200 between router 6 and router 10. 154 00:07:31,690 --> 00:07:33,030 So we'll start with that. 155 00:07:33,030 --> 00:07:36,960 And then again, we'll look at our routing default optimized 156 00:07:36,960 --> 00:07:37,570 feature. 157 00:07:37,570 --> 00:07:40,640 So let's jump into the command line. 158 00:07:40,640 --> 00:07:42,370 So we're going to start here by observing 159 00:07:42,370 --> 00:07:44,830 what happens by default between router 6 160 00:07:44,830 --> 00:07:47,860 and router 10 when a failure occurs. 161 00:07:47,860 --> 00:07:49,240 And to see what's going on, we're 162 00:07:49,240 --> 00:07:51,550 just going to use a split window here so that we 163 00:07:51,550 --> 00:07:54,280 can see router 6 and 10 at the same time 164 00:07:54,280 --> 00:07:56,690 as we go through this demonstration. 165 00:07:56,690 --> 00:07:59,440 So let's start by going to router 10 166 00:07:59,440 --> 00:08:02,380 and shutting down its interface to router 6, 167 00:08:02,380 --> 00:08:07,210 and see how long it takes router 6 to figure out what happened. 168 00:08:07,210 --> 00:08:10,410 So simply go into configuration mode for interface gigabit 169 00:08:10,410 --> 00:08:12,730 1, and we will simply do a shut. 170 00:08:12,730 --> 00:08:16,390 Notice router 10 knows immediately because, of course, 171 00:08:16,390 --> 00:08:18,460 it's a direct link failure. 172 00:08:18,460 --> 00:08:20,820 So router 10, of course, knows immediately 173 00:08:20,820 --> 00:08:23,220 that that neighborship is going to go down. 174 00:08:23,220 --> 00:08:26,520 Notice, however, that router 6 still doesn't know. 175 00:08:26,520 --> 00:08:29,165 Now, this is going to take 40 seconds, 176 00:08:29,165 --> 00:08:31,290 so we're not going to sit here necessarily and wait 177 00:08:31,290 --> 00:08:35,100 the whole 40 seconds, but I'll fast forward until router 6 178 00:08:35,100 --> 00:08:37,120 sees that that neighborship is down. 179 00:08:37,120 --> 00:08:39,720 So here we can see router 6 has now realized 180 00:08:39,720 --> 00:08:41,789 that the neighborship is down, and that 181 00:08:41,789 --> 00:08:44,610 did take right around 40 seconds or so. 182 00:08:44,610 --> 00:08:46,950 So let's go ahead and bring this connection back up. 183 00:08:46,950 --> 00:08:50,250 We see that both sides now realize the neighborship is up. 184 00:08:50,250 --> 00:08:53,040 Now, let's adjust those Hello timers 185 00:08:53,040 --> 00:08:55,660 and see the difference in performance. 186 00:08:55,660 --> 00:08:59,220 So what we want to do is we want to say ip ospf, 187 00:08:59,220 --> 00:09:03,510 and we're going to use a feature called the dead-interval, which 188 00:09:03,510 --> 00:09:08,850 you can set this, of course, to be from 1 to 65535 seconds. 189 00:09:08,850 --> 00:09:14,160 Or you can go with this special command, minimal. 190 00:09:14,160 --> 00:09:17,160 If you do minimal, it will set it to one second 191 00:09:17,160 --> 00:09:18,990 as it says there on the description. 192 00:09:18,990 --> 00:09:21,810 However, it gives you this other option 193 00:09:21,810 --> 00:09:24,240 to configure the Hello multiplier. 194 00:09:24,240 --> 00:09:28,380 If we do the Hello multiplier, we can set this from 3 to 20. 195 00:09:28,380 --> 00:09:31,560 Now, as we mentioned in our lecture, 196 00:09:31,560 --> 00:09:35,560 it's really best to keep this at a 4-to-1 ratio. 197 00:09:35,560 --> 00:09:39,330 So to get four Hellos in one second, 198 00:09:39,330 --> 00:09:42,130 we would want to send, well, four of them. 199 00:09:42,130 --> 00:09:46,420 And that means it's going to send every 250 milliseconds. 200 00:09:46,420 --> 00:09:49,200 Now we, of course, need to set these timers exactly the same 201 00:09:49,200 --> 00:09:51,770 on router 6. 202 00:09:51,770 --> 00:09:53,435 On router 6, it's gigabit 2. 203 00:09:53,435 --> 00:09:58,380 204 00:09:58,380 --> 00:10:00,520 If we look at our OSPF interface, 205 00:10:00,520 --> 00:10:02,980 we can see that our Hello interval is, in fact, 206 00:10:02,980 --> 00:10:07,960 set to 250 milliseconds with a Dead timer of one second. 207 00:10:07,960 --> 00:10:10,380 So now let's go ahead and shut down our interface again 208 00:10:10,380 --> 00:10:12,720 on router 10 and see how long it takes 209 00:10:12,720 --> 00:10:14,580 router 6 to figure it out. 210 00:10:14,580 --> 00:10:20,360 211 00:10:20,360 --> 00:10:24,170 Notice now, it was within one second, much, 212 00:10:24,170 --> 00:10:28,600 much faster and better performance using the faster 213 00:10:28,600 --> 00:10:29,440 timers. 214 00:10:29,440 --> 00:10:31,880 So let me take this at a split window now. 215 00:10:31,880 --> 00:10:34,460 So we just broke router 10 back over here. 216 00:10:34,460 --> 00:10:36,520 So now let's take a look at those default 217 00:10:36,520 --> 00:10:40,000 timers for OSPF and LSA. 218 00:10:40,000 --> 00:10:43,330 If we just do a show IP OSPF, we can see here 219 00:10:43,330 --> 00:10:47,480 that the timers are set to what they were on our table. 220 00:10:47,480 --> 00:10:52,382 We can see here that it's set to 50, 200, 5,000, 500, 200, 221 00:10:52,382 --> 00:10:54,700 and 5000. 222 00:10:54,700 --> 00:10:58,150 If however, we were to turn off the routing-default-optimize 223 00:10:58,150 --> 00:11:00,550 feature, which we can do here simply by saying 224 00:11:00,550 --> 00:11:05,680 no routing-default-optimize and then do a show IP OSPF, 225 00:11:05,680 --> 00:11:08,410 we can see that these timers are back to the 5,000, 226 00:11:08,410 --> 00:11:11,450 10,000, 10,000, and so on. 227 00:11:11,450 --> 00:11:14,500 So again, this is a good feature to probably just leave on. 228 00:11:14,500 --> 00:11:15,940 We'll turn it back on. 229 00:11:15,940 --> 00:11:17,360 Verify it again. 230 00:11:17,360 --> 00:11:19,630 And we can see they're back to the fast timers. 231 00:11:19,630 --> 00:11:25,090 But this feature can be enabled or disabled if you want. 232 00:11:25,090 --> 00:11:29,410 In this video, we looked at how to optimize some of the OSPF 233 00:11:29,410 --> 00:11:34,480 timers, specifically, we looked at the new default values 234 00:11:34,480 --> 00:11:39,850 for the SPF and the LSA timers using our routing default 235 00:11:39,850 --> 00:11:41,440 optimize feature. 236 00:11:41,440 --> 00:11:44,740 And we looked at how to optimize the detection of a neighbor 237 00:11:44,740 --> 00:11:47,080 failure by changing the Hello and Dead 238 00:11:47,080 --> 00:11:50,440 intervals to their minimum values of one 239 00:11:50,440 --> 00:11:55,180 second for the Dead, 250 milliseconds for the Hellos. 240 00:11:55,180 --> 00:11:57,250 I hope this has been informative for you. 241 00:11:57,250 --> 00:12:00,240 And I'd like to thank you for viewing. 242 00:12:00,240 --> 00:12:04,000