-
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_redistribute_table test
There is no test that ensures the test of the 'redistribute table-direct' facility. Add a test that checks that routes created before and after BGP is started, is correctly imported. Signed-off-by: Philippe Guibert <[email protected]>
- Loading branch information
1 parent
8b8adf2
commit 1838537
Showing
9 changed files
with
485 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 65500 | ||
bgp router-id 192.0.2.1 | ||
no bgp ebgp-requires-policy | ||
neighbor 192.168.0.2 remote-as 65501 | ||
address-family ipv4 unicast | ||
neighbor 192.168.0.2 activate | ||
exit-address-family | ||
! |
74 changes: 74 additions & 0 deletions
74
tests/topotests/bgp_redistribute_table/r1/ipv4_routes_with_all_redistribute.json
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,74 @@ | ||
{ | ||
"172.31.0.2/32": [ | ||
{ | ||
"prefix": "172.31.0.2/32", | ||
"prefixLen": 32, | ||
"protocol": "bgp", | ||
"vrfId": 0, | ||
"vrfName": "default", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"fib": true, | ||
"ip": "192.168.0.2", | ||
"afi": "ipv4", | ||
"interfaceName": "r1-eth0", | ||
"active": true, | ||
"weight": 1 | ||
} | ||
] | ||
} | ||
], | ||
"172.31.0.10/32": [ | ||
{ | ||
"prefix": "172.31.0.10/32", | ||
"prefixLen": 32, | ||
"protocol": "bgp", | ||
"vrfId": 0, | ||
"vrfName": "default", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"fib": true, | ||
"ip": "192.168.0.2", | ||
"afi": "ipv4", | ||
"interfaceName": "r1-eth0", | ||
"active": true, | ||
"weight": 1 | ||
} | ||
] | ||
} | ||
], | ||
"172.31.0.15/32": [ | ||
{ | ||
"prefix": "172.31.0.15/32", | ||
"prefixLen": 32, | ||
"protocol": "bgp", | ||
"vrfId": 0, | ||
"vrfName": "default", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"fib": true, | ||
"ip": "192.168.0.2", | ||
"afi": "ipv4", | ||
"interfaceName": "r1-eth0", | ||
"active": true, | ||
"weight": 1 | ||
} | ||
] | ||
} | ||
] | ||
} |
50 changes: 50 additions & 0 deletions
50
tests/topotests/bgp_redistribute_table/r1/ipv4_routes_with_redistribute.json
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,50 @@ | ||
{ | ||
"172.31.0.2/32": [ | ||
{ | ||
"prefix": "172.31.0.2/32", | ||
"prefixLen": 32, | ||
"protocol": "bgp", | ||
"vrfId": 0, | ||
"vrfName": "default", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"fib": true, | ||
"ip": "192.168.0.2", | ||
"afi": "ipv4", | ||
"interfaceName": "r1-eth0", | ||
"active": true, | ||
"weight": 1 | ||
} | ||
] | ||
} | ||
], | ||
"172.31.0.10/32": [ | ||
{ | ||
"prefix": "172.31.0.10/32", | ||
"prefixLen": 32, | ||
"protocol": "bgp", | ||
"vrfId": 0, | ||
"vrfName": "default", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"fib": true, | ||
"ip": "192.168.0.2", | ||
"afi": "ipv4", | ||
"interfaceName": "r1-eth0", | ||
"active": true, | ||
"weight": 1 | ||
} | ||
] | ||
} | ||
] | ||
} |
26 changes: 26 additions & 0 deletions
26
tests/topotests/bgp_redistribute_table/r1/ipv4_routes_without_redistribute.json
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 @@ | ||
{ | ||
"172.31.0.2/32": [ | ||
{ | ||
"prefix": "172.31.0.2/32", | ||
"prefixLen": 32, | ||
"protocol": "bgp", | ||
"vrfId": 0, | ||
"vrfName": "default", | ||
"selected": true, | ||
"destSelected": true, | ||
"distance": 20, | ||
"metric": 0, | ||
"installed": true, | ||
"nexthops": [ | ||
{ | ||
"fib": true, | ||
"ip": "192.168.0.2", | ||
"afi": "ipv4", | ||
"interfaceName": "r1-eth0", | ||
"active": true, | ||
"weight": 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,7 @@ | ||
log stdout | ||
interface r1-eth1 | ||
ip address 172.31.0.1/32 | ||
! | ||
interface r1-eth0 | ||
ip address 192.168.0.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,10 @@ | ||
router bgp 65501 | ||
bgp router-id 192.0.2.2 | ||
no bgp ebgp-requires-policy | ||
neighbor 192.168.0.1 remote-as 65500 | ||
address-family ipv4 unicast | ||
network 172.31.0.2/32 | ||
neighbor 192.168.0.1 activate | ||
redistribute table-direct 2200 | ||
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,8 @@ | ||
log stdout | ||
interface r2-eth0 | ||
ip address 192.168.0.2/24 | ||
! | ||
interface r2-eth1 | ||
ip address 172.31.0.2/32 | ||
ip address 172.31.1.2/24 | ||
! |
Oops, something went wrong.