]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: bgp_evpn_rt5 re-address underlay
authorLouis Scalbert <louis.scalbert@6wind.com>
Wed, 23 Apr 2025 09:49:13 +0000 (11:49 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Thu, 24 Apr 2025 08:35:22 +0000 (10:35 +0200)
for clarity.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
tests/topotests/bgp_evpn_rt5/r1/bgp_l2vpn_evpn_routes.json
tests/topotests/bgp_evpn_rt5/r1/bgp_l2vpn_evpn_routes_all.json
tests/topotests/bgp_evpn_rt5/r1/bgp_vrf_ipv4_routes_detail.json
tests/topotests/bgp_evpn_rt5/r1/bgp_vrf_ipv6_routes_detail.json
tests/topotests/bgp_evpn_rt5/r1/frr.conf
tests/topotests/bgp_evpn_rt5/r2/bgp_l2vpn_evpn_routes.json
tests/topotests/bgp_evpn_rt5/r2/bgp_vrf_ipv4_routes_detail.json
tests/topotests/bgp_evpn_rt5/r2/bgp_vrf_ipv6_routes_detail.json
tests/topotests/bgp_evpn_rt5/r2/frr.conf
tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py

index cfab5726ed3c45261928931e4649ca3b369dc25f..a6497ea7c7eb9e15a6a458399125e10709453e65 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "bgpLocalRouterId":"192.168.100.21",
+    "bgpLocalRouterId":"192.168.0.1",
     "defaultLocPrf":100,
     "localAS":65000,
     "65000:201":{
                     "metric":0,
                     "locPrf":100,
                     "weight":0,
-                    "peerId":"192.168.100.41",
+                    "peerId":"192.168.0.2",
                     "path":"",
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.41",
+                            "ip":"192.168.0.2",
                             "hostname":"r2",
                             "afi":"ipv4",
                             "used":true
                     "metric":0,
                     "locPrf":100,
                     "weight":0,
-                    "peerId":"192.168.100.41",
+                    "peerId":"192.168.0.2",
                     "path":"",
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.41",
+                            "ip":"192.168.0.2",
                             "hostname":"r2",
                             "afi":"ipv4",
                             "used":true
@@ -87,7 +87,7 @@
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.21",
+                            "ip":"192.168.0.1",
                             "hostname":"r1",
                             "afi":"ipv4",
                             "used":true
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.21",
+                            "ip":"192.168.0.1",
                             "hostname":"r1",
                             "afi":"ipv4",
                             "used":true
index 444c67e44285f021d25f259f81aa2581f87dbb57..82fa2c0598f01dd17dd230fcd22711b9d1da67ac 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "bgpLocalRouterId":"192.168.100.21",
+    "bgpLocalRouterId":"192.168.0.1",
     "defaultLocPrf":100,
     "localAS":65000,
     "65000:201":{
                     "metric":0,
                     "locPrf":100,
                     "weight":0,
-                    "peerId":"192.168.100.41",
+                    "peerId":"192.168.0.2",
                     "path":"",
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.41",
+                            "ip":"192.168.0.2",
                             "hostname":"r2",
                             "afi":"ipv4",
                             "used":true
                     "metric":0,
                     "locPrf":100,
                     "weight":0,
-                    "peerId":"192.168.100.41",
+                    "peerId":"192.168.0.2",
                     "path":"",
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.41",
+                            "ip":"192.168.0.2",
                             "hostname":"r2",
                             "afi":"ipv4",
                             "used":true
                     "metric":0,
                     "locPrf":100,
                     "weight":0,
-                    "peerId":"192.168.100.41",
+                    "peerId":"192.168.0.2",
                     "path":"",
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.41",
+                            "ip":"192.168.0.2",
                             "hostname":"r2",
                             "afi":"ipv4",
                             "used":true
                     "metric":0,
                     "locPrf":100,
                     "weight":0,
-                    "peerId":"192.168.100.41",
+                    "peerId":"192.168.0.2",
                     "path":"",
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.41",
+                            "ip":"192.168.0.2",
                             "hostname":"r2",
                             "afi":"ipv4",
                             "used":true
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.21",
+                            "ip":"192.168.0.1",
                             "hostname":"r1",
                             "afi":"ipv4",
                             "used":true
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.21",
+                            "ip":"192.168.0.1",
                             "hostname":"r1",
                             "afi":"ipv4",
                             "used":true
index 3327bbcd31d9399a1e1666733c6f45b9256f1ce5..45b4645a80be13e986441bf59b0b463377078bac 100644 (file)
@@ -11,7 +11,7 @@
                 "extendedCommunity": null,
                 "nexthops": [
                     {
-                        "ip": "192.168.100.41",
+                        "ip": "192.168.0.2",
                         "hostname": "r2",
                         "afi": "ipv4",
                         "used": true
index f89b89f1dd2f0a089810e7cf73b8a6c26262f803..d063b23df6af72f684d98a921601809ac33b2cf2 100644 (file)
@@ -11,7 +11,7 @@
                 "extendedCommunity": null,
                 "nexthops": [
                     {
-                        "ip": "::ffff:192.168.100.41",
+                        "ip": "::ffff:192.168.0.2",
                         "hostname": "r2",
                         "afi": "ipv6",
                         "scope": "global",
index 275f13acd50946cbbca82dffafd33fd52e01ba36..550900c4c02f10296fa320da83b54798b9746828 100644 (file)
@@ -11,23 +11,23 @@ vrf r1-vrf-101
  exit-vrf
 !
 interface r1-eth0
- ip address 192.168.100.21/24
+ ip address 192.168.0.1/24
 !
 interface loop101 vrf r1-vrf-101
  ip address 192.168.102.21/32
  ipv6 address fd00::1/128
 !
 router bgp 65000
- bgp router-id 192.168.100.21
+ bgp router-id 192.168.0.1
  bgp log-neighbor-changes
  no bgp default ipv4-unicast
  no bgp ebgp-requires-policy
- neighbor 192.168.100.41 remote-as 65000
- neighbor 192.168.100.41 capability extended-nexthop
+ neighbor 192.168.0.2 remote-as 65000
+ neighbor 192.168.0.2 capability extended-nexthop
  !
  address-family l2vpn evpn
-  neighbor 192.168.100.41 activate
-  neighbor 192.168.100.41 route-map rmap_r1 in
+  neighbor 192.168.0.2 activate
+  neighbor 192.168.0.2 route-map rmap_r1 in
   advertise-all-vni
  exit-address-family
 !
index 3a55a7a38d044c9738cdb69fbb1338003b7580cb..ab03480d7096325bbd8d418cceb6c81a2b5b43ec 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "bgpLocalRouterId":"192.168.100.41",
+    "bgpLocalRouterId":"192.168.0.2",
     "defaultLocPrf":100,
     "localAS":65000,
     "65000:201":{
@@ -24,7 +24,7 @@
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.41",
+                            "ip":"192.168.0.2",
                             "hostname":"r2",
                             "afi":"ipv4",
                             "used":true
@@ -53,7 +53,7 @@
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.41",
+                            "ip":"192.168.0.2",
                             "hostname":"r2",
                             "afi":"ipv4",
                             "used":true
                     "metric":0,
                     "locPrf":100,
                     "weight":0,
-                    "peerId":"192.168.100.21",
+                    "peerId":"192.168.0.1",
                     "path":"",
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.21",
+                            "ip":"192.168.0.1",
                             "hostname":"r1",
                             "afi":"ipv4",
                             "used":true
                     "metric":0,
                     "locPrf":100,
                     "weight":0,
-                    "peerId":"192.168.100.21",
+                    "peerId":"192.168.0.1",
                     "path":"",
                     "origin":"IGP",
                     "nexthops":[
                         {
-                            "ip":"192.168.100.21",
+                            "ip":"192.168.0.1",
                             "hostname":"r1",
                             "afi":"ipv4",
                             "used":true
index c50964f8c0477b3d4a8b0a6c9d587a628811d10e..29d61e340fd929147979479542151da2279952af 100644 (file)
@@ -11,7 +11,7 @@
                 "extendedCommunity": null,
                 "nexthops": [
                     {
-                        "ip": "192.168.100.21",
+                        "ip": "192.168.0.1",
                         "hostname": "r1",
                         "afi": "ipv4",
                         "used": true
index 17928a9b0dc72bdfcf5fffdf972b337b5b9682db..97c155d04e5daa6b0cb812a63be5a68d91bd9adf 100644 (file)
@@ -11,7 +11,7 @@
                 "extendedCommunity": null,
                 "nexthops": [
                     {
-                        "ip": "::ffff:192.168.100.21",
+                        "ip": "::ffff:192.168.0.1",
                         "hostname": "r1",
                         "afi": "ipv6",
                         "scope": "global",
index 0bb4b7cab52878b8b5ef1d81063b9b1d727b21f0..fdb2a3b32927f969b24e42dfc6bb69ccd1b1a6c1 100644 (file)
@@ -12,18 +12,18 @@ interface loop101 vrf r2-vrf-101
  ipv6 address fd00::2/128
 !
 interface r2-eth0
- ip address 192.168.100.41/24
+ ip address 192.168.0.2/24
 !
 router bgp 65000
- bgp router-id 192.168.100.41
+ bgp router-id 192.168.0.2
  bgp log-neighbor-changes
  no bgp default ipv4-unicast
- neighbor 192.168.100.21 peer-group
- neighbor 192.168.100.21 remote-as 65000
- neighbor 192.168.100.21 capability extended-nexthop
+ neighbor 192.168.0.1 peer-group
+ neighbor 192.168.0.1 remote-as 65000
+ neighbor 192.168.0.1 capability extended-nexthop
  !
  address-family l2vpn evpn
-  neighbor 192.168.100.21 activate
+  neighbor 192.168.0.1 activate
   advertise-all-vni
  exit-address-family
 !
index 9cbbc0dee87941c06aa76323c47645609d3df839..6394e74678d68bbe622bd3eba83c3c75d70dac79 100644 (file)
@@ -88,7 +88,7 @@ def setup_module(mod):
         "ip link add name bridge-101 up type bridge stp_state 0",
         "ip link set bridge-101 master {}-vrf-101",
         "ip link set dev bridge-101 up",
-        "ip link add name vxlan-101 type vxlan id 101 dstport 4789 dev r2-eth0 local 192.168.100.41",
+        "ip link add name vxlan-101 type vxlan id 101 dstport 4789 dev r2-eth0 local 192.168.0.2",
         "ip link set dev vxlan-101 master bridge-101",
         "ip link set vxlan-101 up type bridge_slave learning off flood off mcast_flood off",
     ]
@@ -112,7 +112,7 @@ def setup_module(mod):
         logger.info("result: " + output)
 
     tgen.net["r1"].cmd_raises(
-        "ip link add name vxlan-101 type vxlan id 101 dstport 4789 dev r1-eth0 local 192.168.100.21"
+        "ip link add name vxlan-101 type vxlan id 101 dstport 4789 dev r1-eth0 local 192.168.0.1"
     )
     tgen.net["r1"].set_intf_netns("vxlan-101", "r1-vrf-101", up=True)
     tgen.net["r1"].cmd_raises("ip -n r1-vrf-101 link set lo up")
@@ -298,7 +298,7 @@ def test_router_check_ip():
                 "vrfName": "r1-vrf-101",
                 "nexthops": [
                     {
-                        "ip": "::ffff:192.168.100.41",
+                        "ip": "::ffff:192.168.0.2",
                     }
                 ],
             }
@@ -315,14 +315,14 @@ def _test_router_check_evpn_next_hop(expected_paths=1):
 
     # Check IPv4
     expected = {
-        "ip": "192.168.100.21",
+        "ip": "192.168.0.1",
         "refCount": 1,
         "prefixList": [{"prefix": "192.168.102.21/32", "pathCount": expected_paths}],
     }
     test_func = partial(
         topotest.router_json_cmp,
         dut,
-        "show evpn next-hops vni 101 ip 192.168.100.21 json",
+        "show evpn next-hops vni 101 ip 192.168.0.1 json",
         expected,
     )
     _, result = topotest.run_and_expect(test_func, None, count=20, wait=1)
@@ -330,14 +330,14 @@ def _test_router_check_evpn_next_hop(expected_paths=1):
 
     # Check IPv6
     expected = {
-        "ip": "::ffff:192.168.100.21",
+        "ip": "::ffff:192.168.0.1",
         "refCount": 1,
         "prefixList": [{"prefix": "fd00::1/128", "pathCount": expected_paths}],
     }
     test_func = partial(
         topotest.router_json_cmp,
         dut,
-        "show evpn next-hops vni 101 ip ::ffff:192.168.100.21 json",
+        "show evpn next-hops vni 101 ip ::ffff:192.168.0.1 json",
         expected,
     )
     _, result = topotest.run_and_expect(test_func, None, count=20, wait=1)
@@ -352,8 +352,8 @@ def _test_router_check_evpn_contexts(router, ipv4_only=False, ipv6_only=False):
         expected = {
             "101": {
                 "numNextHops": 1,
-                "192.168.100.41": {
-                    "nexthopIp": "192.168.100.41",
+                "192.168.0.2": {
+                    "nexthopIp": "192.168.0.2",
                 },
             }
         }
@@ -361,8 +361,8 @@ def _test_router_check_evpn_contexts(router, ipv4_only=False, ipv6_only=False):
         expected = {
             "101": {
                 "numNextHops": 1,
-                "::ffff:192.168.100.41": {
-                    "nexthopIp": "::ffff:192.168.100.41",
+                "::ffff:192.168.0.2": {
+                    "nexthopIp": "::ffff:192.168.0.2",
                 },
             }
         }
@@ -370,11 +370,11 @@ def _test_router_check_evpn_contexts(router, ipv4_only=False, ipv6_only=False):
         expected = {
             "101": {
                 "numNextHops": 2,
-                "192.168.100.41": {
-                    "nexthopIp": "192.168.100.41",
+                "192.168.0.2": {
+                    "nexthopIp": "192.168.0.2",
                 },
-                "::ffff:192.168.100.41": {
-                    "nexthopIp": "::ffff:192.168.100.41",
+                "::ffff:192.168.0.2": {
+                    "nexthopIp": "::ffff:192.168.0.2",
                 },
             }
         }
@@ -639,7 +639,7 @@ def _test_wait_for_multipath_convergence(router, expected_paths=1):
     Wait for multipath convergence on R2
     """
     expected = {
-        "192.168.102.21/32": [{"nexthops": [{"ip": "192.168.100.21"}] * expected_paths}]
+        "192.168.102.21/32": [{"nexthops": [{"ip": "192.168.0.1"}] * expected_paths}]
     }
     # Using router_json_cmp instead of verify_fib_routes, because we need to check for
     # two next-hops with the same IP address.
@@ -687,26 +687,26 @@ def test_evpn_multipath():
         "r1": {
             "raw_config": [
                 "interface r1-eth0",
-                "ip address 192.168.99.21/24",
+                "ip address 192.168.99.1/24",
                 "router bgp 65000",
-                "neighbor 192.168.99.41 remote-as 65000",
-                "neighbor 192.168.99.41 capability extended-nexthop",
-                "neighbor 192.168.99.41 update-source 192.168.99.21",
+                "neighbor 192.168.99.2 remote-as 65000",
+                "neighbor 192.168.99.2 capability extended-nexthop",
+                "neighbor 192.168.99.2 update-source 192.168.99.1",
                 "address-family l2vpn evpn",
-                "neighbor 192.168.99.41 activate",
-                "neighbor 192.168.99.41 route-map rmap_r1 in",
+                "neighbor 192.168.99.2 activate",
+                "neighbor 192.168.99.2 route-map rmap_r1 in",
             ]
         },
         "r2": {
             "raw_config": [
                 "interface r2-eth0",
-                "ip address 192.168.99.41/24",
+                "ip address 192.168.99.2/24",
                 "router bgp 65000",
-                "neighbor 192.168.99.21 remote-as 65000",
-                "neighbor 192.168.99.21 capability extended-nexthop",
-                "neighbor 192.168.99.21 update-source 192.168.99.41",
+                "neighbor 192.168.99.1 remote-as 65000",
+                "neighbor 192.168.99.1 capability extended-nexthop",
+                "neighbor 192.168.99.1 update-source 192.168.99.2",
                 "address-family l2vpn evpn",
-                "neighbor 192.168.99.21 activate",
+                "neighbor 192.168.99.1 activate",
             ]
         },
     }
@@ -726,8 +726,8 @@ def test_evpn_multipath():
     dut.vtysh_cmd("configure terminal\ndebug zebra dplane detailed\n")
 
     for i in range(4):
-        peer = "192.168.100.41" if i % 2 == 0 else "192.168.99.41"
-        local_peer = "192.168.100.21" if i % 2 == 0 else "192.168.99.21"
+        peer = "192.168.0.2" if i % 2 == 0 else "192.168.99.2"
+        local_peer = "192.168.0.1" if i % 2 == 0 else "192.168.99.1"
 
         # Retrieving the last established epoch from the DUT to check against
         last_established_epoch = _get_established_epoch(dut, local_peer)
@@ -763,13 +763,13 @@ def test_shutdown_multipath_check_next_hops():
         "r1": {
             "raw_config": [
                 "router bgp 65000",
-                "neighbor 192.168.99.41 shutdown",
+                "neighbor 192.168.99.2 shutdown",
             ]
         },
         "r2": {
             "raw_config": [
                 "router bgp 65000",
-                "neighbor 192.168.99.21 shutdown",
+                "neighbor 192.168.99.1 shutdown",
             ]
         },
     }