-
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_vpnv4_gr graceful restart test
This test creates a BGP peering with 2 VPNv4 routes that became staled after the link between the peering becomes down. - One test checks that the routes are removed on the BGP listener. Then the recovery re-adds the routes. - The other test removes one of the two received routes, after the link is down. Then a recovery happens. The expecation is that the removed route is removed from the BGP listener, while the maintained route is kept. Signed-off-by: Philippe Guibert <[email protected]>
- Loading branch information
1 parent
5b41a0e
commit 4665bd4
Showing
7 changed files
with
568 additions
and
0 deletions.
There are no files selected for viewing
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,37 @@ | ||
{ | ||
"vrfName": "vrf1", | ||
"localAS": 65500, | ||
"routes": | ||
{ | ||
"172.31.0.10/32": [ | ||
{ | ||
"prefix": "172.31.0.10", | ||
"prefixLen": 32, | ||
"network": "172.31.0.10\/32", | ||
"nhVrfName": "default", | ||
"nexthops": [ | ||
{ | ||
"ip": "192.168.0.2", | ||
"afi": "ipv4", | ||
"used": true | ||
} | ||
] | ||
} | ||
], | ||
"172.31.1.10/32": [ | ||
{ | ||
"prefix": "172.31.1.10", | ||
"prefixLen": 32, | ||
"network": "172.31.1.10\/32", | ||
"nhVrfName": "default", | ||
"nexthops": [ | ||
{ | ||
"ip": "192.168.0.2", | ||
"afi": "ipv4", | ||
"used": true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
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,52 @@ | ||
{ | ||
"vrfName":"default", | ||
"routerId":"192.0.2.1", | ||
"defaultLocPrf":100, | ||
"localAS":65500, | ||
"routes":{ | ||
"routeDistinguishers":{ | ||
"444:2":{ | ||
"172.31.0.10/32":[ | ||
{ | ||
"valid":true, | ||
"bestpath":true, | ||
"selectionReason":"First path received", | ||
"pathFrom":"external", | ||
"prefix":"172.31.0.10", | ||
"prefixLen":32, | ||
"network":"172.31.0.10\/32", | ||
"peerId":"192.168.0.2", | ||
"nexthops":[ | ||
{ | ||
"ip":"192.168.0.2", | ||
"afi":"ipv4", | ||
"used":true | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"444:2":{ | ||
"172.31.1.10/32":[ | ||
{ | ||
"valid":true, | ||
"bestpath":true, | ||
"selectionReason":"First path received", | ||
"pathFrom":"external", | ||
"prefix":"172.31.1.10", | ||
"prefixLen":32, | ||
"network":"172.31.1.10\/32", | ||
"peerId":"192.168.0.2", | ||
"nexthops":[ | ||
{ | ||
"ip":"192.168.0.2", | ||
"afi":"ipv4", | ||
"used":true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
router bgp 65500 | ||
bgp router-id 192.0.2.1 | ||
no bgp ebgp-requires-policy | ||
neighbor 192.168.0.2 remote-as 65501 | ||
neighbor 192.168.0.2 timers 10 30 | ||
address-family ipv4 unicast | ||
no neighbor 192.168.0.2 activate | ||
exit-address-family | ||
address-family ipv4 vpn | ||
neighbor 192.168.0.2 activate | ||
exit-address-family | ||
! | ||
router bgp 65500 vrf vrf1 | ||
bgp router-id 192.0.2.1 | ||
address-family ipv4 unicast | ||
label vpn export 101 | ||
rd vpn export 444:1 | ||
rt vpn both 52:100 | ||
export vpn | ||
import vpn | ||
exit-address-family | ||
! | ||
interface r1-eth0 | ||
mpls bgp forwarding | ||
! |
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 vrf vrf1 | ||
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,29 @@ | ||
router bgp 65501 | ||
bgp router-id 192.0.2.2 | ||
bgp graceful-restart restart-time 15 | ||
bgp graceful-restart | ||
no bgp ebgp-requires-policy | ||
neighbor 192.168.0.1 remote-as 65500 | ||
neighbor 192.168.0.1 timers 10 30 | ||
neighbor 192.168.0.1 timers connect 5 | ||
address-family ipv4 unicast | ||
no neighbor 192.168.0.1 activate | ||
exit-address-family | ||
address-family ipv4 vpn | ||
neighbor 192.168.0.1 activate | ||
exit-address-family | ||
! | ||
router bgp 65501 vrf vrf1 | ||
bgp router-id 192.0.2.2 | ||
address-family ipv4 unicast | ||
redistribute connected | ||
label vpn export 102 | ||
rd vpn export 444:2 | ||
rt vpn both 52:100 | ||
export vpn | ||
import vpn | ||
exit-address-family | ||
! | ||
interface r2-eth0 | ||
mpls bgp forwarding | ||
! |
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 r2-eth2 vrf vrf1 | ||
ip address 172.31.1.10/32 | ||
! | ||
interface r2-eth1 vrf vrf1 | ||
ip address 172.31.0.10/32 | ||
! | ||
interface r2-eth0 | ||
ip address 192.168.0.2/24 | ||
! |
Oops, something went wrong.