Use the unified configuration for bgp_srv6l3vpn_to_bgp_vrf test.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
+++ /dev/null
-frr defaults traditional
-!
-hostname ce1
-password zebra
-!
-log stdout notifications
-log commands
-log file bgpd.log
--- /dev/null
+frr defaults traditional
+!
+interface eth0
+ ipv6 address 2001:1::2/64
+!
+ip forwarding
+ipv6 forwarding
+!
+ipv6 route ::/0 2001:1::1
+++ /dev/null
-log file zebra.log
-!
-hostname ce1
-!
-interface eth0
- ipv6 address 2001:1::2/64
-!
-ip forwarding
-ipv6 forwarding
-!
-ipv6 route ::/0 2001:1::1
-!
-line vty
-!
+++ /dev/null
-frr defaults traditional
-!
-hostname ce2
-password zebra
-!
-log stdout notifications
-log commands
-log file bgpd.log
--- /dev/null
+frr defaults traditional
+!
+interface eth0
+ ipv6 address 2001:2::2/64
+!
+ip forwarding
+ipv6 forwarding
+!
+ipv6 route ::/0 2001:2::1
+++ /dev/null
-log file zebra.log
-!
-hostname ce2
-!
-interface eth0
- ipv6 address 2001:2::2/64
-!
-ip forwarding
-ipv6 forwarding
-!
-ipv6 route ::/0 2001:2::1
-!
-line vty
-!
+++ /dev/null
-frr defaults traditional
-!
-hostname ce3
-password zebra
-!
-log stdout notifications
-log commands
-log file bgpd.log
--- /dev/null
+frr defaults traditional
+!
+interface eth0
+ ipv6 address 2001:3::2/64
+!
+ip forwarding
+ipv6 forwarding
+!
+ipv6 route ::/0 2001:3::1
+++ /dev/null
-log file zebra.log
-!
-hostname ce3
-!
-interface eth0
- ipv6 address 2001:3::2/64
-!
-ip forwarding
-ipv6 forwarding
-!
-ipv6 route ::/0 2001:3::1
-!
-line vty
-!
+++ /dev/null
-frr defaults traditional
-!
-hostname ce4
-password zebra
-!
-log stdout notifications
-log commands
-log file bgpd.log
--- /dev/null
+frr defaults traditional
+!
+interface eth0
+ ipv6 address 2001:4::2/64
+!
+ip forwarding
+ipv6 forwarding
+!
+ipv6 route ::/0 2001:4::1
+++ /dev/null
-log file zebra.log
-!
-hostname ce4
-!
-interface eth0
- ipv6 address 2001:4::2/64
-!
-ip forwarding
-ipv6 forwarding
-!
-ipv6 route ::/0 2001:4::1
-!
-line vty
-!
+++ /dev/null
-frr defaults traditional
-!
-hostname ce5
-password zebra
-!
-log stdout notifications
-log commands
-log file bgpd.log
--- /dev/null
+frr defaults traditional
+!
+interface eth0
+ ipv6 address 2001:5::2/64
+!
+ip forwarding
+ipv6 forwarding
+!
+ipv6 route ::/0 2001:5::1
+++ /dev/null
-log file zebra.log
-!
-hostname ce5
-!
-interface eth0
- ipv6 address 2001:5::2/64
-!
-ip forwarding
-ipv6 forwarding
-!
-ipv6 route ::/0 2001:5::1
-!
-line vty
-!
+++ /dev/null
-frr defaults traditional
-!
-hostname ce6
-password zebra
-!
-log stdout notifications
-log commands
-log file bgpd.log
--- /dev/null
+frr defaults traditional
+!
+interface eth0
+ ipv6 address 2001:6::2/64
+!
+ip forwarding
+ipv6 forwarding
+!
+ipv6 route ::/0 2001:6::1
+++ /dev/null
-log file zebra.log
-!
-hostname ce6
-!
-interface eth0
- ipv6 address 2001:6::2/64
-!
-ip forwarding
-ipv6 forwarding
-!
-ipv6 route ::/0 2001:6::1
-!
-line vty
-!
+++ /dev/null
-frr defaults traditional
-!
-bgp send-extra-data zebra
-!
-hostname r1
-password zebra
-!
-log stdout notifications
-log commands
-!
-!debug bgp neighbor-events
-!debug bgp zebra
-!debug bgp vnc verbose
-!debug bgp update-groups
-!debug bgp updates in
-!debug bgp updates out
-!debug bgp vpn label
-!debug bgp vpn leak-from-vrf
-!debug bgp vpn leak-to-vrf
-!debug bgp vpn rmap-event
-!
-router bgp 1
- bgp router-id 1.1.1.1
- no bgp ebgp-requires-policy
- no bgp default ipv4-unicast
- neighbor 2001::2 remote-as 2
- neighbor 2001::2 timers 3 10
- neighbor 2001::2 timers connect 1
- !
- address-family ipv6 vpn
- neighbor 2001::2 activate
- exit-address-family
- !
- segment-routing srv6
- locator loc1
- !
-!
-router bgp 1 vrf vrf10
- bgp router-id 1.1.1.1
- no bgp ebgp-requires-policy
- no bgp default ipv4-unicast
- !
- address-family ipv6 unicast
- sid vpn export auto
- rd vpn export 1:10
- rt vpn both 99:99
- import vpn
- export vpn
- redistribute connected
- exit-address-family
-!
-router bgp 1 vrf vrf20
- bgp router-id 1.1.1.1
- no bgp ebgp-requires-policy
- no bgp default ipv4-unicast
- !
- address-family ipv6 unicast
- sid vpn export auto
- rd vpn export 1:20
- rt vpn both 88:88
- import vpn
- export vpn
- redistribute connected
- exit-address-family
-!
--- /dev/null
+! debug zebra packet
+! debug zebra dplane
+! debug zebra kernel
+! debug bgp neighbor-events
+! debug bgp zebra
+! debug bgp vnc verbose
+! debug bgp update-groups
+! debug bgp updates in
+! debug bgp updates out
+! debug bgp vpn label
+! debug bgp vpn leak-from-vrf
+! debug bgp vpn leak-to-vrf
+! debug bgp vpn rmap-event
+!
+interface eth0
+ ipv6 address 2001::1/64
+!
+interface eth1 vrf vrf10
+ ipv6 address 2001:1::1/64
+!
+interface eth2 vrf vrf10
+ ipv6 address 2001:3::1/64
+!
+interface eth3 vrf vrf20
+ ipv6 address 2001:5::1/64
+!
+segment-routing
+ srv6
+ locators
+ locator loc1
+ prefix 2001:db8:1:1::/64 func-bits 8
+ !
+ !
+!
+ip forwarding
+ipv6 forwarding
+!
+ipv6 route 2001:db8:2:1::/64 2001::2
+ipv6 route 2001:db8:2:2::/64 2001::2
+ipv6 route 2001:db8:2:3::/64 2001::2
+!
+line vty
+!
+router bgp 1
+ bgp router-id 1.1.1.1
+ no bgp ebgp-requires-policy
+ no bgp default ipv4-unicast
+ neighbor 2001::2 remote-as 2
+ neighbor 2001::2 timers 3 10
+ neighbor 2001::2 timers connect 1
+ !
+ address-family ipv6 vpn
+ neighbor 2001::2 activate
+ exit-address-family
+ !
+ segment-routing srv6
+ locator loc1
+ !
+!
+router bgp 1 vrf vrf10
+ bgp router-id 1.1.1.1
+ no bgp ebgp-requires-policy
+ no bgp default ipv4-unicast
+ !
+ address-family ipv6 unicast
+ sid vpn export auto
+ rd vpn export 1:10
+ rt vpn both 99:99
+ import vpn
+ export vpn
+ redistribute connected
+ exit-address-family
+!
+router bgp 1 vrf vrf20
+ bgp router-id 1.1.1.1
+ no bgp ebgp-requires-policy
+ no bgp default ipv4-unicast
+ !
+ address-family ipv6 unicast
+ sid vpn export auto
+ rd vpn export 1:20
+ rt vpn both 88:88
+ import vpn
+ export vpn
+ redistribute connected
+ exit-address-family
+!
+++ /dev/null
-log file zebra.log
-!
-hostname r1
-password zebra
-!
-log stdout notifications
-log commands
-!
-! debug zebra packet
-! debug zebra dplane
-! debug zebra kernel
-!
-interface eth0
- ipv6 address 2001::1/64
-!
-interface eth1 vrf vrf10
- ipv6 address 2001:1::1/64
-!
-interface eth2 vrf vrf10
- ipv6 address 2001:3::1/64
-!
-interface eth3 vrf vrf20
- ipv6 address 2001:5::1/64
-!
-segment-routing
- srv6
- locators
- locator loc1
- prefix 2001:db8:1:1::/64 func-bits 8
- !
- !
-!
-ip forwarding
-ipv6 forwarding
-!
-ipv6 route 2001:db8:2:1::/64 2001::2
-ipv6 route 2001:db8:2:2::/64 2001::2
-ipv6 route 2001:db8:2:3::/64 2001::2
-!
-line vty
-!
+++ /dev/null
-frr defaults traditional
-!
-bgp send-extra-data zebra
-!
-hostname r2
-password zebra
-!
-log stdout notifications
-log commands
-!
-!debug bgp neighbor-events
-!debug bgp zebra
-!debug bgp vnc verbose
-!debug bgp update-groups
-!debug bgp updates in
-!debug bgp updates out
-!debug bgp updates
-!debug bgp vpn label
-!debug bgp vpn leak-from-vrf
-!debug bgp vpn leak-to-vrf
-!debug bgp vpn rmap-event
-!
-router bgp 2
- bgp router-id 2.2.2.2
- no bgp ebgp-requires-policy
- no bgp default ipv4-unicast
- neighbor 2001::1 remote-as 1
- neighbor 2001::1 timers 3 10
- neighbor 2001::1 timers connect 1
- !
- address-family ipv6 vpn
- neighbor 2001::1 activate
- exit-address-family
- !
- segment-routing srv6
- locator loc1
- !
-!
-router bgp 2 vrf vrf10
- bgp router-id 2.2.2.2
- no bgp ebgp-requires-policy
- no bgp default ipv4-unicast
- !
- address-family ipv6 unicast
- sid vpn export auto
- rd vpn export 2:10
- rt vpn both 99:99
- import vpn
- export vpn
- redistribute connected
- exit-address-family
-!
-router bgp 2 vrf vrf20
- bgp router-id 2.2.2.2
- no bgp ebgp-requires-policy
- no bgp default ipv4-unicast
- !
- address-family ipv6 unicast
- sid vpn export auto
- rd vpn export 2:20
- rt vpn both 88:88
- import vpn
- export vpn
- redistribute connected
- exit-address-family
-!
--- /dev/null
+! debug zebra packet
+! debug zebra dplane
+! debug zebra kernel
+! debug bgp neighbor-events
+! debug bgp zebra
+! debug bgp vnc verbose
+! debug bgp update-groups
+! debug bgp updates in
+! debug bgp updates out
+! debug bgp updates
+! debug bgp vpn label
+! debug bgp vpn leak-from-vrf
+! debug bgp vpn leak-to-vrf
+! debug bgp vpn rmap-event
+!
+interface eth0
+ ipv6 address 2001::2/64
+!
+interface eth1 vrf vrf10
+ ipv6 address 2001:2::1/64
+!
+interface eth2 vrf vrf20
+ ipv6 address 2001:4::1/64
+!
+interface eth3 vrf vrf20
+ ipv6 address 2001:6::1/64
+!
+segment-routing
+ srv6
+ locators
+ locator loc1
+ prefix 2001:db8:2:2::/64 func-bits 8
+ !
+ !
+!
+ip forwarding
+ipv6 forwarding
+!
+ipv6 route 2001:db8:1:1::/64 2001::1
+ipv6 route 2001:db8:1:2::/64 2001::1
+ipv6 route 2001:db8:1:3::/64 2001::1
+!
+line vty
+!
+router bgp 2
+ bgp router-id 2.2.2.2
+ no bgp ebgp-requires-policy
+ no bgp default ipv4-unicast
+ neighbor 2001::1 remote-as 1
+ neighbor 2001::1 timers 3 10
+ neighbor 2001::1 timers connect 1
+ !
+ address-family ipv6 vpn
+ neighbor 2001::1 activate
+ exit-address-family
+ !
+ segment-routing srv6
+ locator loc1
+ !
+!
+router bgp 2 vrf vrf10
+ bgp router-id 2.2.2.2
+ no bgp ebgp-requires-policy
+ no bgp default ipv4-unicast
+ !
+ address-family ipv6 unicast
+ sid vpn export auto
+ rd vpn export 2:10
+ rt vpn both 99:99
+ import vpn
+ export vpn
+ redistribute connected
+ exit-address-family
+!
+router bgp 2 vrf vrf20
+ bgp router-id 2.2.2.2
+ no bgp ebgp-requires-policy
+ no bgp default ipv4-unicast
+ !
+ address-family ipv6 unicast
+ sid vpn export auto
+ rd vpn export 2:20
+ rt vpn both 88:88
+ import vpn
+ export vpn
+ redistribute connected
+ exit-address-family
+!
+++ /dev/null
-log file zebra.log
-!
-hostname r2
-password zebra
-!
-log stdout notifications
-log commands
-!
-! debug zebra packet
-! debug zebra dplane
-! debug zebra kernel
-!
-interface eth0
- ipv6 address 2001::2/64
-!
-interface eth1 vrf vrf10
- ipv6 address 2001:2::1/64
-!
-interface eth2 vrf vrf20
- ipv6 address 2001:4::1/64
-!
-interface eth3 vrf vrf20
- ipv6 address 2001:6::1/64
-!
-segment-routing
- srv6
- locators
- locator loc1
- prefix 2001:db8:2:2::/64 func-bits 8
- !
- !
-!
-ip forwarding
-ipv6 forwarding
-!
-ipv6 route 2001:db8:1:1::/64 2001::1
-ipv6 route 2001:db8:1:2::/64 2001::1
-ipv6 route 2001:db8:1:3::/64 2001::1
-!
-line vty
-!
tgen.start_topology()
router_list = tgen.routers()
for rname, router in tgen.routers().items():
- if os.path.exists("{}/{}/setup.sh".format(CWD, rname)):
- router.run("/bin/bash {}/{}/setup.sh".format(CWD, rname))
- router.load_config(
- TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
- )
- router.load_config(
- TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname))
- )
+ logger.info("Loading router %s" % rname)
+ router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)))
tgen.gears["r1"].run("ip link add vrf10 type vrf table 10")
tgen.gears["r1"].run("ip link set vrf10 up")