In the following post I will examine the
maximum-path option for BGP.
This is the lab topology I’m going to use:
R12 advertise network 192.120.1.0/24.
Now let’s see R1 BGP table:
R1#show ip
bgp
BGP table
version is 26, local router ID is 1.1.1.1
Status codes:
s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m
multipath, b backup-path, f RT-Filter,
x best-external, a
additional-path, c RIB-compressed,
Origin codes:
i - IGP, e - EGP, ? - incomplete
RPKI
validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* i 192.120.1.0 10.1.24.4 0 100
0 65034 65007 65009 65120 ?
* 10.1.14.4 0 65034 65007
65009 65120 ?
* 10.1.15.5 0 65005 65007
65009 65120 ?
*> 10.1.13.3 0 65034 65007
65009 65120 ? <OUTPUT_OMMITED>
|
We can see that R1 learns about 192.120.1.0/24 network
from 3 different peers (R3, R4 and R5) but install only the best in his RIB -
that is R3.
Now let’s say we want to configure equal-cost
load-balance on R1, for this purpose we can use the BGP maximum-path command.
The BGP command maximum-path allow us to
install more then one path in the RIB but only when both (or more) paths have
the same characteristics –
From Cisco BGP Best Path Selection Algorithm
document:
“In order to be candidates for multipath, paths
to the same destination need to have these characteristics equal to the
best-path characteristics:
Weight
Local preference
AS-PATH length
Origin
MED
One of these:
- Neighboring AS or sub-AS (before the addition
of the eiBGP Multipath feature)
- AS-PATH (after the addition of the eiBGP
Multipath feature)”
URL:
So now let’s configure on R1 the maximum-path
command:
R1(config-router)#maximum-paths
4
|
The default value is 1
Let’s see R1 BGP table again:
R1#show ip
bgp
BGP table
version is 29, local router ID is 1.1.1.1
Status codes:
s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m
multipath, b backup-path, f RT-Filter,
x best-external, a
additional-path, c RIB-compressed,
Origin codes:
i - IGP, e - EGP, ? - incomplete
RPKI
validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* i 192.120.1.0 10.1.24.4 0 100
0 65034 65007 65009 65120 ?
*m
10.1.14.4
0 65034 65007 65009 65120 ?
* 10.1.15.5 0 65005 65007
65009 65120 ?
*> 10.1.13.3 0 65034 65007
65009 65120 ? <OUTPUT_OMMITED>
|
Now we can see entries with the ‘m’ sign,
toward R4, which means multipath.
Let’s see the routing table:
R1#show ip route 192.120.1.0
Routing entry for
192.120.1.0/24
Known via "bgp 65012", distance
20, metric 0
Tag 65034, type external
Last update from 10.1.13.3 00:03:07 ago
Routing Descriptor Blocks:
* 10.1.14.4, from 10.1.14.4, 00:03:07 ago
Route metric is 0, traffic share count
is 1
AS Hops 4
Route tag 65034
MPLS label: none
10.1.13.3, from 10.1.13.3, 00:03:07 ago
Route metric is 0, traffic share count
is 1
AS Hops 4
Route tag 65034
MPLS label: none
|
R1 has installed both paths, to R3 and to R4,
in his routing table and now we gain equal-cost load-balance between these two
peers, on a per-destination algorithm used by CEF:
R1#show ip cef 192.120.1.0
detail
192.120.1.0/24, epoch 0,
flags rib only nolabel, rib defined all labels, per-destination sharing
recursive via 10.1.13.3
attached to FastEthernet0/1
recursive via 10.1.14.4
attached to FastEthernet1/0
|
But what about R5? Why R5 path didn’t installed
in the RIB also?
We got the same Weight, Local preference,
AS-PATH length, Origin and MED?!
That’s because R5 is in different autonomous system!
In order to install R5 path and overcome the
different AS limitation we can use the following hidden command:
R1(config-router)# bgp bestpath as-path multipath-relax
|
Now let’s see R1 BGP table:
R1#show ip
bgp
BGP table
version is 45, local router ID is 1.1.1.1
Status codes:
s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m
multipath, b backup-path, f RT-Filter,
x best-external, a
additional-path, c RIB-compressed,
Origin codes:
i - IGP, e - EGP, ? - incomplete
RPKI
validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* i 192.120.1.0 10.1.24.4 0 100
0 65034 65007 65009 65120 ?
*m
10.1.14.4
0 65034 65007 65009 65120 ?
*m
10.1.15.5
0 65005 65007 65009 65120 ?
*> 10.1.13.3 0 65034 65007
65009 65120 ?
<OUTPUT_OMMITED>
|
And on the routing table:
R1# show ip route 192.120.1.0
Routing entry for
192.120.1.0/24
Known via "bgp 65012", distance
20, metric 0
Tag 65034, type external
Last update from 10.1.13.3 00:06:36 ago
Routing Descriptor Blocks:
10.1.15.5, from 10.1.15.5, 00:06:36 ago
Route metric is 0, traffic share count
is 1
AS Hops 4
Route tag 65034
MPLS label: none
* 10.1.14.4, from 10.1.14.4, 00:06:36 ago
Route metric is 0, traffic share count
is 1
AS Hops 4
Route tag 65034
MPLS label: none
10.1.13.3, from 10.1.13.3, 00:06:36 ago
Route metric is 0, traffic share count
is 1
AS Hops 4
Route tag 65034
MPLS label: none
|
Now we got equal-cost load-balance on all 3
links from R1.
Another option for this command is maximum-path
ibgp <NUMBER> which has the same effect but with iBGP peers.
No comments:
Post a Comment