1 00:00:00,000 --> 00:00:01,476 2 00:00:01,476 --> 00:00:04,920 [AUDIO LOGO] 3 00:00:04,920 --> 00:00:07,390 4 00:00:07,390 --> 00:00:10,180 So now that we've talked about the details of using 5 00:00:10,180 --> 00:00:14,170 AS path prepending, let's jump in with a diagram 6 00:00:14,170 --> 00:00:17,620 and look at an operational example of how 7 00:00:17,620 --> 00:00:22,630 we would actually use AS path prepending in a multi AS 8 00:00:22,630 --> 00:00:25,760 environment. 9 00:00:25,760 --> 00:00:30,110 So in this scenario, we'll be talking about three ASes. 10 00:00:30,110 --> 00:00:33,460 So we have AS 100, 200, and 300. 11 00:00:33,460 --> 00:00:36,910 And this is going to be about return traffic coming 12 00:00:36,910 --> 00:00:39,040 to AS 100. 13 00:00:39,040 --> 00:00:42,415 And the default behavior would be for router 3 14 00:00:42,415 --> 00:00:45,880 to send the traffic to router 1, and for router 4 15 00:00:45,880 --> 00:00:49,540 to send the traffic directly to router 2. 16 00:00:49,540 --> 00:00:51,580 The part that we don't want here, 17 00:00:51,580 --> 00:00:55,600 we don't want router 4 to be sending this traffic to router 18 00:00:55,600 --> 00:00:58,990 2 across this one gig link. 19 00:00:58,990 --> 00:01:01,340 So this is what we want to stop. 20 00:01:01,340 --> 00:01:06,250 We want to get router 4 to follow the path over the 10 gig 21 00:01:06,250 --> 00:01:07,120 link. 22 00:01:07,120 --> 00:01:11,380 Here's how we do that with AS path prepending. 23 00:01:11,380 --> 00:01:14,650 What we'll do is on router 2, we will simply 24 00:01:14,650 --> 00:01:20,350 prepend our AS number say, for example, three times. 25 00:01:20,350 --> 00:01:23,350 So now when router 4 gets the update, 26 00:01:23,350 --> 00:01:27,250 it would have four copies of our AS number, 27 00:01:27,250 --> 00:01:31,000 the three were prepending, plus the one that would normally 28 00:01:31,000 --> 00:01:33,130 be put on that update. 29 00:01:33,130 --> 00:01:37,780 On the update however coming this direction, 30 00:01:37,780 --> 00:01:44,650 the AS path would simply be 200, 100. 31 00:01:44,650 --> 00:01:48,460 So now we have a comparison where we have a path with four 32 00:01:48,460 --> 00:01:53,350 AS numbers versus a path with two AS numbers. 33 00:01:53,350 --> 00:01:57,070 And of course, we will choose the one with two. 34 00:01:57,070 --> 00:01:59,710 That means that the traffic from router 4 35 00:01:59,710 --> 00:02:02,420 will now go up to router 3. 36 00:02:02,420 --> 00:02:05,140 And of course, router 3 is already 37 00:02:05,140 --> 00:02:07,810 forwarding it to router 1. 38 00:02:07,810 --> 00:02:09,759 So this means that the traffic is 39 00:02:09,759 --> 00:02:13,010 going to follow the path that we want it to. 40 00:02:13,010 --> 00:02:17,260 So as we mentioned, it would be possible for router 4 41 00:02:17,260 --> 00:02:21,220 to not accept this AS path prepending. 42 00:02:21,220 --> 00:02:24,430 And therefore, the end result would be it would not 43 00:02:24,430 --> 00:02:26,680 accept this path at all. 44 00:02:26,680 --> 00:02:29,280 It would not even be considered. 45 00:02:29,280 --> 00:02:33,070 Now interestingly enough, the effect would be the same. 46 00:02:33,070 --> 00:02:36,930 Meaning, if I'm not getting the path from router 2 47 00:02:36,930 --> 00:02:40,440 at all on router 4, well then router 4 48 00:02:40,440 --> 00:02:43,050 would follow the only path it had left, 49 00:02:43,050 --> 00:02:46,290 which would be up through router 3 and over to router 1 50 00:02:46,290 --> 00:02:51,070 as we've been trying to get our traffic to go that way anyway. 51 00:02:51,070 --> 00:02:55,050 The downside, of course, to that plan is then I 52 00:02:55,050 --> 00:02:57,750 wouldn't have the link between router 2 53 00:02:57,750 --> 00:03:00,420 and router 4 as a backup. 54 00:03:00,420 --> 00:03:02,940 If I don't learn the prefix at all, 55 00:03:02,940 --> 00:03:06,160 I can't go that way to get to the prefix. 56 00:03:06,160 --> 00:03:08,790 So yeah, at the end of the day, it 57 00:03:08,790 --> 00:03:11,170 would affect our path selection. 58 00:03:11,170 --> 00:03:14,640 But we don't want to affect the path selection by making 59 00:03:14,640 --> 00:03:16,930 the backup path unusable. 60 00:03:16,930 --> 00:03:19,210 So that would be a problem. 61 00:03:19,210 --> 00:03:24,030 We still need to make sure that the AS, in this case AS 300, 62 00:03:24,030 --> 00:03:27,090 is still actually accepting the path 63 00:03:27,090 --> 00:03:32,950 and then making a decision based on the shortest AS path. 64 00:03:32,950 --> 00:03:35,200 Just to change our diagram up here 65 00:03:35,200 --> 00:03:39,040 for just a moment, let's talk about another interesting issue 66 00:03:39,040 --> 00:03:41,920 we have with AS path prepending. 67 00:03:41,920 --> 00:03:46,990 What happens if our AS 200 and our AS 300 68 00:03:46,990 --> 00:03:49,390 are not directly connected? 69 00:03:49,390 --> 00:03:51,500 What if they're going through a public network 70 00:03:51,500 --> 00:03:53,180 such as the internet? 71 00:03:53,180 --> 00:03:57,550 The problem with this is we have no idea what's 72 00:03:57,550 --> 00:04:00,100 going on in the internet. 73 00:04:00,100 --> 00:04:03,760 We don't know how many ASes it's going 74 00:04:03,760 --> 00:04:06,670 to go through as the update is sent 75 00:04:06,670 --> 00:04:10,060 from router 3 down to router 4. 76 00:04:10,060 --> 00:04:14,270 We don't know how long this path is going to be now. 77 00:04:14,270 --> 00:04:17,980 So when it comes to us doing our prepending, 78 00:04:17,980 --> 00:04:22,089 as we send the update from router 2 to router 4, 79 00:04:22,089 --> 00:04:24,370 it becomes an issue of how many times 80 00:04:24,370 --> 00:04:29,280 do we have to prepend in order to make this happen. 81 00:04:29,280 --> 00:04:34,290 One possibility here may be to go to AS 300 82 00:04:34,290 --> 00:04:38,490 if they offer a public looking glass router that we can 83 00:04:38,490 --> 00:04:41,100 log into that device and actually see 84 00:04:41,100 --> 00:04:45,090 what our prefixes look like after they've gone through AS 85 00:04:45,090 --> 00:04:48,060 200 going around through the internet 86 00:04:48,060 --> 00:04:51,000 and finally ended up at AS 300. 87 00:04:51,000 --> 00:04:53,640 We could look at that AS path and get 88 00:04:53,640 --> 00:04:58,080 an idea of how many times the prepend are AS number. 89 00:04:58,080 --> 00:05:01,290 The primary issue with that is that things 90 00:05:01,290 --> 00:05:02,980 change on the internet. 91 00:05:02,980 --> 00:05:05,190 So you would have to keep a close eye 92 00:05:05,190 --> 00:05:06,930 to make sure that your traffic is still 93 00:05:06,930 --> 00:05:09,130 going the way you want it to. 94 00:05:09,130 --> 00:05:11,160 And the other thing here is we want 95 00:05:11,160 --> 00:05:14,110 to make sure that we're not cutting it too close. 96 00:05:14,110 --> 00:05:17,730 We might go to AS 300, see that the AS 97 00:05:17,730 --> 00:05:20,880 is let's say six ASes long. 98 00:05:20,880 --> 00:05:25,530 Well, we wouldn't want to prepend just six or seven then 99 00:05:25,530 --> 00:05:27,240 to our path. 100 00:05:27,240 --> 00:05:31,230 Because again, it would only take one AS or two ASes 101 00:05:31,230 --> 00:05:33,930 to change on the internet to have this go right 102 00:05:33,930 --> 00:05:36,630 back to default path selection. 103 00:05:36,630 --> 00:05:39,990 You would probably want to go to say 10 or something 104 00:05:39,990 --> 00:05:43,050 along those lines to make sure the traffic is going 105 00:05:43,050 --> 00:05:45,120 to go the way we want it to. 106 00:05:45,120 --> 00:05:48,490 If you don't have any of these options, in other words, 107 00:05:48,490 --> 00:05:51,690 you can't see what AS 300 is learning, 108 00:05:51,690 --> 00:05:58,380 well the old school way so to speak is prepend say five ASes 109 00:05:58,380 --> 00:06:00,480 and see if your traffic starts coming 110 00:06:00,480 --> 00:06:01,950 in the way you want it to. 111 00:06:01,950 --> 00:06:05,790 Keep adding ASes until no traffic 112 00:06:05,790 --> 00:06:09,743 is coming in that link between router 2 and 4. 113 00:06:09,743 --> 00:06:11,160 That's basically what you're going 114 00:06:11,160 --> 00:06:15,150 to have to do if you can't see what your prefixes look 115 00:06:15,150 --> 00:06:19,010 like in AS 300 here. 116 00:06:19,010 --> 00:06:21,970 So, again, let's say we actually get that information 117 00:06:21,970 --> 00:06:25,750 by looking at AS 300, and we find out 118 00:06:25,750 --> 00:06:27,760 that the path being learned through the internet 119 00:06:27,760 --> 00:06:32,050 maybe has six ASes on it, then like I 120 00:06:32,050 --> 00:06:35,440 said on our advertisement, when we're 121 00:06:35,440 --> 00:06:37,870 sending the update towards router 4 then, 122 00:06:37,870 --> 00:06:43,330 we should probably put something like 10 on here to make sure 123 00:06:43,330 --> 00:06:47,590 that this is going to be treated just like a backup and not 124 00:06:47,590 --> 00:06:51,030 as a primary circuit. 125 00:06:51,030 --> 00:06:53,970 So in this video, we examined how 126 00:06:53,970 --> 00:07:00,120 to use AS path prepending to influence other ASes to send 127 00:07:00,120 --> 00:07:02,610 the traffic in on the circuits that we 128 00:07:02,610 --> 00:07:05,290 would prefer them to use. 129 00:07:05,290 --> 00:07:08,620 Now, again, there are some caveats with this. 130 00:07:08,620 --> 00:07:11,340 One of them is that neighboring AS 131 00:07:11,340 --> 00:07:15,930 has to support you doing AS path prepending. 132 00:07:15,930 --> 00:07:18,330 Now, again, most do. 133 00:07:18,330 --> 00:07:21,990 However you might run into a few service providers out there 134 00:07:21,990 --> 00:07:25,800 that you are trying to pair up with that maybe don't. 135 00:07:25,800 --> 00:07:29,670 Also, we have to be concerned about the number of times 136 00:07:29,670 --> 00:07:32,250 we need to prepend our AS. 137 00:07:32,250 --> 00:07:35,190 Generally speaking, going a little bit higher 138 00:07:35,190 --> 00:07:38,220 is better particularly if we're looking 139 00:07:38,220 --> 00:07:42,480 for a backup and primary type scenario. 140 00:07:42,480 --> 00:07:46,720 If you are actually looking for a load balancing scenario here, 141 00:07:46,720 --> 00:07:49,410 then you want to start playing with numbers 142 00:07:49,410 --> 00:07:53,110 that are pretty close to what the other AS is getting. 143 00:07:53,110 --> 00:07:55,860 So, again, if they're receiving your prefixes 144 00:07:55,860 --> 00:08:00,120 with an AS of say seven ASes in the path, then maybe 145 00:08:00,120 --> 00:08:04,120 you want to prepend say six or maybe even five times, 146 00:08:04,120 --> 00:08:07,740 maybe four times, something to allow some traffic 147 00:08:07,740 --> 00:08:09,090 to come in that link. 148 00:08:09,090 --> 00:08:11,460 And you have to adjust those numbers 149 00:08:11,460 --> 00:08:14,370 and watch your links to make sure they're getting 150 00:08:14,370 --> 00:08:16,860 fairly even distribution. 151 00:08:16,860 --> 00:08:19,110 I hope this has been informative for you. 152 00:08:19,110 --> 00:08:22,280 And I'd like to thank you for viewing. 153 00:08:22,280 --> 00:08:26,000