########################################################################
# nhzero is for the new code that sets nh of locally-leaked routes to 0
-nhzero = 1
-#nhzero = 0
+#nhzero = 1
+nhzero = 0
if nhzero:
luCommand('r1','vtysh -c "show bgp ipv4 vpn"',
else:
luCommand('r1','vtysh -c "show bgp ipv4 vpn"',
- 'Distinguisher: *10:1.*5.1.0.0/24 *1.1.1.1 .*5.1.1.0/24 *1.1.1.1 .*99.0.0.1/32 *1.1.1.1 ',
+ r'Distinguisher: *10:1.*5.1.0.0/24 *99.0.0.1\b.*5.1.1.0/24 *99.0.0.1\b.*99.0.0.1/32 *192.168.1.2\b',
'pass','vrf->vpn routes')
luCommand('r3','vtysh -c "show bgp ipv4 vpn"',
- 'Distinguisher: *10:3.*5.1.0.0/24 *3.3.3.3 .*5.1.1.0/24 *3.3.3.3 .*99.0.0.2/32 *3.3.3.3 ',
+ r'Distinguisher: *10:3.*5.1.0.0/24 *99.0.0.2\b.*5.1.1.0/24 *99.0.0.2\b.*99.0.0.2/32 *192.168.1.2\b',
'pass','vrf->vpn routes')
want = [
- {'rd':'10:41', 'p':'5.1.2.0/24', 'n':'4.4.4.4'},
- {'rd':'10:41', 'p':'5.1.3.0/24', 'n':'4.4.4.4'},
- {'rd':'10:41', 'p':'99.0.0.3/32', 'n':'4.4.4.4'},
+ {'rd':'10:41', 'p':'5.1.2.0/24', 'n':'99.0.0.3'},
+ {'rd':'10:41', 'p':'5.1.3.0/24', 'n':'99.0.0.3'},
+ {'rd':'10:41', 'p':'99.0.0.3/32', 'n':'192.168.1.2'},
- {'rd':'10:42', 'p':'5.4.2.0/24', 'n':'4.4.4.4'},
- {'rd':'10:42', 'p':'5.4.3.0/24', 'n':'4.4.4.4'},
- {'rd':'10:42', 'p':'99.0.0.4/32', 'n':'4.4.4.4'},
+ {'rd':'10:42', 'p':'5.4.2.0/24', 'n':'99.0.0.4'},
+ {'rd':'10:42', 'p':'5.4.3.0/24', 'n':'99.0.0.4'},
+ {'rd':'10:42', 'p':'99.0.0.4/32', 'n':'192.168.2.2'},
]
bgpribRequireVpnRoutes('r4','vrf->vpn routes',want)
# PE routers: VRFs contain routes from remote customer nets
########################################################################
want_r1_remote_cust1_routes = [
- {'p':'5.1.0.0/24', 'n':'0.0.0.0'},
- {'p':'5.1.1.0/24', 'n':'0.0.0.0'},
- {'p':'99.0.0.2/32', 'n':'0.0.0.0'},
+ {'p':'5.1.0.0/24', 'n':'3.3.3.3'},
+ {'p':'5.1.1.0/24', 'n':'3.3.3.3'},
+ {'p':'99.0.0.2/32', 'n':'3.3.3.3'},
- {'p':'5.1.2.0/24', 'n':'0.0.0.0'},
- {'p':'5.1.3.0/24', 'n':'0.0.0.0'},
- {'p':'99.0.0.3/32', 'n':'0.0.0.0'},
+ {'p':'5.1.2.0/24', 'n':'4.4.4.4'},
+ {'p':'5.1.3.0/24', 'n':'4.4.4.4'},
+ {'p':'99.0.0.3/32', 'n':'4.4.4.4'},
- {'p':'5.4.2.0/24', 'n':'0.0.0.0'},
- {'p':'5.4.3.0/24', 'n':'0.0.0.0'},
- {'p':'99.0.0.3/32', 'n':'0.0.0.0'},
+ {'p':'5.4.2.0/24', 'n':'4.4.4.4'},
+ {'p':'5.4.3.0/24', 'n':'4.4.4.4'},
+ {'p':'99.0.0.3/32', 'n':'4.4.4.4'},
]
bgpribRequireUnicastRoutes('r1','ipv4','r1-cust1','Customer 1 routes in r1 vrf',want_r1_remote_cust1_routes)
want_r3_remote_cust1_routes = [
- {'p':'5.1.0.0/24', 'n':'0.0.0.0'},
- {'p':'5.1.1.0/24', 'n':'0.0.0.0'},
- {'p':'99.0.0.1/32', 'n':'0.0.0.0'},
+ {'p':'5.1.0.0/24', 'n':'1.1.1.1'},
+ {'p':'5.1.1.0/24', 'n':'1.1.1.1'},
+ {'p':'99.0.0.1/32', 'n':'1.1.1.1'},
- {'p':'5.1.2.0/24', 'n':'0.0.0.0'},
- {'p':'5.1.3.0/24', 'n':'0.0.0.0'},
- {'p':'99.0.0.3/32', 'n':'0.0.0.0'},
+ {'p':'5.1.2.0/24', 'n':'4.4.4.4'},
+ {'p':'5.1.3.0/24', 'n':'4.4.4.4'},
+ {'p':'99.0.0.3/32', 'n':'4.4.4.4'},
- {'p':'5.4.2.0/24', 'n':'0.0.0.0'},
- {'p':'5.4.3.0/24', 'n':'0.0.0.0'},
- {'p':'99.0.0.3/32', 'n':'0.0.0.0'},
+ {'p':'5.4.2.0/24', 'n':'4.4.4.4'},
+ {'p':'5.4.3.0/24', 'n':'4.4.4.4'},
+ {'p':'99.0.0.3/32', 'n':'4.4.4.4'},
]
bgpribRequireUnicastRoutes('r3','ipv4','r3-cust1','Customer 1 routes in r3 vrf',want_r3_remote_cust1_routes)
want_r4_remote_cust1_routes = [
- {'p':'5.1.0.0/24', 'n':'0.0.0.0'},
- {'p':'5.1.1.0/24', 'n':'0.0.0.0'},
- {'p':'99.0.0.1/32', 'n':'0.0.0.0'},
- {'p':'99.0.0.2/32', 'n':'0.0.0.0'},
+ {'p':'5.1.0.0/24', 'n':'1.1.1.1'},
+ {'p':'5.1.1.0/24', 'n':'1.1.1.1'},
+ {'p':'5.1.0.0/24', 'n':'3.3.3.3'},
+ {'p':'5.1.1.0/24', 'n':'3.3.3.3'},
+ {'p':'99.0.0.1/32', 'n':'1.1.1.1'},
+ {'p':'99.0.0.2/32', 'n':'3.3.3.3'},
]
bgpribRequireUnicastRoutes('r4','ipv4','r4-cust1','Customer 1 routes in r4 vrf',want_r4_remote_cust1_routes)
want_r4_remote_cust2_routes = [
- {'p':'5.1.0.0/24', 'n':'0.0.0.0'},
- {'p':'5.1.1.0/24', 'n':'0.0.0.0'},
- {'p':'99.0.0.1/32', 'n':'0.0.0.0'},
- {'p':'99.0.0.2/32', 'n':'0.0.0.0'},
+ {'p':'5.1.0.0/24', 'n':'1.1.1.1'},
+ {'p':'5.1.1.0/24', 'n':'1.1.1.1'},
+ {'p':'5.1.0.0/24', 'n':'3.3.3.3'},
+ {'p':'5.1.1.0/24', 'n':'3.3.3.3'},
+ {'p':'99.0.0.1/32', 'n':'1.1.1.1'},
+ {'p':'99.0.0.2/32', 'n':'3.3.3.3'},
]
bgpribRequireUnicastRoutes('r4','ipv4','r4-cust2','Customer 2 routes in r4 vrf',want_r4_remote_cust2_routes)
]
bgpribRequireUnicastRoutes('ce2','ipv4','','Cust 1 routes from remote',want)
-want = [
- {'p':'5.1.0.0/24', 'n':'192.168.1.1'},
- {'p':'5.1.1.0/24', 'n':'192.168.1.1'},
- {'p':'5.4.2.0/24', 'n':'192.168.1.1'},
- {'p':'5.4.3.0/24', 'n':'192.168.1.1'},
-]
-bgpribRequireUnicastRoutes('ce3','ipv4','','Cust 1 routes from remote',want)
-
-want = [
- {'p':'5.1.0.0/24', 'n':'192.168.2.1'},
- {'p':'5.1.1.0/24', 'n':'192.168.2.1'},
- {'p':'5.1.2.0/24', 'n':'192.168.2.1'},
- {'p':'5.1.3.0/24', 'n':'192.168.2.1'},
-]
-bgpribRequireUnicastRoutes('ce4','ipv4','','Cust 2 routes from remote',want)
+# Requires bvl-bug-degenerate-no-label fix
+# want = [
+# {'p':'5.1.0.0/24', 'n':'192.168.1.1'},
+# {'p':'5.1.1.0/24', 'n':'192.168.1.1'},
+# {'p':'5.4.2.0/24', 'n':'192.168.1.1'},
+# {'p':'5.4.3.0/24', 'n':'192.168.1.1'},
+# ]
+# bgpribRequireUnicastRoutes('ce3','ipv4','','Cust 1 routes from remote',want)
+#
+# want = [
+# {'p':'5.1.0.0/24', 'n':'192.168.2.1'},
+# {'p':'5.1.1.0/24', 'n':'192.168.2.1'},
+# {'p':'5.1.2.0/24', 'n':'192.168.2.1'},
+# {'p':'5.1.3.0/24', 'n':'192.168.2.1'},
+# ]
+# bgpribRequireUnicastRoutes('ce4','ipv4','','Cust 2 routes from remote',want)