So, BGP is not something that we are going to have to get heavily invested in for the Encore certification exam.
What does that mean? It means that you are not going to have to learn all the extra nitty-gritty attributes and features and everything else that goes along with BGP.
If you look at the exam objective, it states that you need to be able to do BGP, so eBGP I should say, configuration and verification.
And you have to understand the BGP attributes and how it makes its decision. It's pretty much what the exam states.
So, we are definitely going to cover that. We'll cover a little bit more, but if you are looking at getting more involved in BGP and you want to know more about iBGP and you want to know more about things like route reflectors,
and you want to learn about some of the various communities or different attributes that go along with BGP that we won't be covering here, that's the place to go.
Or what's the place to go? NRC. That's where you go. There you go. NRC. That's going to be the 300-410 course and certification exam.
They will test you on a whole bunch of other things, and therefore you'll learn a whole lot more about BGP in that course.
But we're going to stay focused here. There's still a lot we've got to learn about BGP here to get you ready for the certification exam,
but it's more about understanding it at a high level, configure, verify, sharing routes.
We'll talk about the BGP pass selection process and something that's not on the certification exam, the manipulation of BGP.
There are a few things you need to know since this update of version 1.1 that's not in the exam objectives that you'll actually need to know on the certification exam.
So, we'll have you cover there. All right. So, Board of Gateway Protocol. Primarily, it's the routing protocol of the Internet.
That's really what it was invented for. So, it's a very, very scalable routing protocol, heavily used by ISPs, used lightly by non-ISPs.
But what I want you to realize is that BGP is a protocol that we can use for a lot of other things.
For example, if you've ever set up MPLS Layer 3 VPNs, BGP is being used there.
So, maybe you formed a BGP neighborhood with your service provider.
They're using BGP inside of their service provider environment, and then you are using BGP at the edge to connect to them at your branch office, let's say.
So, you might be using BGP at the edge of your environment to connect to your ISP for the MPLS connection.
And everywhere else in your organization, you might be using OSPF or EIGRP.
So, you'll have to do a little bit of redistribution there between your OSPF and BGP or your EIGRP and BGP, whatever it is you have set up.
You may be using BGP to connect up to your service provider for Internet connections.
You may be doing some filtering there and a whole lot of other things that are beyond the scope of this course.
What we need to recognize is that BGP is just a very flexible protocol that gives us an opportunity to share routes dynamically in many different types of environments.
But for this certification exam, we're focused on enterprise-level connectivity.
So, whether we are connecting up via MPLS or whether we are connecting up to the Internet, right, the fact of the matter is that you still have to form a BGP neighborship,
and you'll still have to advertise the routes you want to advertise and so on and so forth.
So, that is the gist of ENCQOR, making sure that you understand the basis of BGP.
So, no matter what type of environment you want to use it in, whether it's for MPLS or whether it's for Internet connectivity,
then you have the fundamental knowledge that you need in order to be successful with that.
So, the primary thing you have to recognize is that BGP has the concept of autonomous systems.
Now, in a previous session, many of you had indicated that you were using EIGRP.
And for those of you using EIGRP, when you set up EIGRP, you have to specify an autonomous system that EIGRP is going to be running in.
Well, this is not the same thing, right?
This is not the same thing, right?
When we use autonomous systems for EIGRP, that is locally significant to us, even though we might be using the same numbering system as BGP.
But an EIGRP autonomous system is locally significant to us, and it would be a collection of routers that are enabled to share EIGRP information with each other.
So, if I have a router running EIGRP and I configure it to be an EIGRP autonomous system 100,
then any other router I want it to share routes with are also going to have to be an EIGRP autonomous system 100.
All right, but when it comes to BGP, when we're dealing with autonomous systems, we are referring to a collection of networks,
a collection of IPv4 or IPv6 networks along with their routers, the collection of routers that go along with that under the control of a single organization.
So, every single environment, every single entity that wants to use BGP and be part of the Internet using BGP is going to have to have an autonomous system number,
because that autonomous system number represents you out on the Internet.
And that autonomous system number is going to be associated with all of those public IP addresses, IPv4 and IPv6 addresses that are addressed to you.
So, therefore, autonomous system numbers have to be unique, just like IPv4 and IPv6 addressing.
And this is one of the most important aspects of BGP.
BGP heavily relies on these autonomous system numbers for many different reasons, and one of them is routing.
Routing, and you'll see that here momentarily.
So, when you think about this group right here, autonomous system 65,250, let's pretend that's you.
And let's pretend this is me.
If we wanted to share public information with each other, we could run BGP.
And the end result is that what I am sharing using BGP, you will ultimately learn using BGP.
So, if you change this, there's you, and there's your ISP as an example.
So, whether this is an Internet connection you have or whether it's an MPLS connection you have, it doesn't matter.
In the end, you are going to form a BGP session with your what?
With your Internet service provider.
And then whatever IP networks you have, a public IPv4 network, public IPv6 networks you have that you want to, let's say, exchange, so that's for the Internet example,
then you can exchange that using BGP with your ISP, and then they can share that to everyone else.
And if you were using something like MPLS instead, the whole point of MPLS is that over here, you'd, let's say, have your branch office.
That's your branch office, and let's say this is your headquarters.
So, in this case, if this is your headquarters and that's your branch office, and we're running MPLS, so this is not the Internet anymore, right?
It's a private network hosted by the service provider.
What's going to happen now is you use BGP, so that way there you can take that IPv6 network,
and then redistribute them into BGP, so that way there they can be taken over the MPLS network and sent over to your branch office, and vice versa.
And then you can route between your branch office and your headquarters environment over that.
So, you can see how with BGP, we have many different ways that we can implement it, depending on the scenario and circumstances,
but these autonomous system numbers, especially for the Internet, are really, really important,
because these autonomous system numbers are really, really important.
But these autonomous system numbers, especially for the Internet, are really, really important,
because the autonomous system numbers for the Internet are going to make sure that we are all unique and identifiable out on the Internet.
So, we look here at my crude diagram of the Internet.
What do we have? Well, we have you over here.
Let's say this is me over here. Let's say this is Cisco over here.
You have an autonomous system number. Let's just throw in 65,238.
So, you are here. So, your ISPs, you've got dual ISP connectivity.
Those are your ISPs, and you've got other ISPs, and you've got Cisco over here.
Cisco just happens to be my ISP.
Not really, but, you know, the idea here is for you to recognize how we're all interconnected together.
We've got this web of autonomous systems, and inside each of these autonomous systems are what?
Public networks, public servers, public services, public resources that we can access,
as well as private resources that we're not allowed to access.
So, in the end, for example, let's say this is Cisco's public IP, 192.0.0.24.
What public network do they have? An autonomous system, 1024.
So, if we looked up, for example, autonomous system 1024, then we would see Cisco's addresses in there.
Now, that's not really Cisco's autonomous system number.
But if you want to look up autonomous system numbers, you can absolutely do so.
That's public knowledge, folks.
So, you can just do a Google search. Who owns autonomous system or this?
What IP addresses are part of autonomous system or that?
You can get all that information.
That's not secretive information. That's public information.
But the idea here is that you, using BGP, can learn about that specific public network.
Just like inside of your organization using OSPF or EIGRP,
you can learn about those specific private networks inside your organization.
So, with BGP, though, it's not like OSPF.
BGP is more like EIGRP, sort of.
Why? Distance vector. This is a path vector protocol.
What does that mean?
It means I know, for example, about this network because I own it.
I own it.
So, what do I do? I share it.
I share it with all my BGP neighbors.
So, I share it with these other autonomous systems that are beyond my control.
And then each one of these autonomous systems have to ultimately figure out
what is the best, most efficient, most effective way for me to get to that particular network.
And once it makes that decision, it can then tell all of its neighbors the decision it has made.
So, if you focus on this network down here, for example, let's say it decides we're going this way.
Then what's it going to do? It's going to tell this autonomous system that.
It's going to tell this autonomous system that.
But it will not tell the autonomous system that taught it.
Why? Because that is what we call the split horizon rule.
And with BGP, the split horizon rule is making sure that you don't share information back to the source that actually gave it to you.
So, if this autonomous system is giving me that information, then I don't share that information back with them.
Because that could cause a routing loop.
So, it's a split horizon rule.
So, now when you look at my autonomous system here, I've learned from two different ways now.
I learned from this autonomous system.
So, in this case, let's say I choose to go this way because that's the quicker way to go.
Well, then I'll share with this router that I have about that.
But now, not router, autonomous system.
Now, this autonomous system has already chosen this way.
And when it receives the information from me, let's say it's like, oh, that's not good enough.
Okay, well, it's just going to keep it.
It's going to keep it as alternative path.
But it's not going to use it.
It's going to keep using this path right here.
So, every time that autonomous system is learning about a network, it's going to have to compare that to what it already knows.
And if that information is better, then it's going to use it.
If it's not better, then it's going to just store it for later, potentially, if it needs it.
So, as we continue this ripple effect through the internet, eventually, you learn about it from here, and you learn about it from here.
Now, you have to make a decision.
Which way are you going to go to get to 192.02.024, autonomous system 1024?
And let's say you choose to go this way.
This is the way you choose to go.
So, you will no longer go this way, but you'll keep that information for later use, and you'll send all your traffic this way.
Now, this autonomous system, which way is it going?
Well, you don't know that, right?
You don't necessarily know that.
Now, you can find out that information, or you can look up information, and you can verify paths and stuff like that through the internet.
But in the end, let's say it decided to go this way, and this autonomous system decided to go this way.
That's pretty efficient in this particular example.
This path is pretty efficient.
But there are times in the world of BGP where the path that is chosen is not the most efficient path.
And the reason why is because there is no way for BGP to know the number of routers in each autonomous system, the number of links in each autonomous system, the number or the amount of delay or congestion that is happening in a particular autonomous system.
So, having the ability to monitor over time mission-critical paths that you may have is important because you might need to tweak your decision-making process.
Maybe it's better to go this way, right?
If there is 10,000 routers in each of these autonomous systems that traffic had to go through, but up here there's only five in each, maybe this is a better way to go.
Even though it's longer, hop-wise, autonomous system-wise, maybe it's a better way to go.
So, you're not going to have to manipulate any of that per se on the certification exam, but it's just to give you an idea that you're playing this big giant sandbox with a whole bunch of kids and everybody's got to play fairly here.
And everybody's going to be different.
And we'd still have to get along in this big old giant internet of autonomous systems that we have.
So, you're going to need an autonomous system if you plan on playing on the internet.
But you don't necessarily need one.
For example, I'll get into that momentarily.
But when you need a public autonomous system, you can reach out to your ISP or your regional registry to get a public autonomous system number.
So, autonomous system numbers are created and assigned by the Internet Assigned Numbers Authority through regional registries or ISPs.
So, if you go to your ISP, then you're essentially going to be getting an autonomous system number from the ISP that was given to them.
And it's going to be tied to that ISP, though, meaning that if you choose to leave that ISP and go somewhere else, you have to give up that autonomous system number.
But if you go to a regional registry, then you are going to be able to get an autonomous system that's not tied to any ISP.
And you're going to be able to bring that autonomous system number with you to any ISP that you go to.
So, there's pros and cons to each, right?
If you get it from a regional registry, it's more likely going to cost you a lot more money than just getting it directly from your ISP.
So, you'll have to research that and figure out what's better for us.
Typically, if you're a dual home to two different ISPs, so if this is ISP 1 and this is ISP 2, and you're dual home connected to them, so this is you, then typically it's better to go with a regional registry.
So, that way your autonomous system number is not tied to any individual ISP.
That way I can use that autonomous system number to represent me and connect up to both of those different ISPs.
So, our range originally was from 1 to 65,535, or essentially zero, all right, 65,535.
We could use 1 to 64,511 as public.
And then for private, we could use this range right here.
So, what does private mean?
Private means you can go ahead and use those without jeopardizing the internet.
It's like your RFC 1918 addresses for IPv4.
So, that way there, if you wanted to set up IPv4 addressing in your environment, use your private RFC 1918 addresses, and that doesn't conflict with anybody else who's using any other address on the internet or even in their own environment because of the way we use them and set them up.
So, same thing with these private autonomous system numbers.
When you use them, you're not going to be hurting the internet.
Now, when you think about what I've just described to you, I said that every single organization essentially needs an autonomous system number if they're going to be playing on the internet.
So, this ran out pretty fast, as you can imagine, through the 90s internet explosion.
So, it wasn't long after that where they had to expand that range from 65,536 all the way up to, actually the end number is right here, 4.2, that's 3, 3, 3, 3, 4.2 billion is what we have in total now.
So, there's your public range going from here to here, and then from here to here, and then your private range going from here to here, and then from here to here.
So, any of those numbers in the public range can be used for internet, and anything in the private range can be used for just goofing around in your own environment, setting up demo labs, different things like that if you want to.
However, you can use private on the internet, sort of.
Now, why do I say it that way?
Because there are times when it doesn't make sense for you to spend the money on autonomous system number when it's not really going to make a difference.
Maybe if you're a small or medium organization, you don't really need your own autonomous system number, and you just have a few public IP addresses.
What you can do is you can still use BGP with your service provider.
So, let's say this is you.
Let's use a private autonomous system number like 65,534.
And you're connected up to your ISP, and let's say your ISP is autonomous system number nine, and then this is the rest of the internet.
So, and you have some public IP, like let's say you had 192.0.1.0.24, and you owned 192.0.2.0.24.
Those are your public IPs that were actually given to you by your ISP, and you're using those inside of your environment.
But you want to advertise those out to the internet, so that way their users out on the internet can access those public resources that you have in those subnets.
What your ISP can do is they can actually strip your autonomous system number, meaning that you have an agreement with them.
Instead of paying for an autonomous system number, you're going to piggyback on top of their autonomous system number, essentially.
So, when you go ahead and you advertise your networks, you're going to be advertising your networks as 192.0.1.0.24 via autonomous system number 65,534, and 192.0.2.0.24 via autonomous system number 65,534.
Now, when your ISP gets that, because of your agreement you have with them, and they know what they've got to do, they've configured their routers, they've configured to strip your autonomous system number.
So, now when they advertise it out, it's going to be 192.0.1.0.24 via autonomous system number 9.
192.0.2.0.24 via autonomous system 9.
Okay, so they stripped it out.
Now, if you're using a public autonomous system number, let's change that to a public one.
Let's say you're using public autonomous system number 45.
Well, how does that change things?
Well, I would be advertising to my service provider autonomous system number 45 for both of these.
And then, when they advertise it out to the rest of the world, they just add to the list 45,9.
45,9 as you can see.
So, that list grows and grows and grows, that autonomous system number list.
So, when we go back to this example now, they understand autonomous system numbers better.
When you think about you, you are going to see 192.0.2.0.24 via 65,000, let me clean this up, 65,431, 6021, 1024 when it's all said and done.
Let's go to a BGP router out on the internet.
When we connect to this BGP router that's on the internet, if we type in show IP BGP, we'll look at the BGP table.
What I want you to see is the autonomous system path right here as listed.
So, you'll see that the network 1.0.0.0.24, this router has learned from this neighbor, this one, this one, this one, this one, this one, this one, this one, this one, this one, this one, this one, this one, this one, all of these, all right?
And if you look, the autonomous system number at the very end is the exact same.
It's the exact same for all of these.
So, under path, you'll see this one has 2, 2, 2, 2, 2, this one has 3 paths or 3, not 3 paths, 3 autonomous systems.
This one has 4, this one has 5 in order to get there, right?
So, when you look at those, the last one's always the same.
Why?
Because this autonomous system owns this network.
If we go down to this one down here, 1.0.4.0.24, who owns that?
Autonomous system number 38803, 38803, 38803, and so on and so forth, right?
So, we can see here that the path we could possibly take in these different scenarios, for example, from this router right here,
whatever autonomous system they live in, they would then have to go to this autonomous system,
then this autonomous system to ultimately get to the destination autonomous system that owns that particular network.
Anybody know how many approximate networks there are on the IPv4 Internet right now?
There it is.
This router knows 985,336 public networks.
And it has learned about them from the following BGP neighbors, BGP neighbors that it has.
So, this router's connected to a lot of different neighbors, a lot of different autonomous systems it's connected to.
And you'll see it's learned this many from that neighbor, this many from that neighbor, this many from that neighbor, this many from that neighbor.
That's a lot.
So, in total, it's learned this many different options, 1.8 million, no, 18 million, I should say, different options.
But there's only 985 unique of them within that 18 million.
So, just imagine what type of router you need to be able to accomplish something like this.
I'm going to type in show IP route.
And remember what we said, there's how many?
985,000.
So, the BGP routing table on this router.
We'd be here all day, all day.
Because every time I hit spacebar, it shows 24 at a time.
Because every time I hit spacebar, it shows 24 at a time, which is 985,000 times 24, or divided by 24.
That's how many times I have to hit spacebar.
Anyways, there you go, folks.
There is an example of BGP.
We'll come back to that, and we'll show you.
We'll use that.
We'll use that router to learn about the attributes later, because we can see all the attributes, and there's a lot of good information in there that we can use from a learning standpoint today.
But we're going to play around in our live environment today as we configure BGP and teach you that, because I'm not allowed to configure BGP on those routers.
The router doesn't belong to me.
All right, so BGP basics.
Things to always remember about BGP is that it's not its own transport protocol.
Okay, so EIGRP is its own transport protocol.
OSPF is its own transport protocol.
We said OSPF is protocol number 89.
EIGRP is protocol number 88.
Well, BGP actually uses TCP.
TCP port 179.
So, folks, with EIGRP, you have to be directly connected to form a neighbor adjacency with each other.
You have to be in the same subnet, same broadcast domain.
Same thing is true with OSPF.
In order to form a neighbor adjacency, you have to be in the same what?
Subnet, right?
Same broadcast domain.
And we're using what?
Multicast addressing.
224005 and 6 for OSPF.
2240010 for EIGRP.
Okay, with BGP, we're using TCP.
So does that mean that I have to be directly connected to form a neighbor adjacency if we're using TCP?
Yes or no, what do you think?
No, we don't have to.
We don't have to.
So, for example, if I wanted to form a BGP neighborhood from here over to here, I can do that.
I form a BGP neighborhood from here all the way over to here.
Why?
TCP.
So as long as I know how to get to you and I know your IP address and you know my IP address and my information,
you can get to me, we can form a BGP neighborhood with each other.
Now, by default, they force you to be directly connected together in the same subnet, right?
By default, with EBGP, they force you to be directly connected.
But you can override that by just changing the number of hops away up to a maximum of 255 in order to form a BGP neighborhood.
So TCP, TCP.
So as long as I can form a TCP session with you, then I can form a BGP neighborhood with you.
And because we're using TCP and we're going to be using port numbers here, it's basically client-server now in this case.
One device is going to be the server, and the server uses port 179.
And the other one is going to be the client, and it's going to use an ephemeral port number.
Ephemeral port numbers are what?
Approximately $42,000 up to $65,535, right?
So let's say this device is initiating the session.
If it initiates the session, it's typically going to be the client in that particular case.
So let's say I pick port number 55,389.
And therefore, this is the one that's going to be responding to my initiation, so it's typically going to be the server 179.
So think about access control lists along this path.
It's going to be important to make sure that there's no ACL in between that's blocking the ability to form this TCP session.
Now, typically what happens, though, is both routers try to form a TCP session because when we configure our devices,
they both try to become the clients right away.
So they both try to become the clients.
Let's say I pick 49,284, TCP port 179.
The problem is you can't have two TCP sessions for your BGP.
So great news.
It just automatically solves this problem for you.
What it does is it goes ahead and does its thing and then realizes, oops, we have two sessions,
and then it'll tear down one of those sessions.
Typically, the one with the higher router ID will remain the server,
and then the other one with the lower router ID will remain the client.
So no big deal there.
But you could control who's the client if you want to.
You can control who the server is.
But the only time you would ever need to do that would be in a scenario where,
let's say there was an access control list in between and the ACL was blocking TCP port 179 this way as a destination.
Well, then that would mean you would have no choice but to make sure this one's the client
and this one's the server in order for this to work out.
But here's the deal.
If there was an ACL blocking it that way, then as soon as this client works,
then it's all going to work itself out anyways.
There's not really anything you have to do.
But you can purposely force with certain commands on your device exactly which one's server and which one's client.
But not a big deal typically.
Path vector.
So it's distance vector-based, as you've already seen with the autonomous systems.
We are going to be taking information that we learned via BGP,
making a decision about that, and then sharing with all other autonomous systems that are connected to us.
Now as I'm saying autonomous systems, I'm not saying routers,
because you can have 50 routers inside of your autonomous system all running BGP.
And, yes, all those routers will potentially learn about all the information,
but this is really about training autonomous systems about another autonomous system,
about another autonomous system, about another autonomous system.
It's not about just training routers.
It's training all the routers inside of an autonomous system.
So this is a path vector protocol similar to distance vector,
but it's not going to be router-by-router basis.
It's more about autonomous system-by-autonomous system basis.
We are forming neighbor adjacencies, but one of the things I want you to realize is that these are static.
Static, not dynamic.
With OSPF and EIGRP, we did what?
We did dynamic.
I enabled the routing process on the interface, and when that happens, what occurs?
We send out multicast packets, 224.0.0.5, with EIGRP, 224.0.0.10, and what happens?
We automatically form neighbor adjacencies with other routers participating in EIGRP or OSPF.
Okay, with BGP, I have to statically define exactly the parameters for that neighborhood.
I have to type in your IP address.
You have to type in my IP address.
I have to type in your autonomous system number.
You have to type in my autonomous system number.
That's how we find each other.
There is no dynamic neighborhood here.
Now, beyond the scope of this course and exam, there is an option for dynamic neighborhood,
but it boils down to you just telling your router, hey, if another router reaches out to you to form a BGP neighborhood,
go ahead and form a neighborhood with them.
That's what it means to be dynamic in BGP, but typically you're going to do static neighborhood adjacencies.
You're not going to just let your router just form a neighborhood with anybody who asks it to become a neighbor.
And then once we're neighbors, what do we do?
We advertise network layer reachability information.
Let me repeat that, network layer reachability information.
So in the world of BGP, we call it NLRIs, network layer reachability information.
It's just a fancy way to say things like the network ID, the subnet mask, and all of the attributes that go along with it.
So, for example, ooh, network 192.0.2.0.24, and then all the attributes that go along with it,
things like the MED, the autonomous system path, the weight, the local, and anything else we can, communities, et cetera, et cetera,
and the list goes on, lots and lots of attributes for BGP.
Now, the exam objectives stipulate that you need to understand eBGP,
but I'm also going to cover a little bit of iBGP here for you today,
because that way there, you have a better chance of understanding the scenarios and situations on the exam,
because the last thing I want is for you to only learn about eBGP,
and then on the exam, for some reason, they throw iBGP on it, even though it's not part of the exam objectives.
And if they do that, I don't want you to be confused.
I want you to be able to clearly identify one from the other and accomplish the objectives of the certification exam.
So let's start off with eBGP here.
eBGP simply means you're peering between routers and different autonomous systems,
and by default, they have to be directly connected.
So I've already typed in directly connected here,
meaning you're going to have to be in the same subnet in order to form your neighborship.
So, for example, if this is me right here, and this is my ISP right here,
so I'm going to go ahead and I'm going to form an eBGP session with my ISP.
Typically, we're going to be in the same subnet in this case.
We're directly connected in this case, because if I go to this interface,
it might be 203.0113.89 slash 29 as an example.
Over here, it's 203.0113.91, let's say, slash 29.
So we are directly connected.
We are in the same subnet.
So when we say directly connected, we mean from the perspective of Layer 3 IP addressing,
not Layer 1 as an example in this case.
And the same thing is true with OSPF and EIGRP, directly connected in the same subnet,
not directly connected at Layer 1 as an example.
Because if I had a router and a switch, and I had five routers all connected to that same switch,
we're not technically directly connected, are we?
No, we're all directly connected to the switch, but we're all in the same Layer 3 network.
That's what they mean by directly connected, making sure that we're one hop away from each other.
So if I leave this interface within one hop, I'm at you.
That's what it boils down to.
So with eBGP, by default, you can't route an eBGP packet.
You can't route an eBGP packet.
If I take it from here and I send it out, the next router has to be the neighboring device.
But like I said, you can change that behavior.
So that way there, you could be up to 255 hops away.
And by doing so, then I could technically form, if I wanted to form a neighborhood from here
all the way over to this router, we absolutely could just by changing that parameter from one hop default
to whatever many hops we want to allow.
Right now, iBGP is about what?
Peering with any router inside of the same autonomous system.
So, for example, when you look at all these routers here, they're in my autonomous system.
If I set up BGP on this router and I set up BGP on this router, then they're in the same autonomous system.
That's called an iBGP peering, interior border gateway protocol.
And in this case, you can be up to automatically, by default, 255 hops away.
255 hops away.
So what does that mean?
It means you don't have to be directly connected to each other.
So take a peek at this router.
Take a peek at this router.
They are not connected together at all.
There's an arrow there, right?
There's an arrow.
But there's no line between them.
Okay, there's no line between them.
Yeah, we can still form an iBGP peering with each other.
So that way we can share BGP information with each other.
TCP, the powers of TCP.
All right.
So what we're going to do here today is we're going to set up BGP.
We're going to do eBGP from here up to here.
And then I'll even show you an iBGP right here.
Just for fun.
And then what we're going to do is we're going to advertise some networks over
here that I have.
And we're going to advertise some networks here, even though they're private
networks.
We're just going to use private networks for our example in this case.
But I'll just show you how we can use BGP to share that information back and
forth.
So don't be surprised if you have to configure BGP on the exam.
Don't be surprised if you have to verify BGP on the exam.
So what I'm about to show you is going to be critical for your exam success.
All right.
So let's start off here with configuring R2 and ISPA with eBGP.
So we go to R2 right now.
I'm going to type in show IP protocols.
And we'll see here that I'm not running BGP.
We're just running that.
We're just running OSPF so far.
So let's type in configure terminal router.
I'm going to put in BGP.
And now you specify the autonomous system number.
So in my case, my autonomous system number is 65,001 that we're going to be
using in our example.
So on the exam, whatever autonomous system they show you,
that's the one you got to use.
And if they don't tell you what autonomous system number it is,
it's quite possible BGP might already be pre-set up.
Just type in show IP protocols because if you type in do show IP protocols,
I believe, let me just double check that.
Yes, it shows your autonomous system number right there.
All right.
Or you can type in show run if it'll allow you and take a look at your
running config.
Show run pipe to section BGP.
Do show run pipe to section BGP.
All right.
There you go.
Now, what I want to point out to you is that when you enable BGP,
you're enabling it for the whole router.
The whole router.
Let me be clear.
The whole router.
So remember like OSPF, we did it on an interface-by-interface basis?
With EIGRP, we did it on an interface-by-interface basis.
Okay.
With BGP, it's the whole router.
So you're not going to now go to interfaces and turn it on interfaces.
No, that's not what you do in this case.
What we're going to do is we're going to specify our neighbor now.
Who is our neighbor?
So in this case,
our neighbor is going to be the IP address of that router that I want to
form an eBGP neighborship with.
So I have to know that for my ISP in this case.
If my ISP doesn't tell me what their address is,
I'm going to have to figure it out.
Typically, you'll be able to get it from them if you contact them.
203.0.113.89 in my case.
Now, if you don't know and they can't tell you, you can't get a hold of them,
you can always do something like this if you want.
If they're allowing ICMPs, what you could do, for example,
do ping 255.255.255.255.
I've done this in the past and it's worked for me.
But you'll see here that see the IP address 203.0.113.89?
Okay, that is an IP address that is part.
If I type in do show IP interface brief now,
you see how that IP address is pretty close to that?
So if I basically just know that my IP address on my interface is a
slash 29, well, 89 is in that same subnet,
so that must be the IP address.
But that doesn't always necessarily work in the real world.
And the reason why is because your ISP could actually be using a different
IP address that they want you to peer with instead.
So you've got to get that information from them.
You can't just guess at it.
Because they have to do a configuration on their side as well,
and things are going to have to match properly.
So neighbor 203.0.113.89,
and then I get to type in the remote autonomous system number.
Remote autonomous system number is 65,000, so whatever the ISP is.
So they have to, again, you've got to get that information from them.
All right, so what I've done here is I've been able to successfully
define statically who I'm going to be forming a neighborship with.
Now, how does the router know which interface to send the BGP message out of?
It's based on this destination address.
So if I type in do show IP route,
is there an interface on this device in that subnet?
Or is there, I should say, an entry in the routing table
that will match that IP address
whereby I can use that interface to send the BGP packet out of?
Yes, there is.
So you have to have an entry in your routing table
that will get you to this IP address in order to form a neighborship.
Now, is this a valid entry that you can use to form a neighbor adjacency?
The answer to that is no.
You cannot use the default route to form a neighbor adjacency.
It has to be something more specific than the default route.
It could be a static route, an OSPF learned route, a connected route.
It could be anything as long as it's not the default route
to get to that particular network or to that particular address, I should say.
So when you're troubleshooting BGP neighborships,
you might have to pay attention to that.
Why are we not forming a neighbor adjacency?
Because I do not have an interface that belongs to a network
that will get me to that neighbor.
Like I said, the default route does not qualify for neighborships.
It's just the rules.
I don't make up the rules.
I just teach you the rules.
All right.
Now, if I type in do show IP BGP summary,
this is going to show you my neighborships.
Now, the way I said that is kind of a little misleading.
Why?
Because although it shows my neighborships,
what we need to realize is that this neighborship is not actually up.
You see how it says up down?
Never.
And the state is idle.
So on my neighbor, 20301389, autonomous system number 65,000,
this here is a problem.
Let's look at these states right now.
Let's pause for a moment and go to the slides
because I have a discussion later on that I might as well cover now
that we're seeing idle.
Okay.
There's idle.
What does idle actually mean?
Idle means that my BGP process is currently waiting for the next attempt
to establish appearing.
What does that mean?
It means I've already tried.
I've already tried, and I have failed.
What have I tried?
I've tried to go from here to here.
It failed, and now I'm back to here.
That's what's happening right now.
So idle says I'm waiting for the next attempt.
Connect is what?
Where your TCP connection is being established.
So I tried to establish a TCP connection with that neighbor at 20301389,
but it failed.
The TCP connection is not successful, so I go to the active state,
and then I'm going to make a second attempt while I'm in the active state,
and if that does not work, then I go back to the idle state.
If it does work, then I'll go on to open sent.
So right now I'm kind of stuck in this loop,
and I probably would never see active because it happens so fast.
It's very rarely that I'm ever able to see active.
I'm just refreshing right now my screen, folks, behind the scenes,
and I just keep showing idle, idle, idle, idle, okay?
But it happens.
But if you see on the exam active or you see idle, what does that typically mean?
It means you have been unable to successfully form your TCP session
with a neighboring device, and the question is why?
Why?
Because it wasn't configured yet in our case.
The neighbor is not configured yet, right?
It's not, okay?
What else?
Well, maybe we're both configured properly,
but what if there's an access control list in between us that's preventing us
from forming a neighbor adjacency?
Well, that would be one of the reasons why we're stuck here.
What if I have a route to you, I configured myself properly,
you're configured properly, I have a route to you,
but you're using the default route to get back to me?
Well, then we would not be able to successfully form our TCP session
because you would be getting my stuff, but I wouldn't probably be getting your stuff
because you're not allowed to form a neighbor adjacency using the default route.
So things like that come into mind, right?
Anything that could prevent you from forming the TCP session,
including misconfiguration of the neighbor command for BGP
by specifying the wrong IP address or the wrong autonomous system number,
would cause you to hang out here.
So when you think about this right here,
if I messed up this IP address during my configuration
or I messed up this autonomous system number during my configuration,
we would be stuck in idle, connect, and active, just looping through there.
So if we are successful, though, then what happens,
we move on to the open where we send what is called an open message.
So what's an open message?
An open message is used to establish the actual now BGP peering.
So you have your TCP session set up once you get beyond active,
and now we've got to exchange the actual BGP parameters now
and everything else that goes along with it.
And so open used to establish the peering by exchanging the parameters,
things like your autonomous system number, authentication values,
and anything else that you have as part of your BGP config.
And if all of that is successful,
eventually we get to what is called the established state.
And so established means that we have a successful peering in place,
and now we can actually start exchanging update messages,
meaning we can, I'll use the word, synchronize with each other,
but you're not really synchronizing like you are with OSPF, okay?
But I can send you BGP information and you can send me BGP information.
So that's what the update message is, used to exchange the path attributes,
the prefixes, when adding and withdrawing routes from the table.
So once we establish our session fully, establish is the right word for BGP,
then we can send update messages to teach each other,
and then anytime anything changes down the road,
we just continue to send update messages to each other to update each other
of those changes when it comes to the networks and prefixes
and attributes and everything else.
Keep-alives are going to be sent periodically to maintain our peering as well,
and the reason why is because the TCP session will break down and fall apart
if we don't keep updating ourselves if the TCP session is alive as well.
Because how does a TCP session stay active when you are communicating
between a client and a server?
Let me repeat that.
How does a TCP session remain active, or not active, I can't use the word active,
how does a TCP session remain established when a client is talking to a web server?
Well, just keep talking.
That's right, just keep talking.
As long as you keep talking, as long as you keep doing things,
the TCP session will stay established.
As soon as you stop talking, it's like within approximately nine seconds,
your TCP session would be torn down.
So with BGP, we need a way to keep that session up and running.
We need a way to keep it active, not active.
Ah, established.
Like you said, that active word can be misleading.
I know.
You see, there you go.
You got me saying it now when I'm not supposed to be saying.
So how do we keep that TCP session established with BGP?
We are going to have a keep-alive.
That goes back and forth to make sure it stays up for us.
And then a notification with BGP is going to be generated
and sent any time an issue arises.
If there's an error that needs a BGP appearing to be reset
or anything like that, notifications can be used to accomplish that.
So these, I would know these, like you see them listed here, folks,
like the definitions of them, as well as the definitions of these
and what I described to them.
Because you never know when you might be asked,
hey, why are you in the idle state right now?
Oh, because we haven't been able to successfully establish our TCP peering.
Stuff like that.
Or they might get very specific and say,
because you're waiting for the next attempt to establish a peering.
So I'd keep that in mind for the certification exam,
just to make sure that you have all the information
and details that you need to be successful.
All right.
So with that in mind, let's get back to our diagram.
Let's get back to our configuration of BGP.
All right.
So we've configured one side so far successfully.
Let's go ahead to ISPA.
Now, the ISP would do this themselves, not me.
I wouldn't be the one responsible for doing this.
But we'll type in router BGP, their autonomous system number is 65,000.
And then neighbor, who's their neighbor?
I am their neighbor, so they would have my IP address,
203.0.113.91 is the IP address of R2.
And then what is the remote autonomous system number?
The remote autonomous system number is 65001.
So we see here relatively quickly the neighborship goes up.
It doesn't necessarily happen that quick.
It can take a little time to come up.
BGP is a very slow protocol.
But now we are successfully up.
So if we come back to this output, let's take a peek at that now,
you'll see that it actually has a number instead.
So anytime you see a word here, that means something is wrong.
Anytime you see a number here, that means something is right.
So what does the number zero mean?
The number zero means we just haven't shared any routes with each other.
We're neighbors for 40 seconds now, but we haven't exchanged any routes
because there's nothing to share with each other yet.
So, again, you don't just dynamically share stuff.
You have to identify what you're going to share, and then that can be shared.
Now, if you learn something, you'll automatically share it.
But with EIGP and OSPF, remember,
if your interface was enabled for the routing process,
the network ID was injected, then you share it.
Okay, well, that doesn't happen with BGP.
If you want to share something locally,
you're going to have to manually input what you want to share locally,
and you'll dynamically share anything you learn from other routers as well.
Where does the word established come up?
So if I type in show IPBGP neighbor, and we put in the neighbor address,
you'll see here that the established keyword is right there.
So we have a fully established neighbor adjacency with each other.
Let's scroll down quite a bit here
because I want to show you the server-client relationship.
So you'll see here that I am the client.
The ISP is the server.
How do I know that?
Because they're using TCP port 179.
They're the server, and I'm using an ephemeral port number 62444.
Therefore, I am the client.
Also, you see the time to live here?
That time to live is the default for EBGP.
EBGP's time to live is 1.
What does that mean?
Well, it's what I talked about earlier.
You have to be directly connected to each other.
You have to be within one hop away from each other.
So when I send the message out to this interface,
the next router that gets it must be the router I'm trying to form a peering with
because of that number right there.
So that number can be changed.
Like I said, let me just show you that here, BGP.
I am drawing a blank massively on the command now.
Oh, my gosh.
Not maximum pass.
Man, I was thinking about it like two seconds ago.
EBGP.
No, no, no, no.
What is it?
Yeah, yeah.
Yeah, I just remembered.
It's a part of the neighbor command.
That's why I'm drawing a blank right now.
And it's going to be somebody just chatted in.
Yeah, BGP.
There it is.
Multi-hop.
There is the command right there.
That's what I was looking for.
So that right there is unrecognized command.
How can that be an unrecognized command?
Neighbor 203-01-13.
There it is.
Yeah.
Yay.
It didn't copy the E for me, even though it was highlighted.
Strange.
All right.
So now your maximum hop.
Let me just set it to five as an example.
All right.
Let me just set it to five just so you can see the output now.
There we go.
Scroll down.
You'll see that now it's set to five, which means that could be five router hops away
and form a neighbor adjacency using EBGP.
So you only need to use that command if you are not directly connected to each other.
So on the exam, if all of a sudden the diagram shows a router here and then there's multiple
routers in between and the neighborhood's not forming, well, if the time to live is
the default of one, that's the reason why it's not working.
You're going to have to use the EBGP multi-hop command in order to accomplish that.
All right.
There we go.
So let's go ahead and remove this for a second because I want to reconfigure it.
But what I want to do is I want to put in the wrong autonomous system number and see
what happens.
So for example, the service provider, I accidentally typed in a one.
Well, who's autonomous system number is that?
That's my autonomous system number, right?
That's my autonomous system number.
So notice all the error messages I'm getting.
Why is that?
Because that neighbor, that IP address that I specified in the config, 20301389, okay,
well, they are not in autonomous system 65,001.
They are in what?
Autonomous system 65,000.
So you have to make sure that you get that number perfect and correct.
So let me erase that command and let me put in, for example, let's put in one that's not
mine.
So in this case, I'm not even going to put my own in.
Oops, that's a wait.
Oh, no, that will still work.
But you'll see even then, right, wrong autonomous system number.
So although in the real world, if you got syslog messaging turned on, you're going to
get notified.
Be mindful in the exam, you're never going to get notifications about what's going on.
They're never going to show you syslog messages if you're trying to troubleshoot a BGP issue.
It's about recognizing or looking at the config and realizing, hey, this is misconfigured
in the config.
The autonomous system number should be 65,000, not 65,000 whatever is listed here right now.
And the same thing will be true with the IP address as well.
If I specify an IP address and it's the wrong IP address, then what's going to happen is
as I'm reaching out to that IP address, nobody's going to be there to respond to me.
If nobody's there to respond to me, then I can't form a neighbor adjacency.
So that's what I was saying.
If you're looking at your output for your neighborship, show IP BGP summary, and you
see you're in idle or active state or anything like that, double check that IP.
Double check that autonomous system number.
Double check to see if anything's even configured as it needs to be.
So that way there in the end, you can compare and contrast what needs to be there versus
what you have and then solve the questions that way.
Yeah.
So question coming in about loopback addresses.
If, for example, you were using a loopback address here and you were using a loopback
address here, how many hops are those loopback addresses away from each other?
So what if I was trying to form a neighborship from the loopback to the loopback?
How many hops are they away from each other?
Okay.
Well, when it leaves this router, that's one hop to here.
And what most people don't realize is that to go to the loopback, that's another hop.
So hop one, hop two, that's actually two hops when it's all said and done.
So if you ever see a scenario where it's loopback to loopback, that's actually two hops away,
not one hop.
So you will definitely need to change what?
The eBGP multi-hop parameter in that case.
Let's configure authentication between these two routers now.
So eBGP authentication is pretty simple.
Again, you're going to use the neighbor command.
And then you're going to specify the IP address of the neighbor you want to do authentication with.
And then the keyword that you're looking for is the good old password keyword.
Specify your password that you want to use.
So we use Cisco Rocks.
So now if we go to the ISP, we'll have to do the same thing except specify the other address, the information.
So in this case, neighbor 203011391, password Cisco Rocks.
Now before I hit enter there, let's go back to R2 and let's do do clear IP BGP star.
Let's just hard reset the BGP neighborship.
And when it comes back up, we're going to see, we should see here password mismatch information
because we haven't officially configured it on the other side yet.
So as you can see, we're using MD5 for authentication with BGP.
So even though I'm putting in a password in plain text, we're using MD5 when it's all said and done by default.
So let's go over and configure ISPA.
And then we should see that our neighborship will form and everything will be good and these routers will be happy.
So as you can see, authentication is very, very simple with BGP.
Let me throw that other neighbor command in there, the EBGP1.
Just so you have it as a reference for later on in case you come back and review this and you want to make some notes about this stuff.
Notice that when you're configuring BGP, the list just keeps getting bigger and bigger and bigger when it comes to your commands.
So here's another thing I have to talk about with you.
The way I'm configuring BGP right now is the old classic BGP.
But you have to remember that BGP is a multi-protocol solution.
And so what it has the ability to do is use what are called address families.
So we are actually today using what is called multi-protocol BGP version number four.
Multi-protocol BGP version number four is a multi-protocol BGP version number four.
And it's a multi-protocol BGP version number four.
Multi-protocol BGP version number four.
So you might see it listed as MP-BGP on the certification exam.
And what that means is that if we look here, you'll see that you have what is called address family.
So if I just click on address families right now,
you'll see that I can do IPv4 address families, IPv6 address families, Layer 2 VPN address families,
NSAP address families.
I'm not going to get into the difference between all of these.
But I mean, you could kind of figure out what IPv4 and IPv6 are.
That's not too hard.
But look, if I go under IPv4 now, you'll see that I can do even more different types, I should say,
of address families for IPv4.
We could do a unicast address family, a multicast address family, a VRF address family
for VPN routing and forwarding and stuff like that.
So definitely a lot of different abilities or a lot of different types of situations and scenarios we could use BGP in.
So when you are doing a classic BGP config, I mean, you could do this.
But as soon as you start needing configs for IPv4 and IPv6 and everything else, this doesn't really work for you anymore.
And so what you would do for IPv4 is you'd configure address family IPv4 unicast.
That's the same thing.
So address family IPv4 unicast is the same as what we're doing here underneath the global config.
Let's see if by doing that, it changed anything for us in our output.
See what happened now?
Under address family IPv4, it's done what is called a neighbor activation now.
What is the neighbor activation?
The neighbor activation means that that particular neighbor, 203.0.1.1.3.89 is now activated for IPv4.
Now, why is this activation there?
The activation is there because when it comes to all the other address families,
you have to activate the neighbors before they actually get usable.
With IPv4, they automatically get activated.
But with IPv6, they wouldn't.
You would actually have to type in neighbor, the address, and activate as well.
So typically what's going to happen is you're going to specify your neighbor commands up here first,
like neighbor remote autonomous system, neighbor this, neighbor that.
But then when you get down to specific IPv4-related things,
you'd have to activate the neighbor and do the specific IPv4-related things.
Under IPv6, activate the neighbor, specific IPv6 neighbor thing.
So I'm in the address family right now.
If you take a look here, you can do things like auto-summarization, aggregate addresses, which is a summary.
You can do default metrics, distribute lists, maximum pass, network.
And there's even neighbor commands in here as well.
So if I go into the neighbor command, you can specify the neighbor.
But you'll see that the options are going to be slightly different than what you have under the global config.
So if you've got the active, but then you've got a lot of different things like allow policy, allow ASN, AS override.
We'll talk about some of those a little later on.
Next hop self.
So these are very specific things, very specific little features, functions that you can manipulate and modify with BGP.
But I'm just trying to show you that the address family may or may not show up on this certification exam.
But definitely going down the road, you need to become familiar with just the construct of how you configure BGP.
So if you do see address family on the exam, just realize that what you see here, combined with whatever you would see in here,
is the stuff you want to pay attention to for the IPV4 examples of BGP on the certification exam.
If they don't have the address family specified, then you only have to worry about what's in the top config right there.
The joys of having multiple ways of configuring the same things, right?
All right.
So now I want to take a peek at how we can shut down a neighbor if we ever need to.
What did I mean by shut down a neighbor?
Well, just think about the fact that if you all of a sudden need to stop that one specific neighbor, but no other neighbor, right?
Why might that be?
Well, I mean, could be for any reasons.
The fact of the matter is you don't want to delete your entire BGP config, because that would affect every other neighbor as well.
So you have the ability to enable and disable your neighbors.
So if I type in something like neighbor, and then put in the IP address of that neighbor,
and then put in the IP address of that neighbor,
all right, you'll see here that I am looking for what is called the shutdown option, but it's not here.
And that's one of the things you're going to find with BGP as you play around with it more and more and more,
is that some of the commands, now that you have address family enabled, well, some of them are going to be here,
some of them are going to be in the global mode.
So shutdown is one of those global commands.
So let me back out, and it's going to be neighbor so-and-so.
And if we scroll down to the bottom, we should see shutdown in here somewhere.
There it is.
So if I type in shutdown, that'll just shut down this neighborhood,
but it doesn't shut down any other neighborhood that I would actually have.
So, for example, if you had five or six neighbors, and you want to disable one of those neighbors,
but you don't want to delete the config of that neighbor, you don't want to delete the config of any other neighbor,
then what are you going to do?
You're going to go ahead, and you are going to administratively shut down that neighbor with the command.
And if you look at the output of do show IP BGP summary now, you'll see it actually says admin in brackets.
So if you ever see admin in brackets, idle admin in brackets, that means somebody typed this command in right here.
If you ever want to set your BGP router ID, you can type in BGP router ID.
So just like a router ID in EIGRP, a router ID in OSPF is a 32-bit number that you utilize to uniquely identify the device
amongst the other peering devices in that environment.
So by default, your router ID is going to be chosen the same way as it was with OSPF.
If it's not manually configured, or it's not specified based on the other options here,
like you can specify the actual interface IP address if you want to use this interface for the router ID if you wanted to,
or manually configure it.
If you haven't used OSPF, you can specify the actual IP address for the router ID.
Then it's going to look for loopback interfaces.
Use the highest IP address amongst the loopback interfaces.
If there's no loopback interfaces, it's going to use the highest IP address amongst the remaining interfaces.
So with that said, let me just quickly show you how to do an IBGP neighborship between two routers.
Notice how they're not directly connected to each other.
Obviously, they're not directly connected to each other.
Let me just quickly show you how to do an IBGP neighborship between two routers.
Notice how they're not directly connected to each other, R1 and R2.
Now, the thing about BGP in this type of scenario is that we have multiple ways that we can form our TCP session.
You see that?
So what's going to decide the way we go to form our TCP session?
That's going to be our routing table.
The problem we run into in this case is that when the BGP message is sent out that interface,
that is going to be the source of the BGP message, the source of the BGP message.
Therefore, it's coming from that IP address.
So when this router gets it, it's that source IP address that this router uses to determine if it should form a neighborship with it or not.
So when you type in the neighbor command on this router down here, when you type in neighbor and you put in an IP address,
this IP address has to match the interface that was used to send the packet.
So what does that mean?
Does that mean I would need a neighborship for every single interface IP address that could be used to send the packet?
Kind of, doesn't it?
Well, that's no good.
That's no good.
So whenever you're doing IBGP peerings, because there will typically be multiple paths that you can utilize,
it's better to peer with the loopback interfaces.
So you would definitely want to create loopback interfaces on your device for this purpose.
So loopback 192, and we'll give it an IP address of 168.255.2 in this example, slash 32.
And I'll create one 192.168.255.1, slash 32.
And then I'm going to inject those into OSPF.
Remember, so that way there, R1 and R2 can reach each other.
So remember, we're using OSPF.
So I might as well inject those into OSPF.
So let's just create those quickly.
So I go over to R1, and I'm going to type in interface loopback 192, IP address 192.168.255.1, 255.255.255.255,
IP OSPF OSPF1 area 0.
And then let's go to R2 and do the exact same thing.
So interface loopback 192, IP address 192.168.255.2, 255.255.255.255.
I think we already have this interface configured from when we were doing our,
I think I did the router ID example OSPF, because that's why I don't see it coming up right now.
I think it's because we already had it.
And then we have now IP OSPF1 area 0.
Okay.
So now if I type in do show IP route, we should see those routes in the routing table.
So, all right, so there's 192.168.255.1.
All right, so here's the plan now.
There are multiple ways that I can still get to you.
As you can see, I can get this way or this way in order to get there.
So what we're going to do is we're going to be very specific with our BGP configuration here.
When we actually specify our neighborships, we are going to specify the fact that we want to peer
using our loopback interface instead of the exiting interface's IP address.
So watch this.
I'm going to go back to router BGP configuration mode for 65,001.
I'm going to say my neighbor is at 192.168.255.1.
So I'm going to use its loopback address.
And there in remote autonomous system what?
Well, if you're IBGP, that's what you do.
So IBGP means you put the same autonomous system number.
That's how the router automatically knows it's IBGP.
So if the autonomous system number here is different than there, that means EBGP.
If it's the same, that means IBGP.
All right, so I've done that.
Now what I'm going to do is I'm going to go to address family configuration mode for IPv4 Unicast,
and I'm going to type in neighbor.
I'm going to put in this address here.
And I'm going to say update source.
And let me guess.
That is under, yep, I did it again.
It's under the other configuration.
I do that every time.
Even when I taught it in an RC, I made the same mistake all these years,
and I still may update source loopback 192.
All right, so now what does that mean?
Well, if you type in do, show, run, pipe to section router BGP,
what you're seeing is that I am now telling my router, hey,
any time that you want to communicate with this router,
whether it's to form a neighborhood or send an update,
use the IP address of your loopback interface.
So now all my packets, BGP packets that go to 192.168.255.1
are going to be sourced from 192.168.255.2.
So what does that mean?
It means now when I go over to R1, when I specify neighbor as 192.168.255.2, right,
it matches this IP address here.
That's what I'm trying to do.
I'm trying to make sure that I'm matching the sending
and receiving IP addresses for the neighborhoods
when there are multiple paths that you can utilize.
So go over to R1, router, and we're in BGP Autonomous at 65,001,
neighbor 192.168.255.2, remote autonomous system, 65,001.
And now I'm going to say whenever I form a neighborhood
or send anything to 192.168.255.2, I want to see, as you can see,
we already have a malformatted message.
I want to update source loopback 192, and that should solve our problem.
And the reason why it was malformed, come on, clean yourself up.
The reason why it's malformed is typically because of the fact that I am sending
from the wrong IP and you're receiving from the wrong IP.
I'm sending from the wrong IP.
Okay, let me check my config here.
Something's not happy with me.
192.168.255.1, 192.168.255.2.
Okay, show run pipe section BGP.
That's strange.
Do we have the right IP address on that loopback interface?
192.168.255.1, okay.
So we're saying neighbor 192.168.255.2, remote autonomous system, 65,001.
I am 65,001.
They're 65,001.
That's good.
192.168.255.2, update source loopback 192.
Is that the loopback 192.168.255.1?
Okay, that's fine.
Okay, I'm starting to draw a blank on what's going on here right now.
So we got 192.168.255.2, BGP, 65,001.
I got the right 192.168.255.1.
Okay, let me shut down that neighbor.
I'm going to bring back up the other neighbor that we had shut down because I
realize they're still down.
It is quite possible that.
Okay, so that neighbor should come back up.
That's fine.
Yeah, see, I don't have to do address family over on R1.
So you could do classic IPv4 with.
I've never had that issue before because I've done this demo many times before
this exact same way.
That's why I'm just trying to double check.
Do I have a configuration problem?
So that is the two commands we typed.
So go to R1.
Let's give it a try.
Let's go ahead and let's do address family over here and see what happens.
BGP identifier wrong.
All right.
I know my config is good, all right.
So I'm going to bring back down that neighborhood.
We're not going to keep trying to troubleshoot this because the goal here is
to make sure that we totally recognize the config for the exam.
I've done this demo so many times.
This is the first time I've actually had this issue.
I'm just wondering if it's like a bug from R1 being up so long with all the
stuff I've done to it.
It's just in an unstable state right now.
I have had things like that happen before with other demos I've done.
And so I don't want to waste everybody's time trying to troubleshoot this at
this point in time when something simply as like saving my config rebooting my
router solves the problem.
Right.
So let's not worry about that right now.
Let's do a do show run pipe to section router BGP because the key here is for
us to what be able to recognize the stuff right here for the certification
exam.
All right.
So for example,
make sure that when you're looking at the config,
you understand what you're looking at.
So I'm router to router to autonomous system,
65,001 for every single neighborship you want to have,
you're going to have to have a neighbor command that specifies the remote
autonomous system.
So in this case,
we have a neighborship or a command to form a neighborship with who,
with a neighbor in the same autonomous system.
In this particular case at the IP address,
one nine two one six eight two 55.1 down here we have,
and they are what admin shutdown.
So that's also good for you to know for the certification exam.
So admin shutdown.
So if you saw this,
that would mean that you can't form a neighborship with them because they
have been administratively shut down.
When we look here at this command here,
this is referring to the fact that when you try to form a neighborship where
you send updates or any type of BGP message to one,
nine two one six eight two 55.1,
then you are going to source every single BGP message from the IP address
of your loopback interface.
This one right here is another neighborship we have,
and it's with somebody in a different autonomous system.
Why? Because this is different than this.
So that right there is EBGP,
which means what one hop away directly connected by default.
So if you're further away than one router away from each other,
then you're going to need the EBGP multi-hop command in that particular
type of scenario.
In this case,
we don't need it,
but I put it in there to show you that that's what that command does.
Anytime you want to do authentication,
it would be with what the neighbor password command.
So you specify the neighbor,
the address,
the password command,
and then the password you want to use.
And it uses MD five by default folks.
I know with address family IPV4,
that shows up on the certification exam at a minimum.
You're going to see activate there.
There might be some other commands in there,
but at this point in time,
we haven't seen any command that specifically would live under address
family IPV4 for the certification exam yet at this particular point in
time.
All right.
So now,
now what we're going to do is we're going to look at our network command.
So what is the network command all about?
The network command is all about advertising BGP routes.
Okay.
So the network command for BGP is totally different than it is for EIGRP
and OSPF.
The network command for EIGRP and OSPF enables the EIGRP OSPF running
process on the interface.
So that way there,
you can form dynamic neighbor adjacencies.
Okay.
That's not what it does for BGP.
So the network command is used for you to locally inject networks into your
BGP process.
And then their forces in the BGP process called the BGP table.
In this case,
you're going to be able to share that with other routers at that point in
time.
Notice it said here,
the network command allows you to advertise a prefix to your neighbors.
Okay.
You must be exact with matching on that prefix.
And if not in the routing table,
it's not going to be advertised.
So let me show you exactly what that means in this particular case.
If you go to our over at ISPA as an example,
let's type and show IP route.
When we look at a routing table,
we're going to see that we have all these different directly connected
networks right now at this particular point in time.
Now it doesn't matter if it's a directly connected network.
It doesn't matter if it's a static route.
It doesn't matter for the OSPF EIGP route.
It doesn't matter.
Okay.
The fact of the matter is,
is it just has to be in the routing table,
anything in the routing table,
no matter what it was learned,
you can inject in the BGP using the network command.
So if I type in,
configure terminal router BGP and we're in 65,000 here.
Let me type in the network command.
And then,
what does it ask for?
It says the network number.
So let me go ahead and put in this network number right here.
And then it says mask.
So I'm going to put in mask and then it's asking me to provide the
subnet mask.
And what did we see?
Slash 24.
So that's going to be two by five,
two by five,
two by five dot zero.
Okay.
So what I want to point out to you is that we can verify if it
injected it into the BGP table,
do show IP BGP.
And you'll see that there's nothing in my table right now.
The reason why is because this is a subnet mask.
So I'm going to go ahead and put in the subnet mask.
And then it's asking me for the subnet mask.
And what did we see?
Slash 24.
So that's going to be two by five,
two by five,
two by five dot zero.
Okay.
So we're not seeing anything in our table right now.
The reason why is because this is not actually an exact match to
something in our routing table.
It's not.
And that's what I'm trying to point out to you.
Okay.
Most people don't realize this,
but whenever you see something like this,
notice how there's no source on the left-hand side.
There's no source on the left-hand side.
There's no source.
Think of that as just a header,
a header,
a header.
That's right.
It's saying that anything below this until the next header is
related to that network.
It's related to 192.0.2.0 slash 24.
It says 192.0.2.0 slash 24.
192.0.2.0 slash 24 is variably subnetted into two subnets and
two masks,
and there they are.
Okay.
So that is not actually in your routing table.
So if you were expecting,
hey,
let's advertise 192.0.2.0 slash 24,
you can't because it's not actually in your routing table.
It has to be something that's really in your routing table.
So,
for example,
let's take this one right here.
If we take this one and I type in something like network,
and then we punch in 198.51.100.44,
and it's a slash 30.
What's a slash 30?
255,
252.
Now if we type in show IP BGP,
you're going to see it's actually in the BGP table.
And the next top is 0000 because I'm the one who brought it in to BGP.
It was me.
Look at the AS path.
The AS path is blank.
Why?
Because I am the autonomous system that owns this.
I own it.
I know it's me.
So I don't have to put that information in there right now.
I only put the information in once I send it.
So now if we go into something like R2,
you're going to see this is now learned by R2.
R2 is going to have this,
but you're also going to see the autonomous system number here now,
because when I generate my BGP message,
the ISP,
and sends it out,
it says 198.51.100.44 slash 30 with all other information.
The next hop is going to be the next hop IP address of the ISP router.
That is going to be the autonomous system over the ISP router.
So if we go over to R2 now,
take a peek at that,
do show IP BGP.
And there you go.
Let's go back to the ISP,
and let's grab another thing that we have in our routing table.
So, for example,
we have 8.8.8.8 slash 32 in this case that I have.
So network 8.8.8.8 slash 32.
So it's going to be masked,
and it's going to be 255.255.
Be careful.
For example, if I did this by accident,
not going to work.
Take a look at the BGP table.
Not in there.
Why?
Because that doesn't exist in my routing table.
So pay attention on the exam for that.
Make sure if it's a scenario where you're troubleshooting a BGP route,
double check to make sure that the network command matches the exact address
that's in the table,
routing table.
If the address is not in the routing table,
find out why that is.
Maybe it's because OSPF is improperly advertising that route.
Or maybe the static route is not being installed in the routing table.
Or maybe the interface with a directly connected route is not up, up.
You see how all those little things matter?
How do those routes get in the routing table?
That's number one.
Because if there's a network command,
and it's correct,
and router 2 is not learning that route,
well, maybe it's not a BGP problem.
Maybe it's a problem related to the fact that that route is not in the routing
table.
Why is that?
Now you're troubleshooting the underlying reason why the route's not in the
routing table.
So it may start out as a BGP problem on the exam,
but it ultimately leads to what?
Maybe a problem with an interface not being up, up.
So always be mindful of that.
When you're in the CCNP level of training and certifications,
you could be focused primarily on BGP.
But in the end, why is that not happening?
Is what you're trying to get at.
So now we look, and you'll see that it's also in the table now.
So if you go over to R2, R2 is going to learn about it.
And there we go.
So let's take a look here at address family IPV4 Unicast over on router
number 2.
Because in this case,
you'll see that the network command exists for IPV4 here.
So here's an example of using a command in the address family configuration
mode.
Let me type in do show IP route.
And let's see what I have here that we can go ahead and use.
Look, we have a BGP route and a routing table now.
Let's go down a little further.
We should see the other BGP route and a routing table.
So let's have some fun with this and let's just go ahead.
And I know these are, I know these are,
whatchamacallit, private addresses, but that's okay.
For our example, that's perfectly fine.
So let's go ahead and type in network.
The address, the mask, 255.255.255.0.
Do show IP route.
Oops, not route.
Show IP BGP.
And you'll see here that I've injected myself into this.
Now look at the next hop.
The next hop, even though I use the network command,
notice the next hop is somewhere else because I don't own that.
So if this is not a route that is directly connected to me,
then I will specify the actual next hop that I need in order to get there.
But now when the ISP gets it, who's the next hop?
The next hop is R2.
See, R2's address is there, which is what we'd expect because we want to
make sure that ISP router knows that it has to go to this next hop IP
address in order to get to the particular destination, 10.0.0.24.
So, folks, that's your network command when it's all said and done.
Now, if R2 was working in my particular case, which it's not,
I can't get that neighborhood running between R1 and 2.
I'll try to get it sorted out during our break when we have it.
But in that particular case, R1 would be learning through IPGV all the
information that is coming over from R2.
So R2 would be learning from ISPA and then sharing that information over
because of how we have our neighborhood.
So we've got an EBGP here and we have an IBGP here.
All right, and a few final,
final nuggets of information before we wrap up this overview,
BGP configuration and verification of BGP.
So look at this scenario here.
I have to introduce this to you right now.
I'm not going to demo it live because it's going to require a lot more
configuration to accomplish this.
But think of a scenario, let's say,
where this is your HQ and this is your branch office.
Notice how you are using the same autonomous system number in HQ and the
same autonomous system number in branch, which is perfectly fine.
What you need to recognize is that in this scenario,
I have an EBGP neighborhood here and I have an EBGP neighborhood here.
That's what we have.
There's no neighborhood directly between those two different autonomous
systems.
So I'm advertising my public networks up this way.
The ISP is getting them.
And when the ISP gets it, what's going to happen here?
Let's say the network, let's just pretend the network over here is 192.0.2.0
slash 24.
Let's just pretend that that is the network, the public network we have.
So when the ISP gets it, it learns about it as 192.0.2.0 slash 24 via
autonomous system number 65001.
And now when it shares it down here using EBGP,
then when branch gets it, branch uses 192.0.2.0 slash 24 via AS6500 comma
65001.
Okay, you see this one right here, this autonomous system number there,
65001?
That conflicts with this one.
So with BGP, if you ever receive a network and in the attributes,
you see your very own autonomous system number,
you will automatically drop that information.
Okay.
So this is a problem, isn't it?
Because now I'm not going to learn about the public networks that HQ has
that I need to know.
We can override this behavior with the allow ASN option.
Allows you to receive and keep routes even if your AS number is already in
the path.
That's what this would allow us to do.
So, for example, what we'd have to do is we'd have to go over to both R2
and branch.
That's where we do this configuration, R2 and branch.
And so just think about the fact that on R2,
you would have typed in neighbor 203.0.113.89,
remote autonomous system 65,000.
In addition, now you have to add another command.
And what's that command going to be?
It's going to be neighbor 203.0.113.89 allow ASN.
Allow ASN.
So, for example, wrong configuration mode, probably.
Nope, there it is.
All right, so there's just another command to keep in mind for the
certification exam.
So any scenario whereby you are going to be required to receive routes from
your own autonomous system over the internet,
you're going to have to make sure that you have that command that allows ASN
from that directly connected neighbor.
So we'd have to go over to branch as well and do the same thing.
So on branch, maybe we typed in neighbor 198.51.100.45,
remote ASN 65,000.
So that's the neighborship for the eBGP neighborship.
And then we type in neighbor 198.51.100.45 allow AS-IN.
Now, there's another option we have here, and that is AS override.
Allows you to remove an autonomous system number and replace it with your
own autonomous system number.
So remember when I was talking about the ability to use private autonomous
system numbers?
And then you piggyback on top of your ISP's autonomous system number.
Let's see if I still have that diagram up that we did before.
So where was that?
I think it was this page.
Yeah, it's right there.
Good.
And it's still there.
So this is what would happen if you were public, right?
So if you had a public autonomous system number,
there's my autonomous system number, and then the ISP adds onto that list,
and away you go.
And remember we said, what if we were like 65,145?
Well, what would happen here is that you would have 65,145, 65,145,
and then that would get stripped, okay?
Those would get stripped, and it would be replaced with just your ISP's
autonomous system number.
So that way there, the Internet doesn't see that private autonomous system
number.
So that's essentially what's going on here in this particular case.
So what would happen here is that any time I learn now from this autonomous
system, the ISP could have set up here neighbor 20301391,
so my router's IP address, remote autonomous system 65,001.
Then they would also have the command 20301391 AS override,
which means allow you to remove the AS number
and replace it with your own AS number instead.
So if the ISP did that for incoming here and did that for incoming here,
then when that information's shared there,
this is going to be stripped out of it.
And when this information that's coming in this way gets shared down here,
then that information's stripped out of it.
So now your branch doesn't see that it came from here specifically.
It thinks it came directly from the ISP, and HQ doesn't see 65,001 specifically.
It thinks it all came from the ISP.
So that would be AS override.
So if we look at our config, allow AS in was that one,
and then the other one would be AS override.
Override matching AS number while sending an update.
All right?
So that's what I want you to know to get ready for the certification exam,
for configuration and verification.
So now you know how to create your neighbors, neighbor command.
You know, a bunch of little added things I added to that conversation
so you can pick things out of a lineup on the exam,
and you know the network command.
You know the states of BGP.
You know the messages for BGP.
You know AS override, and you know allow AS in.
All right, make sure you know all of those for the exam.