1 00:00:00,000 --> 00:00:03,880 [AUDIO LOGO] 2 00:00:03,880 --> 00:00:06,790 3 00:00:06,790 --> 00:00:11,350 So now it's time to get a better look at deterministic MED. 4 00:00:11,350 --> 00:00:14,680 We're going to take a look at the difference between what 5 00:00:14,680 --> 00:00:20,590 IOS XE does by default versus what deterministic MED does 6 00:00:20,590 --> 00:00:23,180 to the path selection process. 7 00:00:23,180 --> 00:00:25,780 Now, we'll see, as we go through this discussion, 8 00:00:25,780 --> 00:00:28,420 that deterministic MED is actually 9 00:00:28,420 --> 00:00:31,720 enabled by default on IOS XR. 10 00:00:31,720 --> 00:00:34,060 So this is mostly going to be about what 11 00:00:34,060 --> 00:00:38,710 we have to do to effect this change on IOS XE. 12 00:00:38,710 --> 00:00:41,680 And it is generally considered best practice 13 00:00:41,680 --> 00:00:44,170 to enable deterministic MED. 14 00:00:44,170 --> 00:00:47,200 So let's jump in and take a look at the details of how this 15 00:00:47,200 --> 00:00:50,810 affects the overall process. 16 00:00:50,810 --> 00:00:53,800 So our first example here is where 17 00:00:53,800 --> 00:00:58,070 we're ordered from the newest to the oldest, in other words, 18 00:00:58,070 --> 00:01:00,730 just the order in which the routes were learned. 19 00:01:00,730 --> 00:01:04,870 And this is the default on IOS XE. 20 00:01:04,870 --> 00:01:09,530 Now, what's the problem with this, or why do we care? 21 00:01:09,530 --> 00:01:13,570 Well, the way the IOS picks the best path is it 22 00:01:13,570 --> 00:01:18,460 takes the first two entries and compares them together. 23 00:01:18,460 --> 00:01:20,230 Here's the problem. 24 00:01:20,230 --> 00:01:23,290 This one is from AS 500. 25 00:01:23,290 --> 00:01:26,830 This one is from AS 100. 26 00:01:26,830 --> 00:01:29,510 And since they're from different AS numbers, 27 00:01:29,510 --> 00:01:33,880 that means that the MED doesn't get considered. 28 00:01:33,880 --> 00:01:37,870 Now, moving on, they're both external. 29 00:01:37,870 --> 00:01:42,730 This decision is going to come down to the lowest router ID. 30 00:01:42,730 --> 00:01:46,180 Well, the lowest router ID is 1.1.1.1. 31 00:01:46,180 --> 00:01:53,390 And this becomes the best of those two paths. 32 00:01:53,390 --> 00:01:55,810 So now, entry2 is our best. 33 00:01:55,810 --> 00:02:00,400 Now we compare entry2 to entry3. 34 00:02:00,400 --> 00:02:06,841 Once again, AS 100, AS 500, we don't look at MED. 35 00:02:06,841 --> 00:02:08,960 MED is not considered. 36 00:02:08,960 --> 00:02:11,830 So now, as we go down the BGP path selection, 37 00:02:11,830 --> 00:02:15,130 we're going to prefer external over internal. 38 00:02:15,130 --> 00:02:18,440 And this one is going to become the best. 39 00:02:18,440 --> 00:02:22,810 And as we can see here, entry2 is our best entry 40 00:02:22,810 --> 00:02:25,300 in this scenario. 41 00:02:25,300 --> 00:02:28,060 I think the biggest thing to realize here, 42 00:02:28,060 --> 00:02:30,640 whether deterministic MED changes 43 00:02:30,640 --> 00:02:33,550 the actual ultimate decision or not, 44 00:02:33,550 --> 00:02:37,820 MED wasn't even considered in this discussion. 45 00:02:37,820 --> 00:02:41,590 We just chose the best path, and we crossed out 46 00:02:41,590 --> 00:02:43,990 MED the whole way through. 47 00:02:43,990 --> 00:02:47,890 MED didn't even get a chance to affect the decision. 48 00:02:47,890 --> 00:02:53,560 That's not very deterministic if MED doesn't even get a chance. 49 00:02:53,560 --> 00:02:56,710 Again, will it ultimately change the final decision? 50 00:02:56,710 --> 00:02:58,480 Maybe, maybe not. 51 00:02:58,480 --> 00:03:02,320 But it doesn't even get considered in, we'll say, 52 00:03:02,320 --> 00:03:05,500 just the wrong scenario like this one. 53 00:03:05,500 --> 00:03:07,480 MED wasn't even looked at. 54 00:03:07,480 --> 00:03:10,870 Let's look at that same scenario now but now 55 00:03:10,870 --> 00:03:14,010 with deterministic MED. 56 00:03:14,010 --> 00:03:18,120 So now, we're taking those same prefixes, 57 00:03:18,120 --> 00:03:22,080 but this time, they're ordered by the AS number. 58 00:03:22,080 --> 00:03:25,540 And this is using the deterministic MED feature, 59 00:03:25,540 --> 00:03:30,570 which is actually the default on IOS XR. 60 00:03:30,570 --> 00:03:32,280 So what's changed? 61 00:03:32,280 --> 00:03:35,820 Well, we can actually see here that they are now 62 00:03:35,820 --> 00:03:40,470 grouped by the AS number, not the order in which they 63 00:03:40,470 --> 00:03:41,830 were learned. 64 00:03:41,830 --> 00:03:47,410 Remember that before, router 1 was entry2 up here at the top. 65 00:03:47,410 --> 00:03:50,940 Now, router 1 is entry1. 66 00:03:50,940 --> 00:03:59,080 So now what happens is we pick the best by the AS number. 67 00:03:59,080 --> 00:04:00,750 In other words, we're going to start off 68 00:04:00,750 --> 00:04:03,720 by looking at these two entries because they're 69 00:04:03,720 --> 00:04:04,923 from the same AS. 70 00:04:04,923 --> 00:04:07,340 And what we're going to do is we're going to go down here, 71 00:04:07,340 --> 00:04:08,715 and we're going to go OK, they're 72 00:04:08,715 --> 00:04:11,760 both from a single AS, AS 500. 73 00:04:11,760 --> 00:04:14,610 This one has a MED of 100. 74 00:04:14,610 --> 00:04:17,579 This one has a MED of 150. 75 00:04:17,579 --> 00:04:26,040 Lowest wins, so entry2 becomes the best, the best from AS 500. 76 00:04:26,040 --> 00:04:29,880 But then we clear that out, and we say, OK, 77 00:04:29,880 --> 00:04:36,640 now take the best from AS 500 and compare it to AS 100. 78 00:04:36,640 --> 00:04:40,260 OK, well, again, they're both one AS number. 79 00:04:40,260 --> 00:04:44,010 In this case, they're from different AS's, so once again, 80 00:04:44,010 --> 00:04:46,120 MED gets thrown out. 81 00:04:46,120 --> 00:04:50,880 We prefer external over internal, so guess what? 82 00:04:50,880 --> 00:04:54,710 Entry1 becomes the best. 83 00:04:54,710 --> 00:04:58,010 Now, you might note that it's still router 1. 84 00:04:58,010 --> 00:05:00,890 As I mentioned, deterministic MED 85 00:05:00,890 --> 00:05:03,780 may not affect the ultimate end decision. 86 00:05:03,780 --> 00:05:05,780 And in this case, it didn't. 87 00:05:05,780 --> 00:05:07,700 But you see the important factor here 88 00:05:07,700 --> 00:05:10,670 is that MED at least got considered. 89 00:05:10,670 --> 00:05:13,190 It may not have been the final decision-maker, 90 00:05:13,190 --> 00:05:15,500 but it was at least considered when 91 00:05:15,500 --> 00:05:17,970 making our best path selection. 92 00:05:17,970 --> 00:05:20,300 So let's clear this off, and let's take 93 00:05:20,300 --> 00:05:22,820 a look at this same scenario. 94 00:05:22,820 --> 00:05:25,380 But what if we turn on both? 95 00:05:25,380 --> 00:05:29,930 So what if we do deterministic MED and always compare MED? 96 00:05:29,930 --> 00:05:32,160 Let's see what that changes. 97 00:05:32,160 --> 00:05:34,460 So once again, we're going to start off 98 00:05:34,460 --> 00:05:37,760 by looking at entry2 and entry3 together because they're 99 00:05:37,760 --> 00:05:39,440 from the same AS. 100 00:05:39,440 --> 00:05:42,950 And once again, they're both from 500. 101 00:05:42,950 --> 00:05:44,540 This one has a MED of 100. 102 00:05:44,540 --> 00:05:46,160 This has a MED of 150. 103 00:05:46,160 --> 00:05:50,270 Therefore, once again, entry2 wins. 104 00:05:50,270 --> 00:05:53,840 So so far, entry2 is our winner out of this pairing. 105 00:05:53,840 --> 00:05:56,120 So let's get rid of these. 106 00:05:56,120 --> 00:06:00,870 And now we compare entry2 and entry1. 107 00:06:00,870 --> 00:06:02,510 This one's from a single AS. 108 00:06:02,510 --> 00:06:03,800 This is from a single AS. 109 00:06:03,800 --> 00:06:06,920 So the AS path length is the same. 110 00:06:06,920 --> 00:06:11,670 But now, remember, we have BGP always compare MED enabled. 111 00:06:11,670 --> 00:06:15,800 So now it is going to look at the MED of 200 and 100. 112 00:06:15,800 --> 00:06:22,740 And again, 100 is lower, so this now becomes the overall best. 113 00:06:22,740 --> 00:06:25,500 So using these two features together, 114 00:06:25,500 --> 00:06:27,710 we end up with a different answer. 115 00:06:27,710 --> 00:06:30,980 Now, entry2 is the best. 116 00:06:30,980 --> 00:06:33,180 Now, using these features together, of course, 117 00:06:33,180 --> 00:06:36,500 we still have to make sure that those neighboring AS's, 118 00:06:36,500 --> 00:06:41,630 100 and 500 in this case, are using compatible MEDs. 119 00:06:41,630 --> 00:06:44,100 But you can see that at bare minimum, 120 00:06:44,100 --> 00:06:47,190 we should turn on deterministic MED. 121 00:06:47,190 --> 00:06:49,980 Deterministic MED is, at this point, 122 00:06:49,980 --> 00:06:53,340 considered the best choice for new installations. 123 00:06:53,340 --> 00:06:57,570 This is, again, part of why it's on by default on IOS XR. 124 00:06:57,570 --> 00:07:01,900 You should probably enable it on IOS XE as well. 125 00:07:01,900 --> 00:07:04,110 Now, do you always compare MED? 126 00:07:04,110 --> 00:07:08,950 That one, of course, depends on your scenario. 127 00:07:08,950 --> 00:07:13,270 In this video, we saw how using deterministic MED 128 00:07:13,270 --> 00:07:18,400 actually ensures that MED is always at least considered 129 00:07:18,400 --> 00:07:20,930 if we don't use this feature. 130 00:07:20,930 --> 00:07:23,560 Then we saw, in our first example, 131 00:07:23,560 --> 00:07:26,770 that depending on the exact order that the routes are 132 00:07:26,770 --> 00:07:30,800 learned in, MED might not be considered at all. 133 00:07:30,800 --> 00:07:34,420 Now, again, MED might not be making the final decision 134 00:07:34,420 --> 00:07:37,210 as far as the best path, but at least it 135 00:07:37,210 --> 00:07:40,390 gets to contribute or at least be involved 136 00:07:40,390 --> 00:07:42,700 if we use deterministic MED. 137 00:07:42,700 --> 00:07:45,160 And again, that is generally considered 138 00:07:45,160 --> 00:07:47,380 to be the best practice, and that's 139 00:07:47,380 --> 00:07:51,850 part of why it's enabled by default on IOS XR. 140 00:07:51,850 --> 00:07:54,010 I hope this has been informative for you, 141 00:07:54,010 --> 00:07:57,150 and I'd like to thank you for viewing. 142 00:07:57,150 --> 00:08:00,000