]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_vty.c
bgpd isisd lib: fix return on void functions
[mirror_frr.git] / bgpd / bgp_vty.c
index e6d44c1a2c500b6fed62ba77c6f43c67b702030a..85b6414e481cd0aacb2363b1a3e768f9b5175d3e 100644 (file)
@@ -61,6 +61,7 @@
 #include "bgpd/bgp_bfd.h"
 #include "bgpd/bgp_io.h"
 #include "bgpd/bgp_evpn.h"
+#include "bgpd/bgp_addpath.h"
 
 static struct peer_group *listen_range_exists(struct bgp *bgp,
                                              struct prefix *range, int exact);
@@ -822,6 +823,87 @@ DEFUN_HIDDEN (no_bgp_multiple_instance,
        return CMD_SUCCESS;
 }
 
+DEFUN_HIDDEN (bgp_local_mac,
+              bgp_local_mac_cmd,
+              "bgp local-mac vni " CMD_VNI_RANGE " mac WORD seq (0-4294967295)",
+              BGP_STR
+              "Local MAC config\n"
+              "VxLAN Network Identifier\n"
+              "VNI number\n"
+              "local mac\n"
+              "mac address\n"
+              "mac-mobility sequence\n"
+              "seq number\n")
+{
+       int rv;
+       vni_t vni;
+       struct ethaddr mac;
+       struct ipaddr ip;
+       uint32_t seq;
+       struct bgp *bgp;
+
+       vni = strtoul(argv[3]->arg, NULL, 10);
+       if (!prefix_str2mac(argv[5]->arg, &mac)) {
+               vty_out(vty, "%% Malformed MAC address\n");
+               return CMD_WARNING;
+       }
+       memset(&ip, 0, sizeof(ip));
+       seq = strtoul(argv[7]->arg, NULL, 10);
+
+       bgp = bgp_get_default();
+       if (!bgp) {
+               vty_out(vty, "Default BGP instance is not there\n");
+               return CMD_WARNING;
+       }
+
+       rv = bgp_evpn_local_macip_add(bgp, vni, &mac, &ip, 0 /* flags */, seq);
+       if (rv < 0) {
+               vty_out(vty, "Internal error\n");
+               return CMD_WARNING;
+       }
+
+       return CMD_SUCCESS;
+}
+
+DEFUN_HIDDEN (no_bgp_local_mac,
+              no_bgp_local_mac_cmd,
+              "no bgp local-mac vni " CMD_VNI_RANGE " mac WORD",
+              NO_STR
+              BGP_STR
+              "Local MAC config\n"
+              "VxLAN Network Identifier\n"
+              "VNI number\n"
+              "local mac\n"
+              "mac address\n")
+{
+       int rv;
+       vni_t vni;
+       struct ethaddr mac;
+       struct ipaddr ip;
+       struct bgp *bgp;
+
+       vni = strtoul(argv[4]->arg, NULL, 10);
+       if (!prefix_str2mac(argv[6]->arg, &mac)) {
+               vty_out(vty, "%% Malformed MAC address\n");
+               return CMD_WARNING;
+       }
+       memset(&ip, 0, sizeof(ip));
+
+       bgp = bgp_get_default();
+       if (!bgp) {
+               vty_out(vty, "Default BGP instance is not there\n");
+               return CMD_WARNING;
+       }
+
+       rv = bgp_evpn_local_macip_del(bgp, vni, &mac, &ip);
+       if (rv < 0) {
+               vty_out(vty, "Internal error\n");
+               return CMD_WARNING;
+       }
+
+       return CMD_SUCCESS;
+}
+
 #if (CONFDATE > 20190601)
 CPP_NOTICE("bgpd: time to remove deprecated cli bgp config-type cisco")
 CPP_NOTICE("This includes BGP_OPT_CISCO_CONFIG")
