Skip to content

Commit

Permalink
tests: an srv6 sid reachability use-case
Browse files Browse the repository at this point in the history
Verify that SRv6 SID becomes unreachable and
further the IPv4 route in L3VPN becomes invalid.

Signed-off-by: Dmytro Shytyi <[email protected]>
  • Loading branch information
dmytroshytyi-6WIND committed Jan 30, 2024
1 parent b3ac502 commit 5101463
Show file tree
Hide file tree
Showing 28 changed files with 498 additions and 0 deletions.
Empty file.
4 changes: 4 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c11/staticd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!
ip route 0.0.0.0/0 192.168.1.254
ipv6 route ::/0 2001:1::ffff
!
6 changes: 6 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c11/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hostname c11
!
interface eth0
ip address 192.168.1.1/24
ipv6 address 2001:1::1/64
!
Empty file.
4 changes: 4 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c12/staticd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!
ip route 0.0.0.0/0 192.168.1.254
ipv6 route ::/0 2001:1::ffff
!
6 changes: 6 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c12/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hostname c12
!
interface eth0
ip address 192.168.1.1/24
ipv6 address 2001:1::1/64
!
Empty file.
4 changes: 4 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c21/staticd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!
ip route 0.0.0.0/0 192.168.2.254
ipv6 route ::/0 2001:2::ffff
!
6 changes: 6 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c21/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hostname c21
!
interface eth0
ip address 192.168.2.1/24
ipv6 address 2001:2::1/64
!
Empty file.
5 changes: 5 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c22/staticd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

