Skip to content

Commit ed808e3

Browse files
committed
topotests: add bgp l3vpn importation test behind bgp evpn setup
Add a BGP L3VPN setup with ability to import L3VPN prefixes, behind EVPN setup. Two BGP sessions are configured between R2 and R4, and are shutdown, then used at the end of the test; then filtering is applied. Signed-off-by: Philippe Guibert <[email protected]>
1 parent c547827 commit ed808e3

File tree

5 files changed

+397
-0
lines changed

5 files changed

+397
-0
lines changed
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"65000:201":{
3+
"rd":"65000:201",
4+
"[5]:[0]:[32]:[192.168.116.61]":{
5+
"prefix":"[5]:[0]:[32]:[192.168.116.61]",
6+
"prefixLen":352,
7+
"paths":[
8+
{
9+
"valid":true,
10+
"bestpath":true,
11+
"selectionReason":"First path received",
12+
"pathFrom":"internal",
13+
"routeType":5,
14+
"ethTag":0,
15+
"ipLen":32,
16+
"ip":"192.168.116.61",
17+
"metric":0,
18+
"locPrf":100,
19+
"weight":0,
20+
"peerId":"192.168.100.41",
21+
"path":"",
22+
"origin":"IGP",
23+
"nexthops":[
24+
{
25+
"ip":"192.168.100.41",
26+
"hostname":"r2",
27+
"afi":"ipv4",
28+
"used":true
29+
}
30+
]
31+
}
32+
]
33+
},
34+
"[5]:[0]:[32]:[192.168.126.61]":{
35+
"prefix":"[5]:[0]:[32]:[192.168.126.61]",
36+
"prefixLen":352,
37+
"paths":[
38+
{
39+
"valid":true,
40+
"bestpath":true,
41+
"selectionReason":"First path received",
42+
"pathFrom":"internal",
43+
"routeType":5,
44+
"ethTag":0,
45+
"ipLen":32,
46+
"ip":"192.168.126.61",
47+
"metric":0,
48+
"locPrf":100,
49+
"weight":0,
50+
"peerId":"192.168.100.41",
51+
"path":"",
52+
"origin":"IGP",
53+
"nexthops":[
54+
{
55+
"ip":"192.168.100.41",
56+
"hostname":"r2",
57+
"afi":"ipv4",
58+
"used":true
59+
}
60+
]
61+
}
62+
]
63+
},
64+
"[5]:[0]:[128]:[fd00::116]":{
65+
"prefix":"[5]:[0]:[128]:[fd00::116]",
66+
"prefixLen":352,
67+
"paths":[
68+
{
69+
"valid":true,
70+
"bestpath":true,
71+
"selectionReason":"First path received",
72+
"pathFrom":"internal",
73+
"routeType":5,
74+
"ethTag":0,
75+
"ipLen":128,
76+
"ip":"fd00::116",
77+
"metric":0,
78+
"locPrf":100,
79+
"weight":0,
80+
"peerId":"192.168.100.41",
81+
"path":"",
82+
"origin":"IGP",
83+
"nexthops":[
84+
{
85+
"ip":"192.168.100.41",
86+
"hostname":"r2",
87+
"afi":"ipv4",
88+
"used":true
89+
}
90+
]
91+
}
92+
]
93+
},
94+
"[5]:[0]:[128]:[fd00::126]":{
95+
"prefix":"[5]:[0]:[128]:[fd00::126]",
96+
"prefixLen":352,
97+
"paths":[
98+
{
99+
"valid":true,
100+
"bestpath":true,
101+
"selectionReason":"First path received",
102+
"pathFrom":"internal",
103+
"routeType":5,
104+
"ethTag":0,
105+
"ipLen":128,
106+
"ip":"fd00::126",
107+
"metric":0,
108+
"locPrf":100,
109+
"weight":0,
110+
"peerId":"192.168.100.41",
111+
"path":"",
112+
"origin":"IGP",
113+
"nexthops":[
114+
{
115+
"ip":"192.168.100.41",
116+
"hostname":"r2",
117+
"afi":"ipv4",
118+
"used":true
119+
}
120+
]
121+
}
122+
]
123+
}
124+
},
125+
"numPrefix":8,
126+
"totalPrefix":8
127+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"65000:201":{
3+
"rd":"65000:201",
4+
"[5]:[0]:[32]:[192.168.116.61]":{
5+
"prefix":"[5]:[0]:[32]:[192.168.116.61]",
6+
"prefixLen":352,
7+
"paths":[
8+
{
9+
"valid":true,
10+
"bestpath":true,
11+
"selectionReason":"First path received",
12+
"pathFrom":"internal",
13+
"routeType":5,
14+
"ethTag":0,
15+
"ipLen":32,
16+
"ip":"192.168.116.61",
17+
"metric":0,
18+
"locPrf":100,
19+
"weight":0,
20+
"peerId":"192.168.100.41",
21+
"path":"",
22+
"origin":"IGP",
23+
"nexthops":[
24+
{
25+
"ip":"192.168.100.41",
26+
"hostname":"r2",
27+
"afi":"ipv4",
28+
"used":true
29+
}
30+
]
31+
}
32+
]
33+
},
34+
"[5]:[0]:[128]:[fd00::126]":{
35+
"prefix":"[5]:[0]:[128]:[fd00::126]",
36+
"prefixLen":352,
37+
"paths":[
38+
{
39+
"valid":true,
40+
"bestpath":true,
41+
"selectionReason":"First path received",
42+
"pathFrom":"internal",
43+
"routeType":5,
44+
"ethTag":0,
45+
"ipLen":128,
46+
"ip":"fd00::126",
47+
"metric":0,
48+
"locPrf":100,
49+
"weight":0,
50+
"peerId":"192.168.100.41",
51+
"path":"",
52+
"origin":"IGP",
53+
"nexthops":[
54+
{
55+
"ip":"192.168.100.41",
56+
"hostname":"r2",
57+
"afi":"ipv4",
58+
"used":true
59+
}
60+
]
61+
}
62+
]
63+
}
64+
},
65+
"numPrefix":5,
66+
"totalPrefix":5
67+
}

