},
"matchSrc":"1.2.0.0\/16",
"matchDst":"3.4.5.0\/24"
+ },
+ {
+ "sequenceNumber":10,
+ "vrfUnchanged":true,
+ "installed":false,
+ "installedReason":"Valid",
+ "matchSrc":"1.2.0.0\/16",
+ "matchDst":"3.4.5.0\/24"
}
]
},
nexthop 192.168.50.1
!
nexthop-group C
- nexthop 192.168.4.1
- nexthop 192.168.4.2
- nexthop 192.168.4.3
+ nexthop 192.168.4.1 nexthop-vrf vrf-chiyoda
+ nexthop 192.168.4.2 nexthop-vrf vrf-chiyoda
+ nexthop 192.168.4.3 nexthop-vrf vrf-chiyoda
!
nexthop-group D
nexthop c0ff:ee::1
match src-ip 1.2.0.0/16
set nexthop-group B
!
+pbr-map DONNA seq 10
+ match dst-ip 3.4.5.0/24
+ match src-ip 1.2.0.0/16
+ set vrf unchanged
+!
pbr-map AKIHABARA seq 5
+ no set vrf unchanged
match dst-ip 192.168.4.0/24
set nexthop-group C
!
set nexthop-group C
!
pbr-map AKIHABARA seq 15
+ set vrf noexist-vrf
match dst-ip 192.168.4.0/24
set nexthop-group C
no set nexthop-group C
router_list = tgen.routers()
for rname, router in router_list.iteritems():
+ # Install vrf into the kernel and slave eth3
+ router.run("ip link add vrf-chiyoda type vrf table 1000")
+ router.run("ip link set dev {}-eth3 master vrf-chiyoda".format(rname))
+ router.run("ip link set vrf-chiyoda up")
+
router.load_config(
TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
)
for router in router_list:
# Flap interface to see if route-map properties are intact
# Shutdown interface
- dut = "r1"
+
for i in range(5):
intf = "r1-eth{}".format(i)
# Down and back again
- shutdown_bringup_interface(tgen, dut, intf, False)
- shutdown_bringup_interface(tgen, dut, intf, True)
+ shutdown_bringup_interface(tgen, router.name, intf, False)
+ shutdown_bringup_interface(tgen, router.name, intf, True)
intf_file = "{}/{}/pbr-interface.json".format(CWD, router.name)
logger.info(intf_file)