]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_vty.c
bgpd: Convert `struct bgp_info` to `struct bgp_path_info`
[mirror_frr.git] / bgpd / bgp_vty.c
index e12d9ec3413e526152e65f4f835b46a5e91a02fe..c7f8494d3bfe280a6235e176ab119cdf1fc81c3c 100644 (file)
@@ -301,7 +301,7 @@ int argv_find_and_parse_safi(struct cmd_token **argv, int argc, int *index,
 int bgp_vty_find_and_parse_afi_safi_bgp(struct vty *vty,
                                        struct cmd_token **argv, int argc,
                                        int *idx, afi_t *afi, safi_t *safi,
-                                       struct bgp **bgp)
+                                       struct bgp **bgp, bool use_json)
 {
        char *vrf_name = NULL;
 
@@ -312,18 +312,24 @@ int bgp_vty_find_and_parse_afi_safi_bgp(struct vty *vty,
        if (argv_find(argv, argc, "ip", idx))
                *afi = AFI_IP;
 
-       if (argv_find(argv, argc, "view", idx)
-           || argv_find(argv, argc, "vrf", idx)) {
+       if (argv_find(argv, argc, "view", idx))
                vrf_name = argv[*idx + 1]->arg;
-
+       else if (argv_find(argv, argc, "vrf", idx)) {
+               vrf_name = argv[*idx + 1]->arg;
+               if (strmatch(vrf_name, VRF_DEFAULT_NAME))
+                       vrf_name = NULL;
+       }
+       if (vrf_name) {
                if (strmatch(vrf_name, "all"))
                        *bgp = NULL;
                else {
                        *bgp = bgp_lookup_by_name(vrf_name);
                        if (!*bgp) {
-                               vty_out(vty,
-                                       "View/Vrf specified is unknown: %s\n",
-                                       vrf_name);
+                               if (use_json)
+                                       vty_out(vty, "{}\n");
+                               else
+                                       vty_out(vty, "View/Vrf %s is unknown\n",
+                                               vrf_name);
                                *idx = 0;
                                return 0;
                        }
@@ -331,7 +337,11 @@ int bgp_vty_find_and_parse_afi_safi_bgp(struct vty *vty,
        } else {
                *bgp = bgp_get_default();
                if (!*bgp) {
-                       vty_out(vty, "Unable to find default BGP instance\n");
+                       if (use_json)
+                               vty_out(vty, "{}\n");
+                       else
+                               vty_out(vty,
+                                       "Default BGP instance not found\n");
                        *idx = 0;
                        return 0;
                }
@@ -803,7 +813,7 @@ DEFUN_HIDDEN (no_bgp_multiple_instance,
 
        vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
        vty_out(vty, "if you are using this please let the developers know\n");
-       zlog_warn("Deprecated option: `bgp multiple-instance` being used");
+       zlog_info("Deprecated option: `bgp multiple-instance` being used");
        ret = bgp_option_unset(BGP_OPT_MULTIPLE_INSTANCE);
        if (ret < 0) {
                vty_out(vty, "%% There are more than two BGP instances\n");
@@ -828,7 +838,7 @@ DEFUN_HIDDEN (bgp_config_type,
        if (argv_find(argv, argc, "cisco", &idx)) {
                vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
                vty_out(vty, "if you are using this please let the developers know!\n");
-               zlog_warn("Deprecated option: `bgp config-type cisco` being used");
+               zlog_info("Deprecated option: `bgp config-type cisco` being used");
                bgp_option_set(BGP_OPT_CONFIG_CISCO);
        } else
                bgp_option_unset(BGP_OPT_CONFIG_CISCO);
@@ -910,9 +920,12 @@ DEFUN_NOSH (router_bgp,
                if (argc > 3) {
                        name = argv[idx_vrf]->arg;
 
-                       if (!strcmp(argv[idx_view_vrf]->text, "vrf"))
-                               inst_type = BGP_INSTANCE_TYPE_VRF;
-                       else if (!strcmp(argv[idx_view_vrf]->text, "view"))
+                       if (!strcmp(argv[idx_view_vrf]->text, "vrf")) {
+                               if (strmatch(name, VRF_DEFAULT_NAME))
+                                       name = NULL;
+                               else
+                                       inst_type = BGP_INSTANCE_TYPE_VRF;
+                       } else if (!strcmp(argv[idx_view_vrf]->text, "view"))
                                inst_type = BGP_INSTANCE_TYPE_VIEW;
                }
 
@@ -2019,7 +2032,7 @@ DEFUN (no_bgp_fast_external_failover,
 }
 
 /* "bgp enforce-first-as" configuration. */
-#if CONFDATE > 20180517
+#if CONFDATE > 20190517
 CPP_NOTICE("bgpd: remove deprecated '[no] bgp enforce-first-as' commands")
 #endif
 
@@ -7144,13 +7157,17 @@ DEFUN (clear_ip_bgp_all,
        if (argv_find(argv, argc, "ip", &idx))
                afi = AFI_IP;
 
-       /* [<view|vrf> VIEWVRFNAME] */
-       if (argv_find(argv, argc, "view", &idx)
-           || argv_find(argv, argc, "vrf", &idx)) {
+       /* [<vrf> VIEWVRFNAME] */
+       if (argv_find(argv, argc, "vrf", &idx)) {
+               vrf = argv[idx + 1]->arg;
+               idx += 2;
+               if (vrf && strmatch(vrf, VRF_DEFAULT_NAME))
+                       vrf = NULL;
+       } else if (argv_find(argv, argc, "view", &idx)) {
+               /* [<view> VIEWVRFNAME] */
                vrf = argv[idx + 1]->arg;
                idx += 2;
        }
-
        /* ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] */
        if (argv_find_and_parse_afi(argv, argc, &idx, &afi))
                argv_find_and_parse_safi(argv, argc, &idx, &safi);
@@ -7215,8 +7232,16 @@ DEFUN (clear_ip_bgp_prefix,
        int idx = 0;
 
        /* [<view|vrf> VIEWVRFNAME] */
-       if (argv_find(argv, argc, "VIEWVRFNAME", &idx))
-               vrf = argv[idx]->arg;
+       if (argv_find(argv, argc, "vrf", &idx)) {
+               vrf = argv[idx + 1]->arg;
+               idx += 2;
+               if (vrf && strmatch(vrf, VRF_DEFAULT_NAME))
+                       vrf = NULL;
+       } else if (argv_find(argv, argc, "view", &idx)) {
+               /* [<view> VIEWVRFNAME] */
+               vrf = argv[idx + 1]->arg;
+               idx += 2;
+       }
 
        prefix = argv[argc - 1]->arg;
 
@@ -7258,16 +7283,23 @@ DEFUN (clear_bgp_instance_ipv6_safi_prefix,
        "Clear bestpath and re-advertise\n"
        "IPv6 prefix\n")
 {
-       int idx_word = 3;
        int idx_safi = 0;
+       int idx_vrfview = 0;
        int idx_ipv6_prefix = 0;
        safi_t safi = SAFI_UNICAST;
        char *prefix = argv_find(argv, argc, "X:X::X:X/M", &idx_ipv6_prefix) ?
                argv[idx_ipv6_prefix]->arg : NULL;
-       /* [<view|vrf> VIEWVRFNAME] */
-       char *vrfview = argv_find(argv, argc, "VIEWVRFNAME", &idx_word) ?
-               argv[idx_word]->arg : NULL;
+       char *vrfview = NULL;
 
+       /* [<view|vrf> VIEWVRFNAME] */
+       if (argv_find(argv, argc, "vrf", &idx_vrfview)) {
+               vrfview = argv[idx_vrfview + 1]->arg;
+               if (vrfview && strmatch(vrfview, VRF_DEFAULT_NAME))
+                       vrfview = NULL;
+       } else if (argv_find(argv, argc, "view", &idx_vrfview)) {
+               /* [<view> VIEWVRFNAME] */
+               vrfview = argv[idx_vrfview + 1]->arg;
+       }
        argv_find_and_parse_safi(argv, argc, &idx_safi, &safi);
 
        return bgp_clear_prefix(
@@ -7317,7 +7349,7 @@ DEFUN (show_bgp_vrfs,
        struct list *inst = bm->bgp;
        struct listnode *node;
        struct bgp *bgp;
-       uint8_t uj = use_json(argc, argv);
+       bool uj = use_json(argc, argv);
        json_object *json = NULL;
        json_object *json_vrfs = NULL;
        int count = 0;
@@ -7335,7 +7367,7 @@ DEFUN (show_bgp_vrfs,
        for (ALL_LIST_ELEMENTS_RO(inst, node, bgp)) {
                const char *name, *type;
                struct peer *peer;
-               struct listnode *node, *nnode;
+               struct listnode *node2, *nnode2;
                int peers_cfg, peers_estb;
                json_object *json_vrf = NULL;
 
@@ -7355,7 +7387,7 @@ DEFUN (show_bgp_vrfs,
                        json_vrf = json_object_new_object();
 
 
-               for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
+               for (ALL_LIST_ELEMENTS(bgp->peer, node2, nnode2, peer)) {
                        if (!CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE))
                                continue;
                        peers_cfg++;
@@ -7419,14 +7451,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)
 {
@@ -7440,9 +7464,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,
@@ -7458,10 +7480,18 @@ DEFUN(show_bgp_martian_nexthop_db, show_bgp_martian_nexthop_db_cmd,
 {
        struct bgp *bgp = NULL;
        int idx = 0;
-
-       if (argv_find(argv, argc, "view", &idx)
-           || argv_find(argv, argc, "vrf", &idx))
-               bgp = bgp_lookup_by_name(argv[idx + 1]->arg);
+       char *name = NULL;
+
+       /* [<vrf> VIEWVRFNAME] */
+       if (argv_find(argv, argc, "vrf", &idx)) {
+               name = argv[idx + 1]->arg;
+               if (name && strmatch(name, VRF_DEFAULT_NAME))
+                       name = NULL;
+       } else if (argv_find(argv, argc, "view", &idx))
+               /* [<view> VIEWVRFNAME] */
+               name = argv[idx + 1]->arg;
+       if (name)
+               bgp = bgp_lookup_by_name(name);
        else
                bgp = bgp_get_default();
 
@@ -7494,12 +7524,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,
@@ -7638,7 +7669,7 @@ static void bgp_show_bestpath_json(struct bgp *bgp, json_object *json)
 
 /* Show BGP peer's summary information. */
 static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
-                           uint8_t use_json, json_object *json)
+                           bool use_json, json_object *json)
 {
        struct peer *peer;
        struct listnode *node, *nnode;
@@ -8055,14 +8086,14 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
 }
 
 static void bgp_show_summary_afi_safi(struct vty *vty, struct bgp *bgp, int afi,
-                                     int safi, uint8_t use_json,
+                                     int safi, bool use_json,
                                      json_object *json)
 {
        int is_first = 1;
        int afi_wildcard = (afi == AFI_MAX);
        int safi_wildcard = (safi == SAFI_MAX);
        int is_wildcard = (afi_wildcard || safi_wildcard);
-       bool json_output = false;
+       bool nbr_output = false;
 
        if (use_json && is_wildcard)
                vty_out(vty, "{\n");
@@ -8073,7 +8104,7 @@ static void bgp_show_summary_afi_safi(struct vty *vty, struct bgp *bgp, int afi,
                        safi = 1; /* SAFI_UNICAST */
                while (safi < SAFI_MAX) {
                        if (bgp_afi_safi_peer_exists(bgp, afi, safi)) {
-                               json_output = true;
+                               nbr_output = true;
                                if (is_wildcard) {
                                        /*
                                         * So limit output to those afi/safi
@@ -8112,22 +8143,28 @@ static void bgp_show_summary_afi_safi(struct vty *vty, struct bgp *bgp, int afi,
 
        if (use_json && is_wildcard)
                vty_out(vty, "}\n");
-       else if (use_json && !json_output)
-               vty_out(vty, "{}\n");
+       else if (!nbr_output) {
+               if (use_json)
+                       vty_out(vty, "{}\n");
+               else
+                       vty_out(vty, "%% No BGP neighbors found\n");
+       }
 }
 
 static void bgp_show_all_instances_summary_vty(struct vty *vty, afi_t afi,
-                                              safi_t safi, uint8_t use_json)
+                                              safi_t safi, bool use_json)
 {
        struct listnode *node, *nnode;
        struct bgp *bgp;
        json_object *json = NULL;
        int is_first = 1;
+       bool nbr_output = false;
 
        if (use_json)
                vty_out(vty, "{\n");
 
        for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
+               nbr_output = true;
                if (use_json) {
                        json = json_object_new_object();
 
@@ -8151,10 +8188,12 @@ static void bgp_show_all_instances_summary_vty(struct vty *vty, afi_t afi,
 
        if (use_json)
                vty_out(vty, "}\n");
+       else if (!nbr_output)
+               vty_out(vty, "%% BGP instance not found\n");
 }
 
 int bgp_show_summary_vty(struct vty *vty, const char *name, afi_t afi,
-                        safi_t safi, uint8_t use_json)
+                        safi_t safi, bool use_json)
 {
        struct bgp *bgp;
 
@@ -8171,7 +8210,7 @@ int bgp_show_summary_vty(struct vty *vty, const char *name, afi_t afi,
                                        vty_out(vty, "{}\n");
                                else
                                        vty_out(vty,
-                                               "%% No such BGP instance exist\n");
+                                               "%% BGP instance not found\n");
                                return CMD_WARNING;
                        }
 
@@ -8185,6 +8224,13 @@ int bgp_show_summary_vty(struct vty *vty, const char *name, afi_t afi,
 
        if (bgp)
                bgp_show_summary_afi_safi(vty, bgp, afi, safi, use_json, NULL);
+       else {
+               if (use_json)
+                       vty_out(vty, "{}\n");
+               else
+                       vty_out(vty, "%% BGP instance not found\n");
+               return CMD_WARNING;
+       }
 
        return CMD_SUCCESS;
 }
@@ -8211,16 +8257,20 @@ DEFUN (show_ip_bgp_summary,
        /* show [ip] bgp */
        if (argv_find(argv, argc, "ip", &idx))
                afi = AFI_IP;
-       /* [<view|vrf> VIEWVRFNAME] */
-       if (argv_find(argv, argc, "view", &idx)
-           || argv_find(argv, argc, "vrf", &idx))
-               vrf = argv[++idx]->arg;
+       /* [<vrf> VIEWVRFNAME] */
+       if (argv_find(argv, argc, "vrf", &idx)) {
+               vrf = argv[idx + 1]->arg;
+               if (vrf && strmatch(vrf, VRF_DEFAULT_NAME))
+                       vrf = NULL;
+       } else if (argv_find(argv, argc, "view", &idx))
+               /* [<view> VIEWVRFNAME] */
+               vrf = argv[idx + 1]->arg;
        /* ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] */
        if (argv_find_and_parse_afi(argv, argc, &idx, &afi)) {
                argv_find_and_parse_safi(argv, argc, &idx, &safi);
        }
 
-       int uj = use_json(argc, argv);
+       bool uj = use_json(argc, argv);
 
        return bgp_show_summary_vty(vty, vrf, afi, safi, uj);
 }
@@ -8302,7 +8352,7 @@ static void bgp_show_peer_afi_orf_cap(struct vty *vty, struct peer *p,
                                      afi_t afi, safi_t safi,
                                      uint16_t adv_smcap, uint16_t adv_rmcap,
                                      uint16_t rcv_smcap, uint16_t rcv_rmcap,
-                                     uint8_t use_json, json_object *json_pref)
+                                     bool use_json, json_object *json_pref)
 {
        /* Send-Mode */
        if (CHECK_FLAG(p->af_cap[afi][safi], adv_smcap)
@@ -8362,7 +8412,7 @@ static void bgp_show_peer_afi_orf_cap(struct vty *vty, struct peer *p,
 }
 
 static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
-                             safi_t safi, uint8_t use_json,
+                             safi_t safi, bool use_json,
                              json_object *json_neigh)
 {
        struct bgp_filter *filter;
@@ -8937,7 +8987,7 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
        }
 }
 
-static void bgp_show_peer(struct vty *vty, struct peer *p, uint8_t use_json,
+static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
                          json_object *json)
 {
        struct bgp *bgp;
@@ -10684,12 +10734,13 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, uint8_t use_json,
 
 static int bgp_show_neighbor(struct vty *vty, struct bgp *bgp,
                             enum show_type type, union sockunion *su,
-                            const char *conf_if, uint8_t use_json,
+                            const char *conf_if, bool use_json,
                             json_object *json)
 {
        struct listnode *node, *nnode;
        struct peer *peer;
        int find = 0;
+       bool nbr_output = false;
 
        for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
                if (!CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE))
@@ -10698,6 +10749,7 @@ static int bgp_show_neighbor(struct vty *vty, struct bgp *bgp,
                switch (type) {
                case show_all:
                        bgp_show_peer(vty, peer, use_json, json);
+                       nbr_output = true;
                        break;
                case show_peer:
                        if (conf_if) {
@@ -10727,6 +10779,9 @@ static int bgp_show_neighbor(struct vty *vty, struct bgp *bgp,
                        vty_out(vty, "%% No such neighbor in this view/vrf\n");
        }
 
+       if (type != show_peer && !nbr_output && !use_json)
+               vty_out(vty, "%% No BGP neighbors found\n");
+
        if (use_json) {
                vty_out(vty, "%s\n", json_object_to_json_string_ext(
                                             json, JSON_C_TO_STRING_PRETTY));
@@ -10741,22 +10796,24 @@ static int bgp_show_neighbor(struct vty *vty, struct bgp *bgp,
 static void bgp_show_all_instances_neighbors_vty(struct vty *vty,
                                                 enum show_type type,
                                                 const char *ip_str,
-                                                uint8_t use_json)
+                                                bool use_json)
 {
        struct listnode *node, *nnode;
        struct bgp *bgp;
        union sockunion su;
        json_object *json = NULL;
        int ret, is_first = 1;
+       bool nbr_output = false;
 
        if (use_json)
                vty_out(vty, "{\n");
 
        for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
+               nbr_output = true;
                if (use_json) {
                        if (!(json = json_object_new_object())) {
                                flog_err(
-                                       BGP_ERR_JSON_MEM_ERROR,
+                                       EC_BGP_JSON_MEM_ERROR,
                                        "Unable to allocate memory for JSON object");
                                vty_out(vty,
                                        "{\"error\": {\"message:\": \"Unable to allocate memory for JSON object\"}}}\n");
@@ -10805,11 +10862,13 @@ static void bgp_show_all_instances_neighbors_vty(struct vty *vty,
 
        if (use_json)
                vty_out(vty, "}\n");
+       else if (!nbr_output)
+               vty_out(vty, "%% BGP instance not found\n");
 }
 
 static int bgp_show_neighbor_vty(struct vty *vty, const char *name,
                                 enum show_type type, const char *ip_str,
-                                uint8_t use_json)
+                                bool use_json)
 {
        int ret;
        struct bgp *bgp;
@@ -10826,8 +10885,6 @@ static int bgp_show_neighbor_vty(struct vty *vty, const char *name,
                        if (!bgp) {
                                if (use_json) {
                                        json = json_object_new_object();
-                                       json_object_boolean_true_add(
-                                               json, "bgpNoSuchInstance");
                                        vty_out(vty, "%s\n",
                                                json_object_to_json_string_ext(
                                                        json,
@@ -10835,7 +10892,7 @@ static int bgp_show_neighbor_vty(struct vty *vty, const char *name,
                                        json_object_free(json);
                                } else
                                        vty_out(vty,
-                                               "%% No such BGP instance exist\n");
+                                               "%% BGP instance not found\n");
 
                                return CMD_WARNING;
                        }
@@ -10859,6 +10916,11 @@ static int bgp_show_neighbor_vty(struct vty *vty, const char *name,
                                          json);
                }
                json_object_free(json);
+       } else {
+               if (use_json)
+                       vty_out(vty, "{}\n");
+               else
+                       vty_out(vty, "%% BGP instance not found\n");
        }
 
        return CMD_SUCCESS;
@@ -10884,12 +10946,17 @@ DEFUN (show_ip_bgp_neighbors,
        char *sh_arg = NULL;
        enum show_type sh_type;
 
-       uint8_t uj = use_json(argc, argv);
+       bool uj = use_json(argc, argv);
 
        int idx = 0;
 
-       if (argv_find(argv, argc, "view", &idx)
-           || argv_find(argv, argc, "vrf", &idx))
+       /* [<vrf> VIEWVRFNAME] */
+       if (argv_find(argv, argc, "vrf", &idx)) {
+               vrf = argv[idx + 1]->arg;
+               if (vrf && strmatch(vrf, VRF_DEFAULT_NAME))
+                       vrf = NULL;
+       } else if (argv_find(argv, argc, "view", &idx))
+               /* [<view> VIEWVRFNAME] */
                vrf = argv[idx + 1]->arg;
 
        idx++;
@@ -10994,8 +11061,8 @@ DEFUN (show_ip_bgp_attr_info,
        return CMD_SUCCESS;
 }
 
-static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
-                                  afi_t afi, safi_t safi)
+static int bgp_show_route_leak_vty(struct vty *vty, const char *name, afi_t afi,
+                                  safi_t safi, bool use_json)
 {
        struct bgp *bgp;
        struct listnode *node;
@@ -11004,64 +11071,146 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
        char *ecom_str;
        vpn_policy_direction_t dir;
 
-       if (name) {
-               bgp = bgp_lookup_by_name(name);
+       if (use_json) {
+               json_object *json = NULL;
+               json_object *json_import_vrfs = NULL;
+               json_object *json_export_vrfs = NULL;
+
+               json = json_object_new_object();
+
+               bgp = name ? bgp_lookup_by_name(name) : bgp_get_default();
+
                if (!bgp) {
-                       vty_out(vty, "%% No such BGP instance exist\n");
+                       vty_out(vty, "%s\n",
+                               json_object_to_json_string_ext(
+                                       json,
+                                       JSON_C_TO_STRING_PRETTY));
+                       json_object_free(json);
+
                        return CMD_WARNING;
                }
+
+               /* Provide context for the block */
+               json_object_string_add(json, "vrf", name ? name : "default");
+               json_object_string_add(json, "afiSafi",
+                                      afi_safi_print(afi, safi));
+
+               if (!CHECK_FLAG(bgp->af_flags[afi][safi],
+                               BGP_CONFIG_VRF_TO_VRF_IMPORT)) {
+                       json_object_string_add(json, "importFromVrfs", "none");
+                       json_object_string_add(json, "importRts", "none");
+               } else {
+                       json_import_vrfs = json_object_new_array();
+
+                       for (ALL_LIST_ELEMENTS_RO(
+                                               bgp->vpn_policy[afi].import_vrf,
+                                               node, vname))
+                               json_object_array_add(json_import_vrfs,
+                                               json_object_new_string(vname));
+
+                       dir = BGP_VPN_POLICY_DIR_FROMVPN;
+                       ecom_str = ecommunity_ecom2str(
+                                       bgp->vpn_policy[afi].rtlist[dir],
+                                       ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
+                       json_object_object_add(json, "importFromVrfs",
+                                              json_import_vrfs);
+                       json_object_string_add(json, "importRts", ecom_str);
+
+                       XFREE(MTYPE_ECOMMUNITY_STR, ecom_str);
+               }
+
+               if (!CHECK_FLAG(bgp->af_flags[afi][safi],
+                               BGP_CONFIG_VRF_TO_VRF_EXPORT)) {
+                       json_object_string_add(json, "exportToVrfs", "none");
+                       json_object_string_add(json, "routeDistinguisher",
+                                              "none");
+                       json_object_string_add(json, "exportRts", "none");
+               } else {
+                       json_export_vrfs = json_object_new_array();
+
+                       for (ALL_LIST_ELEMENTS_RO(
+                                               bgp->vpn_policy[afi].export_vrf,
+                                               node, vname))
+                               json_object_array_add(json_export_vrfs,
+                                               json_object_new_string(vname));
+                       json_object_object_add(json, "exportToVrfs",
+                                              json_export_vrfs);
+                       json_object_string_add(json, "routeDistinguisher",
+                                  prefix_rd2str(&bgp->vpn_policy[afi].tovpn_rd,
+                                                buf1, RD_ADDRSTRLEN));
+
+                       dir = BGP_VPN_POLICY_DIR_TOVPN;
+                       ecom_str = ecommunity_ecom2str(
+                                              bgp->vpn_policy[afi].rtlist[dir],
+                                              ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
+                       json_object_string_add(json, "exportRts", ecom_str);
+
+                       XFREE(MTYPE_ECOMMUNITY_STR, ecom_str);
+               }
+
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(json,
+                                                     JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+
        } else {
-               bgp = bgp_get_default();
+               bgp = name ? bgp_lookup_by_name(name) : bgp_get_default();
+
                if (!bgp) {
-                       vty_out(vty,
-                               "%% Default BGP instance does not exist\n");
+                       vty_out(vty, "%% No such BGP instance exist\n");
                        return CMD_WARNING;
                }
-       }
 
-       if (!CHECK_FLAG(bgp->af_flags[afi][safi],
-                       BGP_CONFIG_VRF_TO_VRF_IMPORT)) {
-               vty_out(vty,
-                       "This VRF is not importing %s routes from any other VRF\n",
-                       afi_safi_print(afi, safi));
-       } else {
-               vty_out(vty,
-                       "This VRF is importing %s routes from the following VRFs:\n",
-                       afi_safi_print(afi, safi));
-               for (ALL_LIST_ELEMENTS_RO(bgp->vpn_policy[afi].import_vrf, node,
-                                         vname)) {
-                       vty_out(vty, "  %s\n", vname);
+               if (!CHECK_FLAG(bgp->af_flags[afi][safi],
+                               BGP_CONFIG_VRF_TO_VRF_IMPORT))
+                       vty_out(vty,
+                    "This VRF is not importing %s routes from any other VRF\n",
+                     afi_safi_print(afi, safi));
+               else {
+                       vty_out(vty,
+                  "This VRF is importing %s routes from the following VRFs:\n",
+                   afi_safi_print(afi, safi));
+
+                       for (ALL_LIST_ELEMENTS_RO(
+                                               bgp->vpn_policy[afi].import_vrf,
+                                               node, vname))
+                               vty_out(vty, "  %s\n", vname);
+
+                       dir = BGP_VPN_POLICY_DIR_FROMVPN;
+                       ecom_str = ecommunity_ecom2str(
+                                              bgp->vpn_policy[afi].rtlist[dir],
+                                              ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
+                       vty_out(vty, "Import RT(s): %s\n", ecom_str);
+
+                       XFREE(MTYPE_ECOMMUNITY_STR, ecom_str);
                }
-               dir = BGP_VPN_POLICY_DIR_FROMVPN;
-               ecom_str = ecommunity_ecom2str(
-                               bgp->vpn_policy[afi].rtlist[dir],
-                               ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
-               vty_out(vty, "Import RT(s): %s\n", ecom_str);
-               XFREE(MTYPE_ECOMMUNITY_STR, ecom_str);
-       }
 
-       if (!CHECK_FLAG(bgp->af_flags[afi][safi],
-                       BGP_CONFIG_VRF_TO_VRF_EXPORT)) {
-               vty_out(vty,
-                       "This VRF is not exporting %s routes to any other VRF\n",
+               if (!CHECK_FLAG(bgp->af_flags[afi][safi],
+                               BGP_CONFIG_VRF_TO_VRF_EXPORT))
+                       vty_out(vty,
+                      "This VRF is not exporting %s routes to any other VRF\n",
                        afi_safi_print(afi, safi));
-       } else {
-               vty_out(vty,
-                       "This VRF is exporting %s routes to the following VRFs:\n",
+               else {
+                       vty_out(vty,
+                      "This VRF is exporting %s routes to the following VRFs:\n",
                        afi_safi_print(afi, safi));
-               for (ALL_LIST_ELEMENTS_RO(bgp->vpn_policy[afi].export_vrf, node,
-                                         vname)) {
-                       vty_out(vty, "  %s\n", vname);
+
+                       for (ALL_LIST_ELEMENTS_RO(
+                                               bgp->vpn_policy[afi].export_vrf,
+                                               node, vname))
+                               vty_out(vty, "  %s\n", vname);
+
+                       vty_out(vty, "RD: %s\n",
+                               prefix_rd2str(&bgp->vpn_policy[afi].tovpn_rd,
+                                             buf1, RD_ADDRSTRLEN));
+
+                       dir = BGP_VPN_POLICY_DIR_TOVPN;
+                       ecom_str = ecommunity_ecom2str(
+                                       bgp->vpn_policy[afi].rtlist[dir],
+                                       ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
+                       vty_out(vty, "Export RT: %s\n", ecom_str);
+                       XFREE(MTYPE_ECOMMUNITY_STR, ecom_str);
                }
-               vty_out(vty, "RD: %s\n",
-                       prefix_rd2str(&bgp->vpn_policy[afi].tovpn_rd,
-                                     buf1, RD_ADDRSTRLEN));
-               dir = BGP_VPN_POLICY_DIR_TOVPN;
-               ecom_str = ecommunity_ecom2str(
-                               bgp->vpn_policy[afi].rtlist[dir],
-                               ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
-               vty_out(vty, "Emport RT: %s\n", ecom_str);
-               XFREE(MTYPE_ECOMMUNITY_STR, ecom_str);
        }
 
        return CMD_SUCCESS;
@@ -11069,20 +11218,22 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
 
 /* "show [ip] bgp route-leak" command.  */
 DEFUN (show_ip_bgp_route_leak,
-       show_ip_bgp_route_leak_cmd,
-       "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] route-leak",
-       SHOW_STR
-       IP_STR
-       BGP_STR
-       BGP_INSTANCE_HELP_STR
-       BGP_AFI_HELP_STR
-       BGP_SAFI_HELP_STR
-       "Route leaking information\n")
+       show_ip_bgp_route_leak_cmd,
+       "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] route-leak  [json]",
+       SHOW_STR
+       IP_STR
+       BGP_STR
+       BGP_INSTANCE_HELP_STR
+       BGP_AFI_HELP_STR
+       BGP_SAFI_HELP_STR
+       "Route leaking information\n"
+       JSON_STR)
 {
        char *vrf = NULL;
        afi_t afi = AFI_MAX;
        safi_t safi = SAFI_MAX;
 
+       bool uj = use_json(argc, argv);
        int idx = 0;
 
        /* show [ip] bgp */
@@ -11097,8 +11248,11 @@ DEFUN (show_ip_bgp_route_leak,
                return CMD_WARNING;
        }
 
-       if (argv_find(argv, argc, "vrf", &idx))
-               vrf = argv[++idx]->arg;
+       if (argv_find(argv, argc, "vrf", &idx)) {
+               vrf = argv[idx + 1]->arg;
+               if (vrf && strmatch(vrf, VRF_DEFAULT_NAME))
+                       vrf = NULL;
+       }
        /* ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] */
        if (argv_find_and_parse_afi(argv, argc, &idx, &afi)) {
                argv_find_and_parse_safi(argv, argc, &idx, &safi);
@@ -11110,7 +11264,7 @@ DEFUN (show_ip_bgp_route_leak,
                return CMD_WARNING;
        }
 
-       return bgp_show_route_leak_vty(vty, vrf, afi, safi);
+       return bgp_show_route_leak_vty(vty, vrf, afi, safi, uj);
 }
 
 static void bgp_show_all_instances_updgrps_vty(struct vty *vty, afi_t afi,
@@ -11171,10 +11325,14 @@ DEFUN (show_ip_bgp_updgrps,
        /* show [ip] bgp */
        if (argv_find(argv, argc, "ip", &idx))
                afi = AFI_IP;
-       /* [<view|vrf> VIEWVRFNAME] */
-       if (argv_find(argv, argc, "view", &idx)
-           || argv_find(argv, argc, "vrf", &idx))
-               vrf = argv[++idx]->arg;
+       /* [<vrf> VIEWVRFNAME] */
+       if (argv_find(argv, argc, "vrf", &idx)) {
+               vrf = argv[idx + 1]->arg;
+               if (vrf && strmatch(vrf, VRF_DEFAULT_NAME))
+                       vrf = NULL;
+       } else if (argv_find(argv, argc, "view", &idx))
+               /* [<view> VIEWVRFNAME] */
+               vrf = argv[idx + 1]->arg;
        /* ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] */
        if (argv_find_and_parse_afi(argv, argc, &idx, &afi)) {
                argv_find_and_parse_safi(argv, argc, &idx, &safi);
@@ -11400,7 +11558,7 @@ static int bgp_show_peer_group_vty(struct vty *vty, const char *name,
        bgp = name ? bgp_lookup_by_name(name) : bgp_get_default();
 
        if (!bgp) {
-               vty_out(vty, "%% No such BGP instance exists\n");
+               vty_out(vty, "%% BGP instance not found\n");
                return CMD_WARNING;
        }
 
@@ -11462,7 +11620,7 @@ DEFUN (bgp_redistribute_ipv4,
        }
 
        bgp_redist_add(bgp, AFI_IP, type, 0);
-       return bgp_redistribute_set(bgp, AFI_IP, type, 0);
+       return bgp_redistribute_set(bgp, AFI_IP, type, 0, false);
 }
 
 ALIAS_HIDDEN(
@@ -11483,6 +11641,7 @@ DEFUN (bgp_redistribute_ipv4_rmap,
        int idx_word = 3;
        int type;
        struct bgp_redist *red;
+       bool changed;
 
        type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
        if (type < 0) {
@@ -11491,8 +11650,8 @@ DEFUN (bgp_redistribute_ipv4_rmap,
        }
 
        red = bgp_redist_add(bgp, AFI_IP, type, 0);
-       bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
-       return bgp_redistribute_set(bgp, AFI_IP, type, 0);
+       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
 
 ALIAS_HIDDEN(
@@ -11516,6 +11675,7 @@ DEFUN (bgp_redistribute_ipv4_metric,
        int type;
        uint32_t metric;
        struct bgp_redist *red;
+       bool changed;
 
        type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
        if (type < 0) {
@@ -11525,8 +11685,8 @@ DEFUN (bgp_redistribute_ipv4_metric,
        metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP, type, 0);
-       bgp_redistribute_metric_set(bgp, red, AFI_IP, type, metric);
-       return bgp_redistribute_set(bgp, AFI_IP, type, 0);
+       changed = bgp_redistribute_metric_set(bgp, red, AFI_IP, type, metric);
+       return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
 
 ALIAS_HIDDEN(
@@ -11553,6 +11713,7 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric,
        int type;
        uint32_t metric;
        struct bgp_redist *red;
+       bool changed;
 
        type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
        if (type < 0) {
@@ -11562,9 +11723,9 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric,
        metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP, type, 0);
-       bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
-       bgp_redistribute_metric_set(bgp, red, AFI_IP, type, metric);
-       return bgp_redistribute_set(bgp, AFI_IP, type, 0);
+       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed |= bgp_redistribute_metric_set(bgp, red, AFI_IP, type, metric);
+       return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
 
 ALIAS_HIDDEN(
@@ -11595,6 +11756,7 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap,
        int type;
        uint32_t metric;
        struct bgp_redist *red;
+       bool changed;
 
        type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
        if (type < 0) {
@@ -11604,9 +11766,9 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap,
        metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP, type, 0);
-       bgp_redistribute_metric_set(bgp, red, AFI_IP, type, metric);
-       bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
-       return bgp_redistribute_set(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);
+       return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
 
 ALIAS_HIDDEN(
@@ -11642,7 +11804,7 @@ DEFUN (bgp_redistribute_ipv4_ospf,
                protocol = ZEBRA_ROUTE_TABLE;
 
        bgp_redist_add(bgp, AFI_IP, protocol, instance);
-       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance);
+       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, false);
 }
 
 ALIAS_HIDDEN(bgp_redistribute_ipv4_ospf, bgp_redistribute_ipv4_ospf_hidden_cmd,
@@ -11669,6 +11831,7 @@ DEFUN (bgp_redistribute_ipv4_ospf_rmap,
        struct bgp_redist *red;
        unsigned short instance;
        int protocol;
+       bool changed;
 
        if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
                protocol = ZEBRA_ROUTE_OSPF;
@@ -11677,8 +11840,8 @@ DEFUN (bgp_redistribute_ipv4_ospf_rmap,
 
        instance = strtoul(argv[idx_number]->arg, NULL, 10);
        red = bgp_redist_add(bgp, AFI_IP, protocol, instance);
-       bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
-       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance);
+       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
 }
 
 ALIAS_HIDDEN(bgp_redistribute_ipv4_ospf_rmap,
@@ -11709,6 +11872,7 @@ DEFUN (bgp_redistribute_ipv4_ospf_metric,
        struct bgp_redist *red;
        unsigned short instance;
        int protocol;
+       bool changed;
 
        if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
                protocol = ZEBRA_ROUTE_OSPF;
@@ -11719,8 +11883,9 @@ DEFUN (bgp_redistribute_ipv4_ospf_metric,
        metric = strtoul(argv[idx_number_2]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP, protocol, instance);
-       bgp_redistribute_metric_set(bgp, red, AFI_IP, protocol, metric);
-       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance);
+       changed = bgp_redistribute_metric_set(bgp, red, AFI_IP, protocol,
+                                               metric);
+       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
 }
 
 ALIAS_HIDDEN(bgp_redistribute_ipv4_ospf_metric,
@@ -11754,6 +11919,7 @@ DEFUN (bgp_redistribute_ipv4_ospf_rmap_metric,
        struct bgp_redist *red;
        unsigned short instance;
        int protocol;
+       bool changed;
 
        if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
                protocol = ZEBRA_ROUTE_OSPF;
@@ -11764,9 +11930,10 @@ 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);
-       bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
-       bgp_redistribute_metric_set(bgp, red, AFI_IP, protocol, metric);
-       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance);
+       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed |= bgp_redistribute_metric_set(bgp, red, AFI_IP, protocol,
+                                               metric);
+       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
 }
 
 ALIAS_HIDDEN(
@@ -11803,6 +11970,7 @@ DEFUN (bgp_redistribute_ipv4_ospf_metric_rmap,
        struct bgp_redist *red;
        unsigned short instance;
        int protocol;
+       bool changed;
 
        if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
                protocol = ZEBRA_ROUTE_OSPF;
@@ -11813,9 +11981,10 @@ DEFUN (bgp_redistribute_ipv4_ospf_metric_rmap,
        metric = strtoul(argv[idx_number_2]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP, protocol, instance);
-       bgp_redistribute_metric_set(bgp, red, AFI_IP, protocol, metric);
-       bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
-       return bgp_redistribute_set(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);
+       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
 }
 
 ALIAS_HIDDEN(
@@ -11923,7 +12092,7 @@ DEFUN (bgp_redistribute_ipv6,
        }
 
        bgp_redist_add(bgp, AFI_IP6, type, 0);
-       return bgp_redistribute_set(bgp, AFI_IP6, type, 0);
+       return bgp_redistribute_set(bgp, AFI_IP6, type, 0, false);
 }
 
 DEFUN (bgp_redistribute_ipv6_rmap,
@@ -11939,6 +12108,7 @@ DEFUN (bgp_redistribute_ipv6_rmap,
        int idx_word = 3;
        int type;
        struct bgp_redist *red;
+       bool changed;
 
        type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
        if (type < 0) {
@@ -11947,8 +12117,8 @@ DEFUN (bgp_redistribute_ipv6_rmap,
        }
 
        red = bgp_redist_add(bgp, AFI_IP6, type, 0);
-       bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
-       return bgp_redistribute_set(bgp, AFI_IP6, type, 0);
+       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
 }
 
 DEFUN (bgp_redistribute_ipv6_metric,
@@ -11965,6 +12135,7 @@ DEFUN (bgp_redistribute_ipv6_metric,
        int type;
        uint32_t metric;
        struct bgp_redist *red;
+       bool changed;
 
        type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
        if (type < 0) {
@@ -11974,8 +12145,8 @@ DEFUN (bgp_redistribute_ipv6_metric,
        metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP6, type, 0);
-       bgp_redistribute_metric_set(bgp, red, AFI_IP6, type, metric);
-       return bgp_redistribute_set(bgp, AFI_IP6, type, 0);
+       changed = bgp_redistribute_metric_set(bgp, red, AFI_IP6, type, metric);
+       return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
 }
 
 DEFUN (bgp_redistribute_ipv6_rmap_metric,
@@ -11995,6 +12166,7 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric,
        int type;
        uint32_t metric;
        struct bgp_redist *red;
+       bool changed;
 
        type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
        if (type < 0) {
@@ -12004,9 +12176,10 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric,
        metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP6, type, 0);
-       bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
-       bgp_redistribute_metric_set(bgp, red, AFI_IP6, type, metric);
-       return bgp_redistribute_set(bgp, AFI_IP6, type, 0);
+       changed = bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
+       changed |= bgp_redistribute_metric_set(bgp, red, AFI_IP6, type,
+                                               metric);
+       return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
 }
 
 DEFUN (bgp_redistribute_ipv6_metric_rmap,
@@ -12026,6 +12199,7 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap,
        int type;
        uint32_t metric;
        struct bgp_redist *red;
+       bool changed;
 
        type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
        if (type < 0) {
@@ -12035,9 +12209,10 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap,
        metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
        red = bgp_redist_add(bgp, AFI_IP6, type, 0);
-       bgp_redistribute_metric_set(bgp, red, AFI_IP6, SAFI_UNICAST, metric);
-       bgp_redistribute_rmap_set(red, argv[idx_word]->arg);
-       return bgp_redistribute_set(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);
+       return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
 }
 
 DEFUN (no_bgp_redistribute_ipv6,
@@ -13551,11 +13726,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"
@@ -13569,6 +13744,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;
@@ -13591,10 +13774,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"
@@ -13603,12 +13788,33 @@ 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;
        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, "(1-99)", &idx);
        argv_find(argv, argc, "WORD", &idx);
        cl_name_or_number = argv[idx]->arg;
@@ -13629,13 +13835,25 @@ 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)
+
+/*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"
@@ -13648,6 +13866,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;
@@ -13670,10 +13894,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"
@@ -13682,12 +13905,31 @@ 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;
        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 community-list <(1-99)|(100-500)|standard|expanded> <deny|permit> AA:NN'\n");
+               zlog_warn("Deprecated option: 'no 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;
@@ -13709,6 +13951,19 @@ 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)
+
 /* Return configuration string of community-list entry.  */
 static const char *community_list_config_str(struct community_entry *entry)
 {
@@ -13756,16 +14011,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;
@@ -13779,11 +14041,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")
@@ -13791,6 +14060,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) {
@@ -13803,6 +14079,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.
  */
@@ -13816,6 +14101,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;
 
@@ -13861,6 +14152,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);
 
@@ -13904,7 +14201,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
@@ -13912,12 +14225,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
@@ -13926,12 +14249,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
@@ -13940,12 +14273,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
@@ -13954,12 +14297,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
@@ -13969,12 +14323,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
@@ -13984,12 +14349,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
@@ -13998,12 +14373,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
@@ -14011,12 +14395,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
@@ -14026,12 +14421,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
@@ -14041,12 +14447,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
@@ -14057,12 +14475,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
@@ -14073,10 +14503,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)
 {
@@ -14108,15 +14534,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);
@@ -14132,16 +14566,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);
@@ -14155,14 +14604,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"
@@ -14176,6 +14634,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;
@@ -14197,11 +14661,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"
@@ -14214,6 +14693,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;
@@ -14235,12 +14721,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"
@@ -14253,6 +14751,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;
@@ -14274,12 +14778,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"
@@ -14292,6 +14809,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;
@@ -14313,6 +14836,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;
@@ -14343,16 +14879,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;
@@ -14366,18 +14909,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) {
@@ -14390,6 +14947,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)
 {
@@ -14403,14 +14969,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",
@@ -14424,14 +14990,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",
@@ -14447,14 +15013,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",
@@ -14475,6 +15041,12 @@ 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_expanded_all_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);
@@ -14483,6 +15055,12 @@ static void community_list_vty(void)
        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);
@@ -14491,6 +15069,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);