-
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
b23a162
commit 021fd55
Showing
9 changed files
with
483 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 | ||
! |
71 changes: 71 additions & 0 deletions
71
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,71 @@ | ||
{ | ||
"172.31.0.2/32": [ | ||
{ | ||
"prefix": "172.31.0.2/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", | ||
"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", | ||
"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 | ||
} | ||
] | ||
} | ||
] | ||
} |
48 changes: 48 additions & 0 deletions
48
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,48 @@ | ||
{ | ||
"172.31.0.2/32": [ | ||
{ | ||
"prefix": "172.31.0.2/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", | ||
"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 | ||
} | ||
] | ||
} | ||
] | ||
} |
25 changes: 25 additions & 0 deletions
25
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,25 @@ | ||
{ | ||
"172.31.0.2/32": [ | ||
{ | ||
"prefix": "172.31.0.2/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.