|
0:00:13
|
In our next section here, we're gonna look at how the new 4 byte BGP autonomous system number is used.
|
|
0:00:19
|
And how this can affect the legacy old BGP implementations that do not support the 4 byte AS.
|
|
0:00:26
|
And the different encodings that we can use in order to transit the 4 byte autonomous sytem through
|
|
0:00:32
|
the networks that do not support that type of value.
|
|
0:00:36
|
So, again, as I mentioned, the new notation for the 4 byte AS number is sometimes called the AS .notation
|
|
0:00:43
|
where we have two 2 byte values that are separated by a dot in the middle.
|
|
0:00:48
|
Technically, you could also disrepresent this as a full decimal number.
|
|
0:00:53
|
But a lot of the times it's easier to read it as the AS .notation
|
|
0:00:58
|
similar to how the BGP community values work.
|
|
0:01:02
|
So, technically, the community is just a binary number that's inside the BGP update.
|
|
0:01:07
|
But when we look at visually in the configuration,
|
|
0:01:10
|
a lot of times, it makes more sense to look at it with the colon notation in the middle
|
|
0:01:14
|
as opposed to just a full decimal value.
|
|
0:01:16
|
So, we'll look at that in communities a little bit later.
|
|
0:01:20
|
But here first, we're gonna look at the 4 byte autonomous system number.
|
|
0:01:24
|
Now, the devices that will support it in our topology are the ones that are running the later versions of 12.4 T.
|
|
0:01:31
|
Which specifically, they are routers 4, 5 and 6 here.
|
|
0:01:36
|
So, the other devices, the catalyst switches and some of the older IOS versions of the router,
|
|
0:01:41
|
these are only gonna support the 2 byte versions.
|
|
0:01:46
|
So, we're going to configure a couple of different peerings here.
|
|
0:01:49
|
Where on routers 4, 5, and 6,
|
|
0:01:51
|
instead of using AS numbers 4, 5, and 6 as we did in the previous example,
|
|
0:01:56
|
on router 6, I'm gooing to use 1.6
|
|
0:01:59
|
On router 4, 1.4
|
|
0:02:04
|
And on router 5, 1.5
|
|
0:02:08
|
So, these will still be EBGP peerings.
|
|
0:02:12
|
We'll say, on switch 1, we'll have AS 7.
|
|
0:02:14
|
On switch 2, we'll have AS 8.
|
|
0:02:17
|
On switch 4, we'll have AS 10.
|
|
0:02:20
|
So, once we establish the peerings, then we'll do some basic advertisements between the neighbors.
|
|
0:02:25
|
And look at what is the end result here for the BGP AS path
|
|
0:02:28
|
inside the 4 byte autonomous systems and the 2 byte autonomous sytems.
|
|
0:02:38
|
So, to start, let's go to...
|
|
0:02:41
|
Swith 4 and switch 2 here.
|
|
0:02:45
|
And we have a directly connected link between them that is 155.28, 108.8 on switch 2.
|
|
0:02:52
|
And 108.10 on switch 4.
|
|
0:02:55
|
So, we'll configure BGP AS 10.
|
|
0:02:58
|
I'm gonna peer with the address of switch 2.
|
|
0:03:03
|
And there in this particular AS, which is gonna be AS number 8.
|
|
0:03:08
|
Now, additionally, I'm going to advertise some of my connected links in the BGP.
|
|
0:03:14
|
We'll say network 155.28.10.0, with the mask of /24.
|
|
0:03:21
|
This is my connected VLAN interface.
|
|
0:03:25
|
So, once the peering is up between these two neighbors,
|
|
0:03:27
|
I should be able to look at the Show IP BGP output
|
|
0:03:30
|
and then see that switch 4 is advertising that particular prefix.
|
|
0:03:39
|
Next, between routers 4, 5, and 6,
|
|
0:03:42
|
I'm going to remove the previous configuration.
|
|
0:03:50
|
And it should be a 10 there, not an 8.
|
|
0:03:53
|
Remove the previous configuration, we'll say on router 5, No router BGP 5.
|
|
0:03:58
|
And we'll replace this by router BGP 1.5
|
|
0:04:03
|
So, there's really nothing too special about this configuration from the routers that do support it.
|
|
0:04:08
|
I'll say that, i'll configure the peering with router 4, who is an AS 1.4
|
|
0:04:15
|
I'm also gonna be peering with switch 2,
|
|
0:04:19
|
who is in the 2 byte AS 8,
|
|
0:04:23
|
which could also be denoted as 0.8
|
|
0:04:28
|
So, in the AS path information, sometimes, you'll see this as 0.8
|
|
0:04:32
|
Configuration wise, most of the versions are still gonna take this as the decimal value.
|
|
0:04:37
|
But it's the same value when we're looking at it a bit wise. If its' 0.8 or just decimal 8.
|
|
0:04:45
|
On router 4, we'll do the same thing.
|
|
0:04:48
|
So, no router BGP 4. We're going to replace this by router BGP 1.4
|
|
0:04:54
|
Then we'll have the peering with router 5,
|
|
0:04:58
|
who is an AS 1.5.
|
|
0:05:01
|
And also, I'll have a peering with router 6,
|
|
0:05:05
|
who is an AS...
|
|
0:05:09
|
1.6
|
|
0:05:15
|
Then on router 6, no router BGP 6.
|
|
0:05:20
|
Router BGP 1.6
|
|
0:05:25
|
I'm peering with router 4.
|
|
0:05:30
|
Remote AS 1.4. And then on router 5 or router 6, we're also going to originate a prefix.
|
|
0:05:37
|
So, let's say any of these connected networks, let's say the loopback, 150.128.6.0...
|
|
0:05:45
|
/24,
|
|
0:05:49
|
we're going to originate this into the network.
|
|
0:05:53
|
So, from router 6, if we look at the Show IP BGP,
|
|
0:05:56
|
we should see that our local loopback has then been advertised into the BGP table.
|
|
0:06:01
|
This then means we're gonna advertise it to our EBGP peer who is router 4.
|
|
0:06:06
|
From router 4, if we look at the same output, the Show IP BGP,
|
|
0:06:11
|
we should shortly see the loopback interface coming in from router 6.
|
|
0:06:16
|
And we should see the AS path is going to include the 4 byte AS which is 1.6
|
|
0:06:22
|
as opposed to the previous just 6.
|
|
0:06:27
|
Now, you'll see a lot of the times when you're doing these BGP configurations,
|
|
0:06:31
|
that the protocol is fairly slow to converge,
|
|
0:06:34
|
So, you may need to move on to another configuration for 5 or 10 minutes and then come back
|
|
0:06:38
|
and see if everything has synchronized.
|
|
0:06:45
|
So, we see we have the prefix 150.28.6.0,
|
|
0:06:48
|
it says theat the autonomous system path is now AS 1.6.
|
|
0:06:53
|
So, it's simply a different notation in the AS path information.
|
|
0:06:58
|
If we were to go to router 5,
|
|
0:07:00
|
as we would expect, this prefix is gonna have the AS path that starts with 1.4,
|
|
0:07:06
|
who is the AS we're learning it from.
|
|
0:07:09
|
And then it's beeing originated in AS 1.6.
|
|
0:07:16
|
Next, we're gonna configure a peering
|
|
0:07:19
|
between router 5 and switch 2.
|
|
0:07:23
|
The issue here is that switch 2's BGP process
|
|
0:07:28
|
doesn't understand the 4 byte autonomous system that router 5 has configured.
|
|
0:07:32
|
So, from router 5's perspective, there's no problem.
|
|
0:07:35
|
It's just gonna say neighbor, switch 2's address and then remote AS 8.
|
|
0:07:40
|
But on switch 2, there's no option syntax wise for us to say, Neighbor 155.28.58.5, remote AS...
|
|
0:07:53
|
remote AS 1.5 Because this version doesn't support it.
|
|
0:07:57
|
So, we need to figure out what is the actual value
|
|
0:08:00
|
that router 5 is using here in the backwards compatilbility.
|
|
0:08:06
|
Now, we can see once I configured
|
|
0:08:08
|
the neighbor statement from switch 2 over to router 5.
|
|
0:08:13
|
There's a BGP notification message received that says the peers in the wrong AS.
|
|
0:08:19
|
There's a 2 byte value that is 5BA0, which is a hex of a decimal value.
|
|
0:08:27
|
That's telling us what is the actual autonomous sytem number that we are receiving from them.
|
|
0:08:34
|
So, if we were to take this value in hex, which is 5BA0,
|
|
0:08:42
|
convert this to decimal, it's that reserved AS number 23456.
|
|
0:08:48
|
So, form the perspective of any device that only supports the 2 byte system number,
|
|
0:08:55
|
essentially, the local AS that 5 is sending to switch 2 is 23456.
|
|
0:09:04
|
We'll also see that any 4-byte autonomous system that is in our AS path,
|
|
0:09:10
|
is then gonna be encoded as AS number 23456.
|
|
0:09:14
|
So, ultimately, once we go to switch 4 and look at the final AS path,
|
|
0:09:20
|
let's say that it's something that is originated by router 6,
|
|
0:09:24
|
it would say, "It originated in 23456."
|
|
0:09:29
|
It pass through 23456, which is really 1.4 and 1.6 respectively.
|
|
0:09:37
|
Then it pass through 23456 again, which is really router 5.
|
|
0:09:42
|
And then it pass through AS 8 and then it was learned by us.
|
|
0:09:48
|
So, if we were to go now to switch 2,
|
|
0:09:53
|
and changed this neighbor peering,
|
|
0:09:57
|
so that the neighbor statement goes to 23456,
|
|
0:10:05
|
we should see that the session is gonna come up.
|
|
0:10:08
|
Now, also, we'll also do the same thing between switch 1 and router 6.
|
|
0:10:13
|
So, router 6 is gonna say that I have a peering that goes over to switch 1.
|
|
0:10:19
|
They're in AS 7.
|
|
0:10:22
|
Since switch 1 doesn't support the 4-byte AS number,
|
|
0:10:26
|
we need to say that this neighbor who is router 6,
|
|
0:10:31
|
is in AS 23456.
|
|
0:10:35
|
Additionally, I'm going to generate a local advertisement.
|
|
0:10:38
|
Okay, I have a connected link here 155.28.7.0
|
|
0:10:47
|
We look at the Show IP BGP.
|
|
0:10:51
|
We see that we are learning the local route that we are originating, which is the 7.0
|
|
0:10:57
|
We're learning the route from router 6 to 6.0
|
|
0:11:00
|
and then the one that's coming all the way from the other end of the network, which is switch 4.
|
|
0:11:05
|
So, in the AS path information here,
|
|
0:11:09
|
we're showing all of them as 23456
|
|
0:11:12
|
where really there's an encoding as an optional transitive attribute on the update
|
|
0:11:19
|
that tells us, this isn't really 23456.
|
|
0:11:22
|
What this is 1.6, 1.4 and 1.5
|
|
0:11:32
|
So, if switch 1 were to have some other peering beyond it,
|
|
0:11:38
|
that was going to some router that did support the 4-byte autonomous systems,
|
|
0:11:43
|
we would see that the full AS path is going to be maintained.
|
|
0:11:48
|
But the keypoint here is that from the device that only supports the 2-byte AS,
|
|
0:11:53
|
they need to say that the remote autonomous system is 23456.
|
|
0:12:00
|
Beyond that, there's no other configuration that we need to do in order to support this.
|
|
0:12:05
|
So, if we were to look at this from switch 4's perspective,
|
|
0:12:09
|
and Show IP BGP,
|
|
0:12:15
|
we see all of the real autonomous system paths have been replaced by 23456.
|
|
0:12:20
|
Now, where this is gonna make more sense,
|
|
0:12:22
|
let's say that the peerings, I'm gonna change the peering design a little bit here so that
|
|
0:12:29
|
1.6 is gonna peer with switch 4.
|
|
0:12:36
|
And then switch 4 is gonna peer back with router 4.
|
|
0:12:41
|
So, there's someone that has just a 2 byte autonomous system,
|
|
0:12:45
|
that's gonna be in the transit path between these 4 byte AS numbers.
|
|
0:12:52
|
So, to simplify this a little bit, we'll put the configuration in no path,
|
|
0:12:56
|
where from router 6, this is BGP 1.6
|
|
0:13:00
|
I need a neighbor peering that goes to 155.28.10.10, who is an AS 10.
|
|
0:13:11
|
Since this is a multihop peering, I need to say EBGP multihop.
|
|
0:13:16
|
And also my update source is loopback 0.
|
|
0:13:22
|
Then router 4 is essentially gonna do the same thing.
|
|
0:13:27
|
But it's coming from 1.4
|
|
0:13:38
|
Then on switch 4, I'll get rid of its previous peerings. We'll restart this with peerings that goes to...
|
|
0:13:41
|
150.28.6.6,
|
|
0:13:45
|
who I think is in 23456.
|
|
0:13:49
|
Then the same with router 4.
|
|
0:13:57
|
They're both EBGP multihop peerings and I'm gonna need to...
|
|
0:14:03
|
originate both of them from my loopback 0.
|
|
0:14:07
|
So, you could see by doing the configurations in no path,
|
|
0:14:11
|
it's a little bit easier to see the overall design of what's going on.
|
|
0:14:14
|
And to make sure that we just don't leave out one key command that's gonna cause the peerings not to work.
|
|
0:14:20
|
So, we'll configure this on router 4.
|
|
0:14:32
|
And under BGP 1.4,
|
|
0:14:35
|
I'm gonna remove the previous peering that was to router 6.
|
|
0:14:41
|
So, now, we have the peering that's going to...
|
|
0:14:48
|
the peering that's going to switch 4.
|
|
0:14:55
|
Router 6 likewise.
|
|
0:15:00
|
And then...
|
|
0:15:02
|
switch 4.
|
|
0:15:04
|
Now, one thing that you do need to be aware of here,
|
|
0:15:08
|
that if you are doing EBGP multihop peerings between
|
|
0:15:12
|
the loopbacks or any of the non-connected interface,
|
|
0:15:15
|
we need to avaoid what could be considered BGP race condition.
|
|
0:15:21
|
In the case that the neighbor's address that we're using is also a route that we're learning from BGP.
|
|
0:15:32
|
So, if we look at the cionfiguration of switch 4 here,
|
|
0:15:37
|
switch 4 says, "I'm peering with the loopback interface of router 6."
|
|
0:15:41
|
So, in order to establish this peering, we're assuming that there's some sort of IGP route to get there.
|
|
0:15:47
|
So, if we Show IP Route for 150.28.6.6,
|
|
0:15:52
|
I should have an IGP route to get there.
|
|
0:15:55
|
But now, in this particular design, router 6 is also advertising that prefix into BGP.
|
|
0:16:02
|
So, we end up in a kind of a recursivce loop in the routing table.
|
|
0:16:07
|
Where it says to get to 150.28.6.6,
|
|
0:16:12
|
use 150.28.6.6.
|
|
0:16:16
|
So, eventually, we'll see that the BGP peering is gonna time out here.
|
|
0:16:20
|
Because BGP cannot rely on itself for transport.
|
|
0:16:24
|
And this is what's known as the BGP race condition.
|
|
0:16:27
|
The same type of logic we talked about before in GRE tunnels.
|
|
0:16:32
|
Where if the GRE tunnel destination is routed out to tunnel itself,
|
|
0:16:38
|
you end up in that recursive error in the routing table,
|
|
0:16:40
|
which is essentially what's happening here.
|
|
0:16:43
|
So, what I would need to do on router 6,
|
|
0:16:46
|
basically, I don't want to advertise that loopback into BGP.
|
|
0:16:56
|
Because this is already advetised into IGP.
|
|
0:17:02
|
And that's what I'm using to terminate this sessions on.
|
|
0:17:07
|
So, i'll advertise something that's connected. Let's say 155.28.67.0/24.
|
|
0:17:23
|
So, now, the peerings are passing from 6 to switch 4,
|
|
0:17:29
|
from switch 4 to router 4.
|
|
0:17:32
|
Then from router 4 to 5.
|
|
0:17:34
|
From 5 to switch 2,
|
|
0:17:38
|
which is an 8.
|
|
0:17:39
|
I'm originating the prefix here.
|
|
0:17:43
|
So, if we look at...
|
|
0:17:46
|
router 6,
|
|
0:17:49
|
and Show IP BGP,
|
|
0:17:52
|
we should see that on switch 4, Show IP BGP,
|
|
0:18:03
|
we will advertise network 155.28.10.0
|
|
0:18:08
|
/24.
|
|
0:18:14
|
So, switch 4 is now locally originating that.
|
|
0:18:17
|
When it gets to router 6, router 6 should say it's coming from AS 10.
|
|
0:18:22
|
Which is what we would expect because this is the normal 2 byte AS of the neighbor.
|
|
0:18:29
|
6 is now passing this to...
|
|
0:18:35
|
Actually, 6 is passing it to no one.
|
|
0:18:36
|
I need to look at this from...
|
|
0:18:44
|
from the other way, so I'm gonna go to switch 2 and advertise that link there.
|
|
0:18:52
|
Let's go to switch 2.
|
|
0:18:55
|
Router BGP 8, we'll say Network 155.28.8.0.
|
|
0:19:01
|
So, this is one of my connected LAN segments.
|
|
0:19:05
|
So, switch 2 is locally originating that.
|
|
0:19:09
|
It goes from switch 2 to router 5.
|
|
0:19:14
|
5 should see this as the normal 2 byte AS, which it does.
|
|
0:19:21
|
When this gets to router 4,
|
|
0:19:24
|
router 4 sees router 5's 4 byte AS.
|
|
0:19:28
|
Because both of these are supporting the 4 byte value.
|
|
0:19:32
|
Then from router 4, it's going to down to switch 4 who doesn't support it.
|
|
0:19:36
|
So, we'll see that this value should then be replaced by 23456.
|
|
0:19:42
|
Which it is here, it's being replaced twice by 23456.
|
|
0:19:46
|
One's for router 4's AS number, one's for 5's.
|
|
0:19:50
|
It was originated in AS 8.
|
|
0:19:51
|
But then finally, when it goes to router 6, we'll see that this information was maintained.
|
|
0:19:57
|
So, as a temporary place holder,
|
|
0:20:01
|
that new optional transit of attribute of the AS 4 path is maintaining.
|
|
0:20:10
|
Now, whether all vendors are going to support this optional transit of attribute,
|
|
0:20:14
|
it depends on there individual implementaion.
|
|
0:20:16
|
But IOS to IOS, there's no problem with it.
|
|
0:20:18
|
You may see that if you are going to other vendors called that's older,
|
|
0:20:23
|
they may not be able to support this.
|
|
0:20:25
|
But the idea is that we're essentially tunneling the autonomous system path
|
|
0:20:30
|
through the older devices that don't support this 4 byte values.
|