topotests: check r2 vpn table in bgp_vpnv4_noretain

Remove no retain in r2 and check that r2 VPN table remains the same
after r1 configuration changes.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
Louis Scalbert 2023-06-08 14:34:22 +02:00
parent 9aa2e5b1cd
commit 1a2b340892
3 changed files with 98 additions and 3 deletions

View File

@ -6,7 +6,6 @@ router bgp 65500
exit-address-family
address-family ipv4 vpn
neighbor 10.125.0.1 activate
no bgp retain route-target all
exit-address-family
!
router bgp 65500 vrf vrf1
@ -27,8 +26,8 @@ router bgp 65500 vrf vrf2
redistribute connected
label vpn export 202
rd vpn export 192.0.2.2:2
rt vpn both 192.0.2.1:100 192.0.2.2:100 192.0.2.2:200
rt vpn both 192.0.2.2:200
rt vpn import 192.0.2.1:100 192.0.2.2:100 192.0.2.2:200
rt vpn export 192.0.2.2:200
export vpn
import vpn
exit-address-family

View File

@ -0,0 +1,94 @@
{
"vrfId": 0,
"vrfName": "default",
"routerId":"192.0.2.2",
"defaultLocPrf": 100,
"localAS": 65500,
"routes": {
"routeDistinguishers": {
"192.0.2.1:1": {
"10.101.0.0/24": [
{
"valid": true,
"bestpath": true,
"selectionReason": "First path received",
"pathFrom": "internal",
"prefix": "10.101.0.0",
"prefixLen": 24,
"network": "10.101.0.0/24",
"metric": 0,
"locPrf": 100,
"weight": 0,
"peerId": "10.125.0.1",
"path": "",
"origin": "incomplete",
"nexthops": [
{
"ip": "10.125.0.1",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
]
},
"192.0.2.2:1": {
"10.201.0.0/24": [
{
"valid": true,
"bestpath": true,
"selectionReason": "First path received",
"pathFrom": "external",
"network": "10.201.0.0/24",
"prefixLen": 24,
"prefix": "10.201.0.0",
"metric": 0,
"weight": 32768,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"announceNexthopSelf": true,
"nhVrfName": "vrf1",
"nexthops": [
{
"ip": "0.0.0.0",
"hostname": "r2",
"afi": "ipv4",
"used": true
}
]
}
]
},
"192.0.2.2:2": {
"10.202.0.0/24": [
{
"valid": true,
"bestpath": true,
"selectionReason": "First path received",
"pathFrom": "external",
"network": "10.202.0.0/24",
"prefixLen": 24,
"prefix": "10.202.0.0",
"metric": 0,
"weight": 32768,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"announceNexthopSelf": true,
"nhVrfName": "vrf2",
"nexthops": [
{
"ip": "0.0.0.0",
"hostname": "r2",
"afi": "ipv4",
"used": true
}
]
}
]
}
}
}
}

View File

@ -176,6 +176,7 @@ def test_bgp_no_retain_step1():
rname = "r1"
check_show_bgp_ipv4_vpn(rname, "ipv4_vpn_routes_no_retain_init.json")
check_show_bgp_ipv4_vpn("r2", "ipv4_vpn_routes_all.json")
def test_bgp_retain_step2():
@ -198,6 +199,7 @@ router bgp 65500
router.vtysh_cmd(cfg)
check_show_bgp_ipv4_vpn(rname, "ipv4_vpn_routes_all.json")
check_show_bgp_ipv4_vpn("r2", "ipv4_vpn_routes_all.json")
def test_memory_leak():