Skip to content

Commit

Permalink
tests: improve test bgp_snmp_bgp4v2mib for snmp multi path support
Browse files Browse the repository at this point in the history
multi path support by snmp implies change in configuration and expected
tests results.

ipv6 trap test output is now ordered to avoid radom result due to
timeline.

Signed-off-by: Francois Dumontet <[email protected]>
Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
fdumontet6WIND committed Dec 4, 2023
1 parent 8dbf2a8 commit c8633c3
Show file tree
Hide file tree
Showing 8 changed files with 366 additions and 157 deletions.
21 changes: 12 additions & 9 deletions tests/topotests/bgp_snmp_bgp4v2mib/r1/bgpd.conf
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
!
!debug bgp updates
!
router bgp 65001
no bgp ebgp-requires-policy
no bgp network import-check
no bgp default ipv4-unicast
neighbor 192.168.12.2 remote-as external
neighbor 192.168.12.2 timers 1 3
neighbor 192.168.12.2 timers connect 1
neighbor 2001:db8::12:2 remote-as external
neighbor 2001:db8::12:2 timers 1 3
neighbor 2001:db8::12:2 timers connect 1
neighbor 192.168.12.4 remote-as external
neighbor 192.168.12.4 timers 1 3
neighbor 192.168.12.4 timers connect 1
neighbor 2001:db8::12:4 remote-as external
neighbor 2001:db8::12:4 timers 1 3
neighbor 2001:db8::12:4 timers connect 1
!
address-family ipv4 unicast
network 10.0.0.0/31 route-map p1
network 10.0.0.2/32 route-map p2
neighbor 192.168.12.2 activate
neighbor 192.168.12.4 activate
neighbor 192.168.12.4 addpath-tx-all-paths
network 10.10.10.10/32
exit-address-family
address-family ipv6 unicast
network 2001:db8::1/128 route-map p1
network 2001:db8:1::/56 route-map p2
neighbor 2001:db8::12:2 activate
neighbor 2001:db8::12:4 activate
exit-address-family
!
route-map p1 permit 10
Expand All @@ -28,4 +32,3 @@ route-map p2 permit 10
set metric 2
set origin incomplete
exit
!
18 changes: 10 additions & 8 deletions tests/topotests/bgp_snmp_bgp4v2mib/r2/bgpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ router bgp 65002
no bgp ebgp-requires-policy
no bgp network import-check
no bgp default ipv4-unicast
neighbor 192.168.12.1 remote-as external
neighbor 192.168.12.1 timers 1 3
neighbor 192.168.12.1 timers connect 1
neighbor 2001:db8::12:1 remote-as external
neighbor 2001:db8::12:1 timers 1 3
neighbor 2001:db8::12:1 timers connect 1
neighbor 192.168.12.4 remote-as external
neighbor 192.168.12.4 timers 1 3
neighbor 192.168.12.4 timers connect 1
neighbor 2001:db8::12:4 remote-as external
neighbor 2001:db8::12:4 timers 1 3
neighbor 2001:db8::12:4 timers connect 1
!
address-family ipv4 unicast
neighbor 192.168.12.1 activate
neighbor 192.168.12.4 activate
neighbor 192.168.12.4 addpath-tx-all-paths

exit-address-family
address-family ipv6 unicast
neighbor 2001:db8::12:1 activate
neighbor 2001:db8::12:4 activate
exit-address-family
!
agentx
Expand Down
25 changes: 25 additions & 0 deletions tests/topotests/bgp_snmp_bgp4v2mib/r3/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
!
!debug bgp updates
!
router bgp 65003
no bgp ebgp-requires-policy
no bgp network import-check
no bgp default ipv4-unicast
neighbor 192.168.12.4 remote-as external
neighbor 192.168.12.4 timers 1 3
neighbor 192.168.12.4 timers connect 1
neighbor 2001:db8::12:4 remote-as external
neighbor 2001:db8::12:4 timers 1 3
neighbor 2001:db8::12:4 timers connect 1
!
address-family ipv4 unicast
neighbor 192.168.12.4 activate
neighbor 192.168.12.4 addpath-tx-all-paths
network 10.10.10.10/32
exit-address-family
address-family ipv6 unicast
neighbor 2001:db8::12:4 activate
exit-address-family
!
agentx
!
5 changes: 5 additions & 0 deletions tests/topotests/bgp_snmp_bgp4v2mib/r3/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
!
interface r3-eth0
ip address 192.168.12.3/24
ipv6 address 2001:db8::12:3/64
!
67 changes: 67 additions & 0 deletions tests/topotests/bgp_snmp_bgp4v2mib/rr/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
!
! debug bgp updates
!
router bgp 65004
no bgp ebgp-requires-policy
no bgp network import-check
no bgp default ipv4-unicast
neighbor 192.168.12.1 remote-as external
neighbor 192.168.12.1 timers 1 3
neighbor 192.168.12.1 timers connect 1
neighbor 192.168.12.2 remote-as external
neighbor 192.168.12.2 timers 1 3
neighbor 192.168.12.2 timers connect 1
neighbor 192.168.12.3 remote-as external
neighbor 192.168.12.3 timers 1 3
neighbor 192.168.12.3 timers connect 1
neighbor 2001:db8::12:1 remote-as external
neighbor 2001:db8::12:1 timers 1 3
neighbor 2001:db8::12:1 timers connect 1
neighbor 2001:db8::12:2 remote-as external
neighbor 2001:db8::12:2 timers 1 3
neighbor 2001:db8::12:2 timers connect 1
neighbor 2001:db8::12:3 remote-as external
neighbor 2001:db8::12:3 timers 1 3
neighbor 2001:db8::12:3 timers connect 1
!
address-family ipv4 unicast
network 10.0.0.0/31 route-map p1
network 10.0.0.2/32 route-map p2
neighbor 192.168.12.1 activate
neighbor 192.168.12.2 activate
neighbor 192.168.12.2 addpath-tx-all-paths
neighbor 192.168.12.2 route-map r2-import in
neighbor 192.168.12.2 route-map r2-export out
! neighbor 192.168.12.2 soft-reconfiguration inbound
neighbor 192.168.12.3 activate
exit-address-family
address-family ipv6 unicast
network 2001:db8::1/128 route-map p1
network 2001:db8:1::/56 route-map p2
neighbor 2001:db8::12:1 activate
neighbor 2001:db8::12:2 activate
neighbor 2001:db8::12:2 addpath-tx-all-paths
neighbor 2001:db8::12:3 activate
exit-address-family


ip prefix-list r2-toto permit any

route-map r2-import permit 10
match ip address prefix-list r2-toto

route-map r2-export permit 10
match ip address prefix-list r2-toto
!
route-map p1 permit 10
set metric 1
exit
route-map p2 permit 10
set metric 2
set origin incomplete
exit



agentx
!
5 changes: 5 additions & 0 deletions tests/topotests/bgp_snmp_bgp4v2mib/rr/zebra.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
!
interface rr-eth0
ip address 192.168.12.4/24
ipv6 address 2001:db8::12:4/64
!
Loading

0 comments on commit c8633c3

Please sign in to comment.