mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 03:28:31 +00:00
topotests: vpnv4 route leaking with import-check
Test vpnv4 route leaking with import-check Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
14e51be394
commit
fb777555d3
@ -165,6 +165,8 @@ def ltemplatePreRouterStartHook():
|
|||||||
cmds = [
|
cmds = [
|
||||||
"ip link add {0}-cust4 type vrf table 30",
|
"ip link add {0}-cust4 type vrf table 30",
|
||||||
"ip link set dev {0}-cust4 up",
|
"ip link set dev {0}-cust4 up",
|
||||||
|
"ip link add {0}-cust5 type vrf table 40",
|
||||||
|
"ip link set dev {0}-cust5 up",
|
||||||
]
|
]
|
||||||
rtr = "r1"
|
rtr = "r1"
|
||||||
for cmd in cmds:
|
for cmd in cmds:
|
||||||
|
@ -64,5 +64,17 @@ router bgp 5227 vrf r1-cust4
|
|||||||
import vpn
|
import vpn
|
||||||
export vpn
|
export vpn
|
||||||
exit-address-family
|
exit-address-family
|
||||||
!
|
|
||||||
end
|
router bgp 5227 vrf r1-cust5
|
||||||
|
bgp router-id 192.168.1.1
|
||||||
|
|
||||||
|
address-family ipv4 unicast
|
||||||
|
network 172.16.1.1/32
|
||||||
|
|
||||||
|
label vpn export 105
|
||||||
|
rd vpn export 10:15
|
||||||
|
rt vpn both 52:100
|
||||||
|
|
||||||
|
import vpn
|
||||||
|
export vpn
|
||||||
|
exit-address-family
|
||||||
|
@ -18,6 +18,10 @@ interface r1-eth4
|
|||||||
ip address 192.168.1.1/24
|
ip address 192.168.1.1/24
|
||||||
no link-detect
|
no link-detect
|
||||||
|
|
||||||
|
interface r1-cust5
|
||||||
|
ip address 172.16.1.1/32
|
||||||
|
no link-detect
|
||||||
|
|
||||||
ip forwarding
|
ip forwarding
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ want_r1_cust1_routes = [
|
|||||||
{"p": "6.0.1.0/24", "n": "99.0.0.1"},
|
{"p": "6.0.1.0/24", "n": "99.0.0.1"},
|
||||||
{"p": "6.0.2.0/24", "n": "99.0.0.1"},
|
{"p": "6.0.2.0/24", "n": "99.0.0.1"},
|
||||||
{"p": "172.16.0.0/24", "n": "0.0.0.0", "bp": True},
|
{"p": "172.16.0.0/24", "n": "0.0.0.0", "bp": True},
|
||||||
|
{"p": "172.16.1.1/32", "n": "0.0.0.0", "bp": True},
|
||||||
{"p": "99.0.0.1/32", "n": "192.168.1.2"},
|
{"p": "99.0.0.1/32", "n": "192.168.1.2"},
|
||||||
]
|
]
|
||||||
bgpribRequireUnicastRoutes(
|
bgpribRequireUnicastRoutes(
|
||||||
@ -73,6 +74,13 @@ bgpribRequireUnicastRoutes(
|
|||||||
"r1", "ipv4", "r1-cust4", "Customer 4 routes in r1 vrf", want_r1_cust4_routes
|
"r1", "ipv4", "r1-cust4", "Customer 4 routes in r1 vrf", want_r1_cust4_routes
|
||||||
)
|
)
|
||||||
|
|
||||||
|
want_r1_cust5_routes = [
|
||||||
|
{"p": "172.16.1.1/32", "n": "0.0.0.0", "bp": True},
|
||||||
|
]
|
||||||
|
bgpribRequireUnicastRoutes(
|
||||||
|
"r1", "ipv4", "r1-cust5", "Customer 5 routes in r1 vrf", want_r1_cust5_routes
|
||||||
|
)
|
||||||
|
|
||||||
want_r3_cust1_routes = [
|
want_r3_cust1_routes = [
|
||||||
{"p": "5.1.0.0/24", "n": "99.0.0.2"},
|
{"p": "5.1.0.0/24", "n": "99.0.0.2"},
|
||||||
{"p": "5.1.1.0/24", "n": "99.0.0.2"},
|
{"p": "5.1.1.0/24", "n": "99.0.0.2"},
|
||||||
@ -675,7 +683,7 @@ bgpribRequireUnicastRoutes(
|
|||||||
luCommand(
|
luCommand(
|
||||||
"ce1",
|
"ce1",
|
||||||
'vtysh -c "show bgp ipv4 uni"',
|
'vtysh -c "show bgp ipv4 uni"',
|
||||||
"13 routes and 13",
|
"14 routes and 14",
|
||||||
"wait",
|
"wait",
|
||||||
"Local and remote routes",
|
"Local and remote routes",
|
||||||
10,
|
10,
|
||||||
@ -697,7 +705,7 @@ bgpribRequireUnicastRoutes(
|
|||||||
luCommand(
|
luCommand(
|
||||||
"ce2",
|
"ce2",
|
||||||
'vtysh -c "show bgp ipv4 uni"',
|
'vtysh -c "show bgp ipv4 uni"',
|
||||||
"13 routes and 16",
|
"14 routes and 17",
|
||||||
"wait",
|
"wait",
|
||||||
"Local and remote routes",
|
"Local and remote routes",
|
||||||
10,
|
10,
|
||||||
@ -729,7 +737,7 @@ luCommand("r4", 'vtysh -c "show ip route vrf r4-cust2"')
|
|||||||
luCommand(
|
luCommand(
|
||||||
"ce3",
|
"ce3",
|
||||||
'vtysh -c "show bgp ipv4 uni"',
|
'vtysh -c "show bgp ipv4 uni"',
|
||||||
"13 routes and 14",
|
"14 routes and 15",
|
||||||
"wait",
|
"wait",
|
||||||
"Local and remote routes",
|
"Local and remote routes",
|
||||||
10,
|
10,
|
||||||
@ -751,7 +759,7 @@ bgpribRequireUnicastRoutes(
|
|||||||
luCommand(
|
luCommand(
|
||||||
"ce4",
|
"ce4",
|
||||||
'vtysh -c "show bgp vrf ce4-cust2 ipv4 uni"',
|
'vtysh -c "show bgp vrf ce4-cust2 ipv4 uni"',
|
||||||
"13 routes and 15",
|
"14 routes and 16",
|
||||||
"wait",
|
"wait",
|
||||||
"Local and remote routes",
|
"Local and remote routes",
|
||||||
10,
|
10,
|
||||||
|
@ -49,7 +49,7 @@ if ret != False and found != None:
|
|||||||
luCommand(
|
luCommand(
|
||||||
rtr,
|
rtr,
|
||||||
'vtysh -c "show bgp ipv4 uni" | grep Display',
|
'vtysh -c "show bgp ipv4 uni" | grep Display',
|
||||||
" 13 route",
|
" 14 route",
|
||||||
"wait",
|
"wait",
|
||||||
"BGP routes removed",
|
"BGP routes removed",
|
||||||
wait,
|
wait,
|
||||||
|
Loading…
Reference in New Issue
Block a user