So currently here on router 11, this is the BGP table.
And we can see that by doing a show IP BGP.
And what I'd like to do is let's focus on this route right here.
And this route is being advertised by R22.
It's its loopback address.
It's being advertised into BGP.
And that's how R11 knows about it.
It learned about it via R21.
It also learned about it from R31.
And that's because R21 also advertised down here.
And that got advertised here. And that got advertised here. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And that got advertised here. And that got advertised here.
And currently R11 has made the decision that it should be using this next top
of 23.10.20.21 for the best route.
Because the AS path is shorter.
So it's basically an AS path of 20 versus 20 and also 40 and also 30 that that
route went through before it reached a time of system 10 and R11 in AS 10.
However, that's not the only element.
The AS path is not the only element that's looked at.
We have a few others that are considered first, including Cisco with the
highest weight. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
highest weight.
So for example, for that one route, the 22 network has its being advertised
here.
If R11 believes that the weight coming in from R31, that the weight is 150.
I'll put the W there.
And it believes that the weight for that same route coming in from R21 is 100.
Weight is the first thing considered.
And as a result, R11 would choose to use the route coming in from R31 as the
best.
And it would not use the route coming in from R21 as the best.
So currently, the route coming in from R21 is the best route as indicated right WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So currently, the route coming in from R21 is the best route as indicated right
there.
Then following that, there's local preference, which really applies to internal
routes within an autonomous system.
And then there's looking for the next top of 0, 0, 0, 0, 0.
And then finally, we have the AS path as a consideration.
So as a demonstration of this currently on R11, the best path is using the next
top of 23.10.20.21, which is the route coming in from R21.
And the reason that one was because all other things being equal, the AS path
was shorter for that route.
However, if we were to train R11 that the route's coming in from R31, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
However, if we were to train R11 that the route's coming in from R31,
should have a weight of 150, that Cisco weight would be checked first.
And as a result, the route would change its mind regarding which is the best
path.
And we'd start to think that the path going through R31 with the next hop of .
31 would be the preferred path.
So with that in mind, let me walk you through a quick example.
So to do that here on R11, let's just do a quick show IPBGP to make sure
nothing changed.
And sure enough, there's our route to 22.
It's considered the best.
And the next top is 23.10.20.21, which is R21. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And the next top is 23.10.20.21, which is R21.
So here on R11, let's go ahead and see if there's any route maps.
Let's do a show route map.
And there aren't any, so let's create one.
I'm going to create a route map that does one thing.
It's going to set the weight.
So let's create route map.
And let's call it set_weight in uppercase, space,
and we'll do a permit and sequence number 10.
And then we'll do a set_weight and let's see what our values are here.
How about 673?
That's a pretty unique weight.
And then what we'll do is we'll take this route map and we'll apply it to our WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And then what we'll do is we'll take this route map and we'll apply it to our
neighbor R31.
So R31 and our topology is down in a Thomas system 30.
So we'll train R11 that, hey, any routes you get from your good buddy R31,
just set the weight to 673.
And currently, if we look at the current weight, which is still on the screen
here,
the current weight for the 22 routes and all the routes actually is set to zero
.
So 673 is going to be a lot higher than zero.
So let's do a do showrun, section BGP.
They are several little bit of typing. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
They are several little bit of typing.
And then we'll go into router BGP, a Thomas system 10.
And then we'll go to our neighbor statement here for our neighbor at dot 31,
which is R31.
I'll copy paste that.
And all I'm going to do is add an additional parameter that says,
you know what, for routes that we receive in from this neighbor, let's go ahead
and
apply the route map that we just made.
So I'll type in route map space.
Then I do a copy paste of the name that way.
Don't get a typo.
So it's called set weight.
I'm going to go ahead and copy and paste that.
So that's done space and a question mark and in. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So that's done space and a question mark and in.
So effectively, any routes coming in from that neighbor,
we are going to go ahead and set the weight to 673 based on the route map.
So again, the route map, do a do show route map.
It's going to set the weight to 673.
So we'll get out configuration mode.
And just to make sure it's a nice fair shake across the board,
again, in production, you don't want to do this because it's going to be
devastating.
But I'm going to go to all routers.
So I'm going to do a clear IP BGP asterisk and select all the routers. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So I'm going to do a clear IP BGP asterisk and select all the routers.
And click here on sends script.
And that's going to reset every possible BGP neighbor adjacency.
And that's also going to force us to have new information for updated routes.
So let's go ahead here on our 11 to show IP BGP summary.
So currently we have our internal BGP pairing set up.
That's these two.
We also have our external ones to router 21 in a ton of system 20.
And also to our 31, which is an autonomous system 30.
And currently we have not received any prefixes yet. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
But that's because BGP takes a minute.
So we'll do a show IP BGP summary.
And we're going to give it at least a minute.
And after a few moments, we should see those routes pouring in.
So go ahead and do a show IP BGP summary.
There we go.
We got one from our 12th.
And we have one from our 21.
And a pit there for a key again.
We should have more in just a moment.
But you also a show IP BGP center that shows the rib.
So those are the two routes that we currently see here.
And we'll give it another moment or two to fully converge. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And we'll give it another moment or two to fully converge.
Also while we're waiting, let's talk about this little r there.
So we look at r in the legend.
That's for a rib failure.
This simply means that hey, for this route, 12, 12, 12, 12,
it was learned a different way that has a better AD.
So the AD for IBGP learned routes is 200.
And this network is being advertised just in a ton of system 10
with OSPF, which is an AD of 110.
So we did a show IP route press enter.
And we look for that 12, 12, 12 network. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And we look for that 12, 12, 12 network.
There it is right there.
And that's why we did a show IP BGP has a little r there in front of it,
indicating that the BGP route, even though it's the best one in the BGP table,
is not the best one in the routing table on the router.
And I only have one route so far for the 22, 22 network.
So let's give it just a few more moments to fully converge.
So for this entry, which is for the 32 network, it has a weight coming in from
our
good buddy r 31 of 678, 3 fantastic.
And also for this one, but I'm still waiting on the route for 22, 22, 22, 22 to WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And also for this one, but I'm still waiting on the route for 22, 22, 22, 22 to
come in.
And once we see that because it also have a heavier weight, our 31 should be
the preferred
next hop.
So we'll go ahead and hit the upper key.
And I don't see that second route coming in.
Let's go back to r 11 and give it a few more moments.
So here at r 11, let's do a show IP BGP.
I still don't see it.
Let me go ahead and do one more clear here clear IP BGP.
Asterisk just from r 11.
So we'll do a show IP BGP summary.
All right.
So now it shows three routes being learned from dot 21 and three from dot 31. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So now it shows three routes being learned from dot 21 and three from dot 31.
That's much better.
So now I'm not sure if it's just didn't wait long enough.
But this was show IP BGP press center.
So it's currently we look right here.
It doesn't have any of them marked as the best.
The greater than symbol isn't there for any of them, but we do have two routes
for the
22, 22 network.
And you'll notice the one with the next top of 23 that 10 dot 30 dot 31 has the
weight
of 678, 3.
So in just a moment, when it's done making its calculations, we hit the upper
key
again, it should show that as the best route, which it does. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
again, it should show that as the best route, which it does.
So this is the next top for the 22 22, 22 network and check this out.
Even though the AS path is longer than the AS path with the next top of R 21,
even though
it's longer here, because the Cisco router checked weight first as its first
consideration
and determining the best path, that's why it has that one put in the routing
table.
So now if we look at the show IP route for BGP learned routes, it's going to
show in
the routing table that the next top is 23 dot 10 dot 30 dot 31 for that 22 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
the routing table that the next top is 23 dot 10 dot 30 dot 31 for that 22
network.
And to verify that, we can do a show IP route and it was hit space.
We could also filter that to BGP learned routes, but there's our BGP learned
route and
there's the next top of 23 dot 10 dot 30 dot 31.
And the reason we did that is just want to reinforce the concept of the pecking
order
when a router is making a decision, we're getting which route is the best.
So again, in this case, the weight was considered before the AS path and that's
why 6, 7, 8,
3, 1 over 0.
And it didn't even bother getting to this portion regarding the number of WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And it didn't even bother getting to this portion regarding the number of
autonomous systems
in the path.
Because that's several lower in the pecking order when the router is choosing
the best path
and placing it in a routing table.
Now to verify this, we'd want to go ahead and do a ping from a loopback on
either R12
or R22, etc. to one of those destination addresses.
So let's go to R12 because it has a loopback that's being advertised in BGP.
And let's ping 22 22 22, which is R22.
So we'll go to R12 and let's do a ping to 22, etc. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So we'll go to R12 and let's do a ping to 22, etc.
And we'll source that from our loopback zero and that works.
And if you do a trace, it should be taking the long way because of how we
manipulate a BGP.
So that traffic should go from R11 down to R31 to R41 to R42 to R21 and then
finding to
R22.
So we'll do a trace route to 22 dot 22 dot 22 dot 22 and we'll source that from
loopback zero press center.
So there's the path based on that last octet that's R11, R31.
In fact, let me bring up the topology while we talk about that. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
In fact, let me bring up the topology while we talk about that.
So the path would be from R12 to R11, which is an AS10 and then over to R31,
which is an
AS30 and then over to R41, which is in AS40 and then to the other router in AS
40, which
is R42 and then up to R21, which is an AS20.
And then over to R22 who own that loopback address and that's the path we have
through the
network.
So in this video, we've had the opportunity to see BGP at work, including IBGP
and external WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and external
BGP, as well as how to advertise a route in BGP.
We also took a look at playing with the weight value just to see that indeed it
does determine
which route is considered the best by a router.
Now watching all this is well and good, but it's not nearly as good as if you
were able
to have a chance to practice yourself, which is exactly what I've designed for
you in the
next video is to present a hands-on lab so you can get some practice in config
uring and
working with BGP.
So I'll see you in the next video for that hands-on lab. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So I'll see you in the next video for that hands-on lab.