]> git.puffer.fish Git - matthieu/frr.git/commitdiff
topotests: bgp_srv6l3vpn_to_bgp_vrf, add redistribute BGP update in l3vpn
authorPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 14 Mar 2025 20:11:32 +0000 (21:11 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 24 Mar 2025 08:17:01 +0000 (09:17 +0100)
Add a BGP update in CE1 for redistribution. The expectation is that this
BGP update will be leaked to the L3VPN. Reversely, if the locator is
unset, the L3VPN prefix will be invalidated.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce1/frr.conf
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce2/ipv6_rib.json
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r1/vpnv6_rib.json
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r1/vpnv6_rib_locator_deleted.json
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r1/vpnv6_rib_locator_recreated.json
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r2/vpnv6_rib.json
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r2/vpnv6_rib_locator_deleted.json
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r2/vpnv6_rib_locator_recreated.json
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r2/vrf10_rib.json

index c70ad42437b5f0fd00a95f627b23c88576c695aa..ca28d55409be4e231837fd85a8b941ccfb8362da 100644 (file)
@@ -8,8 +8,10 @@ ipv6 forwarding
 !
 router bgp 65500
  bgp router-id 1.1.2.1
+ no bgp network import-check
  neighbor 2001:1::1 remote-as 65500
  address-family ipv6 unicast
+  network 2011:1::1/64
   neighbor 2001:1::1 activate
  exit-address-family
 exit
index 1f425952715dfd9a3264dd478a453f7f3180cd99..51076ee19484ca8b9f9cc81c5b70bce1cac15a9c 100644 (file)
         }
       ]
     }
+  ],
+  "2011:1::/64": [
+    {
+      "prefix": "2011:1::/64",
+      "protocol": "bgp",
+      "vrfId": 0,
+      "vrfName": "default",
+      "selected": true,
+      "destSelected": true,
+      "distance": 200,
+      "metric": 0,
+      "installed": true,
+      "table": 254,
+      "internalStatus": 16,
+      "internalFlags": 13,
+      "internalNextHopNum": 1,
+      "internalNextHopActiveNum": 1,
+      "nexthops": [
+        {
+          "flags": 3,
+          "fib": true,
+          "afi": "ipv6",
+          "interfaceName": "eth0",
+          "active": true
+        }
+      ]
+    }
   ]
 }
index d67a3e1cc547eb936c3a7b54a7153459458d10ff..afa713e37fb34a9c9b2c94f2d6d86f8cf024ae04 100644 (file)
               }
             ]
           }
+        ],
+        "2011:1::/64": [
+          {
+            "valid": true,
+            "bestpath": true,
+            "selectionReason": "First path received",
+            "pathFrom": "external",
+            "prefix": "2011:1::",
+            "prefixLen": 64,
+            "network": "2011:1::/64",
+            "metric": 0,
+            "weight": 0,
+            "peerId": "(unspec)",
+            "path": "",
+            "origin": "IGP",
+            "announceNexthopSelf": true,
+            "nhVrfName": "vrf10",
+            "nexthops": [
+              {
+                "ip": "2001:1::2",
+                "hostname": "r1",
+                "afi": "ipv6",
+                "used": true
+              }
+            ]
+          }
         ]
       },
       "1:20": {
         ]
       }
     }
-  }
+  },
+  "totalRoutes": 7,
+  "totalPaths": 7
 }
index 5a7407480ba09c31e0092e4501a37d1827c14326..a3a5f0438a182dfeb4d2206b340bd662f0ccc42a 100644 (file)
               }
             ]
           }
+        ],
+        "2011:1::/64": [
+          {
+            "pathFrom": "external",
+            "prefix": "2011:1::",
+            "prefixLen": 64,
+            "network": "2011:1::/64",
+            "metric": 0,
+            "weight": 0,
+            "peerId": "(unspec)",
+            "path": "",
+            "origin": "IGP",
+            "announceNexthopSelf": true,
+            "nhVrfName": "vrf10",
+            "nexthops": [
+              {
+                "ip": "2001:1::2",
+                "hostname": "r1",
+                "afi": "ipv6",
+                "used": true
+              }
+            ]
+          }
         ]
       },
       "1:20": {
         ]
       }
     }
-  }
+  },
+  "totalRoutes": 7,
+  "totalPaths": 7
 }
