-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
topotests: add bgp test for backup routes
There is no test that illustrate how BGP can handle backup routes. This test creates a core topology with multiple P devices, and CEs devices. The ce9 device is reachable via rt11, rt5 and rt6, while the ce7 device is reachable via rt1. The expectation is to test incoming routes on rt1. The test does the following: - at startup, backup routes support is configured, and 2 ECMP routes, and 1 backup path should be present. - the IGP metric of rt6 is set to 10: the route to rt6 becomes ECMP, like the other 2. - the IGP metric of rt5 and rt11 is set to 20: the route to rt6 becomes primary, and the other two are backup and backup-multipath - the unconfiguration of addpath backup support should remove the backup and backup-multipath - the reconfiguraiton of addpath backup support should add the backup and backup-multipath - the test of the addpath-tx-backup functionality. The below output can be visible on rt1 during the tests: > rt1# show bgp ipv4 > BGP table version is 2, local router ID is 192.0.2.1, vrf id 0 > Default local pref 100, local AS 64500 > Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, > i internal, r RIB-failure, S Stale, R Removed > Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self > Origin codes: i - IGP, e - EGP, ? - incomplete > RPKI validation codes: V valid, I invalid, N Not found > > Network Next Hop Metric LocPrf Weight Path > *>i192.0.2.9/32 192.0.2.5 0 100 0 64511 i > b i 192.0.2.6 0 100 0 64511 i > *>i192.0.2.89/32 192.0.2.2 0 100 0 64499 i > Signed-off-by: Philippe Guibert <[email protected]>
- Loading branch information
1 parent
e443091
commit ca2b13f
Showing
25 changed files
with
1,132 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
router bgp 64499 | ||
bgp router-id 192.0.2.7 | ||
no bgp ebgp-requires-policy | ||
neighbor 172.31.10.1 remote-as 64500 | ||
address-family ipv4 unicast | ||
neighbor 172.31.10.1 addpath-tx-all-paths | ||
! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
log stdout | ||
interface lo | ||
ip address 192.0.2.7/32 | ||
! | ||
interface loop2 | ||
ip address 192.0.2.89/32 | ||
! | ||
interface ce7-eth0 | ||
ip address 172.31.10.7/24 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
router bgp 64511 | ||
bgp router-id 192.0.2.7 | ||
no bgp ebgp-requires-policy | ||
neighbor 172.31.12.5 remote-as 64500 | ||
neighbor 172.31.13.6 remote-as 64500 | ||
neighbor 172.31.20.11 remote-as 64500 | ||
address-family ipv4 unicast | ||
network 192.0.2.9/32 | ||
! | ||
! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
log stdout | ||
interface lo | ||
ip address 192.0.2.9/32 | ||
! | ||
interface loop2 | ||
ip address 192.0.2.9/32 | ||
! | ||
interface ce9-eth0 | ||
ip address 172.31.12.9/24 | ||
! | ||
interface ce9-eth1 | ||
ip address 172.31.13.9/24 | ||
! | ||
interface ce9-eth2 | ||
ip address 172.31.20.9/24 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
debug bgp updates out | ||
router bgp 64500 | ||
bgp router-id 192.0.2.1 | ||
no bgp ebgp-requires-policy | ||
neighbor 172.31.10.7 remote-as 64499 | ||
neighbor rrserver peer-group | ||
neighbor rrserver remote-as 64500 | ||
neighbor rrserver update-source lo | ||
neighbor 192.0.2.3 peer-group rrserver | ||
address-family ipv4 unicast | ||
addpath path-selection backup | ||
neighbor rrserver next-hop-self | ||
neighbor rrserver addpath-tx-all-paths | ||
neighbor 172.31.10.7 addpath-tx-all-paths | ||
exit-address-family | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
hostname r1 | ||
interface lo | ||
ip router isis 1 | ||
isis passive | ||
! | ||
interface r1-eth1 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r1-eth2 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
router isis 1 | ||
net 49.0123.6452.0001.00 | ||
is-type level-2-only | ||
mpls-te on | ||
segment-routing on | ||
segment-routing global-block 16000 17000 | ||
segment-routing node-msd 10 | ||
segment-routing prefix 192.0.2.1/32 index 1 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
log stdout | ||
interface lo | ||
ip address 192.0.2.1/32 | ||
! | ||
interface r1-eth0 | ||
ip address 172.31.10.1/24 | ||
! | ||
interface r1-eth1 | ||
ip address 172.31.0.1/24 | ||
! | ||
interface r1-eth2 | ||
ip address 172.31.2.1/24 | ||
! | ||
interface r1-eth3 | ||
ip address 172.31.15.1/24 | ||
! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
hostname r10 | ||
interface lo | ||
ip router isis 1 | ||
isis passive | ||
! | ||
interface r10-eth0 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r10-eth1 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r10-eth2 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r10-eth3 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
router isis 1 | ||
net 49.0123.6452.0010.00 | ||
is-type level-2-only | ||
mpls-te on | ||
segment-routing on | ||
segment-routing global-block 16000 17000 | ||
segment-routing node-msd 10 | ||
segment-routing prefix 192.0.2.10/32 index 10 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
log stdout | ||
interface lo | ||
ip address 192.0.2.10/32 | ||
! | ||
interface r10-eth0 | ||
ip address 172.31.14.10/24 | ||
! | ||
interface r10-eth1 | ||
ip address 172.31.15.10/24 | ||
! | ||
interface r10-eth2 | ||
ip address 172.31.16.10/24 | ||
! | ||
interface r10-eth3 | ||
ip address 172.31.17.10/24 | ||
! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
router bgp 64500 | ||
bgp router-id 192.0.2.11 | ||
no bgp ebgp-requires-policy | ||
neighbor 172.31.20.9 remote-as 64511 | ||
neighbor rrserver peer-group | ||
neighbor rrserver remote-as 64500 | ||
neighbor rrserver update-source lo | ||
neighbor 192.0.2.3 peer-group rrserver | ||
address-family ipv4 unicast | ||
neighbor rrserver next-hop-self | ||
neighbor rrserver addpath-tx-all-paths | ||
exit-address-family | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
hostname r11 | ||
interface lo | ||
ip router isis 1 | ||
isis passive | ||
! | ||
interface r11-eth0 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r11-eth1 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r11-eth2 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
router isis 1 | ||
net 49.0123.6452.0011.00 | ||
is-type level-2-only | ||
mpls-te on | ||
segment-routing on | ||
segment-routing global-block 16000 17000 | ||
segment-routing node-msd 10 | ||
segment-routing prefix 192.0.2.11/32 index 11 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
log stdout | ||
interface lo | ||
ip address 192.0.2.11/32 | ||
! | ||
interface r11-eth0 | ||
ip address 172.31.17.11/24 | ||
! | ||
interface r11-eth1 | ||
ip address 172.31.18.11/24 | ||
! | ||
interface r11-eth2 | ||
ip address 172.31.19.11/24 | ||
! | ||
interface r11-eth3 | ||
ip address 172.31.20.11/24 | ||
! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
router bgp 64500 | ||
bgp router-id 192.0.2.3 | ||
neighbor rr peer-group | ||
neighbor rr remote-as 64500 | ||
neighbor rr update-source lo | ||
bgp listen range 192.0.2.0/24 peer-group rr | ||
! | ||
address-family ipv4 unicast | ||
neighbor rr addpath-tx-all-paths | ||
neighbor rr route-reflector-client | ||
exit-address-family | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
hostname r3 | ||
interface lo | ||
ip router isis 1 | ||
isis passive | ||
! | ||
interface r3-eth0 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r3-eth1 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r3-eth2 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r3-eth3 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r3-eth4 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r3-eth5 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
router isis 1 | ||
net 49.0123.6452.0003.00 | ||
is-type level-2-only | ||
mpls-te on | ||
segment-routing on | ||
segment-routing global-block 16000 17000 | ||
segment-routing node-msd 10 | ||
segment-routing prefix 192.0.2.3/32 index 3 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
log stdout | ||
interface lo | ||
ip address 192.0.2.3/32 | ||
! | ||
interface r3-eth0 | ||
ip address 172.31.0.3/24 | ||
! | ||
interface r3-eth1 | ||
ip address 172.31.4.3/24 | ||
! | ||
interface r3-eth2 | ||
ip address 172.31.5.3/24 | ||
! | ||
interface r3-eth3 | ||
ip address 172.31.14.3/24 | ||
! | ||
interface r3-eth4 | ||
ip address 172.31.18.3/24 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
hostname r4 | ||
interface lo | ||
ip router isis 1 | ||
isis passive | ||
! | ||
interface r4-eth0 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r4-eth1 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r4-eth2 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r4-eth3 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
router isis 1 | ||
net 49.0123.6452.0004.00 | ||
is-type level-2-only | ||
mpls-te on | ||
segment-routing on | ||
segment-routing global-block 16000 17000 | ||
segment-routing node-msd 10 | ||
segment-routing prefix 192.0.2.4/32 index 4 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
log stdout | ||
interface lo | ||
ip address 192.0.2.4/32 | ||
! | ||
interface r4-eth0 | ||
ip address 172.31.2.4/24 | ||
! | ||
interface r4-eth1 | ||
ip address 172.31.1.4/24 | ||
! | ||
interface r4-eth2 | ||
ip address 172.31.7.4/24 | ||
! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
router bgp 64500 | ||
bgp router-id 192.0.2.5 | ||
no bgp ebgp-requires-policy | ||
neighbor 172.31.12.9 remote-as 64511 | ||
neighbor rrserver peer-group | ||
neighbor rrserver remote-as 64500 | ||
neighbor rrserver update-source lo | ||
neighbor 192.0.2.3 peer-group rrserver | ||
address-family ipv4 unicast | ||
neighbor rrserver next-hop-self | ||
neighbor rrserver addpath-tx-all-paths | ||
exit-address-family | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
hostname r5 | ||
interface lo | ||
ip router isis 1 | ||
isis passive | ||
! | ||
interface r5-eth1 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r5-eth2 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
interface r5-eth3 | ||
ip router isis 1 | ||
isis network point-to-point | ||
! | ||
router isis 1 | ||
net 49.0123.6452.0005.00 | ||
is-type level-2-only | ||
mpls-te on | ||
segment-routing on | ||
segment-routing global-block 16000 17000 | ||
segment-routing node-msd 10 | ||
segment-routing prefix 192.0.2.5/32 index 5 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
log stdout | ||
interface lo | ||
ip address 192.0.2.5/32 | ||
! | ||
interface r5-eth0 | ||
ip address 172.31.12.5/24 | ||
! | ||
interface r5-eth1 | ||
ip address 172.31.4.5/24 | ||
! | ||
interface r5-eth2 | ||
ip address 172.31.7.5/24 | ||
! | ||
interface r5-eth3 | ||
ip address 172.31.16.5/24 | ||
! | ||
interface r5-eth4 | ||
ip address 172.31.19.5/24 | ||
! | ||
|
Oops, something went wrong.