From 7946452bfc5a2a7585cfaddcec18d7fd023fb314 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Wed, 30 Sep 2020 10:50:57 -0400 Subject: [PATCH] tests: bgp_l3vpn_to_bgp_vrf - change 1 route to have equal metrics Signed-off-by: Lou Berger --- .../topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf | 12 ++++++++++-- .../topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf | 12 ++++++++++-- .../topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf | 12 ++++++++++-- .../topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf | 12 ++++++++++-- .../bgp_l3vpn_to_bgp_vrf/scripts/check_routes.py | 15 +++++++-------- 5 files changed, 47 insertions(+), 16 deletions(-) diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf index dbb1c2437c..ae574319b3 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf @@ -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 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf index b0e19e6645..599e2ddc1e 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf @@ -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 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf index ec93c5ba2f..e316de5690 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf @@ -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 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf index e1cc9574e8..60d9e93108 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf @@ -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 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_routes.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_routes.py index 339838464a..34f0505126 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_routes.py +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_routes.py @@ -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) -- 2.39.5