Skip to content

Commit

Permalink
topotests: bgp_evpn_rt5, configure route_distinguisher
Browse files Browse the repository at this point in the history
When not configuring a route distinguisher, neither route-target,
the derived rd settings differ if config load applies with frr.conf
or not. For instance, the forged rd with frr.conf:

> # show bgp l2vpn evpn json
>    "192.168.101.41:3":{
>       "rd":"192.168.101.41:3",

and without:
>     "192.168.101.41:2":{
>        "rd":"192.168.101.41:2",

The defined rts also are impacted. Temporay fix this by using an
hardset configuration for all route distinguisher and route target
of the setups.

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Dec 30, 2024
1 parent b1f1d3e commit 55fabf2
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
8 changes: 4 additions & 4 deletions tests/topotests/bgp_evpn_rt5/r1/bgp_l2vpn_evpn_routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"bgpLocalRouterId":"192.168.100.21",
"defaultLocPrf":100,
"localAS":65000,
"192.168.101.41:2":{
"rd":"192.168.101.41:2",
"65000:201":{
"rd":"65000:201",
"[5]:[0]:[32]:[192.168.101.41]":{
"prefix":"[5]:[0]:[32]:[192.168.101.41]",
"prefixLen":352,
Expand Down Expand Up @@ -65,8 +65,8 @@
]
}
},
"192.168.102.21:2":{
"rd":"192.168.102.21:2",
"65000:101":{
"rd":"65000:101",
"[5]:[0]:[32]:[192.168.102.21]":{
"prefix":"[5]:[0]:[32]:[192.168.102.21]",
"prefixLen":352,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"bgpLocalRouterId":"192.168.100.21",
"defaultLocPrf":100,
"localAS":65000,
"192.168.101.41:2":{
"rd":"192.168.101.41:2",
"65000:201":{
"rd":"65000:201",
"[5]:[0]:[32]:[192.168.101.41]":{
"prefix":"[5]:[0]:[32]:[192.168.101.41]",
"prefixLen":352,
Expand Down Expand Up @@ -125,8 +125,8 @@
]
}
},
"192.168.102.21:2":{
"rd":"192.168.102.21:2",
"65000:101":{
"rd":"65000:101",
"[5]:[0]:[32]:[192.168.102.21]":{
"prefix":"[5]:[0]:[32]:[192.168.102.21]",
"prefixLen":352,
Expand Down
2 changes: 2 additions & 0 deletions tests/topotests/bgp_evpn_rt5/r1/bgpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ router bgp 65000 vrf r1-vrf-101
network fd00::1/128
exit-address-family
address-family l2vpn evpn
rd 65000:101
route-target both 65:101
advertise ipv4 unicast
advertise ipv6 unicast
exit-address-family
Expand Down
8 changes: 4 additions & 4 deletions tests/topotests/bgp_evpn_rt5/r2/bgp_l2vpn_evpn_routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"bgpLocalRouterId":"192.168.100.41",
"defaultLocPrf":100,
"localAS":65000,
"192.168.101.41:2":{
"rd":"192.168.101.41:2",
"65000:201":{
"rd":"65000:201",
"[5]:[0]:[32]:[192.168.101.41]":{
"prefix":"[5]:[0]:[32]:[192.168.101.41]",
"prefixLen":352,
Expand Down Expand Up @@ -63,8 +63,8 @@
]
}
},
"192.168.102.21:2":{
"rd":"192.168.102.21:2",
"65000:101":{
"rd":"65000:101",
"[5]:[0]:[32]:[192.168.102.21]":{
"prefix":"[5]:[0]:[32]:[192.168.102.21]",
"prefixLen":352,
Expand Down
2 changes: 2 additions & 0 deletions tests/topotests/bgp_evpn_rt5/r2/bgpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ router bgp 65000 vrf r2-vrf-101
network fd00::3/128
exit-address-family
address-family l2vpn evpn
rd 65000:201
route-target both 65:101
advertise ipv4 unicast route-map rmap4
advertise ipv6 unicast route-map rmap6
exit-address-family
Expand Down
2 changes: 2 additions & 0 deletions tests/topotests/bgp_evpn_rt5/r3/bgpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ router bgp 65000 vrf r3-vrf-102
network fd00:102::1/128
exit-address-family
address-family l2vpn evpn
rd 65000:302
route-target both 65:101
advertise ipv4 unicast
advertise ipv6 unicast
exit-address-family
Expand Down

0 comments on commit 55fabf2

Please sign in to comment.