[AUDIO LOGO]
So now that we've talked about the details of using
AS path prepending, let's jump in with a diagram
and look at an operational example of how
we would actually use AS path prepending in a multi AS
environment.
So in this scenario, we'll be talking about three ASes.
So we have AS 100, 200, and 300.
And this is going to be about return traffic coming
to AS 100.
And the default behavior would be for router 3
to send the traffic to router 1, and for router 4
to send the traffic directly to router 2.
The part that we don't want here,
we don't want router 4 to be sending this traffic to router
2 across this one gig link.
So this is what we want to stop.
We want to get router 4 to follow the path over the 10 gig
link.
Here's how we do that with AS path prepending.
What we'll do is on router 2, we will simply
prepend our AS number say, for example, three times.
So now when router 4 gets the update,
it would have four copies of our AS number,
the three were prepending, plus the one that would normally
be put on that update.
On the update however coming this direction,
the AS path would simply be 200, 100.
So now we have a comparison where we have a path with four
AS numbers versus a path with two AS numbers.
And of course, we will choose the one with two.
That means that the traffic from router 4
will now go up to router 3.
And of course, router 3 is already
forwarding it to router 1.
So this means that the traffic is
going to follow the path that we want it to.
So as we mentioned, it would be possible for router 4
to not accept this AS path prepending.
And therefore, the end result would be it would not
accept this path at all.
It would not even be considered.
Now interestingly enough, the effect would be the same.
Meaning, if I'm not getting the path from router 2
at all on router 4, well then router 4
would follow the only path it had left,
which would be up through router 3 and over to router 1
as we've been trying to get our traffic to go that way anyway.
The downside, of course, to that plan is then I
wouldn't have the link between router 2
and router 4 as a backup.
If I don't learn the prefix at all,
I can't go that way to get to the prefix.
So yeah, at the end of the day, it
would affect our path selection.
But we don't want to affect the path selection by making
the backup path unusable.
So that would be a problem.
We still need to make sure that the AS, in this case AS 300,
is still actually accepting the path
and then making a decision based on the shortest AS path.
Just to change our diagram up here
for just a moment, let's talk about another interesting issue
we have with AS path prepending.
What happens if our AS 200 and our AS 300
are not directly connected?
What if they're going through a public network
such as the internet?
The problem with this is we have no idea what's
going on in the internet.
We don't know how many ASes it's going
to go through as the update is sent
from router 3 down to router 4.
We don't know how long this path is going to be now.
So when it comes to us doing our prepending,
as we send the update from router 2 to router 4,
it becomes an issue of how many times
do we have to prepend in order to make this happen.
One possibility here may be to go to AS 300
if they offer a public looking glass router that we can
log into that device and actually see
what our prefixes look like after they've gone through AS
200 going around through the internet
and finally ended up at AS 300.
We could look at that AS path and get
an idea of how many times the prepend are AS number.
The primary issue with that is that things
change on the internet.
So you would have to keep a close eye
to make sure that your traffic is still
going the way you want it to.
And the other thing here is we want
to make sure that we're not cutting it too close.
We might go to AS 300, see that the AS
is let's say six ASes long.
Well, we wouldn't want to prepend just six or seven then
to our path.
Because again, it would only take one AS or two ASes
to change on the internet to have this go right
back to default path selection.
You would probably want to go to say 10 or something
along those lines to make sure the traffic is going
to go the way we want it to.
If you don't have any of these options, in other words,
you can't see what AS 300 is learning,
well the old school way so to speak is prepend say five ASes
and see if your traffic starts coming
in the way you want it to.
Keep adding ASes until no traffic
is coming in that link between router 2 and 4.
That's basically what you're going
to have to do if you can't see what your prefixes look
like in AS 300 here.
So, again, let's say we actually get that information
by looking at AS 300, and we find out
that the path being learned through the internet
maybe has six ASes on it, then like I
said on our advertisement, when we're
sending the update towards router 4 then,
we should probably put something like 10 on here to make sure
that this is going to be treated just like a backup and not
as a primary circuit.
So in this video, we examined how
to use AS path prepending to influence other ASes to send
the traffic in on the circuits that we
would prefer them to use.
Now, again, there are some caveats with this.
One of them is that neighboring AS
has to support you doing AS path prepending.
Now, again, most do.
However you might run into a few service providers out there
that you are trying to pair up with that maybe don't.
Also, we have to be concerned about the number of times
we need to prepend our AS.
Generally speaking, going a little bit higher
is better particularly if we're looking
for a backup and primary type scenario.
If you are actually looking for a load balancing scenario here,
then you want to start playing with numbers
that are pretty close to what the other AS is getting.
So, again, if they're receiving your prefixes
with an AS of say seven ASes in the path, then maybe
you want to prepend say six or maybe even five times,
maybe four times, something to allow some traffic
to come in that link.
And you have to adjust those numbers
and watch your links to make sure they're getting
fairly even distribution.
I hope this has been informative for you.
And I'd like to thank you for viewing.