tests/topotests/bgp_evpn_rt5/r2/frr.conf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@ interface loop101 vrf r2-vrf-101
1414
interface r2-eth0 vrf r2-vrf-evpn
1515
ip address 192.168.100.41/24
1616
!
17+
interface r24-eth2 vrf r2-vrf-141
18+
ip address 192.168.106.41/24
19+
!
20+
interface r21-eth2
21+
ip address 192.168.105.41/24
22+
!
23+
router bgp 65000
24+
bgp router-id 192.168.105.41
25+
bgp log-neighbor-changes
26+
neighbor 192.168.105.61 remote-as 65000
27+
neighbor 192.168.105.61 shutdown
28+
neighbor 192.168.105.61 capability extended-nexthop
29+
address-family ipv6 unicast
30+
neighbor 192.168.105.61 activate
31+
exit-address-family
32+
!
33+
router bgp 65000 vrf r2-vrf-141
34+
bgp router-id 192.168.106.41
35+
bgp log-neighbor-changes
36+
!
37+
neighbor 192.168.106.61 remote-as 65000
38+
neighbor 192.168.106.61 shutdown
39+
neighbor 192.168.106.61 capability extended-nexthop
40+
address-family ipv6 unicast
41+
neighbor 192.168.106.61 activate
42+
exit-address-family
43+
!
1744
router bgp 65000 vrf r2-vrf-evpn
1845
bgp router-id 192.168.100.41
1946
bgp log-neighbor-changes
@@ -32,10 +59,14 @@ router bgp 65000 vrf r2-vrf-101
3259
bgp log-neighbor-changes
3360
no bgp network import-check
3461
address-family ipv4 unicast
62+
import vrf r2-vrf-141
63+
import vrf default
3564
network 192.168.101.41/32
3665
network 192.168.102.41/32
3766
exit-address-family
3867
address-family ipv6 unicast
68+
import vrf r2-vrf-141
69+
import vrf default
3970
network fd00::2/128
4071
network fd00::3/128
4172
exit-address-family
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
interface lo
2+
ip address 192.168.126.61/32
3+
ipv6 address fd00::126/128
4+
!
5+
interface loop141 vrf r4-vrf-141
6+
ip address 192.168.116.61/32
7+
ipv6 address fd00::116/128
8+
!
9+
interface r41-eth0
10+
ip address 192.168.105.61/24
11+
!
12+
interface r44-eth0 vrf r4-vrf-141
13+
ip address 192.168.106.61/24
14+
!
15+
router bgp 65000
16+
bgp router-id 192.168.105.61
17+
bgp log-neighbor-changes
18+
neighbor 192.168.105.41 remote-as 65000
19+
neighbor 192.168.105.41 update-source r4-eth0
20+
neighbor 192.168.105.41 capability extended-nexthop
21+
address-family ipv4 unicast
22+
network 192.168.126.61/32
23+
exit-address-family
24+
address-family ipv6 unicast
25+
neighbor 192.168.105.41 activate
26+
network fd00::126/128
27+
exit-address-family
28+
!
29+
router bgp 65000 vrf r4-vrf-141
30+
bgp router-id 192.168.106.61
31+
bgp log-neighbor-changes
32+
neighbor 192.168.106.41 remote-as 65000
33+
neighbor 192.168.106.41 capability extended-nexthop
34+
address-family ipv4 unicast
35+
network 192.168.116.61/32
36+
exit-address-family
37+
address-family ipv6 unicast
38+
neighbor 192.168.106.41 activate
39+
network fd00::116/128
40+
exit-address-family
41+
!

0 commit comments

Comments
 (0)