]> git.puffer.fish Git - mirror/frr.git/commitdiff
topotests: import vpn to default vrf in bgp_vpnv4_noretain 13750/head
authorLouis Scalbert <louis.scalbert@6wind.com>
Thu, 8 Jun 2023 11:42:30 +0000 (13:42 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Fri, 16 Jun 2023 12:18:44 +0000 (14:18 +0200)
Test that importing VPN prefixes into the default VRF is possible with
the no retain feature.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
tests/topotests/bgp_vpnv4_noretain/r1/bgpd.conf
tests/topotests/bgp_vpnv4_noretain/r1/ipv4_vpn_routes_all.json
tests/topotests/bgp_vpnv4_noretain/r1/ipv4_vpn_routes_no_retain_init.json
tests/topotests/bgp_vpnv4_noretain/r1/ipv4_vpn_routes_no_retain_init_plus_r2_vrf2.json
tests/topotests/bgp_vpnv4_noretain/r1/ipv4_vpn_routes_no_retain_init_plus_r2_vrf3.json
tests/topotests/bgp_vpnv4_noretain/r2/bgpd.conf
tests/topotests/bgp_vpnv4_noretain/r2/ipv4_vpn_routes_all.json
tests/topotests/bgp_vpnv4_noretain/r2/zebra.conf

index a30caf5c9d26123ed628650d9c54930d1c5e71db..0709e43edf21153318bd60f05542de1b195ecea4 100644 (file)
@@ -3,6 +3,10 @@ router bgp 65500
  neighbor 10.125.0.2 remote-as 65500
  address-family ipv4 unicast
   no neighbor 10.125.0.2 activate
+  label vpn export 100
+  rd vpn export 192.0.2.1:0
+  rt vpn import 192.0.2.2:400
+  import vpn
  exit-address-family
  address-family ipv4 vpn
   neighbor 10.125.0.2 activate
index e2fed4ef8200d677ed1201db2b16c50f7b9498b6..648bf854baad15788883009a17c1a1aaa57cc0f3 100644 (file)
                   ]
                }
             ]
+         },
+         "192.0.2.2:4":{
+            "10.204.0.0/24":[
+               {
+                  "valid":true,
+                  "bestpath":true,
+                  "selectionReason":"First path received",
+                  "pathFrom":"internal",
+                  "prefix":"10.204.0.0",
+                  "prefixLen":24,
+                  "network":"10.204.0.0\/24",
+                  "metric":0,
+                  "locPrf":100,
+                  "weight":0,
+                  "peerId":"10.125.0.2",
+                  "path":"",
+                  "origin":"incomplete",
+                  "nexthops":[
+                     {
+                        "ip":"10.125.0.2",
+                        "hostname":"r2",
+                        "afi":"ipv4",
+                        "used":true
+                     }
+                  ]
+               }
+            ]
          }
       }
    }
index a6f789282c677e4b40481b337ea1b58970b2ad60..f01607ac4e5a12153e7bd1131dfefff75d6267e6 100644 (file)
                   ]
                }
             ]
+         },
+         "192.0.2.2:4":{
+            "10.204.0.0/24":[
+               {
+                  "valid":true,
+                  "bestpath":true,
+                  "selectionReason":"First path received",
+                  "pathFrom":"internal",
+                  "prefix":"10.204.0.0",
+                  "prefixLen":24,
+                  "network":"10.204.0.0\/24",
+                  "metric":0,
+                  "locPrf":100,
+                  "weight":0,
+                  "peerId":"10.125.0.2",
+                  "path":"",
+                  "origin":"incomplete",
+                  "nexthops":[
+                     {
+                        "ip":"10.125.0.2",
+                        "hostname":"r2",
+                        "afi":"ipv4",
+                        "used":true
+                     }
+                  ]
+               }
+            ]
          }
       }
    }
