Skip to content

Commit 22bb12c

Browse files
committed
topotests: bgp_vrf_route_leak_basic, add r2 peering
Signed-off-by: Philippe Guibert <[email protected]>
1 parent ac0a167 commit 22bb12c

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
hostname r1
22

3-
router bgp 99 vrf DONNA
3+
router bgp 65500 vrf DONNA
44
no bgp ebgp-requires-policy
55
address-family ipv4 unicast
66
redistribute connected
@@ -9,25 +9,30 @@ router bgp 99 vrf DONNA
99
import vrf default
1010
!
1111
!
12-
router bgp 99 vrf EVA
12+
router bgp 65500 vrf EVA
1313
no bgp ebgp-requires-policy
1414
address-family ipv4 unicast
1515
redistribute connected
1616
import vrf DONNA
1717
import vrf ZITA
1818
!
1919
!
20-
router bgp 99 vrf ZITA
20+
router bgp 65500 vrf ZITA
2121
no bgp ebgp-requires-policy
2222
no bgp network import-check
2323
address-family ipv4 unicast
2424
network 172.16.101.0/24
2525
!
2626
!
27-
router bgp 99
27+
router bgp 65500
28+
bgp router-id 192.0.2.1
2829
no bgp ebgp-requires-policy
30+
neighbor 192.0.2.2 remote-as 65501
2931
address-family ipv4 unicast
32+
no neighbor 192.0.2.2 activate
3033
redistribute connected
3134
import vrf DONNA
3235
!
36+
address-family ipv4 vpn
37+
neighbor 192.0.2.2 activate
3338
!

tests/topotests/bgp_vrf_route_leak_basic/r1/zebra.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
hostname r1
22

3+
int r1-eth0
4+
ip address 192.0.2.1/24
5+
!
36
int dummy0
47
ip address 10.0.4.1/24
58
no shut
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
hostname r2
2+
3+
router bgp 65501
4+
bgp router-id 192.0.2.2
5+
no bgp ebgp-requires-policy
6+
neighbor 192.0.2.1 remote-as 65500
7+
address-family ipv4 unicast
8+
no neighbor 192.0.2.1 activate
9+
!
10+
address-family ipv4 vpn
11+
neighbor 192.0.2.1 activate
12+
!
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
hostname r1
2+
3+
int r2-eth0
4+
ip address 192.0.2.2/24
5+
!

tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@
3333
def build_topo(tgen):
3434
"Build function"
3535

36-
for routern in range(1, 2):
36+
for routern in range(1, 3):
3737
tgen.add_router("r{}".format(routern))
3838

39+
switch = tgen.add_switch("s1")
40+
switch.add_link(tgen.gears["r1"])
41+
switch.add_link(tgen.gears["r2"])
42+
3943

4044
def setup_module(mod):
4145
"Sets up the pytest environment"
@@ -72,7 +76,7 @@ def test_router_bgp_as_pretty():
7276
pytest.skip(tgen.errors)
7377

7478
output = tgen.gears["r1"].vtysh_cmd("show run")
75-
assert "router bgp 99\n" in output, "router bgp 99 not found in show run"
79+
assert "router bgp 65500\n" in output, "router bgp 65500 not found in show run"
7680

7781

7882
def test_vrf_route_leak_donna():

0 commit comments

Comments
 (0)