Skip to content

Commit

Permalink
topotests: add bgp labeled unicast fec nexthop resolution tests
Browse files Browse the repository at this point in the history
There are 3 tests with OSPF, IS-IS, BGP and MPLS configured:
1. Check the status of BGP session
between North and South == Established
2. Check the connectivity with "ping South -I North"
3. Check the label on the West.

Signed-off-by: Philippe Guibert <[email protected]>
Signed-off-by: Dmytro Shytyi <[email protected]>
  • Loading branch information
dmytroshytyi-6WIND committed Jun 7, 2024
1 parent 07175f6 commit dde6af3
Show file tree
Hide file tree
Showing 26 changed files with 812 additions and 0 deletions.
Empty file.
24 changes: 24 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r1/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
!
router bgp 65500
bgp router-id 192.0.2.1
neighbor 192.0.2.3 remote-as 65500
neighbor 192.0.2.3 update-source lo
neighbor 192.0.2.7 remote-as 65500
neighbor 192.0.2.7 ttl-security hops 10
neighbor 192.0.2.7 disable-connected-check
neighbor 192.0.2.7 update-source lo
!
address-family ipv4 unicast
network 192.0.2.1/32
no neighbor 192.0.2.3 activate
neighbor 192.0.2.7 activate
exit-address-family
!
address-family ipv4 labeled-unicast
neighbor 192.0.2.3 activate
neighbor 192.0.2.3 route-reflector-client
neighbor 192.0.2.3 next-hop-self force
exit-address-family
!
exit
!
25 changes: 25 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r1/ospfd.conf.after
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
log stdout
!
interface lo
ip ospf passive
exit
!
interface r1-eth0
ip ospf network point-to-point
ip ospf hello-interval 1
exit
!
router ospf
ospf router-id 192.0.2.1
network 192.0.2.1/32 area 0.0.0.0
network 192.168.1.0/24 area 0.0.0.0
passive-interface lo
capability opaque
mpls-te on
mpls-te router-address 192.0.2.1
segment-routing on
segment-routing global-block 1000 10000 local-block 32000 32999
segment-routing node-msd 8
segment-routing prefix 192.0.2.1/32 index 11
exit
!
13 changes: 13 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r1/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
interface lo
ip address 192.0.2.1/32
mpls enable
exit
!
interface r1-eth0
ip address 192.168.1.1/24
mpls enable
link-params
enable
exit-link-params
exit
!
23 changes: 23 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r2/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
router bgp 65500
bgp router-id 192.0.2.2
neighbor 192.0.2.1 remote-as 65500
neighbor 192.0.2.1 update-source lo
neighbor 192.0.2.3 remote-as 65500
neighbor 192.0.2.3 update-source lo
!
address-family ipv4 unicast
network 192.0.2.2/32
no neighbor 192.0.2.1 activate
no neighbor 192.0.2.3 activate
exit-address-family
!
address-family ipv4 labeled-unicast
neighbor 192.0.2.1 activate
neighbor 192.0.2.1 route-reflector-client
neighbor 192.0.2.1 next-hop-self force
neighbor 192.0.2.3 activate
neighbor 192.0.2.3 route-reflector-client
neighbor 192.0.2.3 next-hop-self force
exit-address-family
exit
!
25 changes: 25 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r2/isisd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
!
interface lo
ip router isis 1
isis hello-interval 1
isis hello-multiplier 3
exit
!
interface r2-eth1
ip router isis 2
isis hello-interval 1
isis hello-multiplier 3
exit
!
router isis 1
is-type level-1
net 49.0000.0007.e901.2223.00
lsp-timers gen-interval 1 refresh-interval 900 max-lifetime 1200
mpls-te on
mpls-te router-address 192.0.2.2
segment-routing on
segment-routing global-block 11000 20000 local-block 36000 36999
segment-routing node-msd 8
segment-routing prefix 192.0.2.2/32 index 22 no-php-flag
exit
!
32 changes: 32 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r2/ospfd.conf.after
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
log stdout
!
interface lo
ip ospf network point-to-point
ip ospf passive
exit
!
interface r2-eth0
ip ospf network point-to-point
ip ospf hello-interval 1
exit
!
interface r2-eth1
ip ospf network point-to-point
ip ospf hello-interval 1
exit
!
router ospf
ospf router-id 192.0.2.2
network 192.0.2.2/32 area 0.0.0.0
network 192.168.1.0/24 area 0.0.0.0
network 192.168.2.0/24 area 0.0.0.0
passive-interface lo
capability opaque
mpls-te on
mpls-te router-address 192.0.2.2
segment-routing on
segment-routing global-block 1000 10000 local-block 36000 36999
segment-routing node-msd 8
segment-routing prefix 192.0.2.2/32 index 22
exit
!
16 changes: 16 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r2/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!
interface lo
ip address 192.0.2.2/32
mpls enable
exit
!
interface r2-eth0
ip address 192.168.1.2/24
mpls enable
exit
!
interface r2-eth1
ip address 192.168.2.2/24
mpls enable
exit
!
23 changes: 23 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r3/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
router bgp 65500
bgp router-id 192.0.2.3
neighbor 192.0.2.1 remote-as 65500
neighbor 192.0.2.1 update-source lo
neighbor 192.0.2.5 remote-as 65500
neighbor 192.0.2.5 update-source lo
!
address-family ipv4 unicast
network 192.0.2.3/32
no neighbor 192.0.2.1 activate
no neighbor 192.0.2.5 activate
exit-address-family
!
address-family ipv4 labeled-unicast
neighbor 192.0.2.1 activate
neighbor 192.0.2.1 route-reflector-client
neighbor 192.0.2.1 next-hop-self force
neighbor 192.0.2.5 activate
neighbor 192.0.2.5 route-reflector-client
neighbor 192.0.2.5 next-hop-self force
exit-address-family
exit
!
25 changes: 25 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r3/isisd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
!
interface lo
ip router isis 1
isis hello-interval 1
isis hello-multiplier 3
exit
!
interface r3-eth1
ip router isis 1
isis hello-interval 1
isis hello-multiplier 3
exit
!
router isis 1
is-type level-1
net 49.0000.0007.e901.3333.00
lsp-timers gen-interval 1 refresh-interval 900 max-lifetime 1200
mpls-te on
mpls-te router-address 192.0.2.3
segment-routing on
segment-routing global-block 11000 12000 local-block 36000 36999
segment-routing node-msd 8
segment-routing prefix 192.0.2.3/32 index 33
exit
!
26 changes: 26 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r3/ospfd.conf.after
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
log stdout
!
interface lo
ip ospf network point-to-point
ip ospf passive
exit
!
interface r3-eth0
ip ospf network point-to-point
ip ospf hello-interval 1
exit
!
router ospf
ospf router-id 192.0.2.3
network 192.0.2.3/32 area 0.0.0.0
network 192.168.2.0/24 area 0.0.0.0
passive-interface lo
capability opaque
mpls-te on
mpls-te router-address 192.0.2.3
segment-routing on
segment-routing global-block 1000 10000 local-block 30000 30999
segment-routing node-msd 8
segment-routing prefix 192.0.2.3/32 index 33
exit
!
19 changes: 19 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r3/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
!
interface lo
ip address 192.0.2.3/32
mpls enable
exit
!
interface r3-eth0
ip address 192.168.2.3/24
mpls enable
link-params
enable
exit-link-params
exit
!
interface r3-eth1
ip address 192.168.3.3/24
mpls enable
exit
!
24 changes: 24 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r4/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
!
router bgp 65500
bgp router-id 192.0.2.4
neighbor 192.0.2.1 remote-as 65500
neighbor 192.0.2.1 ttl-security hops 10
neighbor 192.0.2.1 disable-connected-check
neighbor 192.0.2.1 update-source lo
neighbor 192.0.2.3 remote-as 65500
neighbor 192.0.2.3 update-source lo
!
address-family ipv4 unicast
network 192.0.2.4/32
neighbor 192.0.2.1 activate
no neighbor 192.0.2.3 activate
exit-address-family
!
address-family ipv4 labeled-unicast
neighbor 192.0.2.3 activate
neighbor 192.0.2.3 route-reflector-client
neighbor 192.0.2.3 next-hop-self force
exit-address-family
!
exit
!
31 changes: 31 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r4/isisd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
!
interface lo
ip router isis 1
isis hello-interval 1
isis hello-multiplier 3
exit
!
interface r4-eth0
ip router isis 1
isis hello-interval 1
isis hello-multiplier 3
exit
!
interface r4-eth1
ip router isis 1
isis hello-interval 1
isis hello-multiplier 3
exit
!
router isis 1
is-type level-1
net 49.0000.0007.e901.4444.00
lsp-timers gen-interval 1 refresh-interval 900 max-lifetime 1200
mpls-te on
mpls-te router-address 192.0.2.4
segment-routing on
segment-routing global-block 11000 12000 local-block 37000 37999
segment-routing node-msd 8
segment-routing prefix 192.0.2.4/32 index 44
exit
!
19 changes: 19 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r4/ospfd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
!
interface lo
ip ospf area 0
ip ospf passive
exit
!
interface r4-eth0
ip ospf area 0
exit
!
router ospf
mpls-te on
mpls-te router-address 192.0.2.4
segment-routing on
segment-routing global-block 21000 29000 local-block 31000 31999
segment-routing node-msd 8
segment-routing prefix 192.0.2.4/32 index 44 no-php-flag
exit
!
16 changes: 16 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r4/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!
interface lo
ip address 192.0.2.4/32
mpls enable
exit
!
interface r4-eth0
ip address 192.168.3.4/24
mpls enable
exit
!
interface r4-eth1
ip address 192.168.4.4/24
mpls enable
exit
!
23 changes: 23 additions & 0 deletions tests/topotests/zebra_fec_nexthop_resolution/r5/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
router bgp 65500
bgp router-id 192.0.2.5
neighbor 192.0.2.3 remote-as 65500
neighbor 192.0.2.3 update-source lo
neighbor 192.0.2.7 remote-as 65500
neighbor 192.0.2.7 update-source lo
!
address-family ipv4 unicast
network 192.0.2.5/32
no neighbor 192.0.2.3 activate
no neighbor 192.0.2.7 activate
exit-address-family
!
address-family ipv4 labeled-unicast
neighbor 192.0.2.3 activate
neighbor 192.0.2.3 route-reflector-client
neighbor 192.0.2.3 next-hop-self force
neighbor 192.0.2.7 activate
neighbor 192.0.2.7 route-reflector-client
neighbor 192.0.2.7 next-hop-self force
exit-address-family
exit
!
Loading

0 comments on commit dde6af3

Please sign in to comment.