1 00:00:00,000 --> 00:00:07,080 2 00:00:07,080 --> 00:00:09,540 So now that we've seen some of the problems 3 00:00:09,540 --> 00:00:12,540 with not doing summarization, let's 4 00:00:12,540 --> 00:00:17,010 begin by actually looking at summarizing internal routes, 5 00:00:17,010 --> 00:00:21,460 or type III LSAs, in OSPF. 6 00:00:21,460 --> 00:00:23,860 Internal and external summarization 7 00:00:23,860 --> 00:00:25,450 are done differently. 8 00:00:25,450 --> 00:00:28,850 Now, they actually function very similar. 9 00:00:28,850 --> 00:00:31,510 However, there are different restrictions 10 00:00:31,510 --> 00:00:35,020 on when we can do each one, and the command 11 00:00:35,020 --> 00:00:38,680 itself is different for internal versus external. 12 00:00:38,680 --> 00:00:42,388 So as usual, let's take a look at our diagram real quick, 13 00:00:42,388 --> 00:00:43,930 so we can be familiar with what we're 14 00:00:43,930 --> 00:00:46,190 going to be doing in the demonstration. 15 00:00:46,190 --> 00:00:49,960 And then we'll jump into the CLI and see how summarization works 16 00:00:49,960 --> 00:00:54,000 for our internal prefixes. 17 00:00:54,000 --> 00:00:56,900 So in this video, we'll be focusing just 18 00:00:56,900 --> 00:00:58,620 on the internal routes. 19 00:00:58,620 --> 00:01:00,980 So since we're focusing on the internals, 20 00:01:00,980 --> 00:01:03,770 we'll just be looking at those four routes 21 00:01:03,770 --> 00:01:07,220 that we saw earlier, coming from router 10. 22 00:01:07,220 --> 00:01:10,250 These are, of course, coming down to the ABR. 23 00:01:10,250 --> 00:01:14,000 In this case, that's router 6 is acting as the ABR 24 00:01:14,000 --> 00:01:15,590 here for area 200. 25 00:01:15,590 --> 00:01:22,100 Remember that in OSPF, you can only summarize on an ABR. 26 00:01:22,100 --> 00:01:25,250 In this case, that would be router 6, router 1, 27 00:01:25,250 --> 00:01:26,760 or router 3. 28 00:01:26,760 --> 00:01:30,330 Those are the only approaches we have in this topology. 29 00:01:30,330 --> 00:01:32,030 So what we're going to do is, we're 30 00:01:32,030 --> 00:01:37,110 going to take these 4/24 routes that we have right now, 31 00:01:37,110 --> 00:01:43,550 and we are going to summarize them into 1/16 route being 32 00:01:43,550 --> 00:01:46,220 advertised by router 6. 33 00:01:46,220 --> 00:01:48,230 Then we'll, of course, take a look 34 00:01:48,230 --> 00:01:51,560 at the changes that creates on router 7 35 00:01:51,560 --> 00:01:56,660 as far as, once again, causing a failure on router 10, 36 00:01:56,660 --> 00:01:59,060 just for one of the loopbacks, and then 37 00:01:59,060 --> 00:02:01,680 bringing that interface back up. 38 00:02:01,680 --> 00:02:05,510 So we'll take a look at what happens when that route flaps. 39 00:02:05,510 --> 00:02:08,030 So let's jump into the command line. 40 00:02:08,030 --> 00:02:09,979 As usual, we'll start with looking 41 00:02:09,979 --> 00:02:11,390 at what we already have. 42 00:02:11,390 --> 00:02:15,380 So we'll start on router 7 and look at these existing routes, 43 00:02:15,380 --> 00:02:17,420 just to verify that we're getting them 44 00:02:17,420 --> 00:02:20,330 before we do our summarization. 45 00:02:20,330 --> 00:02:23,140 So we'll start with the show IP route OSPF. 46 00:02:23,140 --> 00:02:25,690 We'll look specifically at the anterior area routes. 47 00:02:25,690 --> 00:02:29,590 And what we're looking for are these 100.100 networks. 48 00:02:29,590 --> 00:02:34,750 We can see that right now, we do have 4/24 networks, of course, 49 00:02:34,750 --> 00:02:37,700 only being different in the third octet. 50 00:02:37,700 --> 00:02:45,280 So we're going to be summarizing these to 100.100.0.0/16. 51 00:02:45,280 --> 00:02:47,680 To do this, of course, we have to go to our ABR. 52 00:02:47,680 --> 00:02:50,320 So let's jump up to router 6. 53 00:02:50,320 --> 00:02:52,150 We'll go into configuration mode. 54 00:02:52,150 --> 00:02:54,700 Of course, into our OSPF process. 55 00:02:54,700 --> 00:02:57,320 And then we're going to do the area range command. 56 00:02:57,320 --> 00:03:00,040 Now when we put in the area, this 57 00:03:00,040 --> 00:03:02,990 is going to be the area that the routes are in. 58 00:03:02,990 --> 00:03:05,710 So in this case, it's area 200. 59 00:03:05,710 --> 00:03:10,610 We will be summarizing into all other areas. 60 00:03:10,610 --> 00:03:13,240 So just keep in mind, when you're doing the area range 61 00:03:13,240 --> 00:03:16,840 command, it's always the source area that you're listing, 62 00:03:16,840 --> 00:03:20,200 the one that has the prefixes that we wish to summarize. 63 00:03:20,200 --> 00:03:23,240 Out of area 200, of course, we're doing a range. 64 00:03:23,240 --> 00:03:25,240 This is why we call it the area range command. 65 00:03:25,240 --> 00:03:27,970 And then we put in the network that we actually 66 00:03:27,970 --> 00:03:29,300 want to summarize. 67 00:03:29,300 --> 00:03:33,070 So in this case, it's going to be the 100.100. 68 00:03:33,070 --> 00:03:35,330 And of course, then we put in the mask. 69 00:03:35,330 --> 00:03:37,120 We're going to make this a /16. 70 00:03:37,120 --> 00:03:40,340 There's a few other options we can do on this as well. 71 00:03:40,340 --> 00:03:42,800 So for example, we could set the cost. 72 00:03:42,800 --> 00:03:46,940 Notice the default is to advertise this route. 73 00:03:46,940 --> 00:03:49,800 We're not going to change any of these options right now. 74 00:03:49,800 --> 00:03:53,270 So let's just go ahead and hit Enter. 75 00:03:53,270 --> 00:03:56,690 And let's do a show IP route. 76 00:03:56,690 --> 00:04:00,680 The reason we're doing a show IP route on this device 77 00:04:00,680 --> 00:04:03,140 is, we want to see that it does still, of course, 78 00:04:03,140 --> 00:04:06,180 itself have those 4/24s. 79 00:04:06,180 --> 00:04:10,190 But notice that we now have a /16. 80 00:04:10,190 --> 00:04:16,519 It's listed as a summary, and the next hop is null zero. 81 00:04:16,519 --> 00:04:20,810 This route is referred to as the discard route. 82 00:04:20,810 --> 00:04:27,050 Its purpose is to prevent loops in our OSPF environment. 83 00:04:27,050 --> 00:04:33,000 Say, for example, we had an advertisement of this summary. 84 00:04:33,000 --> 00:04:36,900 And since we're saying that we can get to all of 100.100, 85 00:04:36,900 --> 00:04:42,180 well what if somebody sent a packet to us going to, say 86 00:04:42,180 --> 00:04:44,080 a network that doesn't exist? 87 00:04:44,080 --> 00:04:50,460 So maybe it's going to 100.100.200.0/24. 88 00:04:50,460 --> 00:04:55,230 Well, we don't have a network that's 200/24. 89 00:04:55,230 --> 00:04:59,340 Now normally, what we would do is just discard that traffic, 90 00:04:59,340 --> 00:05:01,960 because we don't have a route for it. 91 00:05:01,960 --> 00:05:08,200 But what if this router happens to also have a default route? 92 00:05:08,200 --> 00:05:11,130 So maybe this is like an internet edge, 93 00:05:11,130 --> 00:05:14,970 and we're default routing to the next hop, 94 00:05:14,970 --> 00:05:18,060 and we're advertising this summary. 95 00:05:18,060 --> 00:05:21,100 Then somebody sends us something that doesn't exist. 96 00:05:21,100 --> 00:05:22,600 We don't have a route for it. 97 00:05:22,600 --> 00:05:25,500 So we send it right back to the default gateway, who of course 98 00:05:25,500 --> 00:05:26,750 routes it right back to us. 99 00:05:26,750 --> 00:05:28,780 We send it right back to the default gateway. 100 00:05:28,780 --> 00:05:31,620 And just like that, we have a loop. 101 00:05:31,620 --> 00:05:36,210 By putting in this summary route to null zero, 102 00:05:36,210 --> 00:05:39,900 this is covering the entire range we're advertising. 103 00:05:39,900 --> 00:05:42,210 And essentially, what we're saying is, 104 00:05:42,210 --> 00:05:47,940 if any traffic shows up for 100.100 dot anything, 105 00:05:47,940 --> 00:05:52,260 if we don't have a more specific route to actually deliver it, 106 00:05:52,260 --> 00:05:57,270 like these 4/24s that we have right now, just discard it. 107 00:05:57,270 --> 00:05:59,820 This way, we're not going to try to send it back 108 00:05:59,820 --> 00:06:01,840 over something like a default. 109 00:06:01,840 --> 00:06:05,070 So again, this is critical for loop prevention. 110 00:06:05,070 --> 00:06:08,730 And as we can see, OSPF puts this discard route 111 00:06:08,730 --> 00:06:12,360 in the routing table for us automatically on the ABR 112 00:06:12,360 --> 00:06:14,470 doing the summarization. 113 00:06:14,470 --> 00:06:16,650 So now let's go back over to router 7 114 00:06:16,650 --> 00:06:20,160 and see what this looks like on a router that's not the ABR. 115 00:06:20,160 --> 00:06:23,970 So on router 7, we'll simply repeat the last command again. 116 00:06:23,970 --> 00:06:32,250 But this time, notice that we have a 100.100.0.0/16 network. 117 00:06:32,250 --> 00:06:33,940 That is, of course, our summary. 118 00:06:33,940 --> 00:06:36,390 So now let's take a look at the effects this is going 119 00:06:36,390 --> 00:06:38,100 to have on our convergence. 120 00:06:38,100 --> 00:06:41,280 Remember, we saw previously that if a network flaps 121 00:06:41,280 --> 00:06:45,660 on router 10, router 7 doesn't have to run Dijkstra. 122 00:06:45,660 --> 00:06:48,640 But it does still have to update the routing table. 123 00:06:48,640 --> 00:06:51,240 So we still saw updates coming in. 124 00:06:51,240 --> 00:06:53,190 Let's go ahead and turn on our debug, 125 00:06:53,190 --> 00:06:57,340 and let's go flap a network on router 10. 126 00:06:57,340 --> 00:06:59,790 Let's just pick on loopback 110. 127 00:06:59,790 --> 00:07:03,180 We'll shut this interface and jump back over to router 7. 128 00:07:03,180 --> 00:07:07,800 Notice that absolutely nothing happened here in our debug. 129 00:07:07,800 --> 00:07:11,070 This is the summary route, protecting us 130 00:07:11,070 --> 00:07:15,270 from root flaps in the other area behind the summary. 131 00:07:15,270 --> 00:07:17,920 And this is one of our main purposes. 132 00:07:17,920 --> 00:07:20,730 Now something else to note while we're here-- 133 00:07:20,730 --> 00:07:24,360 if we look back up at our routing table for this summary, 134 00:07:24,360 --> 00:07:28,200 notice that the metric on that summary is currently 3. 135 00:07:28,200 --> 00:07:30,360 Because the next thing we want to look 136 00:07:30,360 --> 00:07:36,610 at is how OSPF calculates the metric for the summary. 137 00:07:36,610 --> 00:07:39,480 So to do this, let's go back over to router 10. 138 00:07:39,480 --> 00:07:41,880 First thing we'll do is no shut the interface. 139 00:07:41,880 --> 00:07:45,630 Then let's change the OSPF cost on some of these interfaces. 140 00:07:45,630 --> 00:07:48,010 Since we're already under interface 110, 141 00:07:48,010 --> 00:07:51,720 let's change this one to say a cost of 20. 142 00:07:51,720 --> 00:07:54,090 We'll go in interface loopback 100. 143 00:07:54,090 --> 00:07:56,160 We'll change this one to a cost of 10. 144 00:07:56,160 --> 00:07:58,470 And then let's go into loopback 120. 145 00:07:58,470 --> 00:08:00,850 We'll make this one to cost of 20 as well. 146 00:08:00,850 --> 00:08:03,480 And we also have a loopback 130. 147 00:08:03,480 --> 00:08:05,440 We'll make that one a cost of 30. 148 00:08:05,440 --> 00:08:08,530 So these are the loopbacks that represent each of our networks. 149 00:08:08,530 --> 00:08:10,280 So what we're doing is, we're setting them 150 00:08:10,280 --> 00:08:13,180 all to different costs so we can see what happens. 151 00:08:13,180 --> 00:08:15,060 Let's go back over to router 7. 152 00:08:15,060 --> 00:08:17,100 Now the first thing to note here on router 7 153 00:08:17,100 --> 00:08:21,030 is that we have, in fact, gotten SPF updates now. 154 00:08:21,030 --> 00:08:24,880 This is because the metric on that route actually changed. 155 00:08:24,880 --> 00:08:26,790 Let's take a look at our routing table again. 156 00:08:26,790 --> 00:08:31,300 Notice that the metric on that route is now 12. 157 00:08:31,300 --> 00:08:34,559 That means that it's actually using the loopback 158 00:08:34,559 --> 00:08:39,730 with a cost of 10, plus there's two links between us and there. 159 00:08:39,730 --> 00:08:42,280 So it's adding 2 to that. 160 00:08:42,280 --> 00:08:44,520 But to summarize what it's doing here, 161 00:08:44,520 --> 00:08:47,250 it's actually using the lowest metric 162 00:08:47,250 --> 00:08:49,680 from the routes that are being summarized. 163 00:08:49,680 --> 00:08:53,100 So of course, we set some to 10, some to 20, some to 30, 164 00:08:53,100 --> 00:08:54,690 and it's using the 10. 165 00:08:54,690 --> 00:08:58,750 It's, of course, also counting the other interfaces involved. 166 00:08:58,750 --> 00:09:01,800 But overall, it's using the lowest cost 167 00:09:01,800 --> 00:09:03,870 of the routes being summarized. 168 00:09:03,870 --> 00:09:06,840 We can, of course, verify this by going back over the router 169 00:09:06,840 --> 00:09:09,360 10, going into our interface loopback 170 00:09:09,360 --> 00:09:12,490 100, which is the one with the lowest cost, 171 00:09:12,490 --> 00:09:14,940 therefore the one that it would currently be using, 172 00:09:14,940 --> 00:09:18,480 and shut this network down. 173 00:09:18,480 --> 00:09:21,610 Now here's sort of a downside that we have to be aware of. 174 00:09:21,610 --> 00:09:24,600 If we come back over here to router 7, notice, 175 00:09:24,600 --> 00:09:26,730 we've gotten another update again. 176 00:09:26,730 --> 00:09:28,750 Now we expected this behavior. 177 00:09:28,750 --> 00:09:32,250 Because if we look at the route now, now it's 22. 178 00:09:32,250 --> 00:09:36,670 So obviously, it has to send an update for that metric change. 179 00:09:36,670 --> 00:09:38,880 But herein lies the problem. 180 00:09:38,880 --> 00:09:42,030 The whole goal, or at least one of the major goals, 181 00:09:42,030 --> 00:09:46,320 of doing this summarization was to prevent this. 182 00:09:46,320 --> 00:09:50,190 We didn't want the device to receive updates 183 00:09:50,190 --> 00:09:52,080 every time a route flaps. 184 00:09:52,080 --> 00:09:54,600 And if they have different metrics, 185 00:09:54,600 --> 00:09:57,220 that may very well still happen. 186 00:09:57,220 --> 00:10:00,030 So one thing we might want to do to fix this 187 00:10:00,030 --> 00:10:04,950 is to actually hard code the metric on the summary. 188 00:10:04,950 --> 00:10:08,980 That way, if the routes behind the summary, particularly, 189 00:10:08,980 --> 00:10:12,300 of course, the one with the lowest metric, were to fail, 190 00:10:12,300 --> 00:10:14,250 we wouldn't still get this update 191 00:10:14,250 --> 00:10:15,900 to we're trying to prevent. 192 00:10:15,900 --> 00:10:18,540 So that might be a good practice that you 193 00:10:18,540 --> 00:10:20,880 want to do in the real world. 194 00:10:20,880 --> 00:10:22,980 To do that, of course, all we have to do 195 00:10:22,980 --> 00:10:29,030 is go back over to router 6, go back to our area range command, 196 00:10:29,030 --> 00:10:31,160 and simply set the cost. 197 00:10:31,160 --> 00:10:32,240 We'll set it to 100. 198 00:10:32,240 --> 00:10:35,000 Now this will, of course, cause one more update 199 00:10:35,000 --> 00:10:37,280 to go into area 0. 200 00:10:37,280 --> 00:10:39,440 So if we go back over to router 7, 201 00:10:39,440 --> 00:10:42,380 we see that once again, we've gotten another update. 202 00:10:42,380 --> 00:10:45,020 But hopefully, this should then be the last one, 203 00:10:45,020 --> 00:10:46,950 regardless of what happens. 204 00:10:46,950 --> 00:10:48,770 So again, if we look at the route now, 205 00:10:48,770 --> 00:10:54,530 we see that it just flat out has a metric of 101, the 100 that's 206 00:10:54,530 --> 00:10:59,820 being advertised plus our cost of 1 to get to router 6 itself. 207 00:10:59,820 --> 00:11:02,390 Now if those networks on router 10 flap, 208 00:11:02,390 --> 00:11:06,320 it won't change anything, even if they're a better cost. 209 00:11:06,320 --> 00:11:09,530 Let's bring that interface back up on router 10. 210 00:11:09,530 --> 00:11:12,150 Remember that this is the one with the best cost. 211 00:11:12,150 --> 00:11:14,810 So theoretically, based on the normal rules, 212 00:11:14,810 --> 00:11:16,700 this should now become the metric. 213 00:11:16,700 --> 00:11:18,950 But of course, we know that it will not. 214 00:11:18,950 --> 00:11:22,040 We see here on router 7 that we did not get an update. 215 00:11:22,040 --> 00:11:24,950 Everything has been quiet, even though we had 216 00:11:24,950 --> 00:11:26,750 a better route come back up. 217 00:11:26,750 --> 00:11:31,340 Now of course, it's still going to have that cost of 101. 218 00:11:31,340 --> 00:11:34,520 This isn't going to change now, regardless of what 219 00:11:34,520 --> 00:11:37,440 those routes behind it do. 220 00:11:37,440 --> 00:11:40,440 In this video, we took a look at how 221 00:11:40,440 --> 00:11:44,610 to summarize internal routes in OSPF. 222 00:11:44,610 --> 00:11:46,740 Some of our key takeaways-- remember, 223 00:11:46,740 --> 00:11:49,800 we can only do this on the ABR. 224 00:11:49,800 --> 00:11:54,090 It uses the area range command to accomplish this. 225 00:11:54,090 --> 00:11:57,840 And by default, it will use the metric 226 00:11:57,840 --> 00:12:00,690 from the lowest cost route that's being 227 00:12:00,690 --> 00:12:03,930 summarized for the summary. 228 00:12:03,930 --> 00:12:06,600 But to help increase stability, we 229 00:12:06,600 --> 00:12:08,490 may want to go ahead and take care of that 230 00:12:08,490 --> 00:12:13,410 ourselves by manually setting a metric on that summary. 231 00:12:13,410 --> 00:12:15,540 I hope this has been informative for you, 232 00:12:15,540 --> 00:12:18,530 and I'd like to thank you you for viewing. 233 00:12:18,530 --> 00:12:22,000