- [Narrator] By default, when we use EBGP,
this requires two Cisco routers to be directly connected.
If they're not directly connected,
they'll fail to form a neighbor adjacency.
And the reason is that EBGP, uses a TTL value,
a time to live value, of one for BGP packets.
Each time, a BGP packet traverses the device,
and each time any packet traverses a device for that matter,
we know that the TTL is decremented by one,
and once that reaches zero,
that packet is discarded.
So, if we have a TTL value of one,
and we have a topology like we see here,
where the BGP routers are not directly connected,
that packet will be discarded,
and it will never reach the BGP peer.
If you look at our topology,
you can see we have three routers,
we have R one, in autonomous system 65 100,
we have R three, in AS 65 200,
and in the middle, we have R two,
which is a non BGP router.
In a special case such as this,
where two EBGP routers are not directly connected,
we need to use BGP multihop.
I'll also point out that
this command is only used with EBGP.
It's not used with IBGP.
The first thing we want to do on R one
and R three is to create some static routes,
these static routes are going to make sure
that R one and R three are able to reach one another.
So from R one first,
let's go under global configuration mode.
And let's say IP route.
And we're looking to point two R three, 20.1.1.2,
we'll use an all two, five, fives mask.
And the next hop interface IP address
is router two, to which were connected 10.1.1.1.
So that's in place, let's jump to router three.
And we'll do something very similar.
We'll say IP route.
And to get to router one at 10.1.1.2,
we'll use an all two, five, five subnet mask.
And the next hop IP address we want to use is 20.1.1.1.
So that's good.
Let's break out of there.
Let's try a quick ping
to router one to make sure that's successful, and it is.
So now we have communication between
router one and router three.
So now we can configure EBGP.
Let's go back over to router one,
we're already under global configuration mode.
So let's create our BGP instance
by saying router BGP 65 100.
I'll make a router ID
BGP router hyphen ID of 1.1.1.1.
And I want to say neighbor,
and the neighbor is going to be R three at 20.1.1.2.
And the remote autonomous system for that is 65 200.
So that's good.
Let's go over to R three,
we'll do something similar.
Let's go under global configuration mode.
Router BGP 65 200.
set the router ID to 3.3.3.3.
And we'll say neighbor,
our neighbor is going to be R one at 10.1.1.2.
And the remote autonomous system that we want is 65 100.
And actually, let's go ahead and advertise
our network as well.
Since we're doing that,
we'll say network 20.1.1.0, 24 bit mask.
So that takes care of that back on R one,
say network 10.1.1.0, 24 bit mask.
So that's a normal,
fairly typical BGP configuration in most cases.
But if we break out of here on R one,
and we say, show IP BGP neighbors, and hit enter.
You'll notice that,
although we do have a neighbor recognize 20.1.1.2,
which is of course our three.
The BGP state, is in the idle state.
So it hasn't completed the neighbor adjacency.
And that's because we've ran into that issue
where our TTL has expired,
and we're not able to become EBGP neighbors.
Now we can overcome this through EBGP multihop.
So, let's break out of here.
Let's go back under global configuration mode,
let's say router BGP 65 100.
And let's use EBGP multihop
to increase our TTL value,
so that we can have our BGP packets
actually reach router three.
So we'll use another neighbor command
and the neighbor has 20.1.1.2.
And the keyword we want to use is EBGP hyphen multihop.
If we look at contextual help,
you'll see that we have the ability
to set this to any number between one and 255.
That's our TTL value.
Now, it's important to note here
that if you don't specify a TTL value,
it's going to default to 255.
So it's a best practice to set this TTL,
exactly to what you need
in order to reach your non directly connected BGP router.
In our case, we know that we only need two hops.
So, use two and hit enter to complete that.
Let's jump over to router three.
And let's do a very similar thing.
We're already under router BGP 65 200 configuration mode.
So we'll say neighbor,
we'll say the router one address of 10.1.1.2.
And we want to use EBGP hyphen multihop,
and we want to set the TTL value two, two.
Let's go back to router one,
where we initially ran those verification commands.
And you can see that we just had a neighbor come up,
we just now had R three, 20.1.1.2, come into the Upstate.
So it appears that we've corrected our issue.
Let's again run that same verification command,
show IP BGP neighbors.
And now In fact,
you can see that our BGP state is established
at the time that I use this verification command,
it has been up for 17 seconds.
So, everything looks as though it is working exactly.
As we would want to see.
We saw those messages pop into our console to verify that,
and now we're able to overcome
that non BGP router that's in between our EBGP peers.
So that's a very simple way that you can use BGP multihop,
to traverse a non BGP router in your network.
It's possible that you have a router
maybe at the edge of your autonomous system
that doesn't support BGP,
or maybe that's at the edge
of an autonomous system that you're trying to connect
into as an ISP.
That's a case where we might want to use BGP multihop
in the real world.