]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests: bgp_l3vpn_to_bgp_vrf - change 1 route to have equal metrics
authorLou Berger <lberger@labn.net>
Wed, 30 Sep 2020 14:50:57 +0000 (10:50 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 6 Oct 2020 14:34:32 +0000 (10:34 -0400)
Signed-off-by: Lou Berger <lberger@labn.net>
tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf
tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_routes.py

index dbb1c2437cb3c487166186d72fe3e63bb0bd996f..ae574319b30fb93e6e5c54f66b02b746cac29bb0 100644 (file)
@@ -19,7 +19,7 @@ router bgp 5227
      network 5.1.1.0/24 route-map rm-nh
      redistribute sharp route-map sharp-nh
      network 6.0.1.0/24 route-map rm-nh
-     network 6.0.2.0/24 route-map rm-nh
+     network 6.0.2.0/24 route-map rm-nh-same
      neighbor 192.168.1.1 activate
  exit-address-family
 !
@@ -43,5 +43,13 @@ route-map sharp-nh permit 10
  set extcommunity rt 80:987
  set community 0:65
 !
-
+route-map rm-nh-same permit 10
+ match ip address al-any
+ set ip next-hop 99.0.0.1
+ set local-preference 100
+ set metric 100
+ set large-community 12:34:11
+ set extcommunity rt 89:123
+ set community 0:67
+!
 end
index b0e19e6645c085705febdd2486094efad86680e3..599e2ddc1eb497dd5ae2cb639463d781351196ec 100644 (file)
@@ -19,7 +19,7 @@ router bgp 5227
      network 5.1.1.0/24 route-map rm-nh
      redistribute sharp route-map sharp-nh
      network 6.0.1.0/24 route-map rm-nh
-     network 6.0.2.0/24 route-map rm-nh
+     network 6.0.2.0/24 route-map rm-nh-same
      neighbor 192.168.1.1 activate
  exit-address-family
 !
@@ -43,5 +43,13 @@ route-map sharp-nh permit 10
  set extcommunity rt 70:456
  set community 0:66
 !
-
+route-map rm-nh-same permit 10
+ match ip address al-any
+ set ip next-hop 99.0.0.2
+ set local-preference 100
+ set metric 100
+ set large-community 12:34:12
+ set extcommunity rt 89:123
+ set community 0:67
+!
 end
index ec93c5ba2fb2218e91ebd2c8cc67e36d0848c3ad..e316de569049487d0457d6230b84dd80952c0b3c 100644 (file)
@@ -18,7 +18,7 @@ router bgp 5227
      network 5.1.2.0/24 route-map rm-nh
      network 5.1.3.0/24 route-map rm-nh
      network 6.0.1.0/24 route-map rm-nh
-     network 6.0.2.0/24 route-map rm-nh
+     network 6.0.2.0/24 route-map rm-nh-same
      neighbor 192.168.1.1 activate
  exit-address-family
 !
@@ -33,5 +33,13 @@ route-map rm-nh permit 10
  set extcommunity rt 89:123
  set community 0:67
 !
-
+route-map rm-nh-same permit 10
+ match ip address al-any
+ set ip next-hop 99.0.0.3
+ set local-preference 100
+ set metric 100
+ set large-community 12:34:13
+ set extcommunity rt 89:123
+ set community 0:67
+!
 end
index e1cc9574e8af73e10f9bfe7531bf9277f985e4dc..60d9e931083fbf23a564f108d8c7c3947459b5b8 100644 (file)
@@ -18,7 +18,7 @@ router bgp 5228 vrf ce4-cust2
      network 5.4.2.0/24 route-map rm-nh
      network 5.4.3.0/24 route-map rm-nh
      network 6.0.1.0/24 route-map rm-nh
-     network 6.0.2.0/24 route-map rm-nh
+     network 6.0.2.0/24 route-map rm-nh-same
      neighbor 192.168.2.1 activate
  exit-address-family
 !
@@ -33,5 +33,13 @@ route-map rm-nh permit 10
  set extcommunity rt 89:123
  set community 0:67
 !
-
+route-map rm-nh-same permit 10
+ match ip address al-any
+ set ip next-hop 99.0.0.4
+ set local-preference 100
+ set metric 100
+ set large-community 12:34:14
+ set extcommunity rt 89:123
+ set community 0:67
+!
 end
index 339838464a1b125e4d18cc11266a654d0bc5aef7..34f050512618003022925b1627567d65f63257a8 100644 (file)
@@ -321,9 +321,9 @@ want_r3_remote_cust1_routes = [
     {"p": "6.0.1.0/24", "n": "1.1.1.1", "bp": True},
     {"p": "6.0.1.0/24", "n": "4.4.4.4", "bp": False},
     {"p": "6.0.1.0/24", "n": "99.0.0.2", "bp": False},
-    {"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": True},
+    {"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": False},
     {"p": "6.0.2.0/24", "n": "4.4.4.4", "bp": False},
-    {"p": "6.0.2.0/24", "n": "99.0.0.2", "bp": False},
+    {"p": "6.0.2.0/24", "n": "99.0.0.2", "bp": True},
     {"p": "99.0.0.1/32", "n": "1.1.1.1", "bp": True},
     {"p": "99.0.0.3/32", "n": "4.4.4.4", "bp": True},
     {"p": "99.0.0.4/32", "n": "4.4.4.4", "bp": True},
@@ -341,10 +341,10 @@ want_r4_remote_cust1_routes = [
     {"p": "6.0.1.0/24", "n": "3.3.3.3", "bp": False},
     {"p": "6.0.1.0/24", "n": "99.0.0.3", "bp": False},
     {"p": "6.0.1.0/24", "n": "99.0.0.4", "bp": False},
-    {"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": True},
+    {"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": False},
     {"p": "6.0.2.0/24", "n": "3.3.3.3", "bp": False},
     {"p": "6.0.2.0/24", "n": "99.0.0.3", "bp": False},
-    {"p": "6.0.2.0/24", "n": "99.0.0.4", "bp": False},
+    {"p": "6.0.2.0/24", "n": "99.0.0.4", "bp": True},
     {"p": "99.0.0.1/32", "n": "1.1.1.1", "bp": True},
     {"p": "99.0.0.2/32", "n": "3.3.3.3", "bp": True},
     {"p": "99.0.0.3/32", "n": "192.168.1.2", "bp": True},
@@ -363,9 +363,9 @@ want_r4_remote_cust2_routes = [
     {"p": "6.0.1.0/24", "n": "3.3.3.3", "bp": False},
     {"p": "6.0.1.0/24", "n": "99.0.0.3", "bp": False},
     {"p": "6.0.1.0/24", "n": "99.0.0.4", "bp": False},
-    {"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": True},
+    {"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": False},
     {"p": "6.0.2.0/24", "n": "3.3.3.3", "bp": False},
-    {"p": "6.0.2.0/24", "n": "99.0.0.3", "bp": False},
+    {"p": "6.0.2.0/24", "n": "99.0.0.3", "bp": True},
     {"p": "6.0.2.0/24", "n": "99.0.0.4", "bp": False},
     {"p": "99.0.0.1/32", "n": "1.1.1.1", "bp": True},
     {"p": "99.0.0.2/32", "n": "3.3.3.3", "bp": True},
@@ -407,7 +407,7 @@ bgpribRequireUnicastRoutes("ce1", "ipv4", "", "Cust 1 routes from remote", want,
 luCommand(
     "ce2",
     'vtysh -c "show bgp ipv4 uni"',
-    "12 routes and 16",
+    "12 routes and 15",
     "wait",
     "Local and remote routes",
     10,
@@ -423,7 +423,6 @@ want = [
     {"p": "5.4.3.0/24", "n": "192.168.1.1", "bp": True},
     {"p": "6.0.1.0/24", "n": "192.168.1.1", "bp": False},
     {"p": "6.0.1.0/24", "n": "99.0.0.2", "bp": True},
-    {"p": "6.0.2.0/24", "n": "192.168.1.1", "bp": False},
     {"p": "6.0.2.0/24", "n": "99.0.0.2", "bp": True},
 ]
 bgpribRequireUnicastRoutes("ce2", "ipv4", "", "Cust 1 routes from remote", want, debug=False)