@@ -1807,9 +1889,8 @@ DEFUN (no_bgp_deterministic_med,
 
                for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
                        FOREACH_AFI_SAFI (afi, safi)
-                               if (CHECK_FLAG(
-                                           peer->af_flags[afi][safi],
-                                           PEER_FLAG_ADDPATH_TX_BESTPATH_PER_AS)) {
+                               if (bgp_addpath_dmed_required(
+                                       peer->addpath_type[afi][safi])) {
                                        bestpath_per_as_used = 1;
                                        break;
                                }
@@ -2301,7 +2382,7 @@ DEFUN (bgp_default_show_hostname,
        "bgp default show-hostname",
        "BGP specific commands\n"
        "Configure BGP defaults\n"
-       "Show hostname in certain command ouputs\n")
+       "Show hostname in certain command outputs\n")
 {
        VTY_DECLVAR_CONTEXT(bgp, bgp);
        bgp_flag_set(bgp, BGP_FLAG_SHOW_HOSTNAME);
@@ -2314,7 +2395,7 @@ DEFUN (no_bgp_default_show_hostname,
        NO_STR
        "BGP specific commands\n"
        "Configure BGP defaults\n"
-       "Show hostname in certain command ouputs\n")
+       "Show hostname in certain command outputs\n")
 {
        VTY_DECLVAR_CONTEXT(bgp, bgp);
        bgp_flag_unset(bgp, BGP_FLAG_SHOW_HOSTNAME);
@@ -2740,7 +2821,8 @@ static int peer_remote_as_vty(struct vty *vty, const char *peer_str,
                        ret = peer_group_remote_as(bgp, peer_str, &as, as_type);
                        if (ret < 0) {
                                vty_out(vty,
-                                       "%% Create the peer-group or interface first\n");
+                                       "%% Create the peer-group or interface first or specify \"interface\" keyword\n");
+                               vty_out(vty, "%% if using an unnumbered interface neighbor\n");
                                return CMD_WARNING_CONFIG_FAILED;
                        }
                        return CMD_SUCCESS;
@@ -2835,7 +2917,7 @@ static int peer_conf_interface_get(struct vty *vty, const char *conf_if,
        peer = peer_lookup_by_conf_if(bgp, conf_if);
        if (peer) {
                if (as_str)
-                       ret = peer_remote_as(bgp, &su, conf_if, &as, as_type,
+                       ret = peer_remote_as(bgp, NULL, conf_if, &as, as_type,
                                             afi, safi);
        } else {
                if (bgp_flag_check(bgp, BGP_FLAG_NO_DEFAULT_IPV4)
@@ -4767,14 +4849,17 @@ static int peer_default_originate_set_vty(struct vty *vty, const char *peer_str,
 {
        int ret;
        struct peer *peer;
+       struct route_map *route_map;
 
        peer = peer_and_group_lookup_vty(vty, peer_str);
        if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       if (set)
-               ret = peer_default_originate_set(peer, afi, safi, rmap);
-       else
+       if (set) {
+               route_map = route_map_lookup_warn_noexist(vty, rmap);
+               ret = peer_default_originate_set(peer, afi, safi,
+                                                rmap, route_map);
+       } else
                ret = peer_default_originate_unset(peer, afi, safi);
 
        return bgp_vty_return(vty, ret);
@@ -5593,6 +5678,7 @@ static int peer_route_map_set_vty(struct vty *vty, const char *ip_str,
        int ret;
        struct peer *peer;
        int direct = RMAP_IN;
+       struct route_map *route_map;
 
        peer = peer_and_group_lookup_vty(vty, ip_str);
        if (!peer)
@@ -5604,7 +5690,8 @@ static int peer_route_map_set_vty(struct vty *vty, const char *ip_str,
        else if (strncmp(direct_str, "o", 1) == 0)
                direct = RMAP_OUT;
 
-       ret = peer_route_map_set(peer, afi, safi, direct, name_str);
+       route_map = route_map_lookup_warn_noexist(vty, name_str);
+       ret = peer_route_map_set(peer, afi, safi, direct, name_str, route_map);
 
        return bgp_vty_return(vty, ret);
 }
@@ -5691,12 +5778,14 @@ static int peer_unsuppress_map_set_vty(struct vty *vty, const char *ip_str,
 {
        int ret;
        struct peer *peer;
+       struct route_map *route_map;
 
        peer = peer_and_group_lookup_vty(vty, ip_str);
        if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       ret = peer_unsuppress_map_set(peer, afi, safi, name_str);
+       route_map = route_map_lookup_warn_noexist(vty, name_str);
+       ret = peer_unsuppress_map_set(peer, afi, safi, name_str, route_map);
 
        return bgp_vty_return(vty, ret);
 }
@@ -6008,7 +6097,7 @@ DEFUN (neighbor_allowas_in,
        NEIGHBOR_STR
        NEIGHBOR_ADDR_STR2
        "Accept as-path with my AS present in it\n"
-       "Number of occurances of AS number\n"
+       "Number of occurences of AS number\n"
        "Only accept my AS in the as-path if the route was originated in my AS\n")
 {
        int idx_peer = 1;
@@ -6042,7 +6131,7 @@ ALIAS_HIDDEN(
        "neighbor <A.B.C.D|X:X::X:X|WORD> allowas-in [<(1-10)|origin>]",
        NEIGHBOR_STR NEIGHBOR_ADDR_STR2
        "Accept as-path with my AS present in it\n"
-       "Number of occurances of AS number\n"
+       "Number of occurences of AS number\n"
        "Only accept my AS in the as-path if the route was originated in my AS\n")
 
 DEFUN (no_neighbor_allowas_in,
@@ -6052,7 +6141,7 @@ DEFUN (no_neighbor_allowas_in,
        NEIGHBOR_STR
        NEIGHBOR_ADDR_STR2
        "allow local ASN appears in aspath attribute\n"
-       "Number of occurances of AS number\n"
+       "Number of occurences of AS number\n"
        "Only accept my AS in the as-path if the route was originated in my AS\n")
 {
        int idx_peer = 2;
@@ -6074,7 +6163,7 @@ ALIAS_HIDDEN(
        "no neighbor <A.B.C.D|X:X::X:X|WORD> allowas-in [<(1-10)|origin>]",
        NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
        "allow local ASN appears in aspath attribute\n"
-       "Number of occurances of AS number\n"
+       "Number of occurences of AS number\n"
        "Only accept my AS in the as-path if the route was originated in my AS\n")
 
 DEFUN (neighbor_ttl_security,
@@ -6145,9 +6234,9 @@ DEFUN (neighbor_addpath_tx_all_paths,
        if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
-                                   bgp_node_safi(vty),
-                                   PEER_FLAG_ADDPATH_TX_ALL_PATHS);
+       bgp_addpath_set_peer_type(peer, bgp_node_afi(vty), bgp_node_safi(vty),
+                                BGP_ADDPATH_ALL);
+       return CMD_SUCCESS;
 }
 
 ALIAS_HIDDEN(neighbor_addpath_tx_all_paths,
@@ -6165,9 +6254,23 @@ DEFUN (no_neighbor_addpath_tx_all_paths,
        "Use addpath to advertise all paths to a neighbor\n")
 {
        int idx_peer = 2;
-       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
-                                     bgp_node_afi(vty), bgp_node_safi(vty),
-                                     PEER_FLAG_ADDPATH_TX_ALL_PATHS);
+       struct peer *peer;
+
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
+
+       if (peer->addpath_type[bgp_node_afi(vty)][bgp_node_safi(vty)]
+           != BGP_ADDPATH_ALL) {
+               vty_out(vty,
+                       "%% Peer not currently configured to transmit all paths.");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       bgp_addpath_set_peer_type(peer, bgp_node_afi(vty), bgp_node_safi(vty),
+                                BGP_ADDPATH_NONE);
+
+       return CMD_SUCCESS;
 }
 
 ALIAS_HIDDEN(no_neighbor_addpath_tx_all_paths,
@@ -6190,9 +6293,10 @@ DEFUN (neighbor_addpath_tx_bestpath_per_as,
        if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
-                                   bgp_node_safi(vty),
-                                   PEER_FLAG_ADDPATH_TX_BESTPATH_PER_AS);
+       bgp_addpath_set_peer_type(peer, bgp_node_afi(vty), bgp_node_safi(vty),
+                                BGP_ADDPATH_BEST_PER_AS);
+
+       return CMD_SUCCESS;
 }
 
 ALIAS_HIDDEN(neighbor_addpath_tx_bestpath_per_as,
@@ -6210,9 +6314,23 @@ DEFUN (no_neighbor_addpath_tx_bestpath_per_as,
        "Use addpath to advertise the bestpath per each neighboring AS\n")
 {
        int idx_peer = 2;
-       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
-                                     bgp_node_afi(vty), bgp_node_safi(vty),
-                                     PEER_FLAG_ADDPATH_TX_BESTPATH_PER_AS);
+       struct peer *peer;
+
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
+
+       if (peer->addpath_type[bgp_node_afi(vty)][bgp_node_safi(vty)]
+           != BGP_ADDPATH_BEST_PER_AS) {
+               vty_out(vty,
+                       "%% Peer not currently configured to transmit all best path per as.");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       bgp_addpath_set_peer_type(peer, bgp_node_afi(vty), bgp_node_safi(vty),
+                                BGP_ADDPATH_NONE);
+
+       return CMD_SUCCESS;
 }
 
 ALIAS_HIDDEN(no_neighbor_addpath_tx_bestpath_per_as,
@@ -6646,7 +6764,7 @@ DEFPY (af_route_map_vpn_imexport,
                        bgp->vpn_policy[afi].rmap_name[dir] = XSTRDUP(
                                                                      MTYPE_ROUTE_MAP_NAME, rmap_str);
                        bgp->vpn_policy[afi].rmap[dir] =
-                               route_map_lookup_by_name(rmap_str);
+                               route_map_lookup_warn_noexist(vty, rmap_str);
                        if (!bgp->vpn_policy[afi].rmap[dir])
                                return CMD_SUCCESS;
                } else {
@@ -6719,7 +6837,7 @@ DEFPY(af_import_vrf_route_map, af_import_vrf_route_map_cmd,
                bgp->vpn_policy[afi].rmap_name[dir] =
                        XSTRDUP(MTYPE_ROUTE_MAP_NAME, rmap_str);
                bgp->vpn_policy[afi].rmap[dir] =
-                       route_map_lookup_by_name(rmap_str);
+                       route_map_lookup_warn_noexist(vty, rmap_str);
                if (!bgp->vpn_policy[afi].rmap[dir])
                        return CMD_SUCCESS;
        } else {
@@ -6742,13 +6860,12 @@ ALIAS(af_import_vrf_route_map, af_no_import_vrf_route_map_cmd,
       "Vrf routes being filtered\n"
       "Specify route map\n")
 
-DEFPY (bgp_imexport_vrf,
-       bgp_imexport_vrf_cmd,
-       "[no] import vrf NAME$import_name",
-       NO_STR
-       "Import routes from another VRF\n"
-       "VRF to import from\n"
-       "The name of the VRF\n")
+DEFPY(bgp_imexport_vrf, bgp_imexport_vrf_cmd,
+      "[no] import vrf VIEWVRFNAME$import_name",
+      NO_STR
+      "Import routes from another VRF\n"
+      "VRF to import from\n"
+      "The name of the VRF\n")
 {
        VTY_DECLVAR_CONTEXT(bgp, bgp);
        struct listnode *node;
@@ -6777,7 +6894,7 @@ DEFPY (bgp_imexport_vrf,
        safi = bgp_node_safi(vty);
 
        if (((BGP_INSTANCE_TYPE_DEFAULT == bgp->inst_type)
-            && (strcmp(import_name, BGP_DEFAULT_NAME) == 0))
+            && (strcmp(import_name, VRF_DEFAULT_NAME) == 0))
            || (bgp->name && (strcmp(import_name, bgp->name) == 0))) {
                vty_out(vty, "%% Cannot %s vrf %s into itself\n",
                        remove ? "unimport" : "import", import_name);
@@ -6799,7 +6916,7 @@ DEFPY (bgp_imexport_vrf,
 
        vrf_bgp = bgp_lookup_by_name(import_name);
        if (!vrf_bgp) {
-               if (strcmp(import_name, BGP_DEFAULT_NAME) == 0)
+               if (strcmp(import_name, VRF_DEFAULT_NAME) == 0)
                        vrf_bgp = bgp_default;
                else
                        /* Auto-create assuming the same AS */
@@ -7396,7 +7513,7 @@ DEFUN (show_bgp_vrfs,
                }
 
                if (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
-                       name = "Default";
+                       name = VRF_DEFAULT_NAME;
                        type = "DFLT";
                } else {
                        name = bgp->name;
@@ -7451,14 +7568,6 @@ DEFUN (show_bgp_vrfs,
        return CMD_SUCCESS;
 }
 
-static void show_address_entry(struct hash_backet *backet, void *args)
-{
-       struct vty *vty = (struct vty *)args;
-       struct bgp_addr *addr = (struct bgp_addr *)backet->data;
-
-       vty_out(vty, "addr: %s, count: %d\n", inet_ntoa(addr->addr),
-               addr->refcnt);
-}
 
 static void show_tip_entry(struct hash_backet *backet, void *args)
 {
@@ -7472,9 +7581,7 @@ static void show_tip_entry(struct hash_backet *backet, void *args)
 static void bgp_show_martian_nexthops(struct vty *vty, struct bgp *bgp)
 {
        vty_out(vty, "self nexthop database:\n");
-       hash_iterate(bgp->address_hash,
-                    (void (*)(struct hash_backet *, void *))show_address_entry,
-                    vty);
+       bgp_nexthop_show_address_hash(vty, bgp);
 
        vty_out(vty, "Tunnel-ip database:\n");
        hash_iterate(bgp->tip_hash,
@@ -7534,12 +7641,13 @@ DEFUN (show_bgp_memory,
        count = mtype_stats_alloc(MTYPE_BGP_ROUTE);
        vty_out(vty, "%ld BGP routes, using %s of memory\n", count,
                mtype_memstr(memstrbuf, sizeof(memstrbuf),
-                            count * sizeof(struct bgp_info)));
+                            count * sizeof(struct bgp_path_info)));
        if ((count = mtype_stats_alloc(MTYPE_BGP_ROUTE_EXTRA)))
                vty_out(vty, "%ld BGP route ancillaries, using %s of memory\n",
                        count,
-                       mtype_memstr(memstrbuf, sizeof(memstrbuf),
-                                    count * sizeof(struct bgp_info_extra)));
+                       mtype_memstr(
+                               memstrbuf, sizeof(memstrbuf),
+                               count * sizeof(struct bgp_path_info_extra)));
 
        if ((count = mtype_stats_alloc(MTYPE_BGP_STATIC)))
                vty_out(vty, "%ld Static routes, using %s of memory\n", count,
@@ -7691,6 +7799,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
        int pfx_rcd_safi;
        json_object *json_peer = NULL;
        json_object *json_peers = NULL;
+       struct peer_af *paf;
 
        /* labeled-unicast routes are installed in the unicast table so in order
         * to
@@ -7771,7 +7880,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
                                        json, "vrfName",
                                        (bgp->inst_type
                                         == BGP_INSTANCE_TYPE_DEFAULT)
-                                               ? "Default"
+                                               ? VRF_DEFAULT_NAME
                                                : bgp->name);
                        } else {
                                vty_out(vty,
@@ -7983,8 +8092,22 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
                        json_object_int_add(json_peer, "inq", 0);
                        peer_uptime(peer->uptime, timebuf, BGP_UPTIME_LEN,
                                    use_json, json_peer);
+
+                       /*
+                        * Adding "pfxRcd" field to match with the corresponding
+                        * CLI. "prefixReceivedCount" will be deprecated in
+                        * future.
+                        */
                        json_object_int_add(json_peer, "prefixReceivedCount",
                                            peer->pcount[afi][pfx_rcd_safi]);
+                       json_object_int_add(json_peer, "pfxRcd",
+                                       peer->pcount[afi][pfx_rcd_safi]);
+
+                       paf = peer_af_find(peer, afi, pfx_rcd_safi);
+                       if (paf && PAF_SUBGRP(paf))
+                               json_object_int_add(json_peer,
+                                               "pfxSnt",
+                                               (PAF_SUBGRP(paf))->scount);
 
                        if (CHECK_FLAG(peer->flags, PEER_FLAG_SHUTDOWN))
                                json_object_string_add(json_peer, "state",
@@ -8184,12 +8307,12 @@ static void bgp_show_all_instances_summary_vty(struct vty *vty, afi_t afi,
 
                        vty_out(vty, "\"%s\":",
                                (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
-                                       ? "Default"
+                                       ? VRF_DEFAULT_NAME
                                        : bgp->name);
                } else {
                        vty_out(vty, "\nInstance %s:\n",
                                (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
-                                       ? "Default"
+                                       ? VRF_DEFAULT_NAME
                                        : bgp->name);
                }
                bgp_show_summary_afi_safi(vty, bgp, afi, safi, use_json, json);
@@ -8562,15 +8685,11 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
                                json_addr,
                                "privateAsNumsRemovedInUpdatesToNbr");
 
-               if (CHECK_FLAG(p->af_flags[afi][safi],
-                              PEER_FLAG_ADDPATH_TX_ALL_PATHS))
-                       json_object_boolean_true_add(json_addr,
-                                                    "addpathTxAllPaths");
-
-               if (CHECK_FLAG(p->af_flags[afi][safi],
-                              PEER_FLAG_ADDPATH_TX_BESTPATH_PER_AS))
-                       json_object_boolean_true_add(json_addr,
-                                                    "addpathTxBestpathPerAS");
+               if (p->addpath_type[afi][safi] != BGP_ADDPATH_NONE)
+                       json_object_boolean_true_add(
+                               json_addr,
+                               bgp_addpath_names(p->addpath_type[afi][safi])
+                                       ->type_json_name);
 
                if (CHECK_FLAG(p->af_flags[afi][safi], PEER_FLAG_AS_OVERRIDE))
                        json_object_string_add(json_addr,
@@ -8698,6 +8817,9 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
                /* Receive prefix count */
                json_object_int_add(json_addr, "acceptedPrefixCounter",
                                    p->pcount[afi][safi]);
+               if (paf && PAF_SUBGRP(paf))
+                       json_object_int_add(json_addr, "sentPrefixCounter",
+                                               (PAF_SUBGRP(paf))->scount);
 
                /* Maximum prefix */
                if (CHECK_FLAG(p->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX)) {
@@ -8833,14 +8955,10 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
                        vty_out(vty,
                                "  Private AS numbers removed in updates to this neighbor\n");
 
-               if (CHECK_FLAG(p->af_flags[afi][safi],
-                              PEER_FLAG_ADDPATH_TX_ALL_PATHS))
-                       vty_out(vty, "  Advertise all paths via addpath\n");
-
-               if (CHECK_FLAG(p->af_flags[afi][safi],
-                              PEER_FLAG_ADDPATH_TX_BESTPATH_PER_AS))
-                       vty_out(vty,
-                               "  Advertise bestpath per AS via addpath\n");
+               if (p->addpath_type[afi][safi] != BGP_ADDPATH_NONE)
+                       vty_out(vty, "  %s\n",
+                               bgp_addpath_names(p->addpath_type[afi][safi])
+                                       ->human_description);
 
                if (CHECK_FLAG(p->af_flags[afi][safi], PEER_FLAG_AS_OVERRIDE))
                        vty_out(vty,
@@ -9600,7 +9718,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
                                                                json_object_string_add(
                                                                        json_nxt,
                                                                        print_store,
-                                                                       "recieved");
+                                                                       "received");
                                                        }
                                                }
                                                json_object_object_add(
@@ -10208,7 +10326,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
                        json_object_object_add(
                                json_neigh, "gracefulRestartInfo", json_grace);
                } else {
-                       vty_out(vty, "  Graceful restart informations:\n");
+                       vty_out(vty, "  Graceful restart information:\n");
                        if (p->status == Established) {
                                vty_out(vty, "    End-of-RIB send: ");
                                FOREACH_AFI_SAFI (afi, safi) {
@@ -10836,7 +10954,7 @@ static void bgp_show_all_instances_neighbors_vty(struct vty *vty,
                        json_object_string_add(
                                json, "vrfName",
                                (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
-                                       ? "Default"
+                                       ? VRF_DEFAULT_NAME
                                        : bgp->name);
 
                        if (!is_first)
@@ -10846,12 +10964,12 @@ static void bgp_show_all_instances_neighbors_vty(struct vty *vty,
 
                        vty_out(vty, "\"%s\":",
                                (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
-                                       ? "Default"
+                                       ? VRF_DEFAULT_NAME
                                        : bgp->name);
                } else {
                        vty_out(vty, "\nInstance %s:\n",
                                (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
-                                       ? "Default"
+                                       ? VRF_DEFAULT_NAME
                                        : bgp->name);
                }
 
@@ -11285,7 +11403,7 @@ static void bgp_show_all_instances_updgrps_vty(struct vty *vty, afi_t afi,
        for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
                vty_out(vty, "\nInstance %s:\n",
                        (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
-                               ? "Default"
+                               ? VRF_DEFAULT_NAME
                                : bgp->name);
                update_group_show(bgp, afi, safi, vty, 0);
        }
@@ -11368,6 +11486,23 @@ DEFUN (show_bgp_instance_all_ipv6_updgrps,
        return CMD_SUCCESS;
 }
 
+DEFUN (show_bgp_l2vpn_evpn_updgrps,
+       show_bgp_l2vpn_evpn_updgrps_cmd,
+       "show [ip] bgp l2vpn evpn update-groups",
+       SHOW_STR
+       IP_STR
+       BGP_STR
+       "l2vpn address family\n"
+       "evpn sub-address family\n"
+       "Detailed info about dynamic update groups\n")
+{
+       char *vrf = NULL;
+       uint64_t subgrp_id = 0;
+
+       bgp_show_update_groups(vty, vrf, AFI_L2VPN, SAFI_EVPN, subgrp_id);
+       return CMD_SUCCESS;
+}
+
 DEFUN (show_bgp_updgrps_stats,
        show_bgp_updgrps_stats_cmd,
        "show [ip] bgp update-groups statistics",
@@ -11651,6 +11786,8 @@ DEFUN (bgp_redistribute_ipv4_rmap,
        int type;
        struct bgp_redist *red;
        bool changed;
+       struct route_map *route_map = route_map_lookup_warn_noexist(
+               vty, argv[idx_word]->arg);
 
        type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
        if (type < 0) {
@@ -11659,7 +11796,8 @@ DEFUN (bgp_redistribute_ipv4_rmap,
        }
 
        red = bgp_redist_add(bgp, AFI_IP, type, 0);
-       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
        return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
 
@@ -11723,6 +11861,8 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric,
        uint32_t metric;
        struct bgp_redist *red;
        bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
 
        type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
        if (type < 0) {
@@ -11732,7 +11872,8 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric,
        metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP, type, 0);
-       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
        changed |= bgp_redistribute_metric_set(bgp, red, AFI_IP, type, metric);
        return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
@@ -11766,6 +11907,8 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap,
        uint32_t metric;
        struct bgp_redist *red;
        bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
 
        type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
        if (type < 0) {
@@ -11776,7 +11919,8 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap,
 
        red = bgp_redist_add(bgp, AFI_IP, type, 0);
        changed = bgp_redistribute_metric_set(bgp, red, AFI_IP, type, metric);
-       changed |= bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed |=
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
        return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
 
@@ -11841,6 +11985,8 @@ DEFUN (bgp_redistribute_ipv4_ospf_rmap,
        unsigned short instance;
        int protocol;
        bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
 
        if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
                protocol = ZEBRA_ROUTE_OSPF;
@@ -11849,7 +11995,8 @@ DEFUN (bgp_redistribute_ipv4_ospf_rmap,
 
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
        red = bgp_redist_add(bgp, AFI_IP, protocol, instance);
-       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
        return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
 }
 
@@ -11929,6 +12076,8 @@ DEFUN (bgp_redistribute_ipv4_ospf_rmap_metric,
        unsigned short instance;
        int protocol;
        bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
 
        if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
                protocol = ZEBRA_ROUTE_OSPF;
@@ -11939,7 +12088,8 @@ DEFUN (bgp_redistribute_ipv4_ospf_rmap_metric,
        metric = strtoul(argv[idx_number_2]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP, protocol, instance);
-       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
        changed |= bgp_redistribute_metric_set(bgp, red, AFI_IP, protocol,
                                                metric);
        return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
@@ -11980,6 +12130,8 @@ DEFUN (bgp_redistribute_ipv4_ospf_metric_rmap,
        unsigned short instance;
        int protocol;
        bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
 
        if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
                protocol = ZEBRA_ROUTE_OSPF;
@@ -11992,7 +12144,8 @@ DEFUN (bgp_redistribute_ipv4_ospf_metric_rmap,
        red = bgp_redist_add(bgp, AFI_IP, protocol, instance);
        changed = bgp_redistribute_metric_set(bgp, red, AFI_IP, protocol,
                                                metric);
-       changed |= bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed |=
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
        return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
 }
 
@@ -12118,6 +12271,8 @@ DEFUN (bgp_redistribute_ipv6_rmap,
        int type;
        struct bgp_redist *red;
        bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
 
        type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
        if (type < 0) {
@@ -12126,7 +12281,8 @@ DEFUN (bgp_redistribute_ipv6_rmap,
        }
 
        red = bgp_redist_add(bgp, AFI_IP6, type, 0);
-       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
        return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
 }
 
@@ -12176,6 +12332,8 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric,
        uint32_t metric;
        struct bgp_redist *red;
        bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
 
        type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
        if (type < 0) {
@@ -12185,7 +12343,8 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric,
        metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP6, type, 0);
-       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
        changed |= bgp_redistribute_metric_set(bgp, red, AFI_IP6, type,
                                                metric);
        return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
@@ -12209,6 +12368,8 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap,
        uint32_t metric;
        struct bgp_redist *red;
        bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
 
        type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
        if (type < 0) {
@@ -12220,7 +12381,8 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap,
        red = bgp_redist_add(bgp, AFI_IP6, type, 0);
        changed = bgp_redistribute_metric_set(bgp, red, AFI_IP6, SAFI_UNICAST,
                                                metric);
-       changed |= bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed |=
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
        return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
 }
 
@@ -12292,11 +12454,16 @@ void bgp_vpn_policy_config_write_afi(struct vty *vty, struct bgp *bgp,
 {
        int indent = 2;
 
-       if (bgp->vpn_policy[afi].rmap_name[BGP_VPN_POLICY_DIR_FROMVPN])
-               vty_out(vty, "%*simport vrf route-map %s\n", indent, "",
-                       bgp->vpn_policy[afi]
+       if (bgp->vpn_policy[afi].rmap_name[BGP_VPN_POLICY_DIR_FROMVPN]) {
+               if (listcount(bgp->vpn_policy[afi].import_vrf))
+                       vty_out(vty, "%*simport vrf route-map %s\n", indent, "",
+                               bgp->vpn_policy[afi]
                                .rmap_name[BGP_VPN_POLICY_DIR_FROMVPN]);
-
+               else
+                       vty_out(vty, "%*sroute-map vpn import %s\n", indent, "",
+                               bgp->vpn_policy[afi]
+                               .rmap_name[BGP_VPN_POLICY_DIR_FROMVPN]);
+       }
        if (CHECK_FLAG(bgp->af_flags[afi][SAFI_UNICAST],
                       BGP_CONFIG_VRF_TO_VRF_IMPORT)
            || CHECK_FLAG(bgp->af_flags[afi][SAFI_UNICAST],
@@ -12528,6 +12695,10 @@ void bgp_vty_init(void)
        install_element(CONFIG_NODE, &bgp_config_type_cmd);
        install_element(CONFIG_NODE, &no_bgp_config_type_cmd);
 
+       /* "bgp local-mac" hidden commands. */
+       install_element(CONFIG_NODE, &bgp_local_mac_cmd);
+       install_element(CONFIG_NODE, &no_bgp_local_mac_cmd);
+
        /* bgp route-map delay-timer commands. */
        install_element(CONFIG_NODE, &bgp_set_route_map_delay_timer_cmd);
        install_element(CONFIG_NODE, &no_bgp_set_route_map_delay_timer_cmd);
@@ -13118,6 +13289,8 @@ void bgp_vty_init(void)
        install_element(BGP_VPNV4_NODE, &no_neighbor_route_server_client_cmd);
        install_element(BGP_VPNV6_NODE, &neighbor_route_server_client_cmd);
        install_element(BGP_VPNV6_NODE, &no_neighbor_route_server_client_cmd);
+       install_element(BGP_EVPN_NODE, &neighbor_route_server_client_cmd);
+       install_element(BGP_EVPN_NODE, &no_neighbor_route_server_client_cmd);
        install_element(BGP_FLOWSPECV4_NODE, &neighbor_route_server_client_cmd);
        install_element(BGP_FLOWSPECV4_NODE,
                        &no_neighbor_route_server_client_cmd);
@@ -13570,6 +13743,7 @@ void bgp_vty_init(void)
 
        /* "show [ip] bgp summary" commands. */
        install_element(VIEW_NODE, &show_bgp_instance_all_ipv6_updgrps_cmd);
+       install_element(VIEW_NODE, &show_bgp_l2vpn_evpn_updgrps_cmd);
        install_element(VIEW_NODE, &show_bgp_instance_updgrps_stats_cmd);
        install_element(VIEW_NODE, &show_bgp_updgrps_stats_cmd);
        install_element(VIEW_NODE, &show_ip_bgp_instance_updgrps_adj_s_cmd);
@@ -13735,11 +13909,11 @@ static void community_list_perror(struct vty *vty, int ret)
 /* "community-list" keyword help string.  */
 #define COMMUNITY_LIST_STR "Add a community list entry\n"
 
-/* ip community-list standard */
-DEFUN (ip_community_list_standard,
-       ip_community_list_standard_cmd,
-       "ip community-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
-       IP_STR
+/*community-list standard */
+DEFUN (community_list_standard,
+       bgp_community_list_standard_cmd,
+       "bgp community-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
+       BGP_STR
        COMMUNITY_LIST_STR
        "Community list number (standard)\n"
        "Add an standard community-list entry\n"
@@ -13753,6 +13927,14 @@ DEFUN (ip_community_list_standard,
        int style = COMMUNITY_LIST_STANDARD;
 
        int idx = 0;
+
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'bgp community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> AA:NN'\n");
+               zlog_warn("Deprecated option: 'ip community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> AA:NN' being used");
+       }
+
        argv_find(argv, argc, "(1-99)", &idx);
        argv_find(argv, argc, "WORD", &idx);
        cl_name_or_number = argv[idx]->arg;
@@ -13775,10 +13957,12 @@ DEFUN (ip_community_list_standard,
        return CMD_SUCCESS;
 }
 
-DEFUN (no_ip_community_list_standard_all,
-       no_ip_community_list_standard_all_cmd,
-       "no ip community-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
-       NO_STR
+#if CONFDATE > 20191005
+CPP_NOTICE("bgpd: remove deprecated 'ip community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> AA:NN' command")
+#endif
+ALIAS (community_list_standard,
+       ip_community_list_standard_cmd,
+       "ip community-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
        IP_STR
        COMMUNITY_LIST_STR
        "Community list number (standard)\n"
@@ -13787,19 +13971,51 @@ DEFUN (no_ip_community_list_standard_all,
        "Specify community to reject\n"
        "Specify community to accept\n"
        COMMUNITY_VAL_STR)
+
+DEFUN (no_community_list_standard_all,
+       no_bgp_community_list_standard_all_cmd,
+       "no bgp community-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
+       NO_STR
+       BGP_STR
+       COMMUNITY_LIST_STR
+       "Community list number (standard)\n"
+       "Add an standard community-list entry\n"
+       "Community list name\n"
+       "Specify community to reject\n"
+       "Specify community to accept\n"
+       COMMUNITY_VAL_STR)
 {
        char *cl_name_or_number = NULL;
+       char *str = NULL;
        int direct = 0;
        int style = COMMUNITY_LIST_STANDARD;
 
        int idx = 0;
+
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'no bgp community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> AA:NN'\n");
+               zlog_warn("Deprecated option: 'no ip community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> |AA:NN' being used");
+       }
+
+       argv_find(argv, argc, "permit", &idx);
+       argv_find(argv, argc, "deny", &idx);
+
+       if (idx) {
+               direct = argv_find(argv, argc, "permit", &idx)
+                                ? COMMUNITY_PERMIT
+                                : COMMUNITY_DENY;
+
+               idx = 0;
+               argv_find(argv, argc, "AA:NN", &idx);
+               str = argv_concat(argv, argc, idx);
+       }
+
+       idx = 0;
        argv_find(argv, argc, "(1-99)", &idx);
        argv_find(argv, argc, "WORD", &idx);
        cl_name_or_number = argv[idx]->arg;
-       direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT
-                                                      : COMMUNITY_DENY;
-       argv_find(argv, argc, "AA:NN", &idx);
-       char *str = argv_concat(argv, argc, idx);
 
        int ret = community_list_unset(bgp_clist, cl_name_or_number, str,
                                       direct, style);
@@ -13813,13 +14029,39 @@ DEFUN (no_ip_community_list_standard_all,
 
        return CMD_SUCCESS;
 }
-
-/* ip community-list expanded */
-DEFUN (ip_community_list_expanded_all,
-       ip_community_list_expanded_all_cmd,
-       "ip community-list <(100-500)|expanded WORD> <deny|permit> AA:NN...",
+ALIAS (no_community_list_standard_all,
+       no_ip_community_list_standard_all_cmd,
+       "no ip community-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
+       NO_STR
        IP_STR
        COMMUNITY_LIST_STR
+       "Community list number (standard)\n"
+       "Add an standard community-list entry\n"
+       "Community list name\n"
+       "Specify community to reject\n"
+       "Specify community to accept\n"
+       COMMUNITY_VAL_STR)
+
+ALIAS(no_community_list_standard_all, no_bgp_community_list_standard_all_list_cmd,
+      "no bgp community-list <(1-99)|standard WORD>",
+      NO_STR BGP_STR COMMUNITY_LIST_STR
+      "Community list number (standard)\n"
+      "Add an standard community-list entry\n"
+      "Community list name\n")
+
+ALIAS(no_community_list_standard_all, no_ip_community_list_standard_all_list_cmd,
+      "no ip community-list <(1-99)|standard WORD>",
+      NO_STR BGP_STR COMMUNITY_LIST_STR
+      "Community list number (standard)\n"
+      "Add an standard community-list entry\n"
+      "Community list name\n")
+
+/*community-list expanded */
+DEFUN (community_list_expanded_all,
+       bgp_community_list_expanded_all_cmd,
+       "bgp community-list <(100-500)|expanded WORD> <deny|permit> AA:NN...",
+       BGP_STR
+       COMMUNITY_LIST_STR
        "Community list number (expanded)\n"
        "Add an expanded community-list entry\n"
        "Community list name\n"
@@ -13832,6 +14074,12 @@ DEFUN (ip_community_list_expanded_all,
        int style = COMMUNITY_LIST_EXPANDED;
 
        int idx = 0;
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'bgp community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> AA:NN'\n");
+               zlog_warn("Deprecated option: 'ip community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> AA:NN' being used");
+       }
        argv_find(argv, argc, "(100-500)", &idx);
        argv_find(argv, argc, "WORD", &idx);
        cl_name_or_number = argv[idx]->arg;
@@ -13854,10 +14102,9 @@ DEFUN (ip_community_list_expanded_all,
        return CMD_SUCCESS;
 }
 
-DEFUN (no_ip_community_list_expanded_all,
-       no_ip_community_list_expanded_all_cmd,
-       "no ip community-list <(100-500)|expanded WORD> <deny|permit> AA:NN...",
-       NO_STR
+ALIAS (community_list_expanded_all,
+       ip_community_list_expanded_all_cmd,
+       "ip community-list <(100-500)|expanded WORD> <deny|permit> AA:NN...",
        IP_STR
        COMMUNITY_LIST_STR
        "Community list number (expanded)\n"
@@ -13866,19 +14113,51 @@ DEFUN (no_ip_community_list_expanded_all,
        "Specify community to reject\n"
        "Specify community to accept\n"
        COMMUNITY_VAL_STR)
+
+DEFUN (no_community_list_expanded_all,
+       no_bgp_community_list_expanded_all_cmd,
+       "no bgp community-list <(100-500)|expanded WORD> <deny|permit> AA:NN...",
+       NO_STR
+       BGP_STR
+       COMMUNITY_LIST_STR
+       "Community list number (expanded)\n"
+       "Add an expanded community-list entry\n"
+       "Community list name\n"
+       "Specify community to reject\n"
+       "Specify community to accept\n"
+       COMMUNITY_VAL_STR)
 {
        char *cl_name_or_number = NULL;
+       char *str = NULL;
        int direct = 0;
        int style = COMMUNITY_LIST_EXPANDED;
 
        int idx = 0;
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'no bgp community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> AA:NN'\n");
+               zlog_warn("Deprecated option: 'no ip community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> AA:NN' being used");
+       }
+
+       idx = 0;
+       argv_find(argv, argc, "permit", &idx);
+       argv_find(argv, argc, "deny", &idx);
+
+       if (idx) {
+               direct = argv_find(argv, argc, "permit", &idx)
+                                ? COMMUNITY_PERMIT
+                                : COMMUNITY_DENY;
+
+               idx = 0;
+               argv_find(argv, argc, "AA:NN", &idx);
+               str = argv_concat(argv, argc, idx);
+       }
+
+       idx = 0;
        argv_find(argv, argc, "(100-500)", &idx);
        argv_find(argv, argc, "WORD", &idx);
        cl_name_or_number = argv[idx]->arg;
-       direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT
-                                                      : COMMUNITY_DENY;
-       argv_find(argv, argc, "AA:NN", &idx);
-       char *str = argv_concat(argv, argc, idx);
 
        int ret = community_list_unset(bgp_clist, cl_name_or_number, str,
                                       direct, style);
@@ -13893,6 +14172,33 @@ DEFUN (no_ip_community_list_expanded_all,
        return CMD_SUCCESS;
 }
 
+ALIAS (no_community_list_expanded_all,
+       no_ip_community_list_expanded_all_cmd,
+       "no ip community-list <(100-500)|expanded WORD> <deny|permit> AA:NN...",
+       NO_STR
+       IP_STR
+       COMMUNITY_LIST_STR
+       "Community list number (expanded)\n"
+       "Add an expanded community-list entry\n"
+       "Community list name\n"
+       "Specify community to reject\n"
+       "Specify community to accept\n"
+       COMMUNITY_VAL_STR)
+
+ALIAS(no_community_list_expanded_all, no_bgp_community_list_expanded_all_list_cmd,
+      "no bgp community-list <(100-500)|expanded WORD>",
+      NO_STR IP_STR COMMUNITY_LIST_STR
+      "Community list number (expanded)\n"
+      "Add an expanded community-list entry\n"
+      "Community list name\n")
+
+ALIAS(no_community_list_expanded_all, no_ip_community_list_expanded_all_list_cmd,
+      "no ip community-list <(100-500)|expanded WORD>",
+      NO_STR IP_STR COMMUNITY_LIST_STR
+      "Community list number (expanded)\n"
+      "Add an expanded community-list entry\n"
+      "Community list name\n")
+
 /* Return configuration string of community-list entry.  */
 static const char *community_list_config_str(struct community_entry *entry)
 {
@@ -13940,16 +14246,23 @@ static void community_list_show(struct vty *vty, struct community_list *list)
        }
 }
 
-DEFUN (show_ip_community_list,
-       show_ip_community_list_cmd,
-       "show ip community-list",
+DEFUN (show_community_list,
+       show_bgp_community_list_cmd,
+       "show bgp community-list",
        SHOW_STR
-       IP_STR
+       BGP_STR
        "List community-list\n")
 {
        struct community_list *list;
        struct community_list_master *cm;
 
+       int idx = 0;
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'show bgp community-list <(1-500)|WORD>'\n");
+               zlog_warn("Deprecated option: 'ip show community-list <(1-500)|WORD>' being used");
+       }
        cm = community_list_master_lookup(bgp_clist, COMMUNITY_LIST_MASTER);
        if (!cm)
                return CMD_SUCCESS;
@@ -13963,11 +14276,18 @@ DEFUN (show_ip_community_list,
        return CMD_SUCCESS;
 }
 
-DEFUN (show_ip_community_list_arg,
-       show_ip_community_list_arg_cmd,
-       "show ip community-list <(1-500)|WORD>",
+ALIAS (show_community_list,
+       show_ip_community_list_cmd,
+       "show ip community-list",
        SHOW_STR
        IP_STR
+       "List community-list\n")
+
+DEFUN (show_community_list_arg,
+       show_bgp_community_list_arg_cmd,
+       "show bgp community-list <(1-500)|WORD>",
+       SHOW_STR
+       BGP_STR
        "List community-list\n"
        "Community-list number\n"
        "Community-list name\n")
@@ -13975,6 +14295,13 @@ DEFUN (show_ip_community_list_arg,
        int idx_comm_list = 3;
        struct community_list *list;
 
+       int idx = 0;
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'show bgp community-list <(1-500)|WORD>'\n");
+               zlog_warn("Deprecated option: 'ip show community-list <(1-500)|WORD>' being used");
+       }
        list = community_list_lookup(bgp_clist, argv[idx_comm_list]->arg,
                                     COMMUNITY_LIST_MASTER);
        if (!list) {
@@ -13987,6 +14314,15 @@ DEFUN (show_ip_community_list_arg,
        return CMD_SUCCESS;
 }
 
+ALIAS (show_community_list_arg,
+       show_ip_community_list_arg_cmd,
+       "show ip community-list <(1-500)|WORD>",
+       SHOW_STR
+       IP_STR
+       "List community-list\n"
+       "Community-list number\n"
+       "Community-list name\n")
+
 /*
  * Large Community code.
  */
@@ -14000,6 +14336,12 @@ static int lcommunity_list_set_vty(struct vty *vty, int argc,
        int idx = 0;
        char *cl_name;
 
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'bgp large-community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:BB:CC>'\n");
+               zlog_warn("Deprecated option: 'large-community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:BB:CC>' being used");
+       }
        direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT
                                                       : COMMUNITY_DENY;
 
@@ -14045,6 +14387,12 @@ static int lcommunity_list_unset_vty(struct vty *vty, int argc,
        char *str = NULL;
        int idx = 0;
 
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'no bgp large-community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:BB:CC>'\n");
+               zlog_warn("Deprecated option: 'no ip large-community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:BB:CC>' being used");     
+       }
        argv_find(argv, argc, "permit", &idx);
        argv_find(argv, argc, "deny", &idx);
 
@@ -14088,7 +14436,23 @@ static int lcommunity_list_unset_vty(struct vty *vty, int argc,
 #define LCOMMUNITY_LIST_STR "Add a large community list entry\n"
 #define LCOMMUNITY_VAL_STR  "large community in 'aa:bb:cc' format\n"
 
-DEFUN (ip_lcommunity_list_standard,
+#if CONFDATE > 20191005
+CPP_NOTICE("bgpd: remove deprecated 'ip large-community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:BB:CC>' command")
+#endif
+DEFUN (lcommunity_list_standard,
+       bgp_lcommunity_list_standard_cmd,
+       "bgp large-community-list (1-99) <deny|permit>",
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Large Community list number (standard)\n"
+       "Specify large community to reject\n"
+       "Specify large community to accept\n")
+{
+       return lcommunity_list_set_vty(vty, argc, argv,
+                                      LARGE_COMMUNITY_LIST_STANDARD, 0);
+}
+
+ALIAS (lcommunity_list_standard,
        ip_lcommunity_list_standard_cmd,
        "ip large-community-list (1-99) <deny|permit>",
        IP_STR
@@ -14096,12 +14460,22 @@ DEFUN (ip_lcommunity_list_standard,
        "Large Community list number (standard)\n"
        "Specify large community to reject\n"
        "Specify large community to accept\n")
+
+DEFUN (lcommunity_list_standard1,
+       bgp_lcommunity_list_standard1_cmd,
+       "bgp large-community-list (1-99) <deny|permit> AA:BB:CC...",
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Large Community list number (standard)\n"
+       "Specify large community to reject\n"
+       "Specify large community to accept\n"
+       LCOMMUNITY_VAL_STR)
 {
        return lcommunity_list_set_vty(vty, argc, argv,
                                       LARGE_COMMUNITY_LIST_STANDARD, 0);
 }
 
-DEFUN (ip_lcommunity_list_standard1,
+ALIAS (lcommunity_list_standard1,
        ip_lcommunity_list_standard1_cmd,
        "ip large-community-list (1-99) <deny|permit> AA:BB:CC...",
        IP_STR
@@ -14110,12 +14484,22 @@ DEFUN (ip_lcommunity_list_standard1,
        "Specify large community to reject\n"
        "Specify large community to accept\n"
        LCOMMUNITY_VAL_STR)
+
+DEFUN (lcommunity_list_expanded,
+       bgp_lcommunity_list_expanded_cmd,
+       "bgp large-community-list (100-500) <deny|permit> LINE...",
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Large Community list number (expanded)\n"
+       "Specify large community to reject\n"
+       "Specify large community to accept\n"
+       "An ordered list as a regular-expression\n")
 {
        return lcommunity_list_set_vty(vty, argc, argv,
-                                      LARGE_COMMUNITY_LIST_STANDARD, 0);
+                                      LARGE_COMMUNITY_LIST_EXPANDED, 0);
 }
 
-DEFUN (ip_lcommunity_list_expanded,
+ALIAS (lcommunity_list_expanded,
        ip_lcommunity_list_expanded_cmd,
        "ip large-community-list (100-500) <deny|permit> LINE...",
        IP_STR
@@ -14124,12 +14508,22 @@ DEFUN (ip_lcommunity_list_expanded,
        "Specify large community to reject\n"
        "Specify large community to accept\n"
        "An ordered list as a regular-expression\n")
+
+DEFUN (lcommunity_list_name_standard,
+       bgp_lcommunity_list_name_standard_cmd,
+       "bgp large-community-list standard WORD <deny|permit>",
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Specify standard large-community-list\n"
+       "Large Community list name\n"
+       "Specify large community to reject\n"
+       "Specify large community to accept\n")
 {
        return lcommunity_list_set_vty(vty, argc, argv,
-                                      LARGE_COMMUNITY_LIST_EXPANDED, 0);
+                                      LARGE_COMMUNITY_LIST_STANDARD, 1);
 }
 
-DEFUN (ip_lcommunity_list_name_standard,
+ALIAS (lcommunity_list_name_standard,
        ip_lcommunity_list_name_standard_cmd,
        "ip large-community-list standard WORD <deny|permit>",
        IP_STR
@@ -14138,12 +14532,23 @@ DEFUN (ip_lcommunity_list_name_standard,
        "Large Community list name\n"
        "Specify large community to reject\n"
        "Specify large community to accept\n")
+
+DEFUN (lcommunity_list_name_standard1,
+       bgp_lcommunity_list_name_standard1_cmd,
+       "bgp large-community-list standard WORD <deny|permit> AA:BB:CC...",
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Specify standard large-community-list\n"
+       "Large Community list name\n"
+       "Specify large community to reject\n"
+       "Specify large community to accept\n"
+       LCOMMUNITY_VAL_STR)
 {
        return lcommunity_list_set_vty(vty, argc, argv,
                                       LARGE_COMMUNITY_LIST_STANDARD, 1);
 }
 
-DEFUN (ip_lcommunity_list_name_standard1,
+ALIAS (lcommunity_list_name_standard1,
        ip_lcommunity_list_name_standard1_cmd,
        "ip large-community-list standard WORD <deny|permit> AA:BB:CC...",
        IP_STR
@@ -14153,12 +14558,23 @@ DEFUN (ip_lcommunity_list_name_standard1,
        "Specify large community to reject\n"
        "Specify large community to accept\n"
        LCOMMUNITY_VAL_STR)
+
+DEFUN (lcommunity_list_name_expanded,
+       bgp_lcommunity_list_name_expanded_cmd,
+       "bgp large-community-list expanded WORD <deny|permit> LINE...",
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Specify expanded large-community-list\n"
+       "Large Community list name\n"
+       "Specify large community to reject\n"
+       "Specify large community to accept\n"
+       "An ordered list as a regular-expression\n")
 {
        return lcommunity_list_set_vty(vty, argc, argv,
-                                      LARGE_COMMUNITY_LIST_STANDARD, 1);
+                                      LARGE_COMMUNITY_LIST_EXPANDED, 1);
 }
 
-DEFUN (ip_lcommunity_list_name_expanded,
+ALIAS (lcommunity_list_name_expanded,
        ip_lcommunity_list_name_expanded_cmd,
        "ip large-community-list expanded WORD <deny|permit> LINE...",
        IP_STR
@@ -14168,12 +14584,22 @@ DEFUN (ip_lcommunity_list_name_expanded,
        "Specify large community to reject\n"
        "Specify large community to accept\n"
        "An ordered list as a regular-expression\n")
+
+DEFUN (no_lcommunity_list_standard_all,
+       no_bgp_lcommunity_list_standard_all_cmd,
+       "no bgp large-community-list <(1-99)|(100-500)|WORD>",
+       NO_STR
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Large Community list number (standard)\n"
+       "Large Community list number (expanded)\n"
+       "Large Community list name\n")
 {
-       return lcommunity_list_set_vty(vty, argc, argv,
-                                      LARGE_COMMUNITY_LIST_EXPANDED, 1);
+       return lcommunity_list_unset_vty(vty, argc, argv,
+                                        LARGE_COMMUNITY_LIST_STANDARD);
 }
 
-DEFUN (no_ip_lcommunity_list_standard_all,
+ALIAS (no_lcommunity_list_standard_all,
        no_ip_lcommunity_list_standard_all_cmd,
        "no ip large-community-list <(1-99)|(100-500)|WORD>",
        NO_STR
@@ -14182,12 +14608,21 @@ DEFUN (no_ip_lcommunity_list_standard_all,
        "Large Community list number (standard)\n"
        "Large Community list number (expanded)\n"
        "Large Community list name\n")
+
+DEFUN (no_lcommunity_list_name_expanded_all,
+       no_bgp_lcommunity_list_name_expanded_all_cmd,
+       "no bgp large-community-list expanded WORD",
+       NO_STR
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Specify expanded large-community-list\n"
+       "Large Community list name\n")
 {
        return lcommunity_list_unset_vty(vty, argc, argv,
-                                        LARGE_COMMUNITY_LIST_STANDARD);
+                                        LARGE_COMMUNITY_LIST_EXPANDED);
 }
 
-DEFUN (no_ip_lcommunity_list_name_expanded_all,
+ALIAS (no_lcommunity_list_name_expanded_all,
        no_ip_lcommunity_list_name_expanded_all_cmd,
        "no ip large-community-list expanded WORD",
        NO_STR
@@ -14195,12 +14630,23 @@ DEFUN (no_ip_lcommunity_list_name_expanded_all,
        LCOMMUNITY_LIST_STR
        "Specify expanded large-community-list\n"
        "Large Community list name\n")
+
+DEFUN (no_lcommunity_list_standard,
+       no_bgp_lcommunity_list_standard_cmd,
+       "no bgp large-community-list (1-99) <deny|permit> AA:AA:NN...",
+       NO_STR
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Large Community list number (standard)\n"
+       "Specify large community to reject\n"
+       "Specify large community to accept\n"
+       LCOMMUNITY_VAL_STR)
 {
        return lcommunity_list_unset_vty(vty, argc, argv,
-                                        LARGE_COMMUNITY_LIST_EXPANDED);
+                                        LARGE_COMMUNITY_LIST_STANDARD);
 }
 
-DEFUN (no_ip_lcommunity_list_standard,
+ALIAS (no_lcommunity_list_standard,
        no_ip_lcommunity_list_standard_cmd,
        "no ip large-community-list (1-99) <deny|permit> AA:AA:NN...",
        NO_STR
@@ -14210,12 +14656,23 @@ DEFUN (no_ip_lcommunity_list_standard,
        "Specify large community to reject\n"
        "Specify large community to accept\n"
        LCOMMUNITY_VAL_STR)
+
+DEFUN (no_lcommunity_list_expanded,
+       no_bgp_lcommunity_list_expanded_cmd,
+       "no bgp large-community-list (100-500) <deny|permit> LINE...",
+       NO_STR
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Large Community list number (expanded)\n"
+       "Specify large community to reject\n"
+       "Specify large community to accept\n"
+       "An ordered list as a regular-expression\n")
 {
        return lcommunity_list_unset_vty(vty, argc, argv,
-                                        LARGE_COMMUNITY_LIST_STANDARD);
+                                        LARGE_COMMUNITY_LIST_EXPANDED);
 }
 
-DEFUN (no_ip_lcommunity_list_expanded,
+ALIAS (no_lcommunity_list_expanded,
        no_ip_lcommunity_list_expanded_cmd,
        "no ip large-community-list (100-500) <deny|permit> LINE...",
        NO_STR
@@ -14225,12 +14682,24 @@ DEFUN (no_ip_lcommunity_list_expanded,
        "Specify large community to reject\n"
        "Specify large community to accept\n"
        "An ordered list as a regular-expression\n")
+
+DEFUN (no_lcommunity_list_name_standard,
+       no_bgp_lcommunity_list_name_standard_cmd,
+       "no bgp large-community-list standard WORD <deny|permit> AA:AA:NN...",
+       NO_STR
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Specify standard large-community-list\n"
+       "Large Community list name\n"
+       "Specify large community to reject\n"
+       "Specify large community to accept\n"
+       LCOMMUNITY_VAL_STR)
 {
        return lcommunity_list_unset_vty(vty, argc, argv,
-                                        LARGE_COMMUNITY_LIST_EXPANDED);
+                                        LARGE_COMMUNITY_LIST_STANDARD);
 }
 
-DEFUN (no_ip_lcommunity_list_name_standard,
+ALIAS (no_lcommunity_list_name_standard,
        no_ip_lcommunity_list_name_standard_cmd,
        "no ip large-community-list standard WORD <deny|permit> AA:AA:NN...",
        NO_STR
@@ -14241,12 +14710,24 @@ DEFUN (no_ip_lcommunity_list_name_standard,
        "Specify large community to reject\n"
        "Specify large community to accept\n"
        LCOMMUNITY_VAL_STR)
+
+DEFUN (no_lcommunity_list_name_expanded,
+       no_bgp_lcommunity_list_name_expanded_cmd,
+       "no bgp large-community-list expanded WORD <deny|permit> LINE...",
+       NO_STR
+       BGP_STR
+       LCOMMUNITY_LIST_STR
+       "Specify expanded large-community-list\n"
+       "Large community list name\n"
+       "Specify large community to reject\n"
+       "Specify large community to accept\n"
+       "An ordered list as a regular-expression\n")
 {
        return lcommunity_list_unset_vty(vty, argc, argv,
-                                        LARGE_COMMUNITY_LIST_STANDARD);
+                                        LARGE_COMMUNITY_LIST_EXPANDED);
 }
 
-DEFUN (no_ip_lcommunity_list_name_expanded,
+ALIAS (no_lcommunity_list_name_expanded,
        no_ip_lcommunity_list_name_expanded_cmd,
        "no ip large-community-list expanded WORD <deny|permit> LINE...",
        NO_STR
@@ -14257,10 +14738,6 @@ DEFUN (no_ip_lcommunity_list_name_expanded,
        "Specify large community to reject\n"
        "Specify large community to accept\n"
        "An ordered list as a regular-expression\n")
-{
-       return lcommunity_list_unset_vty(vty, argc, argv,
-                                        LARGE_COMMUNITY_LIST_EXPANDED);
-}
 
 static void lcommunity_list_show(struct vty *vty, struct community_list *list)
 {
@@ -14292,15 +14769,23 @@ static void lcommunity_list_show(struct vty *vty, struct community_list *list)
        }
 }
 
-DEFUN (show_ip_lcommunity_list,
-       show_ip_lcommunity_list_cmd,
-       "show ip large-community-list",
+DEFUN (show_lcommunity_list,
+       show_bgp_lcommunity_list_cmd,
+       "show bgp large-community-list",
        SHOW_STR
-       IP_STR
+       BGP_STR
        "List large-community list\n")
 {
        struct community_list *list;
        struct community_list_master *cm;
+       int idx = 0;
+
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'show bgp large-community-list <(1-500)|WORD>'\n");
+               zlog_warn("Deprecated option: 'ip show large-community-list <(1-500)|WORD>' being used");
+       }
 
        cm = community_list_master_lookup(bgp_clist,
                                          LARGE_COMMUNITY_LIST_MASTER);
@@ -14316,16 +14801,31 @@ DEFUN (show_ip_lcommunity_list,
        return CMD_SUCCESS;
 }
 
-DEFUN (show_ip_lcommunity_list_arg,
-       show_ip_lcommunity_list_arg_cmd,
-       "show ip large-community-list <(1-500)|WORD>",
+ALIAS (show_lcommunity_list,
+       show_ip_lcommunity_list_cmd,
+       "show ip large-community-list",
        SHOW_STR
        IP_STR
+       "List large-community list\n")
+
+DEFUN (show_lcommunity_list_arg,
+       show_bgp_lcommunity_list_arg_cmd,
+       "show bgp large-community-list <(1-500)|WORD>",
+       SHOW_STR
+       BGP_STR
        "List large-community list\n"
        "large-community-list number\n"
        "large-community-list name\n")
 {
        struct community_list *list;
+       int idx = 0;
+
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'show bgp large-community-list <(1-500)|WORD>'\n");
+               zlog_warn("Deprecated option: 'ip show large-community-list <(1-500)|WORD>' being used");
+       }
 
        list = community_list_lookup(bgp_clist, argv[3]->arg,
                                     LARGE_COMMUNITY_LIST_MASTER);
@@ -14339,14 +14839,23 @@ DEFUN (show_ip_lcommunity_list_arg,
        return CMD_SUCCESS;
 }
 
+ALIAS (show_lcommunity_list_arg,
+       show_ip_lcommunity_list_arg_cmd,
+       "show ip large-community-list <(1-500)|WORD>",
+       SHOW_STR
+       IP_STR
+       "List large-community list\n"
+       "large-community-list number\n"
+       "large-community-list name\n")
+
 /* "extcommunity-list" keyword help string.  */
 #define EXTCOMMUNITY_LIST_STR "Add a extended community list entry\n"
 #define EXTCOMMUNITY_VAL_STR  "Extended community attribute in 'rt aa:nn_or_IPaddr:nn' OR 'soo aa:nn_or_IPaddr:nn' format\n"
 
-DEFUN (ip_extcommunity_list_standard,
-       ip_extcommunity_list_standard_cmd,
-       "ip extcommunity-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
-       IP_STR
+DEFUN (extcommunity_list_standard,
+       bgp_extcommunity_list_standard_cmd,
+       "bgp extcommunity-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
+       BGP_STR
        EXTCOMMUNITY_LIST_STR
        "Extended Community list number (standard)\n"
        "Specify standard extcommunity-list\n"
@@ -14360,6 +14869,12 @@ DEFUN (ip_extcommunity_list_standard,
        char *cl_number_or_name = NULL;
 
        int idx = 0;
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'bgp extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>'\n");
+               zlog_warn("Deprecated option: 'ip extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>' being used");
+       }
        argv_find(argv, argc, "(1-99)", &idx);
        argv_find(argv, argc, "WORD", &idx);
        cl_number_or_name = argv[idx]->arg;
@@ -14381,11 +14896,26 @@ DEFUN (ip_extcommunity_list_standard,
        return CMD_SUCCESS;
 }
 
-DEFUN (ip_extcommunity_list_name_expanded,
-       ip_extcommunity_list_name_expanded_cmd,
-       "ip extcommunity-list <(100-500)|expanded WORD> <deny|permit> LINE...",
+#if CONFDATE > 20191005
+CPP_NOTICE("bgpd: remove deprecated 'ip extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>' command")
+#endif
+ALIAS (extcommunity_list_standard,
+       ip_extcommunity_list_standard_cmd,
+       "ip extcommunity-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
        IP_STR
        EXTCOMMUNITY_LIST_STR
+       "Extended Community list number (standard)\n"
+       "Specify standard extcommunity-list\n"
+       "Community list name\n"
+       "Specify community to reject\n"
+       "Specify community to accept\n"
+       EXTCOMMUNITY_VAL_STR)
+
+DEFUN (extcommunity_list_name_expanded,
+       bgp_extcommunity_list_name_expanded_cmd,
+       "bgp extcommunity-list <(100-500)|expanded WORD> <deny|permit> LINE...",
+       BGP_STR
+       EXTCOMMUNITY_LIST_STR
        "Extended Community list number (expanded)\n"
        "Specify expanded extcommunity-list\n"
        "Extended Community list name\n"
@@ -14398,6 +14928,13 @@ DEFUN (ip_extcommunity_list_name_expanded,
        char *cl_number_or_name = NULL;
 
        int idx = 0;
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>'\n");
+               zlog_warn("Deprecated option: ‘ip extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>' being used");
+       }
+
        argv_find(argv, argc, "(100-500)", &idx);
        argv_find(argv, argc, "WORD", &idx);
        cl_number_or_name = argv[idx]->arg;
@@ -14419,12 +14956,24 @@ DEFUN (ip_extcommunity_list_name_expanded,
        return CMD_SUCCESS;
 }
 
-DEFUN (no_ip_extcommunity_list_standard_all,
-       no_ip_extcommunity_list_standard_all_cmd,
-       "no ip extcommunity-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
-       NO_STR
+ALIAS (extcommunity_list_name_expanded,
+       ip_extcommunity_list_name_expanded_cmd,
+       "ip extcommunity-list <(100-500)|expanded WORD> <deny|permit> LINE...",
        IP_STR
        EXTCOMMUNITY_LIST_STR
+       "Extended Community list number (expanded)\n"
+       "Specify expanded extcommunity-list\n"
+       "Extended Community list name\n"
+       "Specify community to reject\n"
+       "Specify community to accept\n"
+       "An ordered list as a regular-expression\n")
+
+DEFUN (no_extcommunity_list_standard_all,
+       no_bgp_extcommunity_list_standard_all_cmd,
+       "no bgp extcommunity-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
+       NO_STR
+       BGP_STR
+       EXTCOMMUNITY_LIST_STR
        "Extended Community list number (standard)\n"
        "Specify standard extcommunity-list\n"
        "Community list name\n"
@@ -14437,6 +14986,12 @@ DEFUN (no_ip_extcommunity_list_standard_all,
        char *cl_number_or_name = NULL;
 
        int idx = 0;
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'no bgp extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>'\n");
+               zlog_warn("Deprecated option: ‘no ip extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>' being used");
+       }
        argv_find(argv, argc, "(1-99)", &idx);
        argv_find(argv, argc, "WORD", &idx);
        cl_number_or_name = argv[idx]->arg;
@@ -14458,12 +15013,25 @@ DEFUN (no_ip_extcommunity_list_standard_all,
        return CMD_SUCCESS;
 }
 
-DEFUN (no_ip_extcommunity_list_expanded_all,
-       no_ip_extcommunity_list_expanded_all_cmd,
-       "no ip extcommunity-list <(100-500)|expanded WORD> <deny|permit> LINE...",
+ALIAS (no_extcommunity_list_standard_all,
+       no_ip_extcommunity_list_standard_all_cmd,
+       "no ip extcommunity-list <(1-99)|standard WORD> <deny|permit> AA:NN...",
        NO_STR
        IP_STR
        EXTCOMMUNITY_LIST_STR
+       "Extended Community list number (standard)\n"
+       "Specify standard extcommunity-list\n"
+       "Community list name\n"
+       "Specify community to reject\n"
+       "Specify community to accept\n"
+       EXTCOMMUNITY_VAL_STR)
+
+DEFUN (no_extcommunity_list_expanded_all,
+       no_bgp_extcommunity_list_expanded_all_cmd,
+       "no bgp extcommunity-list <(100-500)|expanded WORD> <deny|permit> LINE...",
+       NO_STR
+       BGP_STR
+       EXTCOMMUNITY_LIST_STR
        "Extended Community list number (expanded)\n"
        "Specify expanded extcommunity-list\n"
        "Extended Community list name\n"
@@ -14476,6 +15044,12 @@ DEFUN (no_ip_extcommunity_list_expanded_all,
        char *cl_number_or_name = NULL;
 
        int idx = 0;
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'no bgp extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>'\n");
+               zlog_warn("Deprecated option: ‘no ip extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>' being used");
+       }
        argv_find(argv, argc, "(100-500)", &idx);
        argv_find(argv, argc, "WORD", &idx);
        cl_number_or_name = argv[idx]->arg;
@@ -14497,6 +15071,19 @@ DEFUN (no_ip_extcommunity_list_expanded_all,
        return CMD_SUCCESS;
 }
 
+ALIAS (no_extcommunity_list_expanded_all,
+       no_ip_extcommunity_list_expanded_all_cmd,
+       "no ip extcommunity-list <(100-500)|expanded WORD> <deny|permit> LINE...",
+       NO_STR
+       IP_STR
+       EXTCOMMUNITY_LIST_STR
+       "Extended Community list number (expanded)\n"
+       "Specify expanded extcommunity-list\n"
+       "Extended Community list name\n"
+       "Specify community to reject\n"
+       "Specify community to accept\n"
+       "An ordered list as a regular-expression\n")
+
 static void extcommunity_list_show(struct vty *vty, struct community_list *list)
 {
        struct community_entry *entry;
@@ -14527,16 +15114,23 @@ static void extcommunity_list_show(struct vty *vty, struct community_list *list)
        }
 }
 
-DEFUN (show_ip_extcommunity_list,
-       show_ip_extcommunity_list_cmd,
-       "show ip extcommunity-list",
+DEFUN (show_extcommunity_list,
+       show_bgp_extcommunity_list_cmd,
+       "show bgp extcommunity-list",
        SHOW_STR
-       IP_STR
+       BGP_STR
        "List extended-community list\n")
 {
        struct community_list *list;
        struct community_list_master *cm;
+       int idx = 0;
 
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'show bgp extcommunity-list <(1-500)|WORD>'\n");
+               zlog_warn("Deprecated option: 'ip show extcommunity-list <(1-500)|WORD>' being used");
+       }
        cm = community_list_master_lookup(bgp_clist, EXTCOMMUNITY_LIST_MASTER);
        if (!cm)
                return CMD_SUCCESS;
@@ -14550,18 +15144,32 @@ DEFUN (show_ip_extcommunity_list,
        return CMD_SUCCESS;
 }
 
-DEFUN (show_ip_extcommunity_list_arg,
-       show_ip_extcommunity_list_arg_cmd,
-       "show ip extcommunity-list <(1-500)|WORD>",
+ALIAS (show_extcommunity_list,
+       show_ip_extcommunity_list_cmd,
+       "show ip extcommunity-list",
        SHOW_STR
        IP_STR
+       "List extended-community list\n")
+
+DEFUN (show_extcommunity_list_arg,
+       show_bgp_extcommunity_list_arg_cmd,
+       "show bgp extcommunity-list <(1-500)|WORD>",
+       SHOW_STR
+       BGP_STR
        "List extended-community list\n"
        "Extcommunity-list number\n"
        "Extcommunity-list name\n")
 {
        int idx_comm_list = 3;
        struct community_list *list;
+       int idx = 0;
 
+       if (argv_find(argv, argc, "ip", &idx)) {
+               vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
+               vty_out(vty, "if you are using this please migrate to the below command.\n");
+               vty_out(vty, "'show bgp extcommunity-list <(1-500)|WORD>'\n");
+               zlog_warn("Deprecated option: 'ip show extcommunity-list <(1-500)|WORD>' being used");
+       }
        list = community_list_lookup(bgp_clist, argv[idx_comm_list]->arg,
                                     EXTCOMMUNITY_LIST_MASTER);
        if (!list) {
@@ -14574,6 +15182,15 @@ DEFUN (show_ip_extcommunity_list_arg,
        return CMD_SUCCESS;
 }
 
+ALIAS (show_extcommunity_list_arg,
+       show_ip_extcommunity_list_arg_cmd,
+       "show ip extcommunity-list <(1-500)|WORD>",
+       SHOW_STR
+       IP_STR
+       "List extended-community list\n"
+       "Extcommunity-list number\n"
+       "Extcommunity-list name\n")
+
 /* Display community-list and extcommunity-list configuration.  */
 static int community_list_config_write(struct vty *vty)
 {
@@ -14587,14 +15204,14 @@ static int community_list_config_write(struct vty *vty)
 
        for (list = cm->num.head; list; list = list->next)
                for (entry = list->head; entry; entry = entry->next) {
-                       vty_out(vty, "ip community-list %s %s %s\n", list->name,
+                       vty_out(vty, "bgp community-list %s %s %s\n", list->name,
                                community_direct_str(entry->direct),
                                community_list_config_str(entry));
                        write++;
                }
        for (list = cm->str.head; list; list = list->next)
                for (entry = list->head; entry; entry = entry->next) {
-                       vty_out(vty, "ip community-list %s %s %s %s\n",
+                       vty_out(vty, "bgp community-list %s %s %s %s\n",
                                entry->style == COMMUNITY_LIST_STANDARD
                                        ? "standard"
                                        : "expanded",
@@ -14608,14 +15225,14 @@ static int community_list_config_write(struct vty *vty)
 
        for (list = cm->num.head; list; list = list->next)
                for (entry = list->head; entry; entry = entry->next) {
-                       vty_out(vty, "ip extcommunity-list %s %s %s\n",
+                       vty_out(vty, "bgp extcommunity-list %s %s %s\n",
                                list->name, community_direct_str(entry->direct),
                                community_list_config_str(entry));
                        write++;
                }
        for (list = cm->str.head; list; list = list->next)
                for (entry = list->head; entry; entry = entry->next) {
-                       vty_out(vty, "ip extcommunity-list %s %s %s %s\n",
+                       vty_out(vty, "bgp extcommunity-list %s %s %s %s\n",
                                entry->style == EXTCOMMUNITY_LIST_STANDARD
                                        ? "standard"
                                        : "expanded",
@@ -14631,14 +15248,14 @@ static int community_list_config_write(struct vty *vty)
 
        for (list = cm->num.head; list; list = list->next)
                for (entry = list->head; entry; entry = entry->next) {
-                       vty_out(vty, "ip large-community-list %s %s %s\n",
+                       vty_out(vty, "bgp large-community-list %s %s %s\n",
                                list->name, community_direct_str(entry->direct),
                                community_list_config_str(entry));
                        write++;
                }
        for (list = cm->str.head; list; list = list->next)
                for (entry = list->head; entry; entry = entry->next) {
-                       vty_out(vty, "ip large-community-list %s %s %s %s\n",
+                       vty_out(vty, "bgp large-community-list %s %s %s %s\n",
                                entry->style == LARGE_COMMUNITY_LIST_STANDARD
                                        ? "standard"
                                        : "expanded",
@@ -14659,14 +15276,30 @@ static void community_list_vty(void)
        install_node(&community_list_node, community_list_config_write);
 
        /* Community-list.  */
+       install_element(CONFIG_NODE, &bgp_community_list_standard_cmd);
+       install_element(CONFIG_NODE, &bgp_community_list_expanded_all_cmd);
+       install_element(CONFIG_NODE, &no_bgp_community_list_standard_all_cmd);
+       install_element(CONFIG_NODE, &no_bgp_community_list_standard_all_list_cmd);
+       install_element(CONFIG_NODE, &no_bgp_community_list_expanded_all_cmd);
+       install_element(CONFIG_NODE, &no_bgp_community_list_expanded_all_list_cmd);
+       install_element(VIEW_NODE, &show_bgp_community_list_cmd);
+       install_element(VIEW_NODE, &show_bgp_community_list_arg_cmd);
        install_element(CONFIG_NODE, &ip_community_list_standard_cmd);
        install_element(CONFIG_NODE, &ip_community_list_expanded_all_cmd);
        install_element(CONFIG_NODE, &no_ip_community_list_standard_all_cmd);
+       install_element(CONFIG_NODE, &no_ip_community_list_standard_all_list_cmd);
        install_element(CONFIG_NODE, &no_ip_community_list_expanded_all_cmd);
+       install_element(CONFIG_NODE, &no_ip_community_list_expanded_all_list_cmd);
        install_element(VIEW_NODE, &show_ip_community_list_cmd);
        install_element(VIEW_NODE, &show_ip_community_list_arg_cmd);
 
        /* Extcommunity-list.  */
+       install_element(CONFIG_NODE, &bgp_extcommunity_list_standard_cmd);
+       install_element(CONFIG_NODE, &bgp_extcommunity_list_name_expanded_cmd);
+       install_element(CONFIG_NODE, &no_bgp_extcommunity_list_standard_all_cmd);
+       install_element(CONFIG_NODE, &no_bgp_extcommunity_list_expanded_all_cmd);
+       install_element(VIEW_NODE, &show_bgp_extcommunity_list_cmd);
+       install_element(VIEW_NODE, &show_bgp_extcommunity_list_arg_cmd);
        install_element(CONFIG_NODE, &ip_extcommunity_list_standard_cmd);
        install_element(CONFIG_NODE, &ip_extcommunity_list_name_expanded_cmd);
        install_element(CONFIG_NODE, &no_ip_extcommunity_list_standard_all_cmd);
@@ -14675,6 +15308,21 @@ static void community_list_vty(void)
        install_element(VIEW_NODE, &show_ip_extcommunity_list_arg_cmd);
 
        /* Large Community List */
+       install_element(CONFIG_NODE, &bgp_lcommunity_list_standard_cmd);
+       install_element(CONFIG_NODE, &bgp_lcommunity_list_standard1_cmd);
+       install_element(CONFIG_NODE, &bgp_lcommunity_list_expanded_cmd);
+       install_element(CONFIG_NODE, &bgp_lcommunity_list_name_standard_cmd);
+       install_element(CONFIG_NODE, &bgp_lcommunity_list_name_standard1_cmd);
+       install_element(CONFIG_NODE, &bgp_lcommunity_list_name_expanded_cmd);
+       install_element(CONFIG_NODE, &no_bgp_lcommunity_list_standard_all_cmd);
+       install_element(CONFIG_NODE,
+                       &no_bgp_lcommunity_list_name_expanded_all_cmd);
+       install_element(CONFIG_NODE, &no_bgp_lcommunity_list_standard_cmd);
+       install_element(CONFIG_NODE, &no_bgp_lcommunity_list_expanded_cmd);
+       install_element(CONFIG_NODE, &no_bgp_lcommunity_list_name_standard_cmd);
+       install_element(CONFIG_NODE, &no_bgp_lcommunity_list_name_expanded_cmd);
+       install_element(VIEW_NODE, &show_bgp_lcommunity_list_cmd);
+       install_element(VIEW_NODE, &show_bgp_lcommunity_list_arg_cmd);
        install_element(CONFIG_NODE, &ip_lcommunity_list_standard_cmd);
        install_element(CONFIG_NODE, &ip_lcommunity_list_standard1_cmd);
        install_element(CONFIG_NODE, &ip_lcommunity_list_expanded_cmd);