Skip to content

Commit 1cd4e04

Browse files
committed
tests: fix bgp_evpn_rt2_local_leak
Fix the following: - Deffer L3VNI configuration on r3 to reproduce the conditions of the bug fixed in the previous commits. - Deffer BGP router-id configuration on r2 to reproduce the conditions of the previous commits. - Apply black - Deleting h2 neighbor was correctly withdrawing the related EVPN and leaked unicast entries but the test was not checking the actual removal. - Test that IP from local neighbor entries are not added as /32 in the ip route tables. - Test delete and re-add of h3 neighbor entry. It shows that we can withdraw an EVPN entry that was added after L3VNI and the unicast is also withdraw. See link. Link: #21967 (comment) Fixes: 184f4c6 ("topotests: add bgp_evpn_rt2_local_leak") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
1 parent b6594e0 commit 1cd4e04

23 files changed

Lines changed: 845 additions & 13 deletions

tests/topotests/bgp_evpn_rt2_local_leak/r1/show_bgp_ipv4_unicast_step2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
]
4242
}
4343
],
44+
"192.168.0.2/32": null,
4445
"192.168.0.3/32": [
4546
{
4647
"valid": true,
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{
2+
"routes": {
3+
"192.168.0.0/24": [
4+
{
5+
"valid": true,
6+
"bestpath": true,
7+
"pathFrom": "external",
8+
"path": "65002",
9+
"origin": "incomplete",
10+
"nexthops": [
11+
{
12+
"hostname": "r2",
13+
"scope": "link-local",
14+
"linkLocalOnly": false,
15+
"used": true
16+
},
17+
{
18+
"interface": "eth-r2",
19+
"hostname": "r2",
20+
"scope": "link-local"
21+
}
22+
]
23+
},
24+
{
25+
"valid": true,
26+
"pathFrom": "external",
27+
"path": "65003",
28+
"origin": "incomplete",
29+
"nexthops": [
30+
{
31+
"hostname": "r3",
32+
"scope": "link-local",
33+
"linkLocalOnly": false,
34+
"used": true
35+
},
36+
{
37+
"interface": "eth-r3",
38+
"hostname": "r3",
39+
"scope": "link-local"
40+
}
41+
]
42+
}
43+
],
44+
"192.168.0.2/32": [
45+
{
46+
"valid": true,
47+
"bestpath": true,
48+
"pathFrom": "external",
49+
"path": "65002",
50+
"origin": "IGP",
51+
"nexthops": [
52+
{
53+
"hostname": "r2",
54+
"scope": "link-local",
55+
"linkLocalOnly": false,
56+
"used": true
57+
},
58+
{
59+
"interface": "eth-r2",
60+
"hostname": "r2",
61+
"scope": "link-local"
62+
}
63+
]
64+
},
65+
{
66+
"valid": true,
67+
"pathFrom": "external",
68+
"path": "65003 65002",
69+
"origin": "IGP",
70+
"nexthops": [
71+
{
72+
"hostname": "r3",
73+
"scope": "link-local",
74+
"linkLocalOnly": false,
75+
"used": true
76+
},
77+
{
78+
"interface": "eth-r3",
79+
"hostname": "r3",
80+
"scope": "link-local"
81+
}
82+
]
83+
}
84+
],
85+
"192.168.0.3/32": null
86+
}
87+
}

tests/topotests/bgp_evpn_rt2_local_leak/r1/show_ip_route_step2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
]
117117
}
118118
],
119+
"192.168.0.2/32": null,
119120
"192.168.0.3/32": [
120121
{
121122
"protocol": "bgp",
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
{
2+
"10.0.0.1/32": [
3+
{
4+
"protocol": "local",
5+
"distance": 0,
6+
"metric": 0,
7+
"installed": true,
8+
"nexthops": [
9+
{
10+
"fib": true,
11+
"directlyConnected": true,
12+
"interfaceName": "lo",
13+
"active": true
14+
}
15+
]
16+
},
17+
{
18+
"protocol": "connected",
19+
"distance": 0,
20+
"metric": 0,
21+
"installed": true,
22+
"selected": true,
23+
"nexthops": [
24+
{
25+
"fib": true,
26+
"directlyConnected": true,
27+
"interfaceName": "lo",
28+
"active": true
29+
}
30+
]
31+
}
32+
],
33+
"10.0.0.2/32": [
34+
{
35+
"protocol": "bgp",
36+
"distance": 20,
37+
"metric": 0,
38+
"installed": true,
39+
"selected": true,
40+
"nexthops": [
41+
{
42+
"fib": true,
43+
"interfaceName": "eth-r2",
44+
"active": true,
45+
"afi": "ipv6"
46+
}
47+
]
48+
}
49+
],
50+
"10.0.0.3/32": [
51+
{
52+
"protocol": "bgp",
53+
"distance": 20,
54+
"metric": 0,
55+
"installed": true,
56+
"selected": true,
57+
"nexthops": [
58+
{
59+
"fib": true,
60+
"interfaceName": "eth-r3",
61+
"active": true,
62+
"afi": "ipv6"
63+
}
64+
]
65+
}
66+
],
67+
"172.16.0.0/24": [
68+
{
69+
"protocol": "connected",
70+
"distance": 0,
71+
"metric": 0,
72+
"installed": true,
73+
"selected": true,
74+
"nexthops": [
75+
{
76+
"fib": true,
77+
"directlyConnected": true,
78+
"interfaceName": "eth-h1",
79+
"active": true
80+
}
81+
]
82+
}
83+
],
84+
"172.16.0.254/32": [
85+
{
86+
"protocol": "local",
87+
"distance": 0,
88+
"metric": 0,
89+
"installed": true,
90+
"selected": true,
91+
"table": 254,
92+
"nexthops": [
93+
{
94+
"fib": true,
95+
"directlyConnected": true,
96+
"interfaceName": "eth-h1",
97+
"active": true
98+
}
99+
]
100+
}
101+
],
102+
"192.168.0.0/24": [
103+
{
104+
"protocol": "bgp",
105+
"distance": 20,
106+
"metric": 0,
107+
"installed": true,
108+
"selected": true,
109+
"nexthops": [
110+
{
111+
"fib": true,
112+
"interfaceName": "eth-r2",
113+
"active": true,
114+
"afi": "ipv6"
115+
}
116+
]
117+
}
118+
],
119+
"192.168.0.2/32": [
120+
{
121+
"protocol": "bgp",
122+
"distance": 20,
123+
"metric": 0,
124+
"installed": true,
125+
"selected": true,
126+
"nexthops": [
127+
{
128+
"fib": true,
129+
"interfaceName": "eth-r2",
130+
"active": true,
131+
"afi": "ipv6"
132+
}
133+
]
134+
}
135+
],
136+
"192.168.0.3/32": null
137+
}

tests/topotests/bgp_evpn_rt2_local_leak/r2/frr.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
interface lo
2-
ip address 10.0.0.2/32
3-
41
interface eth-r1
52
no shutdown
63

tests/topotests/bgp_evpn_rt2_local_leak/r2/show_bgp_ipv4_unicast_step2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
]
1616
}
1717
],
18+
"192.168.0.2/32": null,
1819
"192.168.0.3/32": [
1920
{
2021
"valid": true,
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"routes": {
3+
"192.168.0.0/24": [
4+
{
5+
"valid": true,
6+
"bestpath": true,
7+
"pathFrom": "external",
8+
"path": "",
9+
"origin": "incomplete",
10+
"nexthops": [
11+
{
12+
"hostname": "r2",
13+
"used": true
14+
}
15+
]
16+
}
17+
],
18+
"192.168.0.2/32": [
19+
{
20+
"valid": true,
21+
"bestpath": true,
22+
"pathFrom": "external",
23+
"path": "",
24+
"origin": "IGP",
25+
"nexthops": [
26+
{
27+
"hostname": "r2",
28+
"used": true
29+
}
30+
]
31+
}
32+
],
33+
"192.168.0.3/32": null
34+
}
35+
}

tests/topotests/bgp_evpn_rt2_local_leak/r2/show_ip_route.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
]
9999
}
100100
],
101+
"192.168.0.2/32": null,
101102
"192.168.0.3/32": [
102103
{
103104
"protocol": "bgp",

tests/topotests/bgp_evpn_rt2_local_leak/r2/show_ip_route_step2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
]
9999
}
100100
],
101+
"192.168.0.2/32": null,
101102
"192.168.0.3/32": [
102103
{
103104
"protocol": "bgp",

0 commit comments

Comments
 (0)