index 4877bebb325eadd1732a2062802f4c85b56a327b..6df6c69b8fc5e199e70b1529b9d06cad0d9eac3b 100644 (file)
                   ]
                }
             ]
+         },
+         "192.0.2.2:4":{
+            "10.204.0.0/24":[
+               {
+                  "valid":true,
+                  "bestpath":true,
+                  "selectionReason":"First path received",
+                  "pathFrom":"internal",
+                  "prefix":"10.204.0.0",
+                  "prefixLen":24,
+                  "network":"10.204.0.0\/24",
+                  "metric":0,
+                  "locPrf":100,
+                  "weight":0,
+                  "peerId":"10.125.0.2",
+                  "path":"",
+                  "origin":"incomplete",
+                  "nexthops":[
+                     {
+                        "ip":"10.125.0.2",
+                        "hostname":"r2",
+                        "afi":"ipv4",
+                        "used":true
+                     }
+                  ]
+               }
+            ]
          }
       }
    }
index f05c12b42fce3584485160042b19ed5e05920617..7a17ff0f16a1da67d1c42f77f335994915c02488 100644 (file)
                   ]
                }
             ]
+         },
+         "192.0.2.2:4":{
+            "10.204.0.0/24":[
+               {
+                  "valid":true,
+                  "bestpath":true,
+                  "selectionReason":"First path received",
+                  "pathFrom":"internal",
+                  "prefix":"10.204.0.0",
+                  "prefixLen":24,
+                  "network":"10.204.0.0\/24",
+                  "metric":0,
+                  "locPrf":100,
+                  "weight":0,
+                  "peerId":"10.125.0.2",
+                  "path":"",
+                  "origin":"incomplete",
+                  "nexthops":[
+                     {
+                        "ip":"10.125.0.2",
+                        "hostname":"r2",
+                        "afi":"ipv4",
+                        "used":true
+                     }
+                  ]
+               }
+            ]
          }
       }
    }
index a5c13e0343dd67988500e3a93055012b9003759b..729daef2bc144054ab84e7a436b2b4ae6f822c75 100644 (file)
@@ -42,3 +42,13 @@ router bgp 65500 vrf vrf3
   export vpn
  exit-address-family
 !
+router bgp 65500 vrf vrf4
+ bgp router-id 192.0.2.2
+ address-family ipv4 unicast
+  redistribute connected
+  label vpn export 204
+  rd vpn export 192.0.2.2:4
+  rt vpn export 192.0.2.2:400
+  export vpn
+ exit-address-family
+!
index f94bea2e222bb06fe454578849fc4c8bf5774081..d8b8e88d936d8a25c2b127d438f529c4d99fe9c1 100644 (file)
             ]
           }
         ]
+      },
+      "192.0.2.2:4": {
+        "10.204.0.0/24": [
+          {
+            "valid": true,
+            "bestpath": true,
+            "selectionReason": "First path received",
+            "pathFrom": "external",
+            "prefix": "10.204.0.0",
+            "prefixLen": 24,
+            "network": "10.204.0.0/24",
+            "metric": 0,
+            "weight": 32768,
+            "peerId": "(unspec)",
+            "path": "",
+            "origin": "incomplete",
+            "announceNexthopSelf": true,
+            "nhVrfName": "vrf4",
+            "nexthops": [
+              {
+                "ip": "0.0.0.0",
+                "hostname": "r2",
+                "afi": "ipv4",
+                "used": true
+              }
+            ]
+          }
+        ]
       }
     }
   }
index 057a3614c7eb39b333b27f43d19d3aa4227ca808..f19ad9d3e8c232e998cf9e41fb4e0aac794df2b7 100644 (file)
@@ -17,3 +17,6 @@ interface r2-eth2 vrf vrf2
 interface r2-eth3 vrf vrf3
  ip address 10.203.0.1/24
 !
+interface r2-eth4 vrf vrf4
+ ip address 10.204.0.1/24
+!