From 88c6471720650a0563e55fc3ebf8982171b4a171 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:13:44 +0300 Subject: [PATCH 01/13] Revert "bgpd: fix sending ipv6 local nexthop if global present" This reverts commit 424fe0bf809c1d84f16aba3f5e5f8249af29083b. --- bgpd/bgp_zebra.c | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 5bb177b2f795..e72a739798d2 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -303,12 +303,11 @@ static int bgp_ifp_down(struct interface *ifp) static int bgp_interface_address_add(ZAPI_CALLBACK_ARGS) { - struct connected *ifc, *connected; + struct connected *ifc; struct bgp *bgp; struct peer *peer; struct prefix *addr; struct listnode *node, *nnode; - bool v6_ll_in_nh_global; afi_t afi; safi_t safi; @@ -343,27 +342,6 @@ static int bgp_interface_address_add(ZAPI_CALLBACK_ARGS) addr = ifc->address; for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { - v6_ll_in_nh_global = false; - - if (IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_global)) { - frr_each (if_connected, ifc->ifp->connected, - connected) { - if (connected->address->family != - AF_INET6) - continue; - if (!IPV6_ADDR_SAME(&connected->address - ->u.prefix6, - &peer->nexthop - .v6_global)) - continue; - /* peer->nexthop.v6_global contains a link-local address - * that needs to be replaced by the global address. - */ - v6_ll_in_nh_global = true; - break; - } - } - /* * If the Peer's interface name matches the * interface name for which BGP received the @@ -374,11 +352,10 @@ static int bgp_interface_address_add(ZAPI_CALLBACK_ARGS) * into peer's v6_global and send updates out * with new nexthop addr. */ - if (v6_ll_in_nh_global || - (peer->conf_if && - strcmp(peer->conf_if, ifc->ifp->name) == 0 && - (IS_MAPPED_IPV6(&peer->nexthop.v6_global) || - IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_global)))) { + if ((peer->conf_if && + (strcmp(peer->conf_if, ifc->ifp->name) == 0)) && + ((IS_MAPPED_IPV6(&peer->nexthop.v6_global)) || + IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_global))) { if (bgp_debug_zebra(ifc->address)) { zlog_debug("Update peer %pBP's current intf global addr from %pI6 to %pI6 and send updates", peer, From e85077c69d01e3ab9a2309734fcea00760d6a97b Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:14:12 +0300 Subject: [PATCH 02/13] Revert "bgpd: log new ipv6 global in bgp_interface_address_add" This reverts commit b083885198157555bbb916ecae9809c5d67a567b. --- bgpd/bgp_zebra.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index e72a739798d2..c407008d5737 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -357,10 +357,9 @@ static int bgp_interface_address_add(ZAPI_CALLBACK_ARGS) ((IS_MAPPED_IPV6(&peer->nexthop.v6_global)) || IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_global))) { if (bgp_debug_zebra(ifc->address)) { - zlog_debug("Update peer %pBP's current intf global addr from %pI6 to %pI6 and send updates", + zlog_debug("Update peer %pBP's current intf addr %pI6 and send updates", peer, - &peer->nexthop.v6_global, - &addr->u.prefix6); + &peer->nexthop.v6_global); } memcpy(&peer->nexthop.v6_global, &addr->u.prefix6, IPV6_MAX_BYTELEN); From 0a7e9711878074ba6c223238bb1c130be28cb1d4 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:14:16 +0300 Subject: [PATCH 03/13] Revert "bgpd: reduce bgp_interface_address_add indentation" This reverts commit 778e0df87b7a846f46d84f61ea889a32fe578e49. --- bgpd/bgp_zebra.c | 84 ++++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index c407008d5737..79bb43bda941 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -325,47 +325,53 @@ static int bgp_interface_address_add(ZAPI_CALLBACK_ARGS) if (!bgp) return 0; - if (!if_is_operative(ifc->ifp)) - return 0; - - bgp_connected_add(bgp, ifc); - - /* If we have learnt of any neighbors on this interface, - * check to kick off any BGP interface-based neighbors, - * but only if this is a link-local address. - */ - if (IN6_IS_ADDR_LINKLOCAL(&ifc->address->u.prefix6) && - !list_isempty(ifc->ifp->nbr_connected)) - bgp_start_interface_nbrs(bgp, ifc->ifp); - else if (ifc->address->family == AF_INET6 && - !IN6_IS_ADDR_LINKLOCAL(&ifc->address->u.prefix6)) { - addr = ifc->address; + if (if_is_operative(ifc->ifp)) { + bgp_connected_add(bgp, ifc); - for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { - /* - * If the Peer's interface name matches the - * interface name for which BGP received the - * update and if the received interface address - * is a globalV6 and if the peer is currently - * using a v4-mapped-v6 addr or a link local - * address, then copy the Rxed global v6 addr - * into peer's v6_global and send updates out - * with new nexthop addr. - */ - if ((peer->conf_if && - (strcmp(peer->conf_if, ifc->ifp->name) == 0)) && - ((IS_MAPPED_IPV6(&peer->nexthop.v6_global)) || - IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_global))) { - if (bgp_debug_zebra(ifc->address)) { - zlog_debug("Update peer %pBP's current intf addr %pI6 and send updates", - peer, - &peer->nexthop.v6_global); + /* If we have learnt of any neighbors on this interface, + * check to kick off any BGP interface-based neighbors, + * but only if this is a link-local address. + */ + if (IN6_IS_ADDR_LINKLOCAL(&ifc->address->u.prefix6) + && !list_isempty(ifc->ifp->nbr_connected)) + bgp_start_interface_nbrs(bgp, ifc->ifp); + else if (ifc->address->family == AF_INET6 && + !IN6_IS_ADDR_LINKLOCAL(&ifc->address->u.prefix6)) { + addr = ifc->address; + + for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { + /* + * If the Peer's interface name matches the + * interface name for which BGP received the + * update and if the received interface address + * is a globalV6 and if the peer is currently + * using a v4-mapped-v6 addr or a link local + * address, then copy the Rxed global v6 addr + * into peer's v6_global and send updates out + * with new nexthop addr. + */ + if ((peer->conf_if && + (strcmp(peer->conf_if, ifc->ifp->name) == + 0)) && + ((IS_MAPPED_IPV6( + &peer->nexthop.v6_global)) || + IN6_IS_ADDR_LINKLOCAL( + &peer->nexthop.v6_global))) { + + if (bgp_debug_zebra(ifc->address)) { + zlog_debug( + "Update peer %pBP's current intf addr %pI6 and send updates", + peer, + &peer->nexthop + .v6_global); + } + memcpy(&peer->nexthop.v6_global, + &addr->u.prefix6, + IPV6_MAX_BYTELEN); + FOREACH_AFI_SAFI (afi, safi) + bgp_announce_route(peer, afi, + safi, true); } - memcpy(&peer->nexthop.v6_global, - &addr->u.prefix6, IPV6_MAX_BYTELEN); - FOREACH_AFI_SAFI (afi, safi) - bgp_announce_route(peer, afi, safi, - true); } } } From 8a7c4c023e2a4cbecfd93ad0b680a773c2964e37 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:14:20 +0300 Subject: [PATCH 04/13] Revert "bgpd: optimize bgp_interface_address_add" This reverts commit 8599fe2b5e34b2ac1a46a14983ddcc2336e9116d. --- bgpd/bgp_zebra.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 79bb43bda941..00013b1e7af1 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -335,11 +335,13 @@ static int bgp_interface_address_add(ZAPI_CALLBACK_ARGS) if (IN6_IS_ADDR_LINKLOCAL(&ifc->address->u.prefix6) && !list_isempty(ifc->ifp->nbr_connected)) bgp_start_interface_nbrs(bgp, ifc->ifp); - else if (ifc->address->family == AF_INET6 && - !IN6_IS_ADDR_LINKLOCAL(&ifc->address->u.prefix6)) { + else { addr = ifc->address; for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { + if (addr->family == AF_INET) + continue; + /* * If the Peer's interface name matches the * interface name for which BGP received the @@ -353,6 +355,7 @@ static int bgp_interface_address_add(ZAPI_CALLBACK_ARGS) if ((peer->conf_if && (strcmp(peer->conf_if, ifc->ifp->name) == 0)) && + !IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6) && ((IS_MAPPED_IPV6( &peer->nexthop.v6_global)) || IN6_IS_ADDR_LINKLOCAL( From efd8f613f97480a0aeb90f0446c78bf87f6442f4 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:14:55 +0300 Subject: [PATCH 05/13] Revert "topotests: update bgp_vrf_leaking_5549_routes" This reverts commit f1b8364ab3784cebfc0689883efdb21ac7d06213. --- .../pe1/results/vrf10_ipv4_unicast.json | 7 +++---- .../pe1/results/vrf20_ipv4_unicast.json | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/topotests/bgp_vrf_leaking_5549_routes/pe1/results/vrf10_ipv4_unicast.json b/tests/topotests/bgp_vrf_leaking_5549_routes/pe1/results/vrf10_ipv4_unicast.json index f664bb6b526a..768bffbe9d71 100644 --- a/tests/topotests/bgp_vrf_leaking_5549_routes/pe1/results/vrf10_ipv4_unicast.json +++ b/tests/topotests/bgp_vrf_leaking_5549_routes/pe1/results/vrf10_ipv4_unicast.json @@ -15,16 +15,15 @@ "origin": "incomplete", "nexthops": [ { - "ip": "::ffff:c000:202", "hostname": "ce1", "afi": "ipv6", - "scope": "global" + "scope": "global", + "used": true }, { "hostname": "ce1", "afi": "ipv6", - "scope": "link-local", - "used": true + "scope": "link-local" } ] } diff --git a/tests/topotests/bgp_vrf_leaking_5549_routes/pe1/results/vrf20_ipv4_unicast.json b/tests/topotests/bgp_vrf_leaking_5549_routes/pe1/results/vrf20_ipv4_unicast.json index 3498ed4326b4..1e93715270cf 100644 --- a/tests/topotests/bgp_vrf_leaking_5549_routes/pe1/results/vrf20_ipv4_unicast.json +++ b/tests/topotests/bgp_vrf_leaking_5549_routes/pe1/results/vrf20_ipv4_unicast.json @@ -17,16 +17,15 @@ "nhVrfName": "vrf10", "nexthops": [ { - "ip": "::ffff:c000:202", "hostname": "pe1", "afi": "ipv6", - "scope": "global" + "scope": "global", + "used": true }, { "hostname": "pe1", "afi": "ipv6", - "scope": "link-local", - "used": true + "scope": "link-local" } ] } From 863da18d1e15b1538438f1e15b59419094ecd797 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:14:59 +0300 Subject: [PATCH 06/13] Revert "bgpd: prefer link-local to a ipv4-mapped ipv6 global" This reverts commit 5dd731af8421e8b3070eec0b3af4ad234c95c6bb. --- bgpd/bgp_nht.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index 8ce45558e96f..dc6dc54a3b07 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -320,6 +320,11 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop, afi = BGP_ATTR_MP_NEXTHOP_LEN_IP6(pi->attr) ? AFI_IP6 : AFI_IP; + /* Validation for the ipv4 mapped ipv6 nexthop. */ + if (IS_MAPPED_IPV6(&pi->attr->mp_nexthop_global)) { + afi = AFI_IP; + } + /* This will return true if the global IPv6 NH is a link local * addr */ if (make_prefix(afi, pi, &p) < 0) @@ -1035,11 +1040,19 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p) p->u.prefix4 = p_orig->u.prefix4; p->prefixlen = p_orig->prefixlen; } else { - if (p_orig->family == AF_EVPN) - p->u.prefix4 = pi->attr->mp_nexthop_global_in; - else - p->u.prefix4 = pi->attr->nexthop; - p->prefixlen = IPV4_MAX_BITLEN; + if (IS_MAPPED_IPV6(&pi->attr->mp_nexthop_global)) { + ipv4_mapped_ipv6_to_ipv4( + &pi->attr->mp_nexthop_global, &ipv4); + p->u.prefix4 = ipv4; + p->prefixlen = IPV4_MAX_BITLEN; + } else { + if (p_orig->family == AF_EVPN) + p->u.prefix4 = + pi->attr->mp_nexthop_global_in; + else + p->u.prefix4 = pi->attr->nexthop; + p->prefixlen = IPV4_MAX_BITLEN; + } } break; case AFI_IP6: @@ -1055,7 +1068,6 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p) /* If we receive MP_REACH nexthop with ::(LL) * or LL(LL), use LL address as nexthop cache. */ - p->prefixlen = IPV6_MAX_BITLEN; if (pi->attr && pi->attr->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL && @@ -1070,22 +1082,15 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p) pi->attr->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL) { if (CHECK_FLAG(pi->attr->nh_flags, - BGP_ATTR_NH_MP_PREFER_GLOBAL)) { - if (IS_MAPPED_IPV6( - &pi->attr->mp_nexthop_global)) { - ipv4_mapped_ipv6_to_ipv4( - &pi->attr->mp_nexthop_global, - &ipv4); - p->u.prefix4 = ipv4; - p->prefixlen = IPV4_MAX_BITLEN; - } else - p->u.prefix6 = - pi->attr->mp_nexthop_global; - } else + BGP_ATTR_NH_MP_PREFER_GLOBAL)) + p->u.prefix6 = + pi->attr->mp_nexthop_global; + else p->u.prefix6 = pi->attr->mp_nexthop_local; } else p->u.prefix6 = pi->attr->mp_nexthop_global; + p->prefixlen = IPV6_MAX_BITLEN; } break; default: From 8dffec1c4e0ee4c2e26486b345b086c8fb1a1ced Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:15:04 +0300 Subject: [PATCH 07/13] Revert "bgpd: set ipv4-mapped ipv6 for ipv4 with ipv6 nexthop" This reverts commit fc5a738409eac9ca938cbb398872ea77d9cc5023. --- bgpd/bgp_updgrp_packet.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index 6e30d4f8464a..7c92bbd514ae 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -523,13 +523,11 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt, gnh_modified = 1; } - if (peer->nexthop.v4.s_addr != INADDR_ANY && - (IN6_IS_ADDR_UNSPECIFIED(mod_v6nhg) || - (IN6_IS_ADDR_LINKLOCAL(mod_v6nhg) && - peer->connection->su.sa.sa_family == AF_INET6 && - paf->afi == AFI_IP))) { - ipv4_to_ipv4_mapped_ipv6(mod_v6nhg, peer->nexthop.v4); - gnh_modified = 1; + if (IN6_IS_ADDR_UNSPECIFIED(mod_v6nhg)) { + if (peer->nexthop.v4.s_addr != INADDR_ANY) { + ipv4_to_ipv4_mapped_ipv6(mod_v6nhg, + peer->nexthop.v4); + } } if (IS_MAPPED_IPV6(&peer->nexthop.v6_global)) { From 9a5c3b931e0c4cf6f8bf7f9b2e31a04ea96250af Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:15:08 +0300 Subject: [PATCH 08/13] Revert "tests: ipv6 global removal in bgp_nexthop_mp_ipv4_6" This reverts commit 04c220bedb63334a65677a46ef84938cc812221f. --- .../r1/bgp_ipv6_step2.json | 90 ------------------- .../r2/bgp_ipv6_step2.json | 48 ---------- .../r3/bgp_ipv6_step2.json | 48 ---------- .../r4/bgp_ipv6_step2.json | 49 ---------- .../r5/bgp_ipv6_step2.json | 49 ---------- .../r6/bgp_ipv6_step2.json | 48 ---------- .../r7/bgp_ipv6_step2.json | 48 ---------- .../r8/bgp_ipv6_step2.json | 48 ---------- .../rr1/bgp_ipv6_step2.json | 62 ------------- .../test_nexthop_mp_ipv4_6.py | 52 ----------- 10 files changed, 542 deletions(-) delete mode 100755 tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv6_step2.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv6_step2.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv6_step2.json delete mode 100755 tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv6_step2.json delete mode 100755 tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv6_step2.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv6_step2.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv6_step2.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv6_step2.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv6_step2.json diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv6_step2.json deleted file mode 100755 index f7c5c7c3b56a..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv6_step2.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "multipath": true, - "path": "65000 65700", - "nexthops": [ - { - "ip": "fd00:0:2::3", - "afi": "ipv6", - "scope": "global" - }, - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - }, - { - "valid": true, - "bestpath": true, - "path": "65000 65700", - "nexthops": [ - { - "ip": "fd00:0:1::2", - "afi": "ipv6", - "scope": "global" - }, - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "multipath": true, - "path": "65000 65800", - "nexthops": [ - { - "ip": "fd00:0:2::3", - "afi": "ipv6", - "scope": "global" - }, - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - }, - { - "valid": true, - "bestpath": true, - "path": "65000 65800", - "nexthops": [ - { - "ip": "fd00:0:1::2", - "afi": "ipv6", - "scope": "global" - }, - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv6_step2.json deleted file mode 100644 index 21f36089b6dd..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv6_step2.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv6_step2.json deleted file mode 100644 index 21f36089b6dd..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv6_step2.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv6_step2.json deleted file mode 100755 index 7d0786c0ef7b..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv6_step2.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "2001:db8::2", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv6_step2.json deleted file mode 100755 index 7d0786c0ef7b..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv6_step2.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "2001:db8::2", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv6_step2.json deleted file mode 100644 index 55912dd74ca4..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv6_step2.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "nexthops": [ - { - "ip": "2001:db8::2", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv6_step2.json deleted file mode 100644 index 8fe5f7c1de48..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv6_step2.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65000 65100", - "nexthops": [ - { - "ip": "fd00:0:9::6", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv6_step2.json deleted file mode 100644 index 20f4940328f7..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv6_step2.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65000 65100", - "nexthops": [ - { - "ip": "fd00:0:9::6", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv6_step2.json deleted file mode 100644 index 4ab0e1c2aec5..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv6_step2.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "2001:db8::2", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - }, - { - "valid": true, - "multipath": true, - "path": "65100", - "nexthops": [ - { - "ip": "2001:db8::3", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/test_nexthop_mp_ipv4_6.py b/tests/topotests/bgp_nexthop_mp_ipv4_6/test_nexthop_mp_ipv4_6.py index 911a6d757f8a..4da13b16d17d 100644 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/test_nexthop_mp_ipv4_6.py +++ b/tests/topotests/bgp_nexthop_mp_ipv4_6/test_nexthop_mp_ipv4_6.py @@ -226,58 +226,6 @@ def test_bgp_ping_ok_step1(): check_ping("h1", "fd00:800::1", True, 5, 1) -def test_bgp_ipv6_nexthop_step2(): - """ - Remove IPv6 global on r1 and r7 - Assert that BGP has correct ipv6 nexthops. - """ - - tgen = get_topogen() - if tgen.routers_have_failure(): - pytest.skip(tgen.errors) - - tgen.gears["r1"].vtysh_cmd( - """ -configure -interface eth-r2 - no ipv6 address fd00:0:1::1/64 -! -interface eth-r3 - no ipv6 address fd00:0:2::1/64 -""" - ) - - for rname, router in tgen.routers().items(): - if "h" in rname: - # hosts - continue - if "rs1" in rname: - continue - ref_file = "{}/{}/bgp_ipv6_step2.json".format(CWD, rname) - expected = json.loads(open(ref_file).read()) - test_func = partial( - topotest.router_json_cmp, - router, - "show bgp ipv6 unicast json", - expected, - ) - _, res = topotest.run_and_expect(test_func, None, count=30, wait=1) - assertmsg = "{}: BGP IPv6 Nexthop failure".format(rname) - assert res is None, assertmsg - - -def test_bgp_ping_ok_step2(): - "Check that h1 pings h2 and h3" - tgen = get_topogen() - if tgen.routers_have_failure(): - pytest.skip(tgen.errors) - - check_ping("h1", "192.168.7.1", True, 5, 1) - check_ping("h1", "fd00:700::1", True, 5, 1) - check_ping("h1", "192.168.8.1", True, 5, 1) - check_ping("h1", "fd00:800::1", True, 5, 1) - - if __name__ == "__main__": args = ["-s"] + sys.argv[1:] sys.exit(pytest.main(args)) From 3e7094e2b19459c81aac40fa00b4ea0812c1902e Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:15:13 +0300 Subject: [PATCH 09/13] Revert "bgpd: fix "used" json key on link-local nexthop" This reverts commit 2de4dfc97adfec788e45e148b4204196d612c81c. --- bgpd/bgp_route.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index f6fe87e352e3..9e40e165fa1c 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -9659,7 +9659,10 @@ void route_vty_out(struct vty *vty, const struct prefix *p, json_object_string_add(json_nexthop_ll, "scope", "link-local"); - if (!CHECK_FLAG(attr->nh_flags, + if ((IPV6_ADDR_CMP(&attr->mp_nexthop_global, + &attr->mp_nexthop_local) != + 0) && + !CHECK_FLAG(attr->nh_flags, BGP_ATTR_NH_MP_PREFER_GLOBAL)) json_object_boolean_true_add( json_nexthop_ll, "used"); From 2fd44b1bbbca9e3f9554a8bf2530619f646e7f34 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:15:18 +0300 Subject: [PATCH 10/13] Revert "bgpd: fix removing ipv6 global nexhop" This reverts commit ee0378cdbb458f9d3710f1fb557368ace8d72477. --- bgpd/bgp_zebra.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 00013b1e7af1..d4a0209ea2f0 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -385,12 +385,10 @@ static int bgp_interface_address_add(ZAPI_CALLBACK_ARGS) static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS) { struct listnode *node, *nnode; - struct connected *ifc, *connected; + struct connected *ifc; struct peer *peer; struct bgp *bgp; struct prefix *addr; - struct in6_addr *v6_global = NULL; - struct in6_addr *v6_local = NULL; afi_t afi; safi_t safi; @@ -412,17 +410,7 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS) addr = ifc->address; if (bgp && addr->family == AF_INET6 && - !IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6)) { - /* find another IPv6 global if possible and find the IPv6 link-local */ - frr_each (if_connected, ifc->ifp->connected, connected) { - if (connected->address->family != AF_INET6) - continue; - if (IN6_IS_ADDR_LINKLOCAL(&connected->address->u.prefix6)) - v6_local = &connected->address->u.prefix6; - else - v6_global = &connected->address->u.prefix6; - } - + !IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix)) { /* * When we are using the v6 global as part of the peering * nexthops and we are removing it, then we need to @@ -433,15 +421,8 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS) for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { if (IPV6_ADDR_SAME(&peer->nexthop.v6_global, &addr->u.prefix6)) { - if (v6_global) - IPV6_ADDR_COPY(&peer->nexthop.v6_global, - v6_global); - else if (v6_local) - IPV6_ADDR_COPY(&peer->nexthop.v6_global, - v6_local); - else - memset(&peer->nexthop.v6_global, 0, - IPV6_MAX_BYTELEN); + memset(&peer->nexthop.v6_global, 0, + IPV6_MAX_BYTELEN); FOREACH_AFI_SAFI (afi, safi) bgp_announce_route(peer, afi, safi, true); From 72b4ca50d06b18a24eb9855d5dfc8d4973117977 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:15:22 +0300 Subject: [PATCH 11/13] Revert "bgpd: optimize bgp_interface_address_del" This reverts commit fc1dd2e5060b6e470daa203080bdb9473a637407. --- bgpd/bgp_zebra.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index d4a0209ea2f0..c3b93adc2688 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -389,8 +389,6 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS) struct peer *peer; struct bgp *bgp; struct prefix *addr; - afi_t afi; - safi_t safi; bgp = bgp_lookup_by_vrf_id(vrf_id); @@ -409,8 +407,7 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS) addr = ifc->address; - if (bgp && addr->family == AF_INET6 && - !IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix)) { + if (bgp) { /* * When we are using the v6 global as part of the peering * nexthops and we are removing it, then we need to @@ -419,10 +416,17 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS) * we do not want the peering to bounce. */ for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { - if (IPV6_ADDR_SAME(&peer->nexthop.v6_global, - &addr->u.prefix6)) { - memset(&peer->nexthop.v6_global, 0, - IPV6_MAX_BYTELEN); + afi_t afi; + safi_t safi; + + if (addr->family == AF_INET) + continue; + + if (!IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6) + && memcmp(&peer->nexthop.v6_global, + &addr->u.prefix6, 16) + == 0) { + memset(&peer->nexthop.v6_global, 0, 16); FOREACH_AFI_SAFI (afi, safi) bgp_announce_route(peer, afi, safi, true); From 9e3aa8c1ac2c2fe13fe3c31b62a85b6d96768b6d Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 20:28:13 +0300 Subject: [PATCH 12/13] Revert "topotests: add bgp_nexthop_mp_ipv4_6 test" This reverts commit 62913cb15d8195c41229c2f6090d7e189e04646e. Signed-off-by: Donatas Abraitis --- .../bgp_nexthop_mp_ipv4_6/__init__.py | 0 .../bgp_nexthop_mp_ipv4_6/h1/zebra.conf | 6 - .../bgp_nexthop_mp_ipv4_6/h2/zebra.conf | 6 - .../bgp_nexthop_mp_ipv4_6/h3/zebra.conf | 6 - .../bgp_nexthop_mp_ipv4_6/r1/bgp_ipv4.json | 70 ------ .../r1/bgp_ipv6_step1.json | 90 ------- .../bgp_nexthop_mp_ipv4_6/r1/bgpd.conf | 23 -- .../bgp_nexthop_mp_ipv4_6/r1/zebra.conf | 16 -- .../bgp_nexthop_mp_ipv4_6/r2/bgp_ipv4.json | 46 ---- .../r2/bgp_ipv6_step1.json | 53 ---- .../bgp_nexthop_mp_ipv4_6/r2/bgpd.conf | 11 - .../bgp_nexthop_mp_ipv4_6/r2/isisd.conf | 24 -- .../bgp_nexthop_mp_ipv4_6/r2/zebra.conf | 12 - .../bgp_nexthop_mp_ipv4_6/r3/bgp_ipv4.json | 46 ---- .../r3/bgp_ipv6_step1.json | 53 ---- .../bgp_nexthop_mp_ipv4_6/r3/bgpd.conf | 11 - .../bgp_nexthop_mp_ipv4_6/r3/isisd.conf | 24 -- .../bgp_nexthop_mp_ipv4_6/r3/zebra.conf | 12 - .../bgp_nexthop_mp_ipv4_6/r4/bgp_ipv4.json | 46 ---- .../r4/bgp_ipv6_step1.json | 49 ---- .../bgp_nexthop_mp_ipv4_6/r4/bgpd.conf | 13 - .../bgp_nexthop_mp_ipv4_6/r4/isisd.conf | 26 -- .../bgp_nexthop_mp_ipv4_6/r4/zebra.conf | 12 - .../bgp_nexthop_mp_ipv4_6/r5/bgp_ipv4.json | 46 ---- .../r5/bgp_ipv6_step1.json | 49 ---- .../bgp_nexthop_mp_ipv4_6/r5/bgpd.conf | 13 - .../bgp_nexthop_mp_ipv4_6/r5/isisd.conf | 26 -- .../bgp_nexthop_mp_ipv4_6/r5/zebra.conf | 12 - .../bgp_nexthop_mp_ipv4_6/r6/bgp_ipv4.json | 46 ---- .../r6/bgp_ipv6_step1.json | 48 ---- .../bgp_nexthop_mp_ipv4_6/r6/bgpd.conf | 17 -- .../bgp_nexthop_mp_ipv4_6/r6/isisd.conf | 31 --- .../bgp_nexthop_mp_ipv4_6/r6/zebra.conf | 16 -- .../bgp_nexthop_mp_ipv4_6/r7/bgp_ipv4.json | 46 ---- .../r7/bgp_ipv6_step1.json | 48 ---- .../bgp_nexthop_mp_ipv4_6/r7/bgpd.conf | 21 -- .../bgp_nexthop_mp_ipv4_6/r7/zebra.conf | 12 - .../bgp_nexthop_mp_ipv4_6/r8/bgp_ipv4.json | 46 ---- .../r8/bgp_ipv6_step1.json | 48 ---- .../bgp_nexthop_mp_ipv4_6/r8/bgpd.conf | 21 -- .../bgp_nexthop_mp_ipv4_6/r8/zebra.conf | 12 - .../bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv4.json | 58 ----- .../rr1/bgp_ipv6_step1.json | 62 ----- .../bgp_nexthop_mp_ipv4_6/rr1/bgpd.conf | 26 -- .../bgp_nexthop_mp_ipv4_6/rr1/isisd.conf | 40 --- .../bgp_nexthop_mp_ipv4_6/rr1/zebra.conf | 21 -- .../bgp_nexthop_mp_ipv4_6/rs1/bgpd.conf | 21 -- .../bgp_nexthop_mp_ipv4_6/rs1/isisd.conf | 36 --- .../bgp_nexthop_mp_ipv4_6/rs1/zebra.conf | 8 - .../test_nexthop_mp_ipv4_6.py | 231 ------------------ 50 files changed, 1716 deletions(-) delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/__init__.py delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/h1/zebra.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/h2/zebra.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/h3/zebra.conf delete mode 100755 tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv4.json delete mode 100755 tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv6_step1.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgpd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r1/zebra.conf delete mode 100755 tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv4.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv6_step1.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgpd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r2/isisd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r2/zebra.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv4.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv6_step1.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgpd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r3/isisd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r3/zebra.conf delete mode 100755 tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv4.json delete mode 100755 tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv6_step1.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgpd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r4/isisd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r4/zebra.conf delete mode 100755 tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv4.json delete mode 100755 tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv6_step1.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgpd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r5/isisd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r5/zebra.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv4.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv6_step1.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgpd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r6/isisd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r6/zebra.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv4.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv6_step1.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgpd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r7/zebra.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv4.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv6_step1.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgpd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/r8/zebra.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv4.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv6_step1.json delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgpd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/isisd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/zebra.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/bgpd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/isisd.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/zebra.conf delete mode 100644 tests/topotests/bgp_nexthop_mp_ipv4_6/test_nexthop_mp_ipv4_6.py diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/__init__.py b/tests/topotests/bgp_nexthop_mp_ipv4_6/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/h1/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/h1/zebra.conf deleted file mode 100644 index 9b19b2cfbd36..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/h1/zebra.conf +++ /dev/null @@ -1,6 +0,0 @@ -ipv6 route ::/0 fd00:100::2 -ip route 0.0.0.0/0 192.168.1.2 -interface eth-r1 - ip address 192.168.1.1/24 - ipv6 address fd00:100::1/64 -! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/h2/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/h2/zebra.conf deleted file mode 100644 index 2bf4a666808a..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/h2/zebra.conf +++ /dev/null @@ -1,6 +0,0 @@ -ipv6 route ::/0 fd00:700::2 -ip route 0.0.0.0/0 192.168.7.2 -interface eth-r7 - ip address 192.168.7.1/24 - ipv6 address fd00:700::1/64 -! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/h3/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/h3/zebra.conf deleted file mode 100644 index e8b6ac6e268e..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/h3/zebra.conf +++ /dev/null @@ -1,6 +0,0 @@ -ipv6 route ::/0 fd00:800::2 -ip route 0.0.0.0/0 192.168.8.2 -interface eth-r8 - ip address 192.168.8.1/24 - ipv6 address fd00:800::1/64 -! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv4.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv4.json deleted file mode 100755 index 12fecee39fdf..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv4.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "routes": { - "192.168.1.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "", - "nexthops": [ - { - "ip": "0.0.0.0", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.7.0/24": [ - { - "valid": true, - "multipath": true, - "path": "65000 65700", - "nexthops": [ - { - "ip": "172.16.1.3", - "afi": "ipv4", - "used": true - } - ] - }, - { - "valid": true, - "bestpath": true, - "path": "65000 65700", - "nexthops": [ - { - "ip": "172.16.0.2", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.8.0/24": [ - { - "valid": true, - "multipath": true, - "path": "65000 65800", - "nexthops": [ - { - "ip": "172.16.1.3", - "afi": "ipv4", - "used": true - } - ] - }, - { - "valid": true, - "bestpath": true, - "path": "65000 65800", - "nexthops": [ - { - "ip": "172.16.0.2", - "afi": "ipv4", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv6_step1.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv6_step1.json deleted file mode 100755 index f7c5c7c3b56a..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv6_step1.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "multipath": true, - "path": "65000 65700", - "nexthops": [ - { - "ip": "fd00:0:2::3", - "afi": "ipv6", - "scope": "global" - }, - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - }, - { - "valid": true, - "bestpath": true, - "path": "65000 65700", - "nexthops": [ - { - "ip": "fd00:0:1::2", - "afi": "ipv6", - "scope": "global" - }, - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "multipath": true, - "path": "65000 65800", - "nexthops": [ - { - "ip": "fd00:0:2::3", - "afi": "ipv6", - "scope": "global" - }, - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - }, - { - "valid": true, - "bestpath": true, - "path": "65000 65800", - "nexthops": [ - { - "ip": "fd00:0:1::2", - "afi": "ipv6", - "scope": "global" - }, - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgpd.conf deleted file mode 100644 index 23b986d1301a..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgpd.conf +++ /dev/null @@ -1,23 +0,0 @@ -router bgp 65100 - no bgp ebgp-requires-policy - neighbor 172.16.0.2 remote-as external - neighbor 172.16.1.3 remote-as external - ! neighbor 172.16.0.2 capability extended-nexthop - ! - address-family ipv4 unicast - redistribute connected route-map RMAP4 - ! - address-family ipv6 unicast - redistribute connected route-map RMAP6 - neighbor 172.16.0.2 activate - neighbor 172.16.1.3 activate - ! - -ip prefix-list RANGE4 seq 10 permit 192.168.0.0/16 le 24 -ipv6 prefix-list RANGE6 seq 10 permit fd00:100::0/64 - -route-map RMAP4 permit 10 - match ip address prefix-list RANGE4 -! -route-map RMAP6 permit 10 - match ipv6 address prefix-list RANGE6 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/zebra.conf deleted file mode 100644 index 79cbafb5b817..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/zebra.conf +++ /dev/null @@ -1,16 +0,0 @@ -! -interface eth-h1 - ip address 192.168.1.2/24 - ipv6 address fd00:100::2/64 -! -interface eth-r2 - ip address 172.16.0.1/24 - ipv6 address fd00:0:1::1/64 -! -interface eth-r3 - ip address 172.16.1.1/24 - ipv6 address fd00:0:2::1/64 -! -interface lo - ip address 192.0.2.1/32 - ipv6 address 2001:db8::1/128 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv4.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv4.json deleted file mode 100755 index 64dadf680c0b..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv4.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "routes": { - "192.168.1.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "172.16.0.1", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.7.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "172.17.0.7", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.8.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "172.17.0.8", - "afi": "ipv4", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv6_step1.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv6_step1.json deleted file mode 100644 index 4f86a1a648a5..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv6_step1.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "fd00:0:1::1", - "afi": "ipv6", - "scope": "global" - }, - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgpd.conf deleted file mode 100644 index badb11cbebe2..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgpd.conf +++ /dev/null @@ -1,11 +0,0 @@ -router bgp 65000 - no bgp ebgp-requires-policy - neighbor 172.16.0.1 remote-as external - ! neighbor 172.16.0.1 capability extended-nexthop - neighbor 192.0.2.101 remote-as internal - neighbor 192.0.2.101 update-source 192.0.2.2 - ! - address-family ipv6 unicast - neighbor 172.16.0.1 activate - neighbor 192.0.2.101 activate - ! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/isisd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/isisd.conf deleted file mode 100644 index 16963798f817..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/isisd.conf +++ /dev/null @@ -1,24 +0,0 @@ -! -interface lo - ip router isis 1 - ipv6 router isis 1 - isis passive -! -interface eth-rr1 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -interface eth-r1 - ip router isis 1 - ipv6 router isis 1 - isis passive -! -router isis 1 - net 49.0000.0000.0000.0002.00 - is-type level-1 - lsp-gen-interval 1 - topology ipv6-unicast -! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/zebra.conf deleted file mode 100644 index 8997115d87cc..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/zebra.conf +++ /dev/null @@ -1,12 +0,0 @@ -! -interface eth-r1 - ip address 172.16.0.2/24 - ipv6 address fd00:0:1::2/64 -! -interface eth-rr1 - ip address 10.0.0.2/24 - ipv6 address fd00:0:3::2/64 -! -interface lo - ip address 192.0.2.2/32 - ipv6 address 2001:db8::2/128 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv4.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv4.json deleted file mode 100644 index 0f18a43bf54a..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv4.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "routes": { - "192.168.1.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "172.16.1.1", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.7.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "172.17.0.7", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.8.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "172.17.0.8", - "afi": "ipv4", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv6_step1.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv6_step1.json deleted file mode 100644 index f44121c30ef8..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv6_step1.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "fd00:0:2::1", - "afi": "ipv6", - "scope": "global" - }, - { - "afi": "ipv6", - "scope": "link-local", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgpd.conf deleted file mode 100644 index 4dec311f511d..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgpd.conf +++ /dev/null @@ -1,11 +0,0 @@ -router bgp 65000 - no bgp ebgp-requires-policy - neighbor 172.16.1.1 remote-as external - ! neighbor 172.16.1.1 capability extended-nexthop - neighbor 192.0.2.101 remote-as internal - neighbor 192.0.2.101 update-source 192.0.2.3 - ! - address-family ipv6 unicast - neighbor 172.16.1.1 activate - neighbor 192.0.2.101 activate - ! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/isisd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/isisd.conf deleted file mode 100644 index fe3e307b42ee..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/isisd.conf +++ /dev/null @@ -1,24 +0,0 @@ -! -interface lo - ip router isis 1 - ipv6 router isis 1 - isis passive -! -interface eth-rr1 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -interface eth-r1 - ip router isis 1 - ipv6 router isis 1 - isis passive -! -router isis 1 - net 49.0000.0000.0000.0003.00 - is-type level-1 - lsp-gen-interval 1 - topology ipv6-unicast -! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/zebra.conf deleted file mode 100644 index 8074bbdcde43..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/zebra.conf +++ /dev/null @@ -1,12 +0,0 @@ -! -interface eth-r1 - ip address 172.16.1.3/24 - ipv6 address fd00:0:2::3/64 -! -interface eth-rr1 - ip address 10.0.1.3/24 - ipv6 address fd00:0:4::3/64 -! -interface lo - ip address 192.0.2.3/32 - ipv6 address 2001:db8::3/128 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv4.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv4.json deleted file mode 100755 index 64dadf680c0b..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv4.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "routes": { - "192.168.1.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "172.16.0.1", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.7.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "172.17.0.7", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.8.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "172.17.0.8", - "afi": "ipv4", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv6_step1.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv6_step1.json deleted file mode 100755 index 756a78e3b141..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv6_step1.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "fd00:0:1::1", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgpd.conf deleted file mode 100644 index 2dbc4acddc11..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgpd.conf +++ /dev/null @@ -1,13 +0,0 @@ -router bgp 65000 - neighbor 192.0.2.5 remote-as internal - neighbor 192.0.2.6 remote-as internal - neighbor 192.0.2.101 remote-as internal - neighbor 192.0.2.5 update-source 192.0.2.4 - neighbor 192.0.2.6 update-source 192.0.2.4 - neighbor 192.0.2.101 update-source 192.0.2.4 - ! - address-family ipv6 unicast - neighbor 192.0.2.5 activate - neighbor 192.0.2.6 activate - neighbor 192.0.2.101 activate - ! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/isisd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/isisd.conf deleted file mode 100644 index 21eb80f58b44..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/isisd.conf +++ /dev/null @@ -1,26 +0,0 @@ -! -interface lo - ip router isis 1 - ipv6 router isis 1 - isis passive -! -interface eth-rr1 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -interface eth-r6 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -router isis 1 - net 49.0000.0000.0000.0004.00 - is-type level-1 - lsp-gen-interval 1 - topology ipv6-unicast -! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/zebra.conf deleted file mode 100644 index c598b345e506..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/zebra.conf +++ /dev/null @@ -1,12 +0,0 @@ -! -interface eth-r6 - ip address 10.0.4.4/24 - ipv6 address fd00:0:7::4/64 -! -interface eth-rr1 - ip address 10.0.2.4/24 - ipv6 address fd00:0:5::4/64 -! -interface lo - ip address 192.0.2.4/32 - ipv6 address 2001:db8::4/128 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv4.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv4.json deleted file mode 100755 index 64dadf680c0b..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv4.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "routes": { - "192.168.1.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "172.16.0.1", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.7.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "172.17.0.7", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.8.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "172.17.0.8", - "afi": "ipv4", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv6_step1.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv6_step1.json deleted file mode 100755 index 756a78e3b141..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv6_step1.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "fd00:0:1::1", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgpd.conf deleted file mode 100644 index 101edbd71b21..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgpd.conf +++ /dev/null @@ -1,13 +0,0 @@ -router bgp 65000 - neighbor 192.0.2.4 remote-as internal - neighbor 192.0.2.6 remote-as internal - neighbor 192.0.2.101 remote-as internal - neighbor 192.0.2.4 update-source 192.0.2.5 - neighbor 192.0.2.6 update-source 192.0.2.5 - neighbor 192.0.2.101 update-source 192.0.2.5 - ! - address-family ipv6 unicast - neighbor 192.0.2.4 activate - neighbor 192.0.2.6 activate - neighbor 192.0.2.101 activate - ! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/isisd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/isisd.conf deleted file mode 100644 index f998e805b5d9..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/isisd.conf +++ /dev/null @@ -1,26 +0,0 @@ -! -interface lo - ip router isis 1 - ipv6 router isis 1 - isis passive -! -interface eth-rr1 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -interface eth-r6 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -router isis 1 - net 49.0000.0000.0000.0005.00 - is-type level-1 - lsp-gen-interval 1 - topology ipv6-unicast -! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/zebra.conf deleted file mode 100644 index 7b43db0958cd..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/zebra.conf +++ /dev/null @@ -1,12 +0,0 @@ -! -interface eth-r6 - ip address 10.0.5.5/24 - ipv6 address fd00:0:8::5/64 -! -interface eth-rr1 - ip address 10.0.3.5/24 - ipv6 address fd00:0:6::5/64 -! -interface lo - ip address 192.0.2.5/32 - ipv6 address 2001:db8::5/128 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv4.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv4.json deleted file mode 100644 index 64dadf680c0b..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv4.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "routes": { - "192.168.1.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "172.16.0.1", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.7.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "172.17.0.7", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.8.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "172.17.0.8", - "afi": "ipv4", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv6_step1.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv6_step1.json deleted file mode 100644 index 1a01ead2cd14..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv6_step1.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "nexthops": [ - { - "ip": "fd00:0:1::1", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgpd.conf deleted file mode 100644 index e036a779ae32..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgpd.conf +++ /dev/null @@ -1,17 +0,0 @@ -router bgp 65000 - no bgp ebgp-requires-policy - no bgp enforce-first-as - neighbor 192.0.2.4 remote-as internal - neighbor 192.0.2.5 remote-as internal - neighbor 192.0.2.101 remote-as internal - neighbor 172.17.0.201 remote-as external - neighbor 192.0.2.4 update-source 192.0.2.6 - neighbor 192.0.2.5 update-source 192.0.2.6 - neighbor 192.0.2.101 update-source 192.0.2.6 - ! - address-family ipv6 unicast - neighbor 192.0.2.4 activate - neighbor 192.0.2.5 activate - neighbor 192.0.2.101 activate - neighbor 172.17.0.201 activate - ! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/isisd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/isisd.conf deleted file mode 100644 index b575290e9b0b..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/isisd.conf +++ /dev/null @@ -1,31 +0,0 @@ -! -interface lo - ip router isis 1 - ipv6 router isis 1 - isis passive -! -interface eth-r4 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -interface eth-r5 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -interface eth-sw1 - ip router isis 1 - ipv6 router isis 1 - isis passive -! -router isis 1 - net 49.0000.0000.0000.0006.00 - is-type level-1 - lsp-gen-interval 1 - topology ipv6-unicast -! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/zebra.conf deleted file mode 100644 index fce74c146c2d..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/zebra.conf +++ /dev/null @@ -1,16 +0,0 @@ -! -interface eth-r4 - ip address 10.0.4.6/24 - ipv6 address fd00:0:7::6/64 -! -interface eth-r5 - ip address 10.0.5.6/24 - ipv6 address fd00:0:8::6/64 -! -interface eth-sw1 - ip address 172.17.0.6/24 - ipv6 address fd00:0:9::6/64 -! -interface lo - ip address 192.0.2.6/32 - ipv6 address 2001:db8::6/128 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv4.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv4.json deleted file mode 100644 index 72b0f03c5139..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv4.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "routes": { - "192.168.1.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65000 65100", - "nexthops": [ - { - "ip": "172.17.0.6", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.7.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "", - "nexthops": [ - { - "ip": "0.0.0.0", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.8.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "172.17.0.8", - "afi": "ipv4", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv6_step1.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv6_step1.json deleted file mode 100644 index 8fe5f7c1de48..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv6_step1.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65000 65100", - "nexthops": [ - { - "ip": "fd00:0:9::6", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgpd.conf deleted file mode 100644 index a707b23af0c2..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgpd.conf +++ /dev/null @@ -1,21 +0,0 @@ -router bgp 65700 - no bgp ebgp-requires-policy - no bgp enforce-first-as - neighbor 172.17.0.201 remote-as external - ! - address-family ipv4 unicast - redistribute connected route-map RMAP4 - ! - address-family ipv6 unicast - redistribute connected route-map RMAP6 - neighbor 172.17.0.201 activate - ! - -ip prefix-list RANGE4 seq 10 permit 192.168.0.0/16 le 24 -ipv6 prefix-list RANGE6 seq 10 permit fd00:700::0/64 - -route-map RMAP4 permit 10 - match ip address prefix-list RANGE4 -! -route-map RMAP6 permit 10 - match ipv6 address prefix-list RANGE6 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/zebra.conf deleted file mode 100644 index 75448297eb78..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/zebra.conf +++ /dev/null @@ -1,12 +0,0 @@ -! -interface eth-h2 - ip address 192.168.7.2/24 - ipv6 address fd00:700::2/64 -! -interface eth-sw1 - ip address 172.17.0.7/24 - ipv6 address fd00:0:9::7/64 -! -interface lo - ip address 192.0.2.7/32 - ipv6 address 2001:db8::7/128 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv4.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv4.json deleted file mode 100644 index 596ee4b40bcf..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv4.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "routes": { - "192.168.1.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65000 65100", - "nexthops": [ - { - "ip": "172.17.0.6", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.7.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "172.17.0.7", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.8.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "", - "nexthops": [ - { - "ip": "0.0.0.0", - "afi": "ipv4", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv6_step1.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv6_step1.json deleted file mode 100644 index 20f4940328f7..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv6_step1.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65000 65100", - "nexthops": [ - { - "ip": "fd00:0:9::6", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgpd.conf deleted file mode 100644 index d57712dcddbf..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgpd.conf +++ /dev/null @@ -1,21 +0,0 @@ -router bgp 65800 - no bgp ebgp-requires-policy - no bgp enforce-first-as - neighbor 172.17.0.201 remote-as external - ! - address-family ipv4 unicast - redistribute connected route-map RMAP4 - ! - address-family ipv6 unicast - redistribute connected route-map RMAP6 - neighbor 172.17.0.201 activate - ! - -ip prefix-list RANGE4 seq 10 permit 192.168.0.0/16 le 24 -ipv6 prefix-list RANGE6 seq 10 permit fd00:800::0/64 - -route-map RMAP4 permit 10 - match ip address prefix-list RANGE4 -! -route-map RMAP6 permit 10 - match ipv6 address prefix-list RANGE6 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/zebra.conf deleted file mode 100644 index 7e2479b751d9..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/zebra.conf +++ /dev/null @@ -1,12 +0,0 @@ -! -interface eth-h3 - ip address 192.168.8.2/24 - ipv6 address fd00:800::2/64 -! -interface eth-sw1 - ip address 172.17.0.8/24 - ipv6 address fd00:0:9::8/64 -! -interface lo - ip address 192.0.2.8/32 - ipv6 address 2001:db8::8/128 diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv4.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv4.json deleted file mode 100644 index ac67fe069c8b..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv4.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "routes": { - "192.168.1.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "172.16.0.1", - "afi": "ipv4", - "used": true - } - ] - }, - { - "valid": true, - "multipath": true, - "path": "65100", - "nexthops": [ - { - "ip": "172.16.1.1", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.7.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "172.17.0.7", - "afi": "ipv4", - "used": true - } - ] - } - ], - "192.168.8.0/24": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "172.17.0.8", - "afi": "ipv4", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv6_step1.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv6_step1.json deleted file mode 100644 index 4e359fd97ff9..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv6_step1.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "fd00:0:1::1", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - }, - { - "valid": true, - "multipath": true, - "path": "65100", - "nexthops": [ - { - "ip": "fd00:0:2::1", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:700::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65700", - "nexthops": [ - { - "ip": "fd00:0:9::7", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:800::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65800", - "nexthops": [ - { - "ip": "fd00:0:9::8", - "scope": "global", - "afi": "ipv6", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgpd.conf deleted file mode 100644 index 9bbac8b68e9e..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgpd.conf +++ /dev/null @@ -1,26 +0,0 @@ -router bgp 65000 - neighbor 192.0.2.2 remote-as internal - neighbor 192.0.2.3 remote-as internal - neighbor 192.0.2.4 remote-as internal - neighbor 192.0.2.5 remote-as internal - neighbor 192.0.2.6 remote-as internal - neighbor 192.0.2.2 update-source 192.0.2.101 - neighbor 192.0.2.3 update-source 192.0.2.101 - neighbor 192.0.2.4 update-source 192.0.2.101 - neighbor 192.0.2.5 update-source 192.0.2.101 - neighbor 192.0.2.6 update-source 192.0.2.101 - ! - address-family ipv4 unicast - neighbor 192.0.2.2 route-reflector-client - neighbor 192.0.2.3 route-reflector-client - - ! - address-family ipv6 unicast - neighbor 192.0.2.2 activate - neighbor 192.0.2.3 activate - neighbor 192.0.2.4 activate - neighbor 192.0.2.5 activate - neighbor 192.0.2.6 activate - neighbor 192.0.2.2 route-reflector-client - neighbor 192.0.2.3 route-reflector-client - ! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/isisd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/isisd.conf deleted file mode 100644 index fe5bcfb9f1bc..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/isisd.conf +++ /dev/null @@ -1,40 +0,0 @@ -! -interface lo - ip router isis 1 - ipv6 router isis 1 - isis passive -! -interface eth-r2 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -interface eth-r3 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -interface eth-r4 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -interface eth-r5 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 - isis network point-to-point -! -router isis 1 - net 49.0000.0000.0000.0101.00 - is-type level-1 - lsp-gen-interval 1 - topology ipv6-unicast -! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/zebra.conf deleted file mode 100644 index 7f5c8d1c61a1..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/zebra.conf +++ /dev/null @@ -1,21 +0,0 @@ -! -interface eth-r2 - ip address 10.0.0.101/24 - ipv6 address fd00:0:3::101/64 -! -interface eth-r3 - ip address 10.0.1.101/24 - ipv6 address fd00:0:4::101/64 -! -interface eth-r4 - ip address 10.0.2.101/24 - ipv6 address fd00:0:5::101/64 -! -interface eth-r5 - ip address 10.0.3.101/24 - ipv6 address fd00:0:6::101/64 -! -interface lo - ip address 192.0.2.101/32 - ipv6 address 2001:db8::101/128 - diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/bgpd.conf deleted file mode 100644 index 596cc3e25cb0..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/bgpd.conf +++ /dev/null @@ -1,21 +0,0 @@ -router bgp 65200 view RS - bgp router-id 192.0.2.201 - no bgp ebgp-requires-policy - neighbor 172.17.0.6 remote-as external - neighbor 172.17.0.7 remote-as external - neighbor 172.17.0.8 remote-as external - ! - address-family ipv4 unicast - neighbor 172.17.0.6 route-server-client - neighbor 172.17.0.7 route-server-client - neighbor 172.17.0.8 route-server-client - - ! - address-family ipv6 unicast - neighbor 172.17.0.6 activate - neighbor 172.17.0.7 activate - neighbor 172.17.0.8 activate - neighbor 172.17.0.6 route-server-client - neighbor 172.17.0.7 route-server-client - neighbor 172.17.0.8 route-server-client - ! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/isisd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/isisd.conf deleted file mode 100644 index 892b4e7b74e8..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/isisd.conf +++ /dev/null @@ -1,36 +0,0 @@ -! -interface lo - ip router isis 1 - ipv6 router isis 1 - isis passive -! -interface eth-r2 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 -! -interface eth-r3 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 -! -interface eth-r4 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 -! -interface eth-r5 - ip router isis 1 - ipv6 router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 -! -router isis 1 - net 49.0000.0000.0000.0101.00 - is-type level-1 - lsp-gen-interval 1 - topology ipv6-unicast -! diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/zebra.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/zebra.conf deleted file mode 100644 index 75ee08363ae4..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/rs1/zebra.conf +++ /dev/null @@ -1,8 +0,0 @@ -interface eth-sw1 - ip address 172.17.0.201/24 - ipv6 address fd00:0:9::201/64 -! -interface lo - ip address 192.0.2.201/32 - ipv6 address 2001:db8::201/128 - diff --git a/tests/topotests/bgp_nexthop_mp_ipv4_6/test_nexthop_mp_ipv4_6.py b/tests/topotests/bgp_nexthop_mp_ipv4_6/test_nexthop_mp_ipv4_6.py deleted file mode 100644 index 4da13b16d17d..000000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/test_nexthop_mp_ipv4_6.py +++ /dev/null @@ -1,231 +0,0 @@ -#!/usr/bin/env python -# SPDX-License-Identifier: ISC - -# -# Copyright (c) 2024 by 6WIND -# - -""" -Test BGP nexthop conformity with IPv4,6 MP-BGP over IPv4 peering -""" - -import os -import sys -import json -import functools -from functools import partial -import pytest - -# Save the Current Working Directory to find configuration files. -CWD = os.path.dirname(os.path.realpath(__file__)) -sys.path.append(os.path.join(CWD, "../")) - -# pylint: disable=C0413 -# Import topogen and topotest helpers -from lib import topotest -from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.checkping import check_ping -from lib.bgp import verify_bgp_convergence_from_running_config - -pytestmark = [pytest.mark.bgpd, pytest.mark.isisd] - - -def build_topo(tgen): - r""" - +---+ - | h1| - +---+ - | - +---+ - | r1| AS 65100 - +---+ - / \ _____________ - / \ - +---+ +---+ - | r2| | r3| rr1 is route-reflector - +---+ +---+ for r2 and r3 - \ / - \ / - +---+ - |rr1| AS 65000 - +---+ - / \ - / \ - +---+ +---+ - | r4| | r5| iBGP full-mesh between - +---+ +---+ rr1, r4, r5 and r6 - \ / - \ / - +---+ - | r6| - +---+ - | _____________ - | - | +---+ - [sw1]-----|rs1| AS 65200 - /\ +---+ rs1: route-server - / \ - / \ _____________ - +---+ +---+ - | r7| | r8| AS 65700 (r7) - +---+ +---+ AS 65800 (r8) - | | - +---+ +---+ - | h2| | h3| - +---+ +---+ - """ - - def connect_routers(tgen, left, right): - for rname in [left, right]: - if rname not in tgen.routers().keys(): - tgen.add_router(rname) - - switch = tgen.add_switch("s-{}-{}".format(left, right)) - switch.add_link(tgen.gears[left], nodeif="eth-{}".format(right)) - switch.add_link(tgen.gears[right], nodeif="eth-{}".format(left)) - - def connect_switchs(tgen, rname, switch): - if rname not in tgen.routers().keys(): - tgen.add_router(rname) - - switch.add_link(tgen.gears[rname], nodeif="eth-{}".format(switch.name)) - - connect_routers(tgen, "h1", "r1") - connect_routers(tgen, "r1", "r2") - connect_routers(tgen, "r1", "r3") - connect_routers(tgen, "r2", "rr1") - connect_routers(tgen, "r3", "rr1") - connect_routers(tgen, "rr1", "r4") - connect_routers(tgen, "rr1", "r5") - connect_routers(tgen, "r4", "r6") - connect_routers(tgen, "r5", "r6") - - sw1 = tgen.add_switch("sw1") - connect_switchs(tgen, "r6", sw1) - connect_switchs(tgen, "rs1", sw1) - connect_switchs(tgen, "r7", sw1) - connect_switchs(tgen, "r8", sw1) - - connect_routers(tgen, "r7", "h2") - connect_routers(tgen, "r8", "h3") - - -def setup_module(mod): - "Sets up the pytest environment" - - tgen = Topogen(build_topo, mod.__name__) - tgen.start_topology() - logger.info("setup_module") - - for rname, router in tgen.routers().items(): - router.load_config( - TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) - ) - if "h" in rname: - # hosts - continue - - router.load_config( - TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname)) - ) - - if rname in ["r1", "r7", "r8", "rs1"]: - # external routers - continue - - router.load_config( - TopoRouter.RD_ISIS, os.path.join(CWD, "{}/isisd.conf".format(rname)) - ) - - # Initialize all routers. - tgen.start_router() - - -def teardown_module(_mod): - "Teardown the pytest environment" - tgen = get_topogen() - tgen.stop_topology() - - -def test_bgp_convergence(): - "Assert that BGP is converging." - tgen = get_topogen() - if tgen.routers_have_failure(): - pytest.skip(tgen.errors) - - logger.info("waiting for bgp peers to go up") - - for rname in tgen.routers().keys(): - if "h" in rname: - # hosts - continue - result = verify_bgp_convergence_from_running_config(tgen, dut=rname) - assert result is True, "BGP is not converging on {}".format(rname) - - -def test_bgp_ipv4_nexthop_step1(): - "Assert that BGP has correct ipv4 nexthops." - tgen = get_topogen() - if tgen.routers_have_failure(): - pytest.skip(tgen.errors) - - for rname, router in tgen.routers().items(): - if "h" in rname: - # hosts - continue - if "rs1" in rname: - continue - ref_file = "{}/{}/bgp_ipv4.json".format(CWD, rname) - expected = json.loads(open(ref_file).read()) - test_func = partial( - topotest.router_json_cmp, - router, - "show bgp ipv4 unicast json", - expected, - ) - _, res = topotest.run_and_expect(test_func, None, count=30, wait=1) - assertmsg = "{}: BGP IPv4 Nexthop failure".format(rname) - assert res is None, assertmsg - - -def test_bgp_ipv6_nexthop_step1(): - "Assert that BGP has correct ipv6 nexthops." - tgen = get_topogen() - if tgen.routers_have_failure(): - pytest.skip(tgen.errors) - - for rname, router in tgen.routers().items(): - if "h" in rname: - # hosts - continue - if "rs1" in rname: - continue - ref_file = "{}/{}/bgp_ipv6_step1.json".format(CWD, rname) - expected = json.loads(open(ref_file).read()) - test_func = partial( - topotest.router_json_cmp, - router, - "show bgp ipv6 unicast json", - expected, - ) - _, res = topotest.run_and_expect(test_func, None, count=30, wait=1) - assertmsg = "{}: BGP IPv6 Nexthop failure".format(rname) - assert res is None, assertmsg - - -def test_bgp_ping_ok_step1(): - "Check that h1 pings h2 and h3" - tgen = get_topogen() - if tgen.routers_have_failure(): - pytest.skip(tgen.errors) - - check_ping("h1", "192.168.7.1", True, 5, 1) - check_ping("h1", "fd00:700::1", True, 5, 1) - check_ping("h1", "192.168.8.1", True, 5, 1) - check_ping("h1", "fd00:800::1", True, 5, 1) - - -if __name__ == "__main__": - args = ["-s"] + sys.argv[1:] - sys.exit(pytest.main(args)) From b1edf389462a656360c647b57464a59bf584c687 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 14 Aug 2024 22:51:45 +0300 Subject: [PATCH 13/13] Revert "topotests: add an ebgp 6vpe test" This reverts commit 4d7df91752d7414d9719a361a2fd4cc30943dc96. --- .../topotests/bgp_6vpe_ebgp_topo1/__init__.py | 0 .../bgp_6vpe_ebgp_topo1/h1/zebra.conf | 4 - .../bgp_6vpe_ebgp_topo1/h2/zebra.conf | 8 - .../bgp_6vpe_ebgp_topo1/pe1/bgp_summary.json | 13 -- .../bgp_6vpe_ebgp_topo1/pe1/bgp_vrf_ipv6.json | 116 ------------ .../bgp_6vpe_ebgp_topo1/pe1/bgpd.conf | 32 ---- .../pe1/ipv6_routes_vrf.json | 142 -------------- .../bgp_6vpe_ebgp_topo1/pe1/isisd.conf | 23 --- .../bgp_6vpe_ebgp_topo1/pe1/zebra.conf | 11 -- .../bgp_6vpe_ebgp_topo1/pe2/bgp_summary.json | 13 -- .../bgp_6vpe_ebgp_topo1/pe2/bgp_vrf_ipv6.json | 116 ------------ .../bgp_6vpe_ebgp_topo1/pe2/bgpd.conf | 31 --- .../bgp_6vpe_ebgp_topo1/pe2/isisd.conf | 22 --- .../bgp_6vpe_ebgp_topo1/pe2/zebra.conf | 15 -- .../test_bgp_6vpe_ebgp_topo1.py | 179 ------------------ 15 files changed, 725 deletions(-) delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/__init__.py delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/h1/zebra.conf delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/h2/zebra.conf delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgp_summary.json delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgp_vrf_ipv6.json delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgpd.conf delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe1/ipv6_routes_vrf.json delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe1/isisd.conf delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe1/zebra.conf delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgp_summary.json delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgp_vrf_ipv6.json delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgpd.conf delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe2/isisd.conf delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/pe2/zebra.conf delete mode 100644 tests/topotests/bgp_6vpe_ebgp_topo1/test_bgp_6vpe_ebgp_topo1.py diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/__init__.py b/tests/topotests/bgp_6vpe_ebgp_topo1/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/h1/zebra.conf b/tests/topotests/bgp_6vpe_ebgp_topo1/h1/zebra.conf deleted file mode 100644 index 06a23bb0fd70..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/h1/zebra.conf +++ /dev/null @@ -1,4 +0,0 @@ -ipv6 route fd00:200::/64 fd00:100::2 -interface eth-pe1 - ipv6 address fd00:100::1/64 -! diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/h2/zebra.conf b/tests/topotests/bgp_6vpe_ebgp_topo1/h2/zebra.conf deleted file mode 100644 index 2dadfc40074c..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/h2/zebra.conf +++ /dev/null @@ -1,8 +0,0 @@ -ipv6 route fd00:100::/64 fd00:200::5 -interface eth-pe2 - ipv6 address fd00:200::6/64 - ipv6 address fd00:201::6/64 - ipv6 address fd00:300::6/64 - ipv6 address fd00:400::6/64 - ipv6 address fd01:200::6/64 -! diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgp_summary.json b/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgp_summary.json deleted file mode 100644 index c2100add8efa..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgp_summary.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ipv6Vpn": { - "routerId": "198.51.100.2", - "as": 65500, - "peers": { - "192.0.2.5": { - "remoteAs": 65501, - "state": "Established", - "peerState": "OK" - } - } - } -} diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgp_vrf_ipv6.json b/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgp_vrf_ipv6.json deleted file mode 100644 index c6e776d069f3..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgp_vrf_ipv6.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "vrfName": "vrf1", - "routerId": "198.51.100.2", - "defaultLocPrf": 100, - "localAS": 65500, - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd00:100::/64", - "metric": 0, - "weight": 32768, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:200::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd00:200::/64", - "metric": 0, - "weight": 0, - "path": "65501", - "nexthops": [ - { - "ip": "::ffff:c000:205", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:201::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd00:201::/64", - "metric": 0, - "weight": 0, - "path": "65501", - "nexthops": [ - { - "ip": "::ffff:c000:205", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:300::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd00:300::/64", - "metric": 0, - "weight": 0, - "path": "65501", - "nexthops": [ - { - "ip": "::ffff:c000:205", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:400::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd00:400::/64", - "metric": 0, - "weight": 0, - "path": "65501", - "nexthops": [ - { - "ip": "::ffff:c000:205", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd01:200::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd01:200::/64", - "metric": 0, - "weight": 0, - "path": "65501", - "nexthops": [ - { - "ip": "::ffff:c000:205", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgpd.conf b/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgpd.conf deleted file mode 100644 index 26e94d4b971b..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/bgpd.conf +++ /dev/null @@ -1,32 +0,0 @@ -! -!debug bgp zebra -router bgp 65500 - bgp router-id 198.51.100.2 - no bgp ebgp-requires-policy - neighbor 192.0.2.5 remote-as 65501 - neighbor 192.0.2.5 capability extended-nexthop - address-family ipv4 unicast - no neighbor 192.0.2.5 activate - exit-address-family - address-family ipv6 vpn - neighbor 192.0.2.5 activate - neighbor 192.0.2.5 route-map rmap in - exit-address-family -exit -router bgp 65500 vrf vrf1 - bgp router-id 198.51.100.2 - address-family ipv6 unicast - redistribute connected - label vpn export 101 - rd vpn export 444:1 - rt vpn both 52:100 - export vpn - import vpn - exit-address-family -! -interface eth-pe2 - mpls bgp forwarding -! -route-map rmap permit 1 - set ipv6 next-hop prefer-global -! diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/ipv6_routes_vrf.json b/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/ipv6_routes_vrf.json deleted file mode 100644 index 154574963b9a..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/ipv6_routes_vrf.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "fd00:100::/64": [ - { - "prefix": "fd00:100::/64", - "protocol": "connected", - "vrfName": "vrf1", - "selected": true, - "destSelected": true, - "distance": 0, - "metric": 0, - "installed": true, - "nexthops": [ - { - "fib": true, - "directlyConnected": true, - "interfaceName": "eth-h1", - "active": true - } - ] - } - ], - "fd00:200::/64": [ - { - "prefix": "fd00:200::/64", - "protocol": "bgp", - "vrfName": "vrf1", - "selected": true, - "destSelected": true, - "distance": 20, - "metric": 0, - "installed": true, - "nexthops": [ - { - "ip": "::ffff:c000:205", - "afi": "ipv6", - "vrf": "default", - "active": true, - "labels": [ - 102 - ], - "weight": 1 - } - ] - } - ], - "fd00:201::/64": [ - { - "prefix": "fd00:201::/64", - "protocol": "bgp", - "vrfName": "vrf1", - "selected": true, - "destSelected": true, - "distance": 20, - "metric": 0, - "installed": true, - "nexthops": [ - { - "ip": "::ffff:c000:205", - "afi": "ipv6", - "vrf": "default", - "active": true, - "labels": [ - 102 - ], - "weight": 1 - } - ] - } - ], - "fd00:300::/64": [ - { - "prefix": "fd00:300::/64", - "protocol": "bgp", - "vrfName": "vrf1", - "selected": true, - "destSelected": true, - "distance": 20, - "metric": 0, - "installed": true, - "nexthops": [ - { - "ip": "::ffff:c000:205", - "afi": "ipv6", - "vrf": "default", - "active": true, - "labels": [ - 102 - ], - "weight": 1 - } - ] - } - ], - "fd00:400::/64": [ - { - "prefix": "fd00:400::/64", - "protocol": "bgp", - "vrfName": "vrf1", - "selected": true, - "destSelected": true, - "distance": 20, - "metric": 0, - "installed": true, - "nexthops": [ - { - "ip": "::ffff:c000:205", - "afi": "ipv6", - "vrf": "default", - "active": true, - "labels": [ - 102 - ], - "weight": 1 - } - ] - } - ], - "fd01:200::/64": [ - { - "prefix": "fd01:200::/64", - "protocol": "bgp", - "vrfName": "vrf1", - "selected": true, - "destSelected": true, - "distance": 20, - "metric": 0, - "installed": true, - "nexthops": [ - { - "ip": "::ffff:c000:205", - "afi": "ipv6", - "vrf": "default", - "active": true, - "labels": [ - 102 - ], - "weight": 1 - } - ] - } - ] -} diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/isisd.conf b/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/isisd.conf deleted file mode 100644 index 61f2fe7defe5..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/isisd.conf +++ /dev/null @@ -1,23 +0,0 @@ -! -interface lo - ip router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 -! -interface eth-pe2 - ip router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 -! -router isis 1 - net 49.0000.0007.e901.2222.00 - is-type level-1 - lsp-gen-interval 1 - mpls-te on - mpls-te router-address 198.51.100.2 - segment-routing on - segment-routing node-msd 8 - segment-routing global-block 1000 10000 local-block 30000 30999 - segment-routing prefix 198.51.100.2/32 index 22 -! - diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/zebra.conf b/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/zebra.conf deleted file mode 100644 index 7ddd98f6e7f4..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe1/zebra.conf +++ /dev/null @@ -1,11 +0,0 @@ -! -interface eth-h1 - ipv6 address fd00:100::2/64 -! -interface eth-pe2 - ip address 192.0.2.2/24 - ipv6 address ::ffff:192.0.2.2/120 -! -interface lo - ip address 198.51.100.2/32 -! diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgp_summary.json b/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgp_summary.json deleted file mode 100644 index d74079498e95..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgp_summary.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ipv6Vpn": { - "routerId": "198.51.100.5", - "as": 65501, - "peers": { - "192.0.2.2": { - "remoteAs": 65500, - "state": "Established", - "peerState": "OK" - } - } - } -} diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgp_vrf_ipv6.json b/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgp_vrf_ipv6.json deleted file mode 100644 index ec42999e8a43..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgp_vrf_ipv6.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "vrfName": "vrf1", - "routerId": "198.51.100.5", - "defaultLocPrf": 100, - "localAS": 65501, - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd00:100::/64", - "metric": 0, - "weight": 0, - "path": "65500", - "nexthops": [ - { - "ip": "::ffff:c000:202", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:200::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd00:200::/64", - "metric": 0, - "weight": 32768, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:201::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd00:201::/64", - "metric": 0, - "weight": 32768, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:300::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd00:300::/64", - "metric": 0, - "weight": 32768, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd00:400::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd00:400::/64", - "metric": 0, - "weight": 32768, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ], - "fd01:200::/64": [ - { - "valid": true, - "bestpath": true, - "network": "fd01:200::/64", - "metric": 0, - "weight": 32768, - "path": "", - "nexthops": [ - { - "ip": "::", - "afi": "ipv6", - "scope": "global", - "used": true - } - ] - } - ] - } -} diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgpd.conf b/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgpd.conf deleted file mode 100644 index 03b63af90f54..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/bgpd.conf +++ /dev/null @@ -1,31 +0,0 @@ -! -router bgp 65501 - bgp router-id 198.51.100.5 - no bgp ebgp-requires-policy - neighbor 192.0.2.2 remote-as 65500 - neighbor 192.0.2.2 capability extended-nexthop - address-family ipv4 unicast - no neighbor 192.0.2.2 activate - exit-address-family - address-family ipv6 vpn - neighbor 192.0.2.2 activate - neighbor 192.0.2.2 route-map rmap in - exit-address-family -exit -router bgp 65501 vrf vrf1 - bgp router-id 198.51.100.5 - address-family ipv6 unicast - redistribute connected - label vpn export 102 - rd vpn export 444:2 - rt vpn both 52:100 - export vpn - import vpn -exit-address-family -! -interface eth-pe1 - mpls bgp forwarding -! -route-map rmap permit 1 - set ipv6 next-hop prefer-global -! \ No newline at end of file diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/isisd.conf b/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/isisd.conf deleted file mode 100644 index f210554ff66c..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/isisd.conf +++ /dev/null @@ -1,22 +0,0 @@ -! -interface lo - ip router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 -! -interface eth-pe1 - ip router isis 1 - isis hello-interval 1 - isis hello-multiplier 3 -! -router isis 1 - net 49.0000.0007.e901.5555.00 - is-type level-1 - lsp-gen-interval 1 - mpls-te on - mpls-te router-address 198.51.100.5 - segment-routing on - segment-routing node-msd 8 - segment-routing global-block 1000 10000 local-block 33000 33999 - segment-routing prefix 198.51.100.5/32 index 55 -! diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/zebra.conf b/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/zebra.conf deleted file mode 100644 index bf20638684f9..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/pe2/zebra.conf +++ /dev/null @@ -1,15 +0,0 @@ -! -interface eth-h2 - ipv6 address fd00:200::5/64 - ipv6 address fd00:201::5/64 - ipv6 address fd00:300::5/64 - ipv6 address fd00:400::5/64 - ipv6 address fd01:200::5/64 -! -interface eth-pe1 - ip address 192.0.2.5/24 - ipv6 address ::ffff:192.0.2.5/120 -! -interface lo - ip address 198.51.100.5/32 -! diff --git a/tests/topotests/bgp_6vpe_ebgp_topo1/test_bgp_6vpe_ebgp_topo1.py b/tests/topotests/bgp_6vpe_ebgp_topo1/test_bgp_6vpe_ebgp_topo1.py deleted file mode 100644 index cbed8f089654..000000000000 --- a/tests/topotests/bgp_6vpe_ebgp_topo1/test_bgp_6vpe_ebgp_topo1.py +++ /dev/null @@ -1,179 +0,0 @@ -#!/usr/bin/env python -# SPDX-License-Identifier: ISC - -# -# Copyright (c) 2023 by 6WIND -# - -""" -Test the FRR BGP 6VPE functionality -""" - -import os -import sys -import json -import functools -from functools import partial -import pytest - -# Save the Current Working Directory to find configuration files. -CWD = os.path.dirname(os.path.realpath(__file__)) -sys.path.append(os.path.join(CWD, "../")) - -# pylint: disable=C0413 -# Import topogen and topotest helpers -from lib import topotest -from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.checkping import check_ping - -pytestmark = [pytest.mark.bgpd, pytest.mark.isisd] - - -def build_topo(tgen): - """ - +---+ +---+ +---+ +---+ - | h1|----|pe1|----|pe2|----| h2| - +---+ +---+ +---+ +---+ - """ - - def connect_routers(tgen, left, right): - pe = None - host = None - for rname in [left, right]: - if rname not in tgen.routers().keys(): - tgen.add_router(rname) - if "pe" in rname: - pe = tgen.gears[rname] - if "h" in rname: - host = tgen.gears[rname] - - switch = tgen.add_switch("s-{}-{}".format(left, right)) - switch.add_link(tgen.gears[left], nodeif="eth-{}".format(right)) - switch.add_link(tgen.gears[right], nodeif="eth-{}".format(left)) - - if pe and host: - pe.cmd("ip link add vrf1 type vrf table 10") - pe.cmd("ip link set vrf1 up") - pe.cmd("ip link set dev eth-{} master vrf1".format(host.name)) - - if "p" in left and "p" in right: - # PE <-> P or P <-> P - tgen.gears[left].run("sysctl -w net.mpls.conf.eth-{}.input=1".format(right)) - tgen.gears[right].run("sysctl -w net.mpls.conf.eth-{}.input=1".format(left)) - - connect_routers(tgen, "h1", "pe1") - connect_routers(tgen, "pe1", "pe2") - connect_routers(tgen, "pe2", "h2") - - -def setup_module(mod): - "Sets up the pytest environment" - - tgen = Topogen(build_topo, mod.__name__) - tgen.start_topology() - logger.info("setup_module") - - for rname, router in tgen.routers().items(): - router.load_config( - TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) - ) - if "h" in rname: - # hosts - continue - - router.load_config( - TopoRouter.RD_ISIS, os.path.join(CWD, "{}/isisd.conf".format(rname)) - ) - - router.load_config( - TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname)) - ) - - # Initialize all routers. - tgen.start_router() - - -def teardown_module(_mod): - "Teardown the pytest environment" - tgen = get_topogen() - tgen.stop_topology() - - -def test_bgp_convergence(): - "Assert that BGP is converging." - tgen = get_topogen() - if tgen.routers_have_failure(): - pytest.skip(tgen.errors) - - logger.info("waiting for bgp peers to go up") - - router_list = ["pe1", "pe2"] - - for name in router_list: - router = tgen.gears[name] - ref_file = "{}/{}/bgp_summary.json".format(CWD, router.name) - expected = json.loads(open(ref_file).read()) - test_func = partial( - topotest.router_json_cmp, router, "show bgp summary json", expected - ) - _, res = topotest.run_and_expect(test_func, None, count=90, wait=1) - assertmsg = "{}: bgp did not converge".format(router.name) - assert res is None, assertmsg - - -def test_bgp_ipv6_vpn(): - "Assert that BGP is exchanging BGP route." - tgen = get_topogen() - if tgen.routers_have_failure(): - pytest.skip(tgen.errors) - - logger.info("waiting for bgp peers exchanging UPDATES") - - router_list = ["pe1", "pe2"] - - for name in router_list: - router = tgen.gears[name] - ref_file = "{}/{}/bgp_vrf_ipv6.json".format(CWD, router.name) - expected = json.loads(open(ref_file).read()) - test_func = partial( - topotest.router_json_cmp, - router, - "show bgp vrf vrf1 ipv6 unicast json", - expected, - ) - _, res = topotest.run_and_expect(test_func, None, count=30, wait=1) - assertmsg = "{}: BGP UPDATE exchange failure".format(router.name) - assert res is None, assertmsg - - -def test_zebra_ipv6_installed(): - "Assert that routes are installed." - tgen = get_topogen() - if tgen.routers_have_failure(): - pytest.skip(tgen.errors) - pe1 = tgen.gears["pe1"] - logger.info("check ipv6 routes installed on pe1") - - ref_file = "{}/{}/ipv6_routes_vrf.json".format(CWD, pe1.name) - expected = json.loads(open(ref_file).read()) - test_func = partial( - topotest.router_json_cmp, pe1, "show ipv6 route vrf vrf1 json", expected - ) - _, res = topotest.run_and_expect(test_func, None, count=30, wait=1) - assertmsg = "{}: Zebra Installation failure on vrf vrf1".format(pe1.name) - assert res is None, assertmsg - - -def test_bgp_ping6_ok(): - "Check that h1 pings h2" - tgen = get_topogen() - if tgen.routers_have_failure(): - pytest.skip(tgen.errors) - - check_ping("h1", "fd00:200::6", True, 5, 1) - - -if __name__ == "__main__": - args = ["-s"] + sys.argv[1:] - sys.exit(pytest.main(args))