- [Instructor] In this video,
we want to talk about the Border Gateway Protocol or BGP.
And this is quite different than our other routing protocols
that we've discussed, such as OSPF, or EIGRP.
The first big difference is that BGP
is considered to be an exterior gateway protocol or an EGP.
Protocols like OSPF and EIGRP,
they're considered to be interior gateway protocols or IGPs.
Here's the difference.
An IGP routes within an autonomous system.
An autonomous system is said to be,
a network under a single administrative control.
For example,
we're connecting out to a service providers network.
Well, our network would be one autonomous system,
and the service providers network
would be a separate autonomous system.
They're different networks,
under different administrative control.
And here on screen,
notice the two clouds,
representing the two different autonomous systems.
We've got AS, or autonomous system 64,500,
and we've got autonomous system 64,495.
And an IGP is going to route within an autonomous system.
But in EGP, like a Border Gateway Protocol,
is going to route between autonomous systems.
Now, like those protocols like OSPF and EIGRP,
we do form neighborships.
We form a relationship between neighboring routers.
We do have an option though, by the way with BGP,
where we could have a neighbor
that's not attached to us at the other end of the link,
we could set what's called a multihop neighbor.
But by default, the neighbor does need to be
on the other end of the link.
Just wanted to make you aware
that there is a way to bend the rules a little bit,
and form a neighbor ship with a non adjacent router.
But when we're forming this neighborship,
it is very different than OSPF or EIGRP.
With those protocols,
we send out Hello messages using multicast,
and we dynamically discover our neighbors.
We automatically form these neighborships.
That's not the way it works with BGP.
With BGP, we have to in the configuration,
explicitly define the IP address of our neighbor.
And when we set up this relationship with a neighbor,
we're setting up a TCP session,
over which we're going to be exchanging route information.
And that route information
is going to consist of an address prefix and the length.
In other words, the network address,
and how long the length of the subnet mask.
And we do that with OSPF and EIGRP.
And we typically call that variable length subnet masking
when we're advertising both the network address
and the subnet mask length.
But there's a new term for you here in BGP.
When BGP sends this address prefix,
the network address and the length,
which is the number of bits in the subnet mask.
We call that information NLRI information,
network layer reachability information.
And the way BGP is going to make its Path Selection decision
is quite different from OSPF or EIGRP.
With OSPF, recall that we had a metric
that was entirely based on bandwidth.
And with EIGRP, by default,
we just considered being within delay,
there are a few other things we could consider.
But that's what we consider by default.
With BGP, it's very different
in that we have many different path attributes
or PA, as they're called.
And these path attributes
are going to be discussed in detail in our next video.
But for now, just realize
that we're not basing our Path Selection decision
on something as simple as bandwidth.
In fact, to begin with is not even considered by BGP.
And when we're categorizing different routing protocols,
we would consider EIGRP
to be an advanced distance vector routing protocol.
We said that OSPF is a link state routing protocol.
Well, BGP falls into its own category.
BGP is considered to be a path vector routing protocol.
The vector meaning that,
we don't have a map of the entire topology.
We just know the direction that we go
to get to a certain network.
I'm going to send a packet to this next top IP address
as an example.
But the path as part of the path vector.
The path means,
when we look at our BGP table,
we can actually see every autonomous system
through which we have to transit
in order to get to that destination network.
We don't know the entire topology,
but we do know the autonomous systems
through which we're going to be passing
in order to get to that destination network.
And that's why it's called a path vector routing protocol.
Now, in an upcoming video,
we're going to take a look at a very in-depth example
of a BGP configuration for IP version four.
And then we'll have another video
where we set up BGP for IP version six.
But just to get a started,
I want to give a really simple example in this video,
just so that we have a good understanding of the basics,
and then we'll build on that in upcoming videos.
But let's go out to a live interface right now,
and set up exactly
what we see in this topology on the screen.
We want to form a neighborship
between routers, r one and r two,
and we need to make sure that
we can exchange route information
between those two BGP speaking routers.
Let's begin our configuration on router r one.
I'm going to go into global configuration mode.
And let's go into BGP router configuration mode.
And if you notice the topology on screen,
I'm on r one.
R one is a member of autonomous system 64,500.
That needs to be part of my router command.
It's not a process ID like we have with OSPF
where I can just make up a number,
it's got to match my autonomous system.
I'm going to say router BGP,
and I'm going to give my autonomous system number of 64,500.
And we press Enter.
We're now in BGP router configuration mode.
And we can set up a neighborship,
and advertise a route to a neighbor
with just three commands.
That's it.
I just gave you the first command,
I went into router configuration mode.
The next command is still point to my neighbor,
remembering that,
we don't dynamically form a neighborship using multicast.
No, we're going to explicitly state,
here's the IP address of my neighbor.
Here's the syntax.
I'm going to say, neighbor,
and my neighbor's IP address is 198 dot 51 dot 100 dot two.
And I have to say what my neighbor's autonomous system is.
There in remote As,
remote autonomous system 64,495,
then we press Enter.
That's command number two of three.
Now, I want to advertise a specific network via BGP.
To do that, I'll use the network statement.
I'll say network,
and the network that I want to advertise
is that network between SW one and r one.
And that's a network address
of 192 dot zero dot two dot zero.
And for the mask,
I don't give a wildcard mask,
as we've done previously with other routing protocols.
I'm going to give a subnet mask.
I'm going to give the key word of mask,
and my subnet mask is a 24 bit subnet mask.
So, I'll say 255 dot 255 dot 255 dot zero.
And that's it.
Three commands,
and we've pointed to a neighbor,
and we said we want to advertise this network to a neighbor.
Now, I need to do a mirror configuration on r two.
So, let's go over to r two,
and give a very similar configuration.
I'll go into global configuration mode,
and then into router configuration mode
for BGP autonomous system 64,495,
and I'll need to point to my neighbor,
which is going to be r one.
I'll say, neighbor 198 dot 51 dot 100 dot one,
and the remote autonomous system,
in other words,
the autonomous system in which router r one resides.
The remote AS, is 64,500.
Now, press Enter.
And in a moment, we should see a neighborship form.
But I still need to advertise the network.
I'm going to say, network 203 dot zero dot 113 dot 0.
And we see that an adjacency just came up.
That's good news.
And I'll say that this has a mask,
a subnet mask of 255 dot 255 dot 255 dot zero.
And we're done on a router r two.
Let's see if we have really exchange route information.
Let's do a show IP route.
First of all, have I learned anything via BGP?
Notice here, the code of B means,
we've learned something via BGP.
And it looks like we have,
here's the code of B,
and this is for network
192 dot zero dot two dot zero slash 24.
That's the network between SW one and r one.
We learned that via BGP, r one advertise that to us.
Now, if we want to see our BGP table,
which shows all the routes that BGP knows how to reach,
we can do a show IP, BGP command,
and BGP knows about two different networks.
Notice that we did not advertise the network
between r one and r two.
We didn't have to do that.
I'm learning about 192 dot zero dot two dot zero
from a next top of 198 dot 51 dot 100 dot one.
That's r one.
And to get there,
I need to go into autonomous system 64,500,
which is r one's autonomous system.
And then from there,
it's going to be internal to that autonomous system.
What about this network?
What about 203 dot zero dot 113 dot zero?
Well, that's the network between r two and SW two,
that's within my autonomous system.
So, as we look at the path,
we see that it's strictly internal.
I don't have to go into any other autonomous system.
Now, this was a very basic example of BGP.
We set up a neighborship,
we saw that advertise the network.
We'll get much more in-depth later on in this module,
but this is the basic introduction.
Now, let's take a look at our next video
at how those path attributes work.