!
ip route 0.0.0.0/0 192.168.2.254
ipv6 route ::/0 2001:2::ffff
!
9 changes: 9 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c22/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
hostname c22
!
interface eth0
ip address 192.168.2.1/24
ipv6 address 2001:2::1/64
!
ip route 0.0.0.0/0 192.168.2.254
ipv6 route ::/0 2001:2::ffff
!
Empty file.
4 changes: 4 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c31/staticd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!
ip route 0.0.0.0/0 192.168.3.254
ipv6 route ::/0 2001:3::ffff
!
6 changes: 6 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c31/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hostname c31
!
interface eth0
ip address 192.168.3.1/24
ipv6 address 2001:3::1/64
!
Empty file.
4 changes: 4 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c32/staticd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!
ip route 0.0.0.0/0 192.168.3.254
ipv6 route ::/0 2001:3::ffff
!
6 changes: 6 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/c32/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hostname c32
!
interface eth0
ip address 192.168.3.1/24
ipv6 address 2001:3::1/64
!
61 changes: 61 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/r1/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
frr defaults traditional
!
hostname r1
password zebra
!
log commands
!
router bgp 65001
bgp router-id 192.0.2.1
no bgp ebgp-requires-policy
no bgp default ipv4-unicast
neighbor 2001:db8:12::2 remote-as 65002
neighbor 2001:db8:12::2 timers 3 10
neighbor 2001:db8:12::2 timers connect 1
neighbor 2001:db8:12::2 capability extended-nexthop
neighbor 2001:db8:13::3 remote-as 65001
neighbor 2001:db8:13::3 timers 3 10
neighbor 2001:db8:13::3 timers connect 1
neighbor 2001:db8:13::3 capability extended-nexthop
!
segment-routing srv6
locator default
!
address-family ipv4 vpn
neighbor 2001:db8:12::2 activate
neighbor 2001:db8:13::3 activate
exit-address-family
!
!
router bgp 65001 vrf vrf10
bgp router-id 192.0.2.1
!
address-family ipv4 unicast
redistribute connected
sid vpn export 1
rd vpn export 65001:10
rt vpn both 0:10
import vpn
export vpn
exit-address-family
!
!
router bgp 65001 vrf vrf20
bgp router-id 192.0.2.1
!
address-family ipv4 unicast
redistribute connected
sid vpn export 2
rd vpn export 65001:20
rt vpn both 0:20
import vpn
export vpn
exit-address-family
!
!
interface eth0
mpls bgp forwarding
!
interface eth1
mpls bgp forwarding
!
4 changes: 4 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/r1/staticd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!
ipv6 route 2001:db8:2:2::/64 2001:db8:12::2
ipv6 route 2001:db8:3:3::/64 2001:db8:13::3
!
32 changes: 32 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/r1/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
log file zebra.log
!
hostname r1
!
interface lo
ipv6 address 2001:db8:1:1::1/128
!
interface eth0
ipv6 address 2001:db8:12::1/64
!
interface eth1
ipv6 address 2001:db8:13::1/64
!
interface eth2 vrf vrf10
ip address 192.168.1.254/24
!
interface eth3 vrf vrf20
ip address 192.168.1.254/24
!
segment-routing
srv6
locators
locator default
prefix 2001:db8:1:1::/64
!
!
!
ip forwarding
ipv6 forwarding
!
line vty
!
50 changes: 50 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/r2/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
frr defaults traditional
!
hostname r2
password zebra
!
log commands
!
router bgp 65002
bgp router-id 192.0.2.2
no bgp ebgp-requires-policy
no bgp default ipv4-unicast
neighbor 2001:db8:12::1 remote-as 65001
neighbor 2001:db8:12::1 timers 3 10
neighbor 2001:db8:12::1 timers connect 1
neighbor 2001:db8:12::1 capability extended-nexthop
!
segment-routing srv6
locator default
!
address-family ipv4 vpn
neighbor 2001:db8:12::1 activate
exit-address-family
!
!
router bgp 65002 vrf vrf10
bgp router-id 192.0.2.2
!
address-family ipv4 unicast
redistribute connected
sid vpn export 1
rd vpn export 65002:10
rt vpn both 0:10
import vpn
export vpn
exit-address-family
!
!
router bgp 65002 vrf vrf20
bgp router-id 192.0.2.2
!
address-family ipv4 unicast
redistribute connected
sid vpn export 2
rd vpn export 65002:20
rt vpn both 0:20
import vpn
export vpn
exit-address-family
!
!
4 changes: 4 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/r2/staticd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!
ipv6 route 2001:db8:1:1::/64 2001:db8:12::1
ipv6 route 2001:db8:3:3::/64 2001:db8:12::1
!
29 changes: 29 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/r2/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
log file zebra.log
!
hostname r2
!
interface lo
ipv6 address 2001:db8:2:2::1/128
!
interface eth0
ipv6 address 2001:db8:12::2/64
!
interface eth1 vrf vrf10
ip address 192.168.2.254/24
!
interface eth2 vrf vrf20
ip address 192.168.2.254/24
!
segment-routing
srv6
locators
locator default
prefix 2001:db8:2:2::/64
!
!
!
ip forwarding
ipv6 forwarding
!
line vty
!
50 changes: 50 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/r3/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
frr defaults traditional
!
hostname r2
password zebra
!
log commands
!
router bgp 65001
bgp router-id 192.0.2.3
no bgp ebgp-requires-policy
no bgp default ipv4-unicast
neighbor 2001:db8:13::1 remote-as 65001
neighbor 2001:db8:13::1 timers 3 10
neighbor 2001:db8:13::1 timers connect 1
neighbor 2001:db8:13::1 capability extended-nexthop
!
segment-routing srv6
locator default
!
address-family ipv4 vpn
neighbor 2001:db8:13::1 activate
exit-address-family
!
!
router bgp 65001 vrf vrf10
bgp router-id 192.0.2.3
!
address-family ipv4 unicast
redistribute connected
sid vpn export 1
rd vpn export 65001:10
rt vpn both 0:10
import vpn
export vpn
exit-address-family
!
!
router bgp 65001 vrf vrf20
bgp router-id 192.0.2.2
!
address-family ipv4 unicast
redistribute connected
sid vpn export 2
rd vpn export 65001:20
rt vpn both 0:20
import vpn
export vpn
exit-address-family
!
!
6 changes: 6 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/r3/staticd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
!
ipv6 route 2001:db8:12::/64 2001:db8:13::1
!
ipv6 route 2001:db8:1:1::/64 2001:db8:13::1
ipv6 route 2001:db8:2:2::/64 2001:db8:13::1
!
29 changes: 29 additions & 0 deletions tests/topotests/bgp_srv6_sid_reachability/r3/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
log file zebra.log
!
hostname r2
!
interface lo
ipv6 address 2001:db8:3:3::1/128
!
interface eth0
ipv6 address 2001:db8:13::3/64
!
interface eth1 vrf vrf10
ip address 192.168.3.254/24
!
interface eth2 vrf vrf20
ip address 192.168.3.254/24
!
segment-routing
srv6
locators
locator default
prefix 2001:db8:3:3::/64
!
!
!
ip forwarding
ipv6 forwarding
!
line vty
!
Loading

0 comments on commit 5101463

Please sign in to comment.