To talk fundamentally about what BGP does
is really to talk about what is even the point of BGP.
Why do we even use it?
We already have routing protocols, right?
Like OSPF and EIGRP.
So what makes BGP so different?
Let me jump on a whiteboard and draw it up for you.
So what even is the point of BGP?
Where does it fit in the grand scheme of things?
Well, this is the protocol of the internet
after all, so we need to think about who runs the internet.
The internet is basically run by service providers. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
The internet is basically run by service providers.
Think about your local service provider.
Maybe it's AT&T in the United States or Verizon in the United
States, Virgin in the UK, or whatever your local telecom is.
Just about every country in the world
has a telecom or service provider,
and they're what provides access to the internet.
But what is the internet?
The internet is just a series of routers
connected to each other, who have exchanged routes.
So let's focus on a service provider here, like AT&T,
for a moment. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
for a moment.
I personally use AT&T, and I've got no qualms with them.
AT&T, how many routers do you think AT&T has,
if I were to write like R1 here and then R2 over here?
If you were to actually diagram out AT&T routers,
it would just go on, and on, and on, and on,
and on just all the way down here.
It's going to be massive.
There is going to be redundant connections everywhere.
You get the idea.
Pretend for a moment then that AT&T
is running an interior gateway protocol, like OSPF or EIGRP. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
is running an interior gateway protocol, like OSPF or EIGRP.
So that way, all of these routers know how to reach each
other, and then consider for a moment that AT&T probably has
a large block of IP addresses, something like the 100.0.0.0/8
block of IP addresses.
They then take this block of IP addresses
and subnet them down everywhere.
So all of these are having some sort of subnet
in that block of IP addresses.
Maybe its subneted all the way down to slash 30s,
so down here is you. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
so down here is you.
You may be connected into R2, and you
may have a subnet of this block of IP addresses.
What happens when you need to reach resources outside
of AT&T, maybe a resource in Verizon or a resource in the UK
over on Virgin?
If I were to draw that up here, and let's
just say this is Verizon for a moment.
Verizon would have a similar situation
over here with all of these routers here,
and they're all linked together.
You get the idea, so you're trying
to reach a server that's up here connected off of this router. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to reach a server that's up here connected off of this router.
If these two service providers were to use something,
like OSPF or EIGRP to exchange routes back and forth,
it might work.
But it probably won't.
These protocols were designed to handle only so many routes.
With all of these hundreds or thousands of routers
that are going on in just one service provider,
if a link were to go up or down, and it would have to reconverge
the entire network across these two service providers,
it would just be too much for those protocols to handle. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
it would just be too much for those protocols to handle.
The solution to that would be to use an exterior gateway
protocol called BGP, and BGP is what service providers
around the world use.
See, so far, we've talked about AT&T and Verizon exchanging
routes.
But now, we've got to consider the fact that the world is
bigger than our backyard.
Routes learned in Romania are then shared through the EU
over to the United States, then through to Asia.
Routes in Africa are shared to the United States, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Routes in Africa are shared to the United States,
maybe over to Europe, then to Asia, down to Australia.
You get the idea.
All of these service providers around the world
have shared all of their routes with each other.
And at the time of this recording,
there are about 800,000 routes that make up the internet.
So the way BGP would work, in this case,
is AT&T right here would look at all of their collective routers
in this block of IP addresses, and they would call this
an autonomous system. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
an autonomous system.
I'll write it right here, AS for autonomous system.
This makes sense, because they have autonomy.
They have control over all of their systems.
And when Verizon, like this server up here,
needs to get a packet into the autonomous system,
AT&T can say, if you want to reach our autonomous system,
which contains the 100.0.0.0/8 block of IP addresses,
just send it to this router here, R1. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
just send it to this router here, R1.
Then from here, R1 would use the interior gateway protocol,
like OSPF, or EIGRP, or even a variant of BGP
called internal BGP, to route that
packet through to its final destination.
Similarly, you down here on this router
need to access a resource in Verizon.
Verizon may have something, like the 200.0.0.0/8 prefixes.
So Verizon tells AT&T, if you want to reach our autonomous
system, which contains the 200.0.0.0/8 block of IP WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
system, which contains the 200.0.0.0/8 block of IP
addresses, R2 here is going to be your next hop.
So your packet comes into your router,
who has learned about this autonomous system from R1,
so it forwards your packet to R1.
R1 sends it over to R2 in Verizon's autonomous system.
And in Verizon's interior gateway protocol,
like OSPF or EIGRP, knows the optimal path
to route your packet to the server.
So the point of BGP isn't to share tiny specific prefixes WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So the point of BGP isn't to share tiny specific prefixes
or subnets.
In fact, most of these service providers
won't let you share a prefix to them that
is greater than a slash 24.
So if you tried to say, send AT&T here a slash 30,
they would reject it.
They would say, that's too specific.
That would overwhelm our routing table
with too many specific prefixes.
Please send us something, like a slash 16.
The point of BGP isn't to get you narrowed down
to the specific subnet.
It's just to get your traffic into an autonomous system, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
It's just to get your traffic into an autonomous system,
so that it can be routed from there.
So now we understand the point of BGP, it's time
to talk about how BGP really works.
You're going to hear me say this a few times
throughout this series, but BGP is a deliberate protocol.
When I say deliberate, I mean, there's
not much dynamic discovery and changing happening here.
You configure BGP to work exactly the way
that you want it to work.
So if you're thinking about OSPF or EIGRP,
you may issue a network statement. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
you may issue a network statement.
And then it starts trying to discover its neighbors.
That's not the case, if we were looking at AT&T and Verizon
once more.
Pretending for a moment that AT&T's autonomous system
is autonomous system 100 and Verizon's autonomous system
is autonomous system 200, when these two decided that they
wanted to become neighbors and exchange routes,
they would have to be explicitly configured
saying that, hey, you are my neighbor, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
saying that, hey, you are my neighbor,
and that is your autonomous system number.
And the flip side would have to happen here.
Verizon would have to say, you are also my neighbor,
and I agree that your autonomous system, in this case, is AS100.
What's even cooler about BGP is it uses TCP port
179 to make all of this happen.
It's not using a multicast address.
It's using TCP, so there is a reliable handshake
that's going on there.
And all of the other features that
happened with TCP, like a time to live WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
happened with TCP, like a time to live
or even the fact that this can be routed,
consider that an interesting point for a moment
that there may be routers along the way from R1 to R2.
So if R1 sends a BGP packet destined to TCP 179
and destined to R2s IP address, this router
would look at layer three information,
pass the packet along to the next router,
then pass the packet along over to R2.
And all of these routers along the way, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And all of these routers along the way,
because they're never looking at layer four,
they have no clue that there's a BGP relationship going on.
This is called the multi-hop scenario
that we're going to talk about when we start talking
about BGP's scalability issues, so we would explicitly
configure who our neighbors are.
And then beyond that, we explicitly
identify each individual network that we want
to share with that neighbor.
Again, BGP is very deliberate.
You tell it exactly how to behave in just
about every single scenario. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
about every single scenario.
For this neighbor, you perform this action.
With that neighbor, you perform that action.
So at this point, we understand the fundamental purpose of BGP.
In the next Nugget, we're going to fire up a virtual lab
and build our first neighbor relationship using BGP.
In the meantime, that's been the point of BGP.
I hope this has been informative for you,
and I'd like to thank you for viewing.