index d67a3e1cc547eb936c3a7b54a7153459458d10ff..afa713e37fb34a9c9b2c94f2d6d86f8cf024ae04 100644 (file)
               }
             ]
           }
+        ],
+        "2011:1::/64": [
+          {
+            "valid": true,
+            "bestpath": true,
+            "selectionReason": "First path received",
+            "pathFrom": "external",
+            "prefix": "2011:1::",
+            "prefixLen": 64,
+            "network": "2011:1::/64",
+            "metric": 0,
+            "weight": 0,
+            "peerId": "(unspec)",
+            "path": "",
+            "origin": "IGP",
+            "announceNexthopSelf": true,
+            "nhVrfName": "vrf10",
+            "nexthops": [
+              {
+                "ip": "2001:1::2",
+                "hostname": "r1",
+                "afi": "ipv6",
+                "used": true
+              }
+            ]
+          }
         ]
       },
       "1:20": {
         ]
       }
     }
-  }
+  },
+  "totalRoutes": 7,
+  "totalPaths": 7
 }
index 114fe1ca2532f8d689761968efc9785e3e92b062..e7695281d9a0b7b183a479d3c9673c7ec40fd8c2 100644 (file)
               }
             ]
           }
+        ],
+        "2011:1::/64": [
+          {
+            "valid": true,
+            "bestpath": true,
+            "selectionReason": "First path received",
+            "pathFrom": "external",
+            "prefix": "2011:1::",
+            "prefixLen": 64,
+            "network": "2011:1::/64",
+            "metric": 0,
+            "weight": 0,
+            "peerId": "2001::1",
+            "path": "65500",
+            "origin": "IGP",
+            "nexthops": [
+              {
+                "ip": "2001::1",
+                "hostname": "r1",
+                "afi": "ipv6",
+                "used": true
+              }
+            ]
+          }
         ]
       },
       "1:20": {
         ]
       }
     }
-  }
+  },
+  "totalRoutes": 7,
+  "totalPaths": 7
 }
index f0b764dcb281608f4514f9261717b58184e05d0c..caa5803bfec5a54390821ed2c1ce0edb6ff615f8 100644 (file)
@@ -89,5 +89,7 @@
         ]
       }
     }
-  }
+  },
+  "totalRoutes": 3,
+  "totalPaths": 3
 }
index 114fe1ca2532f8d689761968efc9785e3e92b062..e7695281d9a0b7b183a479d3c9673c7ec40fd8c2 100644 (file)
               }
             ]
           }
+        ],
+        "2011:1::/64": [
+          {
+            "valid": true,
+            "bestpath": true,
+            "selectionReason": "First path received",
+            "pathFrom": "external",
+            "prefix": "2011:1::",
+            "prefixLen": 64,
+            "network": "2011:1::/64",
+            "metric": 0,
+            "weight": 0,
+            "peerId": "2001::1",
+            "path": "65500",
+            "origin": "IGP",
+            "nexthops": [
+              {
+                "ip": "2001::1",
+                "hostname": "r1",
+                "afi": "ipv6",
+                "used": true
+              }
+            ]
+          }
         ]
       },
       "1:20": {
         ]
       }
     }
-  }
+  },
+  "totalRoutes": 7,
+  "totalPaths": 7
 }
index be1c58d3d12b4fe8222b66d8d8478ddf315bac9d..407dfb9fb46d9a74e34e0eea6e9760cdc916863f 100644 (file)
         }
       ]
     }
+  ],
+  "2011:1::/64": [
+    {
+      "prefix": "2011:1::/64",
+      "protocol": "bgp",
+      "vrfName": "vrf10",
+      "selected": true,
+      "destSelected": true,
+      "distance": 20,
+      "metric": 0,
+      "installed": true,
+      "table": 10,
+      "internalStatus": 16,
+      "internalFlags": 8,
+      "internalNextHopNum": 1,
+      "internalNextHopActiveNum": 1,
+      "nexthops": [
+        {
+          "flags": 3,
+          "fib": true,
+          "afi": "ipv6",
+          "interfaceName": "eth0",
+          "vrf": "default",
+          "active": true,
+          "weight": 1,
+          "seg6": {
+            "segs": "2001:db8:1:1:100::"
+          }
+        }
+      ]
+    }
   ]
 }