diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index 8da7521ffc..f75df1e12d 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) @@ -351,9 +356,7 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop, } return 0; } - if (afi == AFI_IP6 && p.family == AF_INET) - /* IPv4 mapped IPv6 nexthop address */ - afi = AFI_IP; + srte_color = bgp_attr_get_color(pi->attr); } else if (peer) { @@ -1037,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: @@ -1057,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 && @@ -1072,33 +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; - p->family = AF_INET; - } else - p->u.prefix6 = - pi->attr->mp_nexthop_global; - } else - p->u.prefix6 = - pi->attr->mp_nexthop_local; - } else { - 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; - p->family = AF_INET; - } 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: diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 9cc9803175..af3e163f02 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -9676,7 +9676,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"); diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index 0f47388389..8cd851b9ac 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -508,9 +508,6 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt, gnh_modified = 1; } } else if (IN6_IS_ADDR_UNSPECIFIED(&v6nhglobal)) { - /* the UPDATE is originating from the local router. - * Build the global nexthop. - */ mod_v6nhg = &peer->nexthop.v6_global; gnh_modified = 1; } else if ((peer->sort == BGP_PEER_EBGP) @@ -524,32 +521,16 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt, */ mod_v6nhg = &peer->nexthop.v6_global; gnh_modified = 1; - } else if (IS_MAPPED_IPV6(&v6nhglobal) && - !IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_global)) { - /* prefer a IPv6 native global address over - * an IPv4-mapped IPv6 address as nexthop when - * forwarding UPDATEs. - */ - mod_v6nhg = &peer->nexthop.v6_global; - 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) || - (peer->connection->su.sa.sa_family == AF_INET && - paf->afi == AFI_IP6))))) { - 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)) { - /* If the interface to the peer has no global IPv6 - * address, replace the nexthop in UPDATE with - * the IPv4-mapped IPv6 address if any. - */ mod_v6nhg = &peer->nexthop.v6_global; gnh_modified = 1; } diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index c9c7b80496..92c15b7d2c 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -1695,18 +1695,15 @@ DEFUN (no_router_bgp, /* Cannot delete default instance if vrf instances exist */ if (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) { - struct listnode *node, *nnode; + struct listnode *node; struct bgp *tmp_bgp; - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, tmp_bgp)) { + for (ALL_LIST_ELEMENTS_RO(bm->bgp, node, tmp_bgp)) { if (tmp_bgp->inst_type != BGP_INSTANCE_TYPE_VRF) continue; - if (CHECK_FLAG(tmp_bgp->vrf_flags, - BGP_VRF_AUTO)) { + if (CHECK_FLAG(tmp_bgp->vrf_flags, BGP_VRF_AUTO)) bgp_delete(tmp_bgp); - continue; - } if (CHECK_FLAG( tmp_bgp->af_flags[AFI_IP] @@ -2931,10 +2928,11 @@ DEFUN(bgp_reject_as_sets, bgp_reject_as_sets_cmd, * with aspath containing AS_SET or AS_CONFED_SET. */ for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { - peer->last_reset = PEER_DOWN_AS_SETS_REJECT; - if (BGP_IS_VALID_STATE_FOR_NOTIF(peer->connection->status)) + if (BGP_IS_VALID_STATE_FOR_NOTIF(peer->connection->status)) { + peer->last_reset = PEER_DOWN_AS_SETS_REJECT; bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE); + } } return CMD_SUCCESS; @@ -2956,10 +2954,11 @@ DEFUN(no_bgp_reject_as_sets, no_bgp_reject_as_sets_cmd, * with aspath containing AS_SET or AS_CONFED_SET. */ for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { - peer->last_reset = PEER_DOWN_AS_SETS_REJECT; - if (BGP_IS_VALID_STATE_FOR_NOTIF(peer->connection->status)) + if (BGP_IS_VALID_STATE_FOR_NOTIF(peer->connection->status)) { + peer->last_reset = PEER_DOWN_AS_SETS_REJECT; bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE); + } } return CMD_SUCCESS; @@ -3024,98 +3023,6 @@ DEFUN (no_bgp_deterministic_med, return CMD_SUCCESS; } -static int bgp_inst_gr_config_vty(struct vty *vty, struct bgp *bgp, bool on, - bool disable) -{ - int ret = BGP_GR_FAILURE; - - /* - * Update the instance and all its peers, if appropriate. - * Then, inform zebra of BGP's GR capabilities, if needed. - */ - if (disable) - ret = bgp_gr_update_all(bgp, on ? GLOBAL_DISABLE_CMD - : NO_GLOBAL_DISABLE_CMD); - else - ret = bgp_gr_update_all(bgp, - on ? GLOBAL_GR_CMD : NO_GLOBAL_GR_CMD); - - VTY_BGP_GR_ROUTER_DETECT_AND_SEND_CAPABILITY_TO_ZEBRA(bgp, bgp->peer, - ret); - return ret; -} - -static int bgp_global_gr_config_vty(struct vty *vty, bool on, bool disable) -{ - struct listnode *node, *nnode; - struct bgp *bgp; - bool vrf_cfg = false; - int ret = BGP_GR_FAILURE; - - if (disable) { - if ((on && CHECK_FLAG(bm->flags, BM_FLAG_GR_DISABLED)) || - (!on && !CHECK_FLAG(bm->flags, BM_FLAG_GR_DISABLED))) - return CMD_SUCCESS; - } else { - if ((on && CHECK_FLAG(bm->flags, BM_FLAG_GR_RESTARTER)) || - (!on && !CHECK_FLAG(bm->flags, BM_FLAG_GR_RESTARTER))) - return CMD_SUCCESS; - } - - /* See if GR is set per-vrf and warn user to delete */ - if (!CHECK_FLAG(bm->flags, BM_FLAG_GR_CONFIGURED)) { - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) { - enum global_mode gr_mode = bgp_global_gr_mode_get(bgp); - - if (gr_mode != GLOBAL_HELPER) { - vty_out(vty, - "%% graceful-restart configuration found in %s, mode %d\n", - bgp->name_pretty, gr_mode); - vrf_cfg = true; - } - } - } - - if (vrf_cfg) { - vty_out(vty, - "%%Failed: global graceful-restart not permitted with per-vrf configuration\n"); - return CMD_WARNING; - } - - /* Set flag globally */ - if (on) { - if (disable) { - UNSET_FLAG(bm->flags, BM_FLAG_GR_RESTARTER); - SET_FLAG(bm->flags, BM_FLAG_GR_DISABLED); - } else { - SET_FLAG(bm->flags, BM_FLAG_GR_RESTARTER); - UNSET_FLAG(bm->flags, BM_FLAG_GR_DISABLED); - } - } else { - if (disable) - UNSET_FLAG(bm->flags, BM_FLAG_GR_DISABLED); - else - UNSET_FLAG(bm->flags, BM_FLAG_GR_RESTARTER); - } - - /* Initiate processing for all BGP instances. */ - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) { - ret = bgp_inst_gr_config_vty(vty, bgp, on, disable); - if (ret != BGP_GR_SUCCESS) - vty_out(vty, - "%% Applying global graceful-restart %s config to vrf %s failed, error %d\n", - (disable) ? "disable" : "", - bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT - ? "Default" - : bgp->name, - ret); - } - - vty_out(vty, - "Graceful restart configuration changed, reset all peers to take effect\n"); - return bgp_vty_return(vty, ret); -} - /* "bgp graceful-restart mode" configuration. */ DEFUN (bgp_graceful_restart, bgp_graceful_restart_cmd, @@ -3124,18 +3031,25 @@ DEFUN (bgp_graceful_restart, GR_CMD ) { - if (vty->node == CONFIG_NODE) - return bgp_global_gr_config_vty(vty, true, false); - int ret = BGP_GR_FAILURE; + + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug("[BGP_GR] bgp_graceful_restart_cmd : START "); + VTY_DECLVAR_CONTEXT(bgp, bgp); - ret = bgp_inst_gr_config_vty(vty, bgp, true, false); + ret = bgp_gr_update_all(bgp, GLOBAL_GR_CMD); if (ret == BGP_GR_SUCCESS) { + VTY_BGP_GR_ROUTER_DETECT_AND_SEND_CAPABILITY_TO_ZEBRA(bgp, + bgp->peer, + ret); vty_out(vty, "Graceful restart configuration changed, reset all peers to take effect\n"); } + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug("[BGP_GR] bgp_graceful_restart_cmd : END "); + return bgp_vty_return(vty, ret); } @@ -3147,13 +3061,14 @@ DEFUN (no_bgp_graceful_restart, NO_GR_CMD ) { - if (vty->node == CONFIG_NODE) - return bgp_global_gr_config_vty(vty, false, false); - VTY_DECLVAR_CONTEXT(bgp, bgp); + + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug("[BGP_GR] no_bgp_graceful_restart_cmd : START "); + int ret = BGP_GR_FAILURE; - ret = bgp_inst_gr_config_vty(vty, bgp, false, false); + ret = bgp_gr_update_all(bgp, NO_GLOBAL_GR_CMD); if (ret == BGP_GR_SUCCESS) { VTY_BGP_GR_ROUTER_DETECT_AND_SEND_CAPABILITY_TO_ZEBRA(bgp, bgp->peer, @@ -3162,6 +3077,9 @@ DEFUN (no_bgp_graceful_restart, "Graceful restart configuration changed, reset all peers to take effect\n"); } + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug("[BGP_GR] no_bgp_graceful_restart_cmd : END "); + return bgp_vty_return(vty, ret); } @@ -3173,21 +3091,12 @@ DEFUN (bgp_graceful_restart_stalepath_time, "Set the max time to hold onto restarting peer's stale paths\n" "Delay value (seconds)\n") { + VTY_DECLVAR_CONTEXT(bgp, bgp); int idx_number = 3; uint32_t stalepath; stalepath = strtoul(argv[idx_number]->arg, NULL, 10); - if (vty->node == CONFIG_NODE) { - struct listnode *node, *nnode; - struct bgp *bgp; - - bm->stalepath_time = stalepath; - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) - bgp->stalepath_time = stalepath; - } else { - VTY_DECLVAR_CONTEXT(bgp, bgp); - bgp->stalepath_time = stalepath; - } + bgp->stalepath_time = stalepath; return CMD_SUCCESS; } @@ -3199,32 +3108,20 @@ DEFUN (bgp_graceful_restart_restart_time, "Set the time to wait to delete stale routes before a BGP open message is received\n" "Delay value (seconds)\n") { + VTY_DECLVAR_CONTEXT(bgp, bgp); int idx_number = 3; uint32_t restart; struct listnode *node, *nnode; struct peer *peer; restart = strtoul(argv[idx_number]->arg, NULL, 10); + bgp->restart_time = restart; - if (vty->node == CONFIG_NODE) { - struct bgp *bgp; + for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) + bgp_capability_send(peer, AFI_IP, SAFI_UNICAST, + CAPABILITY_CODE_RESTART, + CAPABILITY_ACTION_SET); - bm->restart_time = restart; - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) { - bgp->restart_time = restart; - for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) - bgp_capability_send(peer, AFI_IP, SAFI_UNICAST, - CAPABILITY_CODE_RESTART, - CAPABILITY_ACTION_SET); - } - } else { - VTY_DECLVAR_CONTEXT(bgp, bgp); - bgp->restart_time = restart; - for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) - bgp_capability_send(peer, AFI_IP, SAFI_UNICAST, - CAPABILITY_CODE_RESTART, - CAPABILITY_ACTION_SET); - } return CMD_SUCCESS; } @@ -3236,32 +3133,16 @@ DEFUN (bgp_graceful_restart_select_defer_time, "Set the time to defer the BGP route selection after restart\n" "Delay value (seconds, 0 - disable)\n") { + VTY_DECLVAR_CONTEXT(bgp, bgp); int idx_number = 3; uint32_t defer_time; defer_time = strtoul(argv[idx_number]->arg, NULL, 10); - if (vty->node == CONFIG_NODE) { - struct listnode *node, *nnode; - struct bgp *bgp; - - bm->select_defer_time = defer_time; - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) { - bgp->select_defer_time = defer_time; - if (defer_time == 0) - SET_FLAG(bgp->flags, - BGP_FLAG_SELECT_DEFER_DISABLE); - else - UNSET_FLAG(bgp->flags, - BGP_FLAG_SELECT_DEFER_DISABLE); - } - } else { - VTY_DECLVAR_CONTEXT(bgp, bgp); - bgp->select_defer_time = defer_time; - if (defer_time == 0) - SET_FLAG(bgp->flags, BGP_FLAG_SELECT_DEFER_DISABLE); - else - UNSET_FLAG(bgp->flags, BGP_FLAG_SELECT_DEFER_DISABLE); - } + bgp->select_defer_time = defer_time; + if (defer_time == 0) + SET_FLAG(bgp->flags, BGP_FLAG_SELECT_DEFER_DISABLE); + else + UNSET_FLAG(bgp->flags, BGP_FLAG_SELECT_DEFER_DISABLE); return CMD_SUCCESS; } @@ -3275,17 +3156,9 @@ DEFUN (no_bgp_graceful_restart_stalepath_time, "Set the max time to hold onto restarting peer's stale paths\n" "Delay value (seconds)\n") { - if (vty->node == CONFIG_NODE) { - struct listnode *node, *nnode; - struct bgp *bgp; + VTY_DECLVAR_CONTEXT(bgp, bgp); - bm->stalepath_time = BGP_DEFAULT_STALEPATH_TIME; - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) - bgp->stalepath_time = BGP_DEFAULT_STALEPATH_TIME; - } else { - VTY_DECLVAR_CONTEXT(bgp, bgp); - bgp->stalepath_time = BGP_DEFAULT_STALEPATH_TIME; - } + bgp->stalepath_time = BGP_DEFAULT_STALEPATH_TIME; return CMD_SUCCESS; } @@ -3298,30 +3171,17 @@ DEFUN (no_bgp_graceful_restart_restart_time, "Set the time to wait to delete stale routes before a BGP open message is received\n" "Delay value (seconds)\n") { + VTY_DECLVAR_CONTEXT(bgp, bgp); struct listnode *node, *nnode; struct peer *peer; - if (vty->node == CONFIG_NODE) { - struct bgp *bgp; - - bm->restart_time = BGP_DEFAULT_RESTART_TIME; - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) { - bgp->restart_time = BGP_DEFAULT_RESTART_TIME; + bgp->restart_time = BGP_DEFAULT_RESTART_TIME; - for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) - bgp_capability_send(peer, AFI_IP, SAFI_UNICAST, - CAPABILITY_CODE_RESTART, - CAPABILITY_ACTION_UNSET); - } - } else { - VTY_DECLVAR_CONTEXT(bgp, bgp); - bgp->restart_time = BGP_DEFAULT_RESTART_TIME; + for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) + bgp_capability_send(peer, AFI_IP, SAFI_UNICAST, + CAPABILITY_CODE_RESTART, + CAPABILITY_ACTION_UNSET); - for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) - bgp_capability_send(peer, AFI_IP, SAFI_UNICAST, - CAPABILITY_CODE_RESTART, - CAPABILITY_ACTION_UNSET); - } return CMD_SUCCESS; } @@ -3334,21 +3194,10 @@ DEFUN (no_bgp_graceful_restart_select_defer_time, "Set the time to defer the BGP route selection after restart\n" "Delay value (seconds)\n") { - if (vty->node == CONFIG_NODE) { - struct listnode *node, *nnode; - struct bgp *bgp; + VTY_DECLVAR_CONTEXT(bgp, bgp); - bm->select_defer_time = BGP_DEFAULT_SELECT_DEFERRAL_TIME; - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) { - bgp->select_defer_time = - BGP_DEFAULT_SELECT_DEFERRAL_TIME; - UNSET_FLAG(bgp->flags, BGP_FLAG_SELECT_DEFER_DISABLE); - } - } else { - VTY_DECLVAR_CONTEXT(bgp, bgp); - bgp->select_defer_time = BGP_DEFAULT_SELECT_DEFERRAL_TIME; - UNSET_FLAG(bgp->flags, BGP_FLAG_SELECT_DEFER_DISABLE); - } + bgp->select_defer_time = BGP_DEFAULT_SELECT_DEFERRAL_TIME; + UNSET_FLAG(bgp->flags, BGP_FLAG_SELECT_DEFER_DISABLE); return CMD_SUCCESS; } @@ -3360,17 +3209,8 @@ DEFUN (bgp_graceful_restart_preserve_fw, "Graceful restart capability parameters\n" "Sets F-bit indication that fib is preserved while doing Graceful Restart\n") { - if (vty->node == CONFIG_NODE) { - struct listnode *node, *nnode; - struct bgp *bgp; - - SET_FLAG(bm->flags, BM_FLAG_GR_PRESERVE_FWD); - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) - SET_FLAG(bgp->flags, BGP_FLAG_GR_PRESERVE_FWD); - } else { - VTY_DECLVAR_CONTEXT(bgp, bgp); - SET_FLAG(bgp->flags, BGP_FLAG_GR_PRESERVE_FWD); - } + VTY_DECLVAR_CONTEXT(bgp, bgp); + SET_FLAG(bgp->flags, BGP_FLAG_GR_PRESERVE_FWD); return CMD_SUCCESS; } @@ -3382,17 +3222,8 @@ DEFUN (no_bgp_graceful_restart_preserve_fw, "Graceful restart capability parameters\n" "Unsets F-bit indication that fib is preserved while doing Graceful Restart\n") { - if (vty->node == CONFIG_NODE) { - struct listnode *node, *nnode; - struct bgp *bgp; - - UNSET_FLAG(bm->flags, BM_FLAG_GR_PRESERVE_FWD); - for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) - UNSET_FLAG(bgp->flags, BGP_FLAG_GR_PRESERVE_FWD); - } else { - VTY_DECLVAR_CONTEXT(bgp, bgp); - UNSET_FLAG(bgp->flags, BGP_FLAG_GR_PRESERVE_FWD); - } + VTY_DECLVAR_CONTEXT(bgp, bgp); + UNSET_FLAG(bgp->flags, BGP_FLAG_GR_PRESERVE_FWD); return CMD_SUCCESS; } @@ -3444,17 +3275,21 @@ DEFUN (bgp_graceful_restart_disable, BGP_STR GR_DISABLE) { - if (vty->node == CONFIG_NODE) - return bgp_global_gr_config_vty(vty, true, true); - int ret = BGP_GR_FAILURE; struct listnode *node, *nnode; struct peer *peer; + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] bgp_graceful_restart_disable_cmd : START "); + VTY_DECLVAR_CONTEXT(bgp, bgp); - ret = bgp_inst_gr_config_vty(vty, bgp, true, true); + ret = bgp_gr_update_all(bgp, GLOBAL_DISABLE_CMD); if (ret == BGP_GR_SUCCESS) { + VTY_BGP_GR_ROUTER_DETECT_AND_SEND_CAPABILITY_TO_ZEBRA(bgp, + bgp->peer, + ret); vty_out(vty, "Graceful restart configuration changed, reset all peers to take effect\n"); @@ -3468,6 +3303,9 @@ DEFUN (bgp_graceful_restart_disable, } } + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug("[BGP_GR] bgp_graceful_restart_disable_cmd : END "); + return bgp_vty_return(vty, ret); } @@ -3479,18 +3317,27 @@ DEFUN (no_bgp_graceful_restart_disable, NO_GR_DISABLE ) { - if (vty->node == CONFIG_NODE) - return bgp_global_gr_config_vty(vty, false, true); - VTY_DECLVAR_CONTEXT(bgp, bgp); + + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] no_bgp_graceful_restart_disable_cmd : START "); + int ret = BGP_GR_FAILURE; - ret = bgp_inst_gr_config_vty(vty, bgp, false, true); + ret = bgp_gr_update_all(bgp, NO_GLOBAL_DISABLE_CMD); if (ret == BGP_GR_SUCCESS) { + VTY_BGP_GR_ROUTER_DETECT_AND_SEND_CAPABILITY_TO_ZEBRA(bgp, + bgp->peer, + ret); vty_out(vty, "Graceful restart configuration changed, reset all peers to take effect\n"); } + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] no_bgp_graceful_restart_disable_cmd : END "); + return bgp_vty_return(vty, ret); } @@ -3508,14 +3355,13 @@ DEFUN (bgp_neighbor_graceful_restart_set, VTY_BGP_GR_DEFINE_LOOP_VARIABLE; + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] bgp_neighbor_graceful_restart_set_cmd : START "); + peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); if (!peer) return CMD_WARNING_CONFIG_FAILED; - if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) { - vty_out(vty, - "Per peer-group graceful-restart configuration is not yet supported\n"); - return CMD_WARNING_CONFIG_FAILED; - } result = bgp_neighbor_graceful_restart(peer, PEER_GR_CMD); if (result == BGP_GR_SUCCESS) { @@ -3525,7 +3371,15 @@ DEFUN (bgp_neighbor_graceful_restart_set, "Graceful restart configuration changed, reset this peer to take effect\n"); } - return bgp_vty_return(vty, ret); + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] bgp_neighbor_graceful_restart_set_cmd : END "); + + if (ret != BGP_GR_SUCCESS) + vty_out(vty, + "As part of configuring graceful-restart, capability send to zebra failed\n"); + + return bgp_vty_return(vty, result); } DEFUN (no_bgp_neighbor_graceful_restart, @@ -3546,11 +3400,10 @@ DEFUN (no_bgp_neighbor_graceful_restart, peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); if (!peer) return CMD_WARNING_CONFIG_FAILED; - if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) { - vty_out(vty, - "Per peer-group graceful-restart configuration is not yet supported\n"); - return CMD_WARNING_CONFIG_FAILED; - } + + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] no_bgp_neighbor_graceful_restart_set_cmd : START "); result = bgp_neighbor_graceful_restart(peer, NO_PEER_GR_CMD); if (ret == BGP_GR_SUCCESS) { @@ -3560,6 +3413,14 @@ DEFUN (no_bgp_neighbor_graceful_restart, "Graceful restart configuration changed, reset this peer to take effect\n"); } + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] no_bgp_neighbor_graceful_restart_set_cmd : END "); + + if (ret != BGP_GR_SUCCESS) + vty_out(vty, + "As part of configuring graceful-restart, capability send to zebra failed\n"); + return bgp_vty_return(vty, result); } @@ -3577,14 +3438,15 @@ DEFUN (bgp_neighbor_graceful_restart_helper_set, VTY_BGP_GR_DEFINE_LOOP_VARIABLE; + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] bgp_neighbor_graceful_restart_helper_set_cmd : START "); + peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); + if (!peer) return CMD_WARNING_CONFIG_FAILED; - if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) { - vty_out(vty, - "Per peer-group graceful-restart configuration is not yet supported\n"); - return CMD_WARNING_CONFIG_FAILED; - } + ret = bgp_neighbor_graceful_restart(peer, PEER_HELPER_CMD); if (ret == BGP_GR_SUCCESS) { @@ -3594,6 +3456,10 @@ DEFUN (bgp_neighbor_graceful_restart_helper_set, "Graceful restart configuration changed, reset this peer to take effect\n"); } + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] bgp_neighbor_graceful_restart_helper_set_cmd : END "); + return bgp_vty_return(vty, ret); } @@ -3615,11 +3481,10 @@ DEFUN (no_bgp_neighbor_graceful_restart_helper, peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); if (!peer) return CMD_WARNING_CONFIG_FAILED; - if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) { - vty_out(vty, - "Per peer-group graceful-restart configuration is not yet supported\n"); - return CMD_WARNING_CONFIG_FAILED; - } + + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] no_bgp_neighbor_graceful_restart_helper_set_cmd : START "); ret = bgp_neighbor_graceful_restart(peer, NO_PEER_HELPER_CMD); if (ret == BGP_GR_SUCCESS) { @@ -3629,6 +3494,10 @@ DEFUN (no_bgp_neighbor_graceful_restart_helper, "Graceful restart configuration changed, reset this peer to take effect\n"); } + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] no_bgp_neighbor_graceful_restart_helper_set_cmd : END "); + return bgp_vty_return(vty, ret); } @@ -3646,24 +3515,29 @@ DEFUN (bgp_neighbor_graceful_restart_disable_set, VTY_BGP_GR_DEFINE_LOOP_VARIABLE; + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] bgp_neighbor_graceful_restart_disable_set_cmd : START "); + peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); if (!peer) return CMD_WARNING_CONFIG_FAILED; - if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) { - vty_out(vty, - "Per peer-group graceful-restart configuration is not yet supported\n"); - return CMD_WARNING_CONFIG_FAILED; - } ret = bgp_neighbor_graceful_restart(peer, PEER_DISABLE_CMD); if (ret == BGP_GR_SUCCESS) { - if (peer->bgp->t_startup || bgp_in_graceful_restart()) + if (peer->bgp->t_startup) bgp_peer_gr_flags_update(peer); VTY_BGP_GR_ROUTER_DETECT(bgp, peer, peer->bgp->peer); VTY_SEND_BGP_GR_CAPABILITY_TO_ZEBRA(peer->bgp, ret); + vty_out(vty, + "Graceful restart configuration changed, reset this peer to take effect\n"); } + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR]bgp_neighbor_graceful_restart_disable_set_cmd : END "); + return bgp_vty_return(vty, ret); } @@ -3685,18 +3559,23 @@ DEFUN (no_bgp_neighbor_graceful_restart_disable, peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); if (!peer) return CMD_WARNING_CONFIG_FAILED; - if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) { - vty_out(vty, - "Per peer-group graceful-restart configuration is not yet supported\n"); - return CMD_WARNING_CONFIG_FAILED; - } + + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] no_bgp_neighbor_graceful_restart_disable_set_cmd : START "); ret = bgp_neighbor_graceful_restart(peer, NO_PEER_DISABLE_CMD); if (ret == BGP_GR_SUCCESS) { VTY_BGP_GR_ROUTER_DETECT(bgp, peer, peer->bgp->peer); VTY_SEND_BGP_GR_CAPABILITY_TO_ZEBRA(peer->bgp, ret); + vty_out(vty, + "Graceful restart configuration changed, reset this peer to take effect\n"); } + if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) + zlog_debug( + "[BGP_GR] no_bgp_neighbor_graceful_restart_disable_set_cmd : END "); + return bgp_vty_return(vty, ret); } @@ -3711,9 +3590,8 @@ DEFPY (neighbor_graceful_shutdown, afi_t afi; safi_t safi; struct peer *peer; - int ret; - VTY_DECLVAR_CONTEXT(bgp, bgp); + int ret; peer = peer_and_group_lookup_vty(vty, neighbor); if (!peer) @@ -4867,7 +4745,7 @@ static int peer_remote_as_vty(struct vty *vty, const char *peer_str, VTY_DECLVAR_CONTEXT(bgp, bgp); int ret; as_t as; - enum peer_asn_type as_type = AS_SPECIFIED; + int as_type = AS_SPECIFIED; union sockunion su; if (as_str[0] == 'i') { @@ -4876,9 +4754,6 @@ static int peer_remote_as_vty(struct vty *vty, const char *peer_str, } else if (as_str[0] == 'e') { as = 0; as_type = AS_EXTERNAL; - } else if (as_str[0] == 'a') { - as = 0; - as_type = AS_AUTO; } else if (!asn_str2asn(as_str, &as)) as_type = AS_UNSPECIFIED; @@ -4984,14 +4859,13 @@ ALIAS(no_bgp_shutdown, no_bgp_shutdown_msg_cmd, DEFUN (neighbor_remote_as, neighbor_remote_as_cmd, - "neighbor remote-as ", + "neighbor remote-as ", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify a BGP neighbor\n" AS_STR "Internal BGP peer\n" - "External BGP peer\n" - "Automatically detect remote ASN\n") + "External BGP peer\n") { int idx_peer = 1; int idx_remote_as = 3; @@ -5046,7 +4920,7 @@ static int peer_conf_interface_get(struct vty *vty, const char *conf_if, { VTY_DECLVAR_CONTEXT(bgp, bgp); as_t as = 0; - enum peer_asn_type as_type = AS_UNSPECIFIED; + int as_type = AS_UNSPECIFIED; struct peer *peer; struct peer_group *group; int ret = 0; @@ -5063,8 +4937,6 @@ static int peer_conf_interface_get(struct vty *vty, const char *conf_if, as_type = AS_INTERNAL; } else if (as_str[0] == 'e') { as_type = AS_EXTERNAL; - } else if (as_str[0] == 'a') { - as_type = AS_AUTO; } else { /* Get AS number. */ if (asn_str2asn(as_str, &as)) @@ -5108,13 +4980,12 @@ static int peer_conf_interface_get(struct vty *vty, const char *conf_if, else peer_flag_unset(peer, PEER_FLAG_IFPEER_V6ONLY); - peer->last_reset = PEER_DOWN_V6ONLY_CHANGE; - /* v6only flag changed. Reset bgp seesion */ - if (BGP_IS_VALID_STATE_FOR_NOTIF(peer->connection->status)) + if (BGP_IS_VALID_STATE_FOR_NOTIF(peer->connection->status)) { + peer->last_reset = PEER_DOWN_V6ONLY_CHANGE; bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE); - else + } else bgp_session_reset(peer); } @@ -5182,15 +5053,14 @@ DEFUN (neighbor_interface_config_v6only, DEFUN (neighbor_interface_config_remote_as, neighbor_interface_config_remote_as_cmd, - "neighbor WORD interface remote-as ", + "neighbor WORD interface remote-as ", NEIGHBOR_STR "Interface name or neighbor tag\n" "Enable BGP on interface\n" "Specify a BGP neighbor\n" AS_STR "Internal BGP peer\n" - "External BGP peer\n" - "Automatically detect remote ASN\n") + "External BGP peer\n") { int idx_word = 1; int idx_remote_as = 4; @@ -5200,7 +5070,7 @@ DEFUN (neighbor_interface_config_remote_as, DEFUN (neighbor_interface_v6only_config_remote_as, neighbor_interface_v6only_config_remote_as_cmd, - "neighbor WORD interface v6only remote-as ", + "neighbor WORD interface v6only remote-as ", NEIGHBOR_STR "Interface name or neighbor tag\n" "Enable BGP with v6 link-local only\n" @@ -5208,8 +5078,7 @@ DEFUN (neighbor_interface_v6only_config_remote_as, "Specify a BGP neighbor\n" AS_STR "Internal BGP peer\n" - "External BGP peer\n" - "Automatically detect remote ASN\n") + "External BGP peer\n") { int idx_word = 1; int idx_remote_as = 5; @@ -5246,15 +5115,14 @@ DEFUN (neighbor_peer_group, DEFUN (no_neighbor, no_neighbor_cmd, - "no neighbor [remote-as <(1-4294967295)|internal|external|auto>]>", + "no neighbor [remote-as <(1-4294967295)|internal|external>]>", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Specify a BGP neighbor\n" AS_STR "Internal BGP peer\n" - "External BGP peer\n" - "Automatically detect remote ASN\n") + "External BGP peer\n") { VTY_DECLVAR_CONTEXT(bgp, bgp); int idx_peer = 2; @@ -5325,7 +5193,7 @@ DEFUN (no_neighbor, DEFUN (no_neighbor_interface_config, no_neighbor_interface_config_cmd, - "no neighbor WORD interface [v6only] [peer-group PGNAME] [remote-as <(1-4294967295)|internal|external|auto>]", + "no neighbor WORD interface [v6only] [peer-group PGNAME] [remote-as <(1-4294967295)|internal|external>]", NO_STR NEIGHBOR_STR "Interface name\n" @@ -5336,8 +5204,7 @@ DEFUN (no_neighbor_interface_config, "Specify a BGP neighbor\n" AS_STR "Internal BGP peer\n" - "External BGP peer\n" - "Automatically detect remote ASN\n") + "External BGP peer\n") { VTY_DECLVAR_CONTEXT(bgp, bgp); int idx_word = 2; @@ -5394,15 +5261,14 @@ DEFUN (no_neighbor_peer_group, DEFUN (no_neighbor_interface_peer_group_remote_as, no_neighbor_interface_peer_group_remote_as_cmd, - "no neighbor WORD remote-as ", + "no neighbor WORD remote-as ", NO_STR NEIGHBOR_STR "Interface name or neighbor tag\n" "Specify a BGP neighbor\n" AS_STR "Internal BGP peer\n" - "External BGP peer\n" - "Automatically detect remote ASN\n") + "External BGP peer\n") { VTY_DECLVAR_CONTEXT(bgp, bgp); int idx_word = 2; @@ -11901,8 +11767,7 @@ static char *bgp_peer_description_stripped(char *desc, uint32_t size) /* Determine whether var peer should be filtered out of the summary. */ static bool bgp_show_summary_is_peer_filtered(struct peer *peer, - struct peer *fpeer, - enum peer_asn_type as_type, + struct peer *fpeer, int as_type, as_t as) { @@ -11913,7 +11778,7 @@ static bool bgp_show_summary_is_peer_filtered(struct peer *peer, /* filter remote-as (internal|external) */ if (as_type != AS_UNSPECIFIED) { if (peer->as_type == AS_SPECIFIED) { - if (CHECK_FLAG(as_type, AS_INTERNAL)) { + if (as_type == AS_INTERNAL) { if (peer->as != peer->local_as) return true; } else if (peer->as == peer->local_as) @@ -11936,8 +11801,8 @@ static bool bgp_show_summary_is_peer_filtered(struct peer *peer, * whitespaces and the whole output will be tricky. */ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi, - struct peer *fpeer, enum peer_asn_type as_type, - as_t as, uint16_t show_flags) + struct peer *fpeer, int as_type, as_t as, + uint16_t show_flags) { struct peer *peer; struct listnode *node, *nnode; @@ -12049,8 +11914,6 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi, if (show_failed && !failed_count) { if (use_json) { - json_object_free(json_peers); - json_object_int_add(json, "failedPeersCount", 0); json_object_int_add(json, "dynamicPeers", dn_count); json_object_int_add(json, "totalPeers", count); @@ -12333,12 +12196,6 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi, json_object_string_add(json_peer, "domainname", peer->domainname); - json_object_string_add(json_peer, - "softwareVersion", - peer->soft_version - ? peer->soft_version - : "n/a"); - asn_asn2json(json_peer, "remoteAs", peer->as, bgp->asnotation); asn_asn2json(json_peer, "localAs", @@ -12752,9 +12609,10 @@ static void bgp_show_summary_afi_safi(struct vty *vty, struct bgp *bgp, int afi, } static void bgp_show_all_instances_summary_vty(struct vty *vty, afi_t afi, - safi_t safi, const char *neighbor, - enum peer_asn_type as_type, - as_t as, uint16_t show_flags) + safi_t safi, + const char *neighbor, + int as_type, as_t as, + uint16_t show_flags) { struct listnode *node, *nnode; struct bgp *bgp; @@ -12799,9 +12657,8 @@ static void bgp_show_all_instances_summary_vty(struct vty *vty, afi_t afi, } int bgp_show_summary_vty(struct vty *vty, const char *name, afi_t afi, - safi_t safi, const char *neighbor, - enum peer_asn_type as_type, as_t as, - uint16_t show_flags) + safi_t safi, const char *neighbor, int as_type, + as_t as, uint16_t show_flags) { struct bgp *bgp; bool use_json = CHECK_FLAG(show_flags, BGP_SHOW_OPT_JSON); @@ -12916,8 +12773,6 @@ DEFPY(show_ip_bgp_summary, show_ip_bgp_summary_cmd, as_type = AS_INTERNAL; else if (argv[idx + 1]->arg[0] == 'e') as_type = AS_EXTERNAL; - else if (argv[idx + 1]->arg[0] == 'a') - as_type = AS_AUTO; else if (!asn_str2asn(argv[idx + 1]->arg, &as)) { vty_out(vty, "%% Invalid neighbor remote-as value: %s\n", @@ -14041,10 +13896,9 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json, json_object_boolean_true_add(json_neigh, "localAsReplaceAs"); } else { - if (p->as_type == AS_SPECIFIED || - CHECK_FLAG(p->as_type, AS_AUTO) || - CHECK_FLAG(p->as_type, AS_EXTERNAL) || - CHECK_FLAG(p->as_type, AS_INTERNAL)) { + if ((p->as_type == AS_SPECIFIED) || + (p->as_type == AS_EXTERNAL) || + (p->as_type == AS_INTERNAL)) { vty_out(vty, "remote AS "); vty_out(vty, ASN_FORMAT(bgp->asnotation), &p->as); vty_out(vty, ", "); @@ -14063,7 +13917,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json, : ""); } /* peer type internal or confed-internal */ - if ((p->as == p->local_as) || (CHECK_FLAG(p->as_type, AS_INTERNAL))) { + if ((p->as == p->local_as) || (p->as_type == AS_INTERNAL)) { if (use_json) { if (CHECK_FLAG(bgp->config, BGP_CONFIG_CONFEDERATION)) json_object_boolean_true_add( @@ -17060,7 +16914,7 @@ static int bgp_show_one_peer_group(struct vty *vty, struct peer_group *group, &conf->as); vty_out(vty, "\n"); } - } else if (CHECK_FLAG(conf->as_type, AS_INTERNAL)) { + } else if (conf->as_type == AS_INTERNAL) { if (json) asn_asn2json(json, "remoteAs", group->bgp->as, group->bgp->asnotation); @@ -17072,8 +16926,7 @@ static int bgp_show_one_peer_group(struct vty *vty, struct peer_group *group, vty_out(vty, "\nBGP peer-group %s\n", group->name); } - if ((group->bgp->as == conf->as) || - CHECK_FLAG(conf->as_type, AS_INTERNAL)) { + if ((group->bgp->as == conf->as) || (conf->as_type == AS_INTERNAL)) { if (json) json_object_string_add(json_peer_group, "type", "internal"); @@ -18575,9 +18428,6 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp, } else if (peer->as_type == AS_EXTERNAL) { vty_out(vty, " remote-as external"); if_ras_printed = true; - } else if (CHECK_FLAG(peer->as_type, AS_AUTO)) { - vty_out(vty, " remote-as auto"); - if_ras_printed = true; } vty_out(vty, "\n"); @@ -18600,9 +18450,6 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp, vty_out(vty, " neighbor %s remote-as external\n", addr); - } else if (CHECK_FLAG(peer->as_type, AS_AUTO)) { - vty_out(vty, " neighbor %s remote-as auto\n", - addr); } } @@ -18632,9 +18479,6 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp, vty_out(vty, " neighbor %s remote-as external\n", addr); - } else if (CHECK_FLAG(peer->as_type, AS_AUTO)) { - vty_out(vty, " neighbor %s remote-as auto\n", - addr); } } } @@ -19346,7 +19190,6 @@ int bgp_config_write(struct vty *vty) hook_call(bgp_snmp_traps_config_write, vty); - vty_out(vty, "!\n"); if (bm->rmap_update_timer != RMAP_DEFAULT_UPDATE_TIMER) vty_out(vty, "bgp route-map delay-timer %u\n", bm->rmap_update_timer); @@ -19361,30 +19204,6 @@ int bgp_config_write(struct vty *vty) if (bm->wait_for_fib) vty_out(vty, "bgp suppress-fib-pending\n"); - if (bm->stalepath_time != BGP_DEFAULT_STALEPATH_TIME) - vty_out(vty, "bgp graceful-restart stalepath-time %u\n", - bm->stalepath_time); - - if (bm->restart_time != BGP_DEFAULT_RESTART_TIME) - vty_out(vty, "bgp graceful-restart restart-time %u\n", - bm->restart_time); - - if (bm->select_defer_time != BGP_DEFAULT_SELECT_DEFERRAL_TIME) - vty_out(vty, "bgp graceful-restart select-defer-time %u\n", - bm->select_defer_time); - - if (CHECK_FLAG(bm->flags, BM_FLAG_GR_RESTARTER)) - vty_out(vty, "bgp graceful-restart\n"); - else if (CHECK_FLAG(bm->flags, BM_FLAG_GR_DISABLED)) - vty_out(vty, "bgp graceful-restart-disable\n"); - - if (CHECK_FLAG(bm->flags, BM_FLAG_GR_PRESERVE_FWD)) - vty_out(vty, "bgp graceful-restart preserve-fw-state\n"); - - if (bm->rib_stale_time != BGP_DEFAULT_RIB_STALE_TIME) - vty_out(vty, "bgp graceful-restart rib-stale-time %u\n", - bm->rib_stale_time); - if (CHECK_FLAG(bm->flags, BM_FLAG_GRACEFUL_SHUTDOWN)) vty_out(vty, "bgp graceful-shutdown\n"); @@ -19406,8 +19225,6 @@ int bgp_config_write(struct vty *vty) if (bm->outq_limit != BM_DEFAULT_Q_LIMIT) vty_out(vty, "bgp output-queue-limit %u\n", bm->outq_limit); - vty_out(vty, "!\n"); - /* BGP configuration. */ for (ALL_LIST_ELEMENTS(bm->bgp, mnode, mnnode, bgp)) { @@ -19649,21 +19466,15 @@ int bgp_config_write(struct vty *vty) " bgp long-lived-graceful-restart stale-time %u\n", bgp->llgr_stale_time); - /* BGP per-instance graceful-restart. */ - /* BGP-wide settings and per-instance settings are mutually - * exclusive. - */ - if (bm->stalepath_time == BGP_DEFAULT_STALEPATH_TIME) - if (bgp->stalepath_time != BGP_DEFAULT_STALEPATH_TIME) - vty_out(vty, - " bgp graceful-restart stalepath-time %u\n", - bgp->stalepath_time); + /* BGP graceful-restart. */ + if (bgp->stalepath_time != BGP_DEFAULT_STALEPATH_TIME) + vty_out(vty, + " bgp graceful-restart stalepath-time %u\n", + bgp->stalepath_time); - if (bm->restart_time == BGP_DEFAULT_RESTART_TIME) - if (bgp->restart_time != BGP_DEFAULT_RESTART_TIME) - vty_out(vty, - " bgp graceful-restart restart-time %u\n", - bgp->restart_time); + if (bgp->restart_time != BGP_DEFAULT_RESTART_TIME) + vty_out(vty, " bgp graceful-restart restart-time %u\n", + bgp->restart_time); if (!!CHECK_FLAG(bgp->flags, BGP_FLAG_GRACEFUL_NOTIFICATION) != SAVE_BGP_GRACEFUL_NOTIFICATION) @@ -19673,34 +19484,30 @@ int bgp_config_write(struct vty *vty) ? "" : "no "); - if (bm->select_defer_time == BGP_DEFAULT_SELECT_DEFERRAL_TIME) - if (bgp->select_defer_time != - BGP_DEFAULT_SELECT_DEFERRAL_TIME) - vty_out(vty, - " bgp graceful-restart select-defer-time %u\n", - bgp->select_defer_time); + if (bgp->select_defer_time != BGP_DEFAULT_SELECT_DEFERRAL_TIME) + vty_out(vty, + " bgp graceful-restart select-defer-time %u\n", + bgp->select_defer_time); - if (!CHECK_FLAG(bm->flags, BM_FLAG_GR_CONFIGURED)) { - if (bgp_global_gr_mode_get(bgp) == GLOBAL_GR) - vty_out(vty, " bgp graceful-restart\n"); + if (bgp_global_gr_mode_get(bgp) == GLOBAL_GR) + vty_out(vty, " bgp graceful-restart\n"); - if (bgp_global_gr_mode_get(bgp) == GLOBAL_DISABLE) - vty_out(vty, " bgp graceful-restart-disable\n"); - } + if (bgp_global_gr_mode_get(bgp) == GLOBAL_DISABLE) + vty_out(vty, " bgp graceful-restart-disable\n"); - if (!CHECK_FLAG(bm->flags, BM_FLAG_GR_PRESERVE_FWD)) - if (CHECK_FLAG(bgp->flags, BGP_FLAG_GR_PRESERVE_FWD)) - vty_out(vty, - " bgp graceful-restart preserve-fw-state\n"); + /* BGP graceful-restart Preserve State F bit. */ + if (CHECK_FLAG(bgp->flags, BGP_FLAG_GR_PRESERVE_FWD)) + vty_out(vty, + " bgp graceful-restart preserve-fw-state\n"); /* BGP TCP keepalive */ bgp_config_tcp_keepalive(vty, bgp); - if (bm->rib_stale_time == BGP_DEFAULT_RIB_STALE_TIME) - if (bgp->rib_stale_time != BGP_DEFAULT_RIB_STALE_TIME) - vty_out(vty, - " bgp graceful-restart rib-stale-time %u\n", - bgp->rib_stale_time); + /* Stale timer for RIB */ + if (bgp->rib_stale_time != BGP_DEFAULT_RIB_STALE_TIME) + vty_out(vty, + " bgp graceful-restart rib-stale-time %u\n", + bgp->rib_stale_time); /* BGP bestpath method. */ if (CHECK_FLAG(bgp->flags, BGP_FLAG_ASPATH_IGNORE)) @@ -20359,26 +20166,6 @@ void bgp_vty_init(void) install_element(CONFIG_NODE, &bgp_graceful_shutdown_cmd); install_element(CONFIG_NODE, &no_bgp_graceful_shutdown_cmd); - /* BGP-wide graceful-restart commands. */ - install_element(CONFIG_NODE, &bgp_graceful_restart_cmd); - install_element(CONFIG_NODE, &no_bgp_graceful_restart_cmd); - install_element(CONFIG_NODE, &bgp_graceful_restart_disable_cmd); - install_element(CONFIG_NODE, &no_bgp_graceful_restart_disable_cmd); - install_element(CONFIG_NODE, &bgp_graceful_restart_stalepath_time_cmd); - install_element(CONFIG_NODE, - &no_bgp_graceful_restart_stalepath_time_cmd); - install_element(CONFIG_NODE, &bgp_graceful_restart_restart_time_cmd); - install_element(CONFIG_NODE, &no_bgp_graceful_restart_restart_time_cmd); - install_element(CONFIG_NODE, - &bgp_graceful_restart_select_defer_time_cmd); - install_element(CONFIG_NODE, - &no_bgp_graceful_restart_select_defer_time_cmd); - install_element(CONFIG_NODE, &bgp_graceful_restart_preserve_fw_cmd); - install_element(CONFIG_NODE, &no_bgp_graceful_restart_preserve_fw_cmd); - install_element(CONFIG_NODE, &bgp_graceful_restart_rib_stale_time_cmd); - install_element(CONFIG_NODE, - &no_bgp_graceful_restart_rib_stale_time_cmd); - /* Dummy commands (Currently not supported) */ install_element(BGP_NODE, &no_synchronization_cmd); install_element(BGP_NODE, &no_auto_summary_cmd); diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index f88f5c8125..6d86f6ba08 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -161,9 +161,8 @@ extern int bgp_vty_find_and_parse_afi_safi_bgp(struct vty *vty, int bgp_vty_find_and_parse_bgp(struct vty *vty, struct cmd_token **argv, int argc, struct bgp **bgp, bool use_json); extern int bgp_show_summary_vty(struct vty *vty, const char *name, afi_t afi, - safi_t safi, const char *neighbor, - enum peer_asn_type as_type, as_t as, - uint16_t show_flags); + safi_t safi, const char *neighbor, int as_type, + as_t as, uint16_t show_flags); extern bool peergroup_flag_check(struct peer *peer, uint64_t flag); extern bool peergroup_af_flag_check(struct peer *peer, afi_t afi, safi_t safi, uint64_t flag); diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 52c5f5129d..2d9100b895 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -302,12 +302,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; @@ -325,70 +324,56 @@ 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 (if_is_operative(ifc->ifp)) { + 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 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 { + 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; - } - } + 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 - * 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 (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 (bgp_debug_zebra(ifc->address)) { - zlog_debug("Update peer %pBP's current intf global addr from %pI6 to %pI6 and send updates", - peer, - &peer->nexthop.v6_global, - &addr->u.prefix6); + /* + * 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)) && + !IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6) && + ((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); } } } @@ -399,14 +384,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; bgp = bgp_lookup_by_vrf_id(vrf_id); @@ -425,18 +406,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; - } - + if (bgp) { /* * When we are using the v6 global as part of the peering * nexthops and we are removing it, then we need to @@ -445,17 +415,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)) { - 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); + 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); diff --git a/configure.ac b/configure.ac index 59636194f7..7a9b80489e 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ ## AC_PREREQ([2.69]) -AC_INIT([frr], [10.2-dev], [https://github.com/frrouting/frr/issues]) +AC_INIT([frr], [10.1], [https://github.com/frrouting/frr/issues]) PACKAGE_URL="https://frrouting.org/" AC_SUBST([PACKAGE_URL]) PACKAGE_FULLNAME="FRRouting" @@ -2913,8 +2913,7 @@ compiler : ${CC} compiler flags : ${CFLAGS} ${WERROR} ${AC_CFLAGS} ${SAN_FLAGS} make : ${MAKE-make} linker flags : ${LDFLAGS} ${SAN_FLAGS} ${LIBS} ${LIBCAP} ${LIBREADLINE} ${LIBM} -local state file dir : ${e_frr_libstatedir} -run state file dir : ${e_frr_runstatedir} +state file directory : ${e_frr_runstatedir} config file directory : ${e_frr_sysconfdir} module directory : ${e_moduledir} script directory : ${e_scriptdir} diff --git a/debian/changelog b/debian/changelog index 96c66db89b..a556f00f41 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -frr (10.1~dev-1) UNRELEASED; urgency=medium +frr (10.1-0) unstable; urgency=medium - * FRR Dev 10.1 + * New upstream release FRR 10.1 - -- Jafar Al-Gharaibeh Tue, 26 Mar 2024 02:00:00 -0600 + -- Jafar Al-Gharaibeh Fri, 26 Jul 2024 02:00:00 -0600 frr (10.0-0) unstable; urgency=medium diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in index d6775e6e9c..955a73e307 100644 --- a/redhat/frr.spec.in +++ b/redhat/frr.spec.in @@ -834,7 +834,20 @@ sed -i 's/ -M rpki//' %{_sysconfdir}/frr/daemons %changelog -* Mon Mar 25 2024 Jafar Al-Gharaibeh - %{version} +* Fri Jul 26 2024 Jafar Al-Gharaibeh - %{version} + +* Fri Jul 26 2024 Jafar Al-Gharaibeh - 10.1 +- Breaking changes +- Enable BGP dynamic capability by default for datacenter profile +- Split BGP `rpki cache` command into separate per SSH/TCP +- Add deprecation cycle for OSPF `router-info X [A.B.C.D]` command +- Major highlights: +- BGP dampening per-neighbor support +- BMP send-experimental stats +- Implement extended link-bandwidth for BGP +- Paths Limit for Multiple Paths in BGP +- New command for OSPFv2 `ip ospf neighbor-filter NAME [A.B.C.D]` +- Implement non-broadcast support for point-to-multipoint networks * Mon Mar 25 2024 Jafar Al-Gharaibeh - 10.0 - Major highlights: 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 e69de29bb2..0000000000 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 9b19b2cfbd..0000000000 --- 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 2bf4a66680..0000000000 --- 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 e8b6ac6e26..0000000000 --- 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 12fecee39f..0000000000 --- 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 f7c5c7c3b5..0000000000 --- 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/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgp_ipv6_step2.json deleted file mode 100755 index f7c5c7c3b5..0000000000 --- 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/r1/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r1/bgpd.conf deleted file mode 100644 index 23b986d130..0000000000 --- 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 79cbafb5b8..0000000000 --- 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 64dadf680c..0000000000 --- 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 4f86a1a648..0000000000 --- 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/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv6_step2.json deleted file mode 100644 index 6738d45750..0000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r2/bgp_ipv6_step2.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "::ffff:ac10: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 badb11cbeb..0000000000 --- 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 16963798f8..0000000000 --- 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 8997115d87..0000000000 --- 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 0f18a43bf5..0000000000 --- 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 f44121c30e..0000000000 --- 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/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv6_step2.json deleted file mode 100644 index 807806ff8d..0000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/r3/bgp_ipv6_step2.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "routes": { - "fd00:100::/64": [ - { - "valid": true, - "bestpath": true, - "path": "65100", - "nexthops": [ - { - "ip": "::ffff:ac10:101", - "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 4dec311f51..0000000000 --- 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 fe3e307b42..0000000000 --- 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 8074bbdcde..0000000000 --- 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 64dadf680c..0000000000 --- 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 756a78e3b1..0000000000 --- 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/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgp_ipv6_step2.json deleted file mode 100755 index 7d0786c0ef..0000000000 --- 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/r4/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r4/bgpd.conf deleted file mode 100644 index 2dbc4acddc..0000000000 --- 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 21eb80f58b..0000000000 --- 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 c598b345e5..0000000000 --- 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 64dadf680c..0000000000 --- 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 756a78e3b1..0000000000 --- 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/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgp_ipv6_step2.json deleted file mode 100755 index 7d0786c0ef..0000000000 --- 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/r5/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r5/bgpd.conf deleted file mode 100644 index 101edbd71b..0000000000 --- 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 f998e805b5..0000000000 --- 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 7b43db0958..0000000000 --- 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 64dadf680c..0000000000 --- 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 1a01ead2cd..0000000000 --- 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/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgp_ipv6_step2.json deleted file mode 100644 index 55912dd74c..0000000000 --- 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/r6/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r6/bgpd.conf deleted file mode 100644 index e036a779ae..0000000000 --- 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 b575290e9b..0000000000 --- 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 fce74c146c..0000000000 --- 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 72b0f03c51..0000000000 --- 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 8fe5f7c1de..0000000000 --- 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/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgp_ipv6_step2.json deleted file mode 100644 index 8fe5f7c1de..0000000000 --- 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/r7/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r7/bgpd.conf deleted file mode 100644 index a707b23af0..0000000000 --- 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 75448297eb..0000000000 --- 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 596ee4b40b..0000000000 --- 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 20f4940328..0000000000 --- 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/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgp_ipv6_step2.json deleted file mode 100644 index 20f4940328..0000000000 --- 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/r8/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/r8/bgpd.conf deleted file mode 100644 index d57712dcdd..0000000000 --- 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 7e2479b751..0000000000 --- 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 ac67fe069c..0000000000 --- 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 4e359fd97f..0000000000 --- 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/bgp_ipv6_step2.json b/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgp_ipv6_step2.json deleted file mode 100644 index 4ab0e1c2ae..0000000000 --- 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/rr1/bgpd.conf b/tests/topotests/bgp_nexthop_mp_ipv4_6/rr1/bgpd.conf deleted file mode 100644 index 9bbac8b68e..0000000000 --- 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 fe5bcfb9f1..0000000000 --- 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 7f5c8d1c61..0000000000 --- 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 596cc3e25c..0000000000 --- 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 892b4e7b74..0000000000 --- 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 75ee08363a..0000000000 --- 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 e1c28084de..0000000000 --- a/tests/topotests/bgp_nexthop_mp_ipv4_6/test_nexthop_mp_ipv4_6.py +++ /dev/null @@ -1,282 +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 -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) - - -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)) 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 f664bb6b52..768bffbe9d 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 3498ed4326..1e93715270 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" } ] }