[AUDIO LOGO]
Now that we've gotten a little more familiar
with the overall BGP path selection process,
let's jump in and take a closer look
at Cisco's proprietary weight feature.
We can't exactly call this a BGP attribute
since it is Cisco proprietary and as such is not
carried in BGP updates.
Therefore, it's not truly an attribute.
However, it is at the very top of the path selection criteria,
making this a very critical part of our path selection
decisions.
So let's jump in and take a look at some
of the attributes of weight and how
we can use this to affect our path selection.
So the first thing here, as we mentioned
during the introduction, this falls under BGP rule
number 1 that we're going to prefer the path
with the highest weight.
So that's just a reminder of which rule
we're speaking of here.
Let's talk about some things about this rule.
First, this is going to be used for outbound decisions.
And the reason it's going to be outbound decisions is it
can only affect the local router.
Now, if it can only affect the local router,
that means it can only affect its decisions
and that would mean outbound decisions.
You can't influence return traffic with weight.
Now, let me add one little note here.
When we say you can't do something with weight,
for example, I simply mean you can't do it directly
with weight.
A little bit later, we're going to be talking about something
called BGP communities.
And we could use communities to trigger another router
to change its weight.
But that's not exactly using weight.
It's using something else to trigger
the attribute being changed.
So that's not exactly the same thing.
So can we use this in conjunction with communities?
Yes.
And we'll talk about that when we get to communities.
But for now, weight is only going
to affect the local routers decisions.
And as such, that means outbound.
Again, as we've mentioned, this is Cisco proprietary.
That is why we refer to it more as a feature.
So this is not a BGP attribute.
This is not carried in any of the BGP updates.
And as we mentioned, since it's not carried,
that means that it's going to, of course, be local only.
And as that implies, it is never sent to peers.
Again, what if I tried to send it to a non-Cisco router?
It wouldn't even know what this meant.
And since all the other devices wouldn't understand this
and we don't send it to them anyway,
that makes it really difficult to try
to use this for any kind of a consistent routing policy
through our BGP domain.
So this is really not the best choice
if we want to come up with a universal policy
for our domain.
So what is it good for then?
Well, its main function is it gives us
a way to allow a router.
So we're talking about a single entity that might itself
have multiple exits to make a decision as to which exit
to use, either without using local preference
or to override whatever local preference may be set to.
The idea here is I can use this to override the normal BGP
policy in my domain on any one specific device
if I want that device to make a different decision for whatever
reason.
Now, we mentioned that the highest value here wins.
And it has a range of 0 to 65535.
This is a 16-bit number.
So what happens with weight by default if we don't control it?
Well, locally injected routes and redistributed internal
prefixes are going to default right into the middle
32768, half way between our 0 and our 65535.
Any learned prefixes, so something sent to us
by another device, will default to a weight of 0,
which, of course, since highest wins,
would make this the worst value.
Now, of course, as administrators, we
can take control of weight and we can either
set this just per neighbor if we're
looking for a very simplified decision, such as always
preferring a primary path over a backup path.
Or, if we want to get more complicated,
we can use a route map or a routing policy language
for more complex situations where
I could actually set the weight individually per prefix.
So let's bring up a real simple topology
and just talk for a moment about how we could use
this to influence our routing.
So let's talk about traffic going from AS 100 to AS 200.
And we have these two links that are connecting the two
ASs together.
So just for the sake of argument,
let's say that this link down here at the bottom
is a 1 gig link and our link up here at the top
is a 10 gig link.
So our preference is going to be to use the 10 gig link.
So let's start by talking about what we can do on router 1.
What we could do is on the neighborship towards router 2,
we could perhaps set the weight here to be 100.
And on the neighborship towards router 3,
we could set the weight to 200.
What this is going to cause is any traffic on router 1 going
to AS 200, any prefix learned from as 200,
it would choose the top path here to get to AS 200.
Now, router 2 would be a little more interesting.
Router 2 by default would choose to follow the external path.
And that's what we're saying we don't
want it to do because that's only a 1 gig link.
So instead, what we do is on the neighborship to router 4,
we set the weight to 100.
And on the neighborship to router 1,
we set the weight to 200.
Remember, highest weight wins.
And what ends up happening, router 2
will now choose this path to router 1 when going to AS 200.
And we've accomplished our goal.
This was, of course, a very simple example
where we were using a primary versus a backup circuit.
And because of that, we weren't trying to do it per prefix.
We just could do it per neighborship.
But since the routers have to be configured separately,
this is why we said it doesn't make for a very good domain
wide policy because each device has
to be configured individually.
In this video, we took a closer look
at Cisco's BGP wait feature that we
can use right at the top of our route selection criteria
to influence the path selection made on an individual router.
Again, the downside to this feature
is it's not passed in BGP updates.
Therefore, it only affects the local device.
Meaning to really influence path selection,
we have to configure all of the devices individually,
which certainly isn't ideal in a large environment.
I hope this has been informative for you,
and I'd like to thank you for viewing.