Skip to content

Commit 2369323

Browse files
committed
test: Added topotest to test multihop BGP GR
This topotest has tests to test GR functionality when a mix of directly connected and multihop peer are present on DUT. Signed-off-by: Pooja Jagadeesh Doijode <[email protected]>
1 parent 7b1daf4 commit 2369323

File tree

7 files changed

+407
-0
lines changed

7 files changed

+407
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
log syslog debugging
2+
log file /tmp/topotests/bgp_gr_multihop.test_bgp_gr_multihop/r1/bgpd.log
3+
log timestamp precision 6
4+
debug bgp neighbor-events
5+
debug bgp graceful-restart
6+
!
7+
router bgp 65001
8+
no bgp ebgp-requires-policy
9+
bgp graceful-restart
10+
bgp graceful-restart preserve-fw-state
11+
neighbor 3.3.3.3 remote-as 65003
12+
neighbor 3.3.3.3 timers 1 3
13+
neighbor 3.3.3.3 timers connect 1
14+
neighbor 3.3.3.3 ebgp-multihop 5
15+
neighbor 3.3.3.3 update-source lo
16+
neighbor 10.0.1.1 remote-as 65002
17+
neighbor 10.0.1.1 timers 1 3
18+
neighbor 10.0.1.1 timers connect 1
19+
neighbor 10.0.1.1 route-map R2_OUT out
20+
!
21+
address-family ipv4 unicast
22+
redistribute connected
23+
exit-address-family
24+
!
25+
ip prefix-list R1_EXTRA seq 5 permit 1.1.1.2/32
26+
ip prefix-list R1_EXTRA seq 10 permit 1.1.1.3/32
27+
ip prefix-list R1_EXTRA seq 15 permit 1.1.1.4/32
28+
29+
route-map R2_OUT deny 10
30+
match ip address prefix-list R1_EXTRA
31+
route-map R2_OUT permit 100
32+
!
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
hostname r1
2+
ip forwarding
3+
4+
interface r1-eth0
5+
ip address 10.0.1.2/24
6+
!
7+
interface lo
8+
ip address 1.1.1.1/32
9+
ip address 1.1.1.2/32
10+
ip address 1.1.1.3/32
11+
ip address 1.1.1.4/32
12+
!
13+
14+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
router bgp 65002
2+
no bgp ebgp-requires-policy
3+
bgp graceful-restart
4+
bgp graceful-restart preserve-fw-state
5+
neighbor 10.0.1.2 remote-as 65001
6+
neighbor 10.0.1.2 timers 1 3
7+
neighbor 10.0.1.2 timers connect 1
8+
neighbor 10.0.2.2 remote-as 65003
9+
neighbor 10.0.2.2 timers 1 3
10+
neighbor 10.0.2.2 timers connect 1
11+
!
12+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
hostname r2
2+
ip forwarding
3+
4+
interface r2-eth0
5+
ip address 10.0.1.1/24
6+
!
7+
interface r2-eth1
8+
ip address 10.0.2.1/24
9+
!
10+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
log syslog debugging
2+
log file /tmp/topotests/bgp_gr_multihop.test_bgp_gr_multihop/r3/bgpd.log
3+
log timestamp precision 6
4+
debug bgp neighbor-events
5+
debug bgp graceful-restart
6+
debug bgp updates in
7+
!
8+
router bgp 65003
9+
no bgp ebgp-requires-policy
10+
neighbor 1.1.1.1 remote-as 65001
11+
neighbor 1.1.1.1 timers 1 3
12+
neighbor 1.1.1.1 timers connect 1
13+
neighbor 1.1.1.1 ebgp-multihop 5
14+
neighbor 1.1.1.1 update-source lo
15+
neighbor 10.0.2.1 remote-as 65002
16+
neighbor 10.0.2.1 timers 1 3
17+
neighbor 10.0.2.1 timers connect 1
18+
neighbor 10.0.2.1 route-map R2_OUT out
19+
!
20+
address-family ipv4 unicast
21+
redistribute connected
22+
exit-address-family
23+
!
24+
ip prefix-list R3_EXTRA seq 5 permit 3.3.3.4/32
25+
ip prefix-list R3_EXTRA seq 10 permit 3.3.3.5/32
26+
ip prefix-list R3_EXTRA seq 15 permit 3.3.3.6/32
27+
28+
route-map R2_OUT deny 10
29+
match ip address prefix-list R3_EXTRA
30+
route-map R2_OUT permit 100
31+
!
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
hostname r3
2+
ip forwarding
3+
4+
interface r3-eth0
5+
ip address 10.0.2.2/24
6+
!
7+
interface lo
8+
ip address 3.3.3.3/32
9+
ip address 3.3.3.4/32
10+
ip address 3.3.3.5/32
11+
ip address 3.3.3.6/32
12+
!
13+
14+

0 commit comments

Comments
 (0)