diff options
author | Don Slice <dslice@cumulusnetworks.com> | 2017-02-08 20:19:54 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-04-06 16:30:03 +0200 |
commit | f51bae9cf9c9bdfbf1d53a2cc4e01e0fdd0af119 (patch) | |
tree | 3a5fc5191d1875b35008371ccbc9645fe06cbf7a | |
parent | quagga: labeled unicast definitions (diff) | |
download | frr-f51bae9cf9c9bdfbf1d53a2cc4e01e0fdd0af119.tar.xz frr-f51bae9cf9c9bdfbf1d53a2cc4e01e0fdd0af119.zip |
bgpd: labeled unicast config
Implement support for activating the labeled-unicast address family in
BGP and relevant configuration for this address family.
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
-rw-r--r-- | bgpd/bgp_route.c | 19 | ||||
-rw-r--r-- | bgpd/bgp_vty.c | 282 | ||||
-rw-r--r-- | bgpd/bgp_vty.h | 1 | ||||
-rw-r--r-- | bgpd/bgpd.c | 10 | ||||
-rw-r--r-- | lib/command.c | 6 | ||||
-rw-r--r-- | lib/command.h | 3 | ||||
-rw-r--r-- | lib/vty.c | 2 | ||||
-rw-r--r-- | vtysh/vtysh.c | 81 |
8 files changed, 340 insertions, 64 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 1fa3e8bc4..432a566c1 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -10684,6 +10684,19 @@ bgp_route_init (void) install_element (BGP_IPV4M_NODE, &no_aggregate_address_cmd); install_element (BGP_IPV4M_NODE, &no_aggregate_address_mask_cmd); + /* IPv4 labeled-unicast configuration. */ + install_element (BGP_IPV4L_NODE, &bgp_table_map_cmd); + install_element (BGP_IPV4L_NODE, &bgp_network_cmd); + install_element (BGP_IPV4L_NODE, &bgp_network_mask_cmd); + install_element (BGP_IPV4L_NODE, &bgp_network_mask_natural_cmd); + install_element (BGP_IPV4L_NODE, &bgp_network_route_map_cmd); + install_element (BGP_IPV4L_NODE, &bgp_network_mask_route_map_cmd); + install_element (BGP_IPV4L_NODE, &bgp_network_mask_natural_route_map_cmd); + install_element (BGP_IPV4L_NODE, &no_bgp_table_map_cmd); + install_element (BGP_IPV4L_NODE, &no_bgp_network_cmd); + install_element (BGP_IPV4L_NODE, &no_bgp_network_mask_cmd); + install_element (BGP_IPV4L_NODE, &no_bgp_network_mask_natural_cmd); + install_element (VIEW_NODE, &show_ip_bgp_instance_all_cmd); install_element (VIEW_NODE, &show_ip_bgp_cmd); install_element (VIEW_NODE, &show_ip_bgp_route_cmd); @@ -10724,6 +10737,12 @@ bgp_route_init (void) install_element (BGP_IPV6M_NODE, &ipv6_bgp_network_cmd); install_element (BGP_IPV6M_NODE, &no_ipv6_bgp_network_cmd); + install_element (BGP_IPV6L_NODE, &bgp_table_map_cmd); + install_element (BGP_IPV6L_NODE, &ipv6_bgp_network_cmd); + install_element (BGP_IPV6L_NODE, &ipv6_bgp_network_route_map_cmd); + install_element (BGP_IPV6L_NODE, &no_bgp_table_map_cmd); + install_element (BGP_IPV6L_NODE, &no_ipv6_bgp_network_cmd); + install_element (BGP_NODE, &bgp_distance_cmd); install_element (BGP_NODE, &no_bgp_distance_cmd); install_element (BGP_NODE, &bgp_distance_source_cmd); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index e94de682d..b1819e2f0 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -60,6 +60,72 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA static struct peer_group * listen_range_exists (struct bgp *bgp, struct prefix *range, int exact); +#if 0 +#define INSTALL_CMD_ON_AF_NODES(cmd) \ + install_element(BGP_IPV4_NODE, cmd); \ + install_element(BGP_IPV4M_NODE, cmd); \ + install_element(BGP_IPV4L_NODE, cmd); \ + install_element(BGP_IPV6_NODE, cmd); \ + install_element(BGP_IPV6M_NODE, cmd); \ + install_element(BGP_IPV6L_NODE, cmd); \ + install_element(BGP_VPNV4_NODE, cmd); +#endif +static enum node_type +bgp_node_type (afi_t afi, safi_t safi) +{ + switch (afi) + { + case AFI_IP: + switch (safi) + { + case SAFI_UNICAST: + return BGP_IPV4_NODE; + break; + case SAFI_MULTICAST: + return BGP_IPV4M_NODE; + break; + case SAFI_LABELED_UNICAST: + return BGP_IPV4L_NODE; + break; + case SAFI_MPLS_VPN: + return BGP_VPNV4_NODE; + break; + case SAFI_ENCAP: + return BGP_ENCAP_NODE; + break; + default: + return UNDEFINED_NODE; + break; + } + break; + case AFI_IP6: + switch (safi) + { + case SAFI_UNICAST: + return BGP_IPV6_NODE; + break; + case SAFI_MULTICAST: + return BGP_IPV6M_NODE; + break; + case SAFI_LABELED_UNICAST: + return BGP_IPV6L_NODE; + break; + case SAFI_MPLS_VPN: + return BGP_VPNV6_NODE; + break; + case SAFI_ENCAP: + return BGP_ENCAP_NODE; + break; + default: + return UNDEFINED_NODE; + break; + } + break; + default: + return UNDEFINED_NODE; + break; + } +} /* Utility function to get address family from current node. */ afi_t @@ -70,6 +136,7 @@ bgp_node_afi (struct vty *vty) { case BGP_IPV6_NODE: case BGP_IPV6M_NODE: + case BGP_IPV6L_NODE: case BGP_VPNV6_NODE: case BGP_ENCAPV6_NODE: afi = AFI_IP6; @@ -107,6 +174,10 @@ bgp_node_safi (struct vty *vty) case BGP_EVPN_NODE: safi = SAFI_EVPN; break; + case BGP_IPV4L_NODE: + case BGP_IPV6L_NODE: + safi = SAFI_LABELED_UNICAST; + break; default: safi = SAFI_UNICAST; break; @@ -160,7 +231,7 @@ argv_find_and_parse_afi(struct cmd_token **argv, int argc, int *index, afi_t *af return ret; } -/* supports <unicast|multicast|vpn|encap> */ +/* supports <unicast|multicast|vpn|encap|labeled-unicast> */ safi_t bgp_vty_safi_from_arg(const char *safi_str) { @@ -173,6 +244,8 @@ bgp_vty_safi_from_arg(const char *safi_str) safi = SAFI_ENCAP; else if (strncmp (safi_str, "v", 1) == 0) safi = SAFI_MPLS_VPN; + else if (strncmp (safi_str, "l", 1) == 0) + safi = SAFI_LABELED_UNICAST; return safi; } @@ -5649,30 +5722,16 @@ DEFUN (no_neighbor_addpath_tx_bestpath_per_as, DEFUN_NOSH (address_family_ipv4_safi, address_family_ipv4_safi_cmd, - "address-family ipv4 [<unicast|multicast|vpn|encap>]", + "address-family ipv4 [<unicast|multicast|vpn|encap|labeled-unicast>]", "Enter Address Family command mode\n" "Address Family\n" BGP_SAFI_HELP_STR) { - int idx_safi = 2; - if (argc == (idx_safi + 1)) + + if (argc == 3) { - switch (bgp_vty_safi_from_arg(argv[idx_safi]->arg)) - { - case SAFI_MULTICAST: - vty->node = BGP_IPV4M_NODE; - break; - case SAFI_ENCAP: - vty->node = BGP_ENCAP_NODE; - break; - case SAFI_MPLS_VPN: - vty->node = BGP_VPNV4_NODE; - break; - case SAFI_UNICAST: - default: - vty->node = BGP_IPV4_NODE; - break; - } + safi_t safi = bgp_vty_safi_from_arg(argv[2]->arg); + vty->node = bgp_node_type(AFI_IP, safi); } else vty->node = BGP_IPV4_NODE; @@ -5682,30 +5741,15 @@ DEFUN_NOSH (address_family_ipv4_safi, DEFUN_NOSH (address_family_ipv6_safi, address_family_ipv6_safi_cmd, - "address-family ipv6 [<unicast|multicast|vpn|encap>]", + "address-family ipv6 [<unicast|multicast|vpn|encap|labeled-unicast>]", "Enter Address Family command mode\n" "Address Family\n" BGP_SAFI_HELP_STR) { - int idx_safi = 2; - if (argc == (idx_safi + 1)) + if (argc == 3) { - switch (bgp_vty_safi_from_arg(argv[idx_safi]->arg)) - { - case SAFI_MULTICAST: - vty->node = BGP_IPV6M_NODE; - break; - case SAFI_ENCAP: - vty->node = BGP_ENCAPV6_NODE; - break; - case SAFI_MPLS_VPN: - vty->node = BGP_VPNV6_NODE; - break; - case SAFI_UNICAST: - default: - vty->node = BGP_IPV6_NODE; - break; - } + safi_t safi = bgp_vty_safi_from_arg(argv[2]->arg); + vty->node = bgp_node_type(AFI_IP6, safi); } else vty->node = BGP_IPV6_NODE; @@ -5778,9 +5822,11 @@ DEFUN_NOSH (exit_address_family, { if (vty->node == BGP_IPV4_NODE || vty->node == BGP_IPV4M_NODE + || vty->node == BGP_IPV4L_NODE || vty->node == BGP_VPNV4_NODE || vty->node == BGP_IPV6_NODE || vty->node == BGP_IPV6M_NODE + || vty->node == BGP_IPV6L_NODE || vty->node == BGP_VPNV6_NODE || vty->node == BGP_ENCAP_NODE || vty->node == BGP_ENCAPV6_NODE @@ -10033,6 +10079,13 @@ static struct cmd_node bgp_ipv4_multicast_node = 1, }; +static struct cmd_node bgp_ipv4_labeled_unicast_node = +{ + BGP_IPV4L_NODE, + "%s(config-router-af)# ", + 1, +}; + static struct cmd_node bgp_ipv6_unicast_node = { BGP_IPV6_NODE, @@ -10047,6 +10100,13 @@ static struct cmd_node bgp_ipv6_multicast_node = 1, }; +static struct cmd_node bgp_ipv6_labeled_unicast_node = +{ + BGP_IPV6L_NODE, + "%s(config-router-af)# ", + 1, +}; + static struct cmd_node bgp_vpnv4_node = { BGP_VPNV4_NODE, @@ -10091,8 +10151,10 @@ bgp_vty_init (void) install_node (&bgp_node, bgp_config_write); install_node (&bgp_ipv4_unicast_node, NULL); install_node (&bgp_ipv4_multicast_node, NULL); + install_node (&bgp_ipv4_labeled_unicast_node, NULL); install_node (&bgp_ipv6_unicast_node, NULL); install_node (&bgp_ipv6_multicast_node, NULL); + install_node (&bgp_ipv6_labeled_unicast_node, NULL); install_node (&bgp_vpnv4_node, NULL); install_node (&bgp_vpnv6_node, NULL); install_node (&bgp_encap_node, NULL); @@ -10103,8 +10165,10 @@ bgp_vty_init (void) install_default (BGP_NODE); install_default (BGP_IPV4_NODE); install_default (BGP_IPV4M_NODE); + install_default (BGP_IPV4L_NODE); install_default (BGP_IPV6_NODE); install_default (BGP_IPV6M_NODE); + install_default (BGP_IPV6L_NODE); install_default (BGP_VPNV4_NODE); install_default (BGP_VPNV6_NODE); install_default (BGP_ENCAP_NODE); @@ -10180,15 +10244,27 @@ bgp_vty_init (void) install_element (BGP_IPV6_NODE, &bgp_maxpaths_cmd); install_element (BGP_IPV6_NODE, &no_bgp_maxpaths_cmd); install_element (BGP_NODE, &bgp_maxpaths_ibgp_cmd); - install_element(BGP_NODE, &bgp_maxpaths_ibgp_cluster_cmd); + install_element (BGP_NODE, &bgp_maxpaths_ibgp_cluster_cmd); install_element (BGP_NODE, &no_bgp_maxpaths_ibgp_cmd); install_element (BGP_IPV4_NODE, &bgp_maxpaths_ibgp_cmd); - install_element(BGP_IPV4_NODE, &bgp_maxpaths_ibgp_cluster_cmd); + install_element (BGP_IPV4_NODE, &bgp_maxpaths_ibgp_cluster_cmd); install_element (BGP_IPV4_NODE, &no_bgp_maxpaths_ibgp_cmd); install_element (BGP_IPV6_NODE, &bgp_maxpaths_ibgp_cmd); - install_element(BGP_IPV6_NODE, &bgp_maxpaths_ibgp_cluster_cmd); + install_element (BGP_IPV6_NODE, &bgp_maxpaths_ibgp_cluster_cmd); install_element (BGP_IPV6_NODE, &no_bgp_maxpaths_ibgp_cmd); + install_element (BGP_IPV4L_NODE, &bgp_maxpaths_cmd); + install_element (BGP_IPV4L_NODE, &no_bgp_maxpaths_cmd); + install_element (BGP_IPV6L_NODE, &bgp_maxpaths_cmd); + install_element (BGP_IPV6L_NODE, &no_bgp_maxpaths_cmd); + + install_element (BGP_IPV4L_NODE, &bgp_maxpaths_ibgp_cmd); + install_element (BGP_IPV4L_NODE, &bgp_maxpaths_ibgp_cluster_cmd); + install_element (BGP_IPV4L_NODE, &no_bgp_maxpaths_ibgp_cmd); + install_element (BGP_IPV6L_NODE, &bgp_maxpaths_ibgp_cmd); + install_element (BGP_IPV6L_NODE, &bgp_maxpaths_ibgp_cluster_cmd); + install_element (BGP_IPV6L_NODE, &no_bgp_maxpaths_ibgp_cmd); + /* "timers bgp" commands. */ install_element (BGP_NODE, &bgp_timers_cmd); install_element (BGP_NODE, &no_bgp_timers_cmd); @@ -10317,8 +10393,10 @@ bgp_vty_init (void) install_element (BGP_NODE, &neighbor_activate_cmd); install_element (BGP_IPV4_NODE, &neighbor_activate_cmd); install_element (BGP_IPV4M_NODE, &neighbor_activate_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_activate_cmd); install_element (BGP_IPV6_NODE, &neighbor_activate_cmd); install_element (BGP_IPV6M_NODE, &neighbor_activate_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_activate_cmd); install_element (BGP_VPNV4_NODE, &neighbor_activate_cmd); install_element (BGP_VPNV6_NODE, &neighbor_activate_cmd); install_element (BGP_ENCAP_NODE, &neighbor_activate_cmd); @@ -10329,8 +10407,10 @@ bgp_vty_init (void) install_element (BGP_NODE, &no_neighbor_activate_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_activate_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_activate_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_activate_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_activate_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_activate_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_activate_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_activate_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_activate_cmd); install_element (BGP_ENCAP_NODE, &no_neighbor_activate_cmd); @@ -10346,8 +10426,10 @@ bgp_vty_init (void) install_element (BGP_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_IPV4_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_IPV4M_NODE, &neighbor_set_peer_group_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_IPV6_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_IPV6M_NODE, &neighbor_set_peer_group_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_VPNV4_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_VPNV6_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_ENCAP_NODE, &neighbor_set_peer_group_cmd); @@ -10357,8 +10439,10 @@ bgp_vty_init (void) install_element (BGP_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_set_peer_group_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_set_peer_group_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_ENCAP_NODE, &no_neighbor_set_peer_group_cmd); @@ -10369,12 +10453,16 @@ bgp_vty_init (void) install_element (BGP_NODE, &no_neighbor_soft_reconfiguration_cmd); install_element (BGP_IPV4_NODE, &neighbor_soft_reconfiguration_cmd); install_element (BGP_IPV4_NODE, &no_neighbor_soft_reconfiguration_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_soft_reconfiguration_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_soft_reconfiguration_cmd); install_element (BGP_IPV4M_NODE, &neighbor_soft_reconfiguration_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_soft_reconfiguration_cmd); install_element (BGP_IPV6_NODE, &neighbor_soft_reconfiguration_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_soft_reconfiguration_cmd); install_element (BGP_IPV6M_NODE, &neighbor_soft_reconfiguration_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_soft_reconfiguration_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_soft_reconfiguration_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_soft_reconfiguration_cmd); install_element (BGP_VPNV4_NODE, &neighbor_soft_reconfiguration_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_soft_reconfiguration_cmd); install_element (BGP_VPNV6_NODE, &neighbor_soft_reconfiguration_cmd); @@ -10391,10 +10479,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_attr_unchanged_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_attr_unchanged_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged_cmd); install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged_cmd); @@ -10420,10 +10512,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_nexthop_self_cmd); install_element (BGP_IPV4M_NODE, &neighbor_nexthop_self_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_nexthop_self_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_nexthop_self_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_nexthop_self_cmd); install_element (BGP_IPV6_NODE, &neighbor_nexthop_self_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_nexthop_self_cmd); install_element (BGP_IPV6M_NODE, &neighbor_nexthop_self_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_nexthop_self_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_nexthop_self_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_nexthop_self_cmd); install_element (BGP_VPNV4_NODE, &neighbor_nexthop_self_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_nexthop_self_cmd); install_element (BGP_VPNV6_NODE, &neighbor_nexthop_self_cmd); @@ -10440,10 +10536,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_nexthop_self_force_cmd); install_element (BGP_IPV4M_NODE, &neighbor_nexthop_self_force_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_nexthop_self_force_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_nexthop_self_force_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_nexthop_self_force_cmd); install_element (BGP_IPV6_NODE, &neighbor_nexthop_self_force_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_nexthop_self_force_cmd); install_element (BGP_IPV6M_NODE, &neighbor_nexthop_self_force_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_nexthop_self_force_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_nexthop_self_force_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_nexthop_self_force_cmd); install_element (BGP_VPNV4_NODE, &neighbor_nexthop_self_force_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_nexthop_self_force_cmd); install_element (BGP_VPNV6_NODE, &neighbor_nexthop_self_force_cmd); @@ -10456,10 +10556,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_as_override_cmd); install_element (BGP_IPV4M_NODE, &neighbor_as_override_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_as_override_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_as_override_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_as_override_cmd); install_element (BGP_IPV6_NODE, &neighbor_as_override_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_as_override_cmd); install_element (BGP_IPV6M_NODE, &neighbor_as_override_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_as_override_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_as_override_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_as_override_cmd); install_element (BGP_VPNV4_NODE, &neighbor_as_override_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_as_override_cmd); install_element (BGP_VPNV6_NODE, &neighbor_as_override_cmd); @@ -10490,6 +10594,14 @@ bgp_vty_init (void) install_element (BGP_IPV4M_NODE, &no_neighbor_remove_private_as_replace_as_cmd); install_element (BGP_IPV4M_NODE, &neighbor_remove_private_as_all_replace_as_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_remove_private_as_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_remove_private_as_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_remove_private_as_all_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_remove_private_as_all_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_remove_private_as_replace_as_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_remove_private_as_replace_as_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_remove_private_as_all_replace_as_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd); install_element (BGP_IPV6_NODE, &neighbor_remove_private_as_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_remove_private_as_cmd); install_element (BGP_IPV6_NODE, &neighbor_remove_private_as_all_cmd); @@ -10506,6 +10618,14 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &no_neighbor_remove_private_as_replace_as_cmd); install_element (BGP_IPV6M_NODE, &neighbor_remove_private_as_all_replace_as_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_remove_private_as_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_remove_private_as_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_remove_private_as_all_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_remove_private_as_all_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_remove_private_as_replace_as_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_remove_private_as_replace_as_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_remove_private_as_all_replace_as_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd); install_element (BGP_VPNV4_NODE, &neighbor_remove_private_as_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_remove_private_as_cmd); install_element (BGP_VPNV4_NODE, &neighbor_remove_private_as_all_cmd); @@ -10540,6 +10660,10 @@ bgp_vty_init (void) install_element (BGP_IPV4M_NODE, &neighbor_send_community_type_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_send_community_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_send_community_type_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_send_community_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_send_community_type_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_send_community_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_send_community_type_cmd); install_element (BGP_IPV6_NODE, &neighbor_send_community_cmd); install_element (BGP_IPV6_NODE, &neighbor_send_community_type_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_send_community_cmd); @@ -10548,6 +10672,10 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &neighbor_send_community_type_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_send_community_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_send_community_type_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_send_community_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_send_community_type_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_send_community_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_send_community_type_cmd); install_element (BGP_VPNV4_NODE, &neighbor_send_community_cmd); install_element (BGP_VPNV4_NODE, &neighbor_send_community_type_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_send_community_cmd); @@ -10572,10 +10700,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_route_reflector_client_cmd); install_element (BGP_IPV4M_NODE, &neighbor_route_reflector_client_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_route_reflector_client_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_route_reflector_client_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_route_reflector_client_cmd); install_element (BGP_IPV6_NODE, &neighbor_route_reflector_client_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_route_reflector_client_cmd); install_element (BGP_IPV6M_NODE, &neighbor_route_reflector_client_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_route_reflector_client_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_route_reflector_client_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_route_reflector_client_cmd); install_element (BGP_VPNV4_NODE, &neighbor_route_reflector_client_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_route_reflector_client_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_reflector_client_cmd); @@ -10592,10 +10724,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_route_server_client_cmd); install_element (BGP_IPV4M_NODE, &neighbor_route_server_client_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_route_server_client_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_route_server_client_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_route_server_client_cmd); install_element (BGP_IPV6_NODE, &neighbor_route_server_client_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_route_server_client_cmd); install_element (BGP_IPV6M_NODE, &neighbor_route_server_client_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_route_server_client_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_route_server_client_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_route_server_client_cmd); install_element (BGP_VPNV4_NODE, &neighbor_route_server_client_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_route_server_client_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_server_client_cmd); @@ -10612,10 +10748,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_addpath_tx_all_paths_cmd); install_element (BGP_IPV4M_NODE, &neighbor_addpath_tx_all_paths_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_addpath_tx_all_paths_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_addpath_tx_all_paths_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_addpath_tx_all_paths_cmd); install_element (BGP_IPV6_NODE, &neighbor_addpath_tx_all_paths_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_addpath_tx_all_paths_cmd); install_element (BGP_IPV6M_NODE, &neighbor_addpath_tx_all_paths_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_addpath_tx_all_paths_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_addpath_tx_all_paths_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_addpath_tx_all_paths_cmd); install_element (BGP_VPNV4_NODE, &neighbor_addpath_tx_all_paths_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_addpath_tx_all_paths_cmd); install_element (BGP_VPNV6_NODE, &neighbor_addpath_tx_all_paths_cmd); @@ -10628,10 +10768,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd); install_element (BGP_IPV4M_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd); install_element (BGP_IPV6_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd); install_element (BGP_IPV6M_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd); install_element (BGP_VPNV4_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd); install_element (BGP_VPNV6_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd); @@ -10659,10 +10803,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_capability_orf_prefix_cmd); install_element (BGP_IPV4M_NODE, &neighbor_capability_orf_prefix_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_capability_orf_prefix_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_capability_orf_prefix_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_capability_orf_prefix_cmd); install_element (BGP_IPV6_NODE, &neighbor_capability_orf_prefix_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_capability_orf_prefix_cmd); install_element (BGP_IPV6M_NODE, &neighbor_capability_orf_prefix_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_capability_orf_prefix_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_capability_orf_prefix_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_capability_orf_prefix_cmd); /* "neighbor capability dynamic" commands.*/ install_element (BGP_NODE, &neighbor_capability_dynamic_cmd); @@ -10699,12 +10847,18 @@ bgp_vty_init (void) install_element (BGP_IPV4M_NODE, &neighbor_default_originate_cmd); install_element (BGP_IPV4M_NODE, &neighbor_default_originate_rmap_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_default_originate_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_default_originate_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_default_originate_rmap_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_default_originate_cmd); install_element (BGP_IPV6_NODE, &neighbor_default_originate_cmd); install_element (BGP_IPV6_NODE, &neighbor_default_originate_rmap_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_default_originate_cmd); install_element (BGP_IPV6M_NODE, &neighbor_default_originate_cmd); install_element (BGP_IPV6M_NODE, &neighbor_default_originate_rmap_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_default_originate_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_default_originate_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_default_originate_rmap_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_default_originate_cmd); /* "neighbor port" commands. */ install_element (BGP_NODE, &neighbor_port_cmd); @@ -10718,10 +10872,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_weight_cmd); install_element (BGP_IPV4M_NODE, &neighbor_weight_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_weight_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_weight_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_weight_cmd); install_element (BGP_IPV6_NODE, &neighbor_weight_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_weight_cmd); install_element (BGP_IPV6M_NODE, &neighbor_weight_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_weight_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_weight_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_weight_cmd); install_element (BGP_VPNV4_NODE, &neighbor_weight_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_weight_cmd); install_element (BGP_VPNV6_NODE, &neighbor_weight_cmd); @@ -10762,10 +10920,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_distribute_list_cmd); install_element (BGP_IPV4M_NODE, &neighbor_distribute_list_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_distribute_list_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_distribute_list_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_distribute_list_cmd); install_element (BGP_IPV6_NODE, &neighbor_distribute_list_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_distribute_list_cmd); install_element (BGP_IPV6M_NODE, &neighbor_distribute_list_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_distribute_list_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_distribute_list_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_distribute_list_cmd); install_element (BGP_VPNV4_NODE, &neighbor_distribute_list_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_distribute_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_distribute_list_cmd); @@ -10782,10 +10944,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_prefix_list_cmd); install_element (BGP_IPV4M_NODE, &neighbor_prefix_list_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_prefix_list_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_prefix_list_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_prefix_list_cmd); install_element (BGP_IPV6_NODE, &neighbor_prefix_list_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_prefix_list_cmd); install_element (BGP_IPV6M_NODE, &neighbor_prefix_list_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_prefix_list_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_prefix_list_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_prefix_list_cmd); install_element (BGP_VPNV4_NODE, &neighbor_prefix_list_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_prefix_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_prefix_list_cmd); @@ -10802,10 +10968,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_filter_list_cmd); install_element (BGP_IPV4M_NODE, &neighbor_filter_list_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_filter_list_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_filter_list_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_filter_list_cmd); install_element (BGP_IPV6_NODE, &neighbor_filter_list_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_filter_list_cmd); install_element (BGP_IPV6M_NODE, &neighbor_filter_list_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_filter_list_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_filter_list_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_filter_list_cmd); install_element (BGP_VPNV4_NODE, &neighbor_filter_list_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_filter_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_filter_list_cmd); @@ -10822,10 +10992,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_route_map_cmd); install_element (BGP_IPV4M_NODE, &neighbor_route_map_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_route_map_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_route_map_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_route_map_cmd); install_element (BGP_IPV6_NODE, &neighbor_route_map_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_route_map_cmd); install_element (BGP_IPV6M_NODE, &neighbor_route_map_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_route_map_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_route_map_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_route_map_cmd); install_element (BGP_VPNV4_NODE, &neighbor_route_map_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_route_map_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_map_cmd); @@ -10842,10 +11016,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_unsuppress_map_cmd); install_element (BGP_IPV4M_NODE, &neighbor_unsuppress_map_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_unsuppress_map_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_unsuppress_map_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_unsuppress_map_cmd); install_element (BGP_IPV6_NODE, &neighbor_unsuppress_map_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_unsuppress_map_cmd); install_element (BGP_IPV6M_NODE, &neighbor_unsuppress_map_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_unsuppress_map_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_unsuppress_map_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_unsuppress_map_cmd); install_element (BGP_VPNV4_NODE, &neighbor_unsuppress_map_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_unsuppress_map_cmd); install_element (BGP_VPNV6_NODE, &neighbor_unsuppress_map_cmd); @@ -10877,6 +11055,13 @@ bgp_vty_init (void) install_element (BGP_IPV4M_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_IPV4M_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_maximum_prefix_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_threshold_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_warning_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_threshold_warning_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_restart_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_maximum_prefix_cmd); install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_cmd); install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_threshold_cmd); install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_warning_cmd); @@ -10891,6 +11076,13 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &neighbor_maximum_prefix_restart_cmd); install_element (BGP_IPV6M_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_maximum_prefix_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_threshold_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_warning_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_threshold_warning_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_restart_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_maximum_prefix_cmd); install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_cmd); install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_threshold_cmd); install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_warning_cmd); @@ -10929,10 +11121,14 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_neighbor_allowas_in_cmd); install_element (BGP_IPV4M_NODE, &neighbor_allowas_in_cmd); install_element (BGP_IPV4M_NODE, &no_neighbor_allowas_in_cmd); + install_element (BGP_IPV4L_NODE, &neighbor_allowas_in_cmd); + install_element (BGP_IPV4L_NODE, &no_neighbor_allowas_in_cmd); install_element (BGP_IPV6_NODE, &neighbor_allowas_in_cmd); install_element (BGP_IPV6_NODE, &no_neighbor_allowas_in_cmd); install_element (BGP_IPV6M_NODE, &neighbor_allowas_in_cmd); install_element (BGP_IPV6M_NODE, &no_neighbor_allowas_in_cmd); + install_element (BGP_IPV6L_NODE, &neighbor_allowas_in_cmd); + install_element (BGP_IPV6L_NODE, &no_neighbor_allowas_in_cmd); install_element (BGP_VPNV4_NODE, &neighbor_allowas_in_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_allowas_in_cmd); install_element (BGP_VPNV6_NODE, &neighbor_allowas_in_cmd); @@ -10958,8 +11154,10 @@ bgp_vty_init (void) /* "exit-address-family" command. */ install_element (BGP_IPV4_NODE, &exit_address_family_cmd); install_element (BGP_IPV4M_NODE, &exit_address_family_cmd); + install_element (BGP_IPV4L_NODE, &exit_address_family_cmd); install_element (BGP_IPV6_NODE, &exit_address_family_cmd); install_element (BGP_IPV6M_NODE, &exit_address_family_cmd); + install_element (BGP_IPV6L_NODE, &exit_address_family_cmd); install_element (BGP_VPNV4_NODE, &exit_address_family_cmd); install_element (BGP_VPNV6_NODE, &exit_address_family_cmd); install_element (BGP_ENCAP_NODE, &exit_address_family_cmd); diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index 33d24d530..f0342c2c3 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -33,6 +33,7 @@ struct bgp; "Address Family modifier\n" \ "Address Family modifier\n" \ "Address Family modifier\n" \ + "Address Family modifier\n" \ "Address Family modifier\n" #define BGP_AFI_SAFI_CMD_STR BGP_AFI_CMD_STR" "BGP_SAFI_CMD_STR #define BGP_AFI_SAFI_HELP_STR BGP_AFI_HELP_STR BGP_SAFI_HELP_STR diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 3f81c1c50..0ed277b16 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -7262,6 +7262,8 @@ bgp_config_write_family_header (struct vty *vty, afi_t afi, safi_t safi, { if (safi == SAFI_UNICAST) vty_out (vty, "ipv4 unicast"); + else if (safi == SAFI_LABELED_UNICAST) + vty_out (vty, "ipv4 labeled-unicast"); else if (safi == SAFI_MULTICAST) vty_out (vty, "ipv4 multicast"); else if (safi == SAFI_MPLS_VPN) @@ -7273,6 +7275,8 @@ bgp_config_write_family_header (struct vty *vty, afi_t afi, safi_t safi, { if (safi == SAFI_UNICAST) vty_out (vty, "ipv6 unicast"); + else if (safi == SAFI_LABELED_UNICAST) + vty_out (vty, "ipv6 labeled-unicast"); else if (safi == SAFI_MULTICAST) vty_out (vty, "ipv6 multicast"); else if (safi == SAFI_MPLS_VPN) @@ -7579,6 +7583,9 @@ bgp_config_write (struct vty *vty) /* IPv4 multicast configuration. */ write += bgp_config_write_family (vty, bgp, AFI_IP, SAFI_MULTICAST); + /* IPv4 labeled-unicast configuration. */ + write += bgp_config_write_family (vty, bgp, AFI_IP, SAFI_LABELED_UNICAST); + /* IPv4 VPN configuration. */ write += bgp_config_write_family (vty, bgp, AFI_IP, SAFI_MPLS_VPN); @@ -7591,6 +7598,9 @@ bgp_config_write (struct vty *vty) /* IPv6 multicast configuration. */ write += bgp_config_write_family (vty, bgp, AFI_IP6, SAFI_MULTICAST); + /* IPv6 labeled-unicast configuration. */ + write += bgp_config_write_family (vty, bgp, AFI_IP6, SAFI_LABELED_UNICAST); + /* IPv6 VPN configuration. */ write += bgp_config_write_family (vty, bgp, AFI_IP6, SAFI_MPLS_VPN); diff --git a/lib/command.c b/lib/command.c index 993d6f905..af13542bc 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1055,9 +1055,11 @@ node_parent ( enum node_type node ) case BGP_VNC_L2_GROUP_NODE: case BGP_IPV4_NODE: case BGP_IPV4M_NODE: + case BGP_IPV4L_NODE: case BGP_IPV6_NODE: case BGP_IPV6M_NODE: case BGP_EVPN_NODE: + case BGP_IPV6L_NODE: ret = BGP_NODE; break; case KEYCHAIN_KEY_NODE: @@ -1414,6 +1416,7 @@ cmd_exit (struct vty *vty) break; case BGP_IPV4_NODE: case BGP_IPV4M_NODE: + case BGP_IPV4L_NODE: case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: case BGP_ENCAP_NODE: @@ -1425,6 +1428,7 @@ cmd_exit (struct vty *vty) case BGP_IPV6_NODE: case BGP_IPV6M_NODE: case BGP_EVPN_NODE: + case BGP_IPV6L_NODE: vty->node = BGP_NODE; break; case LDP_IPV4_NODE: @@ -1491,9 +1495,11 @@ DEFUN (config_end, case BGP_VPNV6_NODE: case BGP_IPV4_NODE: case BGP_IPV4M_NODE: + case BGP_IPV4L_NODE: case BGP_IPV6_NODE: case BGP_IPV6M_NODE: case BGP_EVPN_NODE: + case BGP_IPV6L_NODE: case RMAP_NODE: case OSPF_NODE: case OSPF6_NODE: diff --git a/lib/command.h b/lib/command.h index d62f7655e..1a5e069ce 100644 --- a/lib/command.h +++ b/lib/command.h @@ -96,8 +96,10 @@ enum node_type BGP_VPNV6_NODE, /* BGP MPLS-VPN PE exchange. */ BGP_IPV4_NODE, /* BGP IPv4 unicast address family. */ BGP_IPV4M_NODE, /* BGP IPv4 multicast address family. */ + BGP_IPV4L_NODE, /* BGP IPv4 labeled unicast address family. */ BGP_IPV6_NODE, /* BGP IPv6 address family */ BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */ + BGP_IPV6L_NODE, /* BGP IPv6 labeled unicast address family. */ BGP_ENCAP_NODE, /* BGP ENCAP SAFI */ BGP_ENCAPV6_NODE, /* BGP ENCAP SAFI */ BGP_VRF_POLICY_NODE, /* BGP VRF policy */ @@ -134,6 +136,7 @@ enum node_type MPLS_NODE, /* MPLS config node */ VTY_NODE, /* Vty node. */ LINK_PARAMS_NODE, /* Link-parameters node */ + UNDEFINED_NODE }; /* Node which has some commands and prompt string and configuration @@ -745,9 +745,11 @@ vty_end_config (struct vty *vty) case BGP_VNC_L2_GROUP_NODE: case BGP_IPV4_NODE: case BGP_IPV4M_NODE: + case BGP_IPV4L_NODE: case BGP_IPV6_NODE: case BGP_IPV6M_NODE: case BGP_EVPN_NODE: + case BGP_IPV6L_NODE: case RMAP_NODE: case OSPF_NODE: case OSPF6_NODE: diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index d0038ea3c..10b98ac4c 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -309,7 +309,8 @@ vtysh_execute_func (const char *line, int pager) || saved_node == BGP_ENCAP_NODE || saved_node == BGP_ENCAPV6_NODE || saved_node == BGP_IPV4_NODE || saved_node == BGP_IPV6_NODE || saved_node == BGP_IPV4M_NODE - || saved_node == BGP_IPV6M_NODE || saved_node == BGP_EVPN_NODE) + || saved_node == BGP_IPV4L_NODE || saved_node == BGP_IPV6L_NODE + || saved_node == BGP_IPV6M_NODE || saved_node == BGP_EVPN_NODE) && (tried == 1)) { vtysh_execute("exit-address-family"); @@ -947,6 +948,12 @@ static struct cmd_node bgp_ipv4m_node = "%s(config-router-af)# " }; +static struct cmd_node bgp_ipv4l_node = +{ + BGP_IPV4L_NODE, + "%s(config-router-af)# " +}; + static struct cmd_node bgp_ipv6_node = { BGP_IPV6_NODE, @@ -965,6 +972,12 @@ static struct cmd_node bgp_evpn_node = "%s(config-router-af)# " }; +static struct cmd_node bgp_ipv6l_node = +{ + BGP_IPV6L_NODE, + "%s(config-router-af)# " +}; + static struct cmd_node bgp_vnc_defaults_node = { BGP_VNC_DEFAULTS_NODE, @@ -1115,7 +1128,7 @@ DEFUNSH (VTYSH_BGPD, "address-family vpnv4 [unicast]", "Enter Address Family command mode\n" "Address Family\n" - "Address Family Modifier\n") + "Address Family modifier\n") { vty->node = BGP_VPNV4_NODE; return CMD_SUCCESS; @@ -1127,7 +1140,7 @@ DEFUNSH (VTYSH_BGPD, "address-family vpnv6 [unicast]", "Enter Address Family command mode\n" "Address Family\n" - "Address Family Modifier\n") + "Address Family modifier\n") { vty->node = BGP_VPNV6_NODE; return CMD_SUCCESS; @@ -1157,15 +1170,16 @@ DEFUNSH (VTYSH_BGPD, } DEFUNSH (VTYSH_BGPD, - address_family_ipv4_unicast, - address_family_ipv4_unicast_cmd, - "address-family ipv4 [<unicast|multicast|vpn|encap>]", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family Modifier\n" - "Address Family Modifier\n" - "Address Family Modifier\n" - "Address Family Modifier\n") + address_family_ipv4, + address_family_ipv4_cmd, + "address-family ipv4 [<unicast|multicast|vpn|encap|labeled-unicast>]", + "Enter Address Family command mode\n" + "Address Family\n" + "Address Family modifier\n" + "Address Family modifier\n" + "Address Family modifier\n" + "Address Family modifier\n" + "Address Family modifier\n") { int idx = 0; @@ -1178,6 +1192,9 @@ DEFUNSH (VTYSH_BGPD, else if (argv_find (argv, argc, "vpn", &idx)) vty->node = BGP_VPNV4_NODE; + else if (argv_find (argv, argc, "labeled-unicast", &idx)) + vty->node = BGP_IPV4L_NODE; + else vty->node = BGP_IPV4_NODE; @@ -1185,15 +1202,16 @@ DEFUNSH (VTYSH_BGPD, } DEFUNSH (VTYSH_BGPD, - address_family_ipv6, - address_family_ipv6_cmd, - "address-family ipv6 [<unicast|multicast|vpn|encap>]", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family Modifier\n" - "Address Family Modifier\n" - "Address Family Modifier\n" - "Address Family Modifier\n") + address_family_ipv6, + address_family_ipv6_cmd, + "address-family ipv6 [<unicast|multicast|vpn|encap|labeled-unicast>]", + "Enter Address Family command mode\n" + "Address Family\n" + "Address Family modifier\n" + "Address Family modifier\n" + "Address Family modifier\n" + "Address Family modifier\n" + "Address Family modifier\n") { int idx = 0; @@ -1206,6 +1224,9 @@ DEFUNSH (VTYSH_BGPD, else if (argv_find (argv, argc, "vpn", &idx)) vty->node = BGP_VPNV6_NODE; + else if (argv_find (argv, argc, "labeled-unicast", &idx)) + vty->node = BGP_IPV6L_NODE; + else vty->node = BGP_IPV6_NODE; @@ -1532,8 +1553,10 @@ vtysh_exit (struct vty *vty) case BGP_ENCAPV6_NODE: case BGP_IPV4_NODE: case BGP_IPV4M_NODE: + case BGP_IPV4L_NODE: case BGP_IPV6_NODE: case BGP_IPV6M_NODE: + case BGP_IPV6L_NODE: case BGP_VRF_POLICY_NODE: case BGP_EVPN_NODE: case BGP_VNC_DEFAULTS_NODE: @@ -1592,11 +1615,13 @@ DEFUNSH (VTYSH_BGPD, { if (vty->node == BGP_IPV4_NODE || vty->node == BGP_IPV4M_NODE + || vty->node == BGP_IPV4L_NODE || vty->node == BGP_VPNV4_NODE || vty->node == BGP_VPNV6_NODE || vty->node == BGP_ENCAP_NODE || vty->node == BGP_ENCAPV6_NODE || vty->node == BGP_IPV6_NODE + || vty->node == BGP_IPV6L_NODE || vty->node == BGP_IPV6M_NODE) vty->node = BGP_NODE; return CMD_SUCCESS; @@ -3124,8 +3149,10 @@ vtysh_init_vty (void) install_node (&bgp_encapv6_node, NULL); install_node (&bgp_ipv4_node, NULL); install_node (&bgp_ipv4m_node, NULL); + install_node (&bgp_ipv4l_node, NULL); install_node (&bgp_ipv6_node, NULL); install_node (&bgp_ipv6m_node, NULL); + install_node (&bgp_ipv6l_node, NULL); install_node (&bgp_vrf_policy_node, NULL); install_node (&bgp_evpn_node, NULL); install_node (&bgp_vnc_defaults_node, NULL); @@ -3162,9 +3189,11 @@ vtysh_init_vty (void) vtysh_install_default (BGP_ENCAPV6_NODE); vtysh_install_default (BGP_IPV4_NODE); vtysh_install_default (BGP_IPV4M_NODE); + vtysh_install_default (BGP_IPV4L_NODE); vtysh_install_default (BGP_IPV6_NODE); vtysh_install_default (BGP_IPV6M_NODE); vtysh_install_default (BGP_EVPN_NODE); + vtysh_install_default (BGP_IPV6L_NODE); #if ENABLE_BGP_VNC vtysh_install_default (BGP_VRF_POLICY_NODE); vtysh_install_default (BGP_VNC_DEFAULTS_NODE); @@ -3233,11 +3262,15 @@ vtysh_init_vty (void) install_element (BGP_IPV4_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_IPV4M_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_IPV4M_NODE, &vtysh_quit_bgpd_cmd); + install_element (BGP_IPV4L_NODE, &vtysh_exit_bgpd_cmd); + install_element (BGP_IPV4L_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_IPV6_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_IPV6_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_IPV6M_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_IPV6M_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_EVPN_NODE, &vtysh_quit_bgpd_cmd); + install_element (BGP_IPV6L_NODE, &vtysh_exit_bgpd_cmd); + install_element (BGP_IPV6L_NODE, &vtysh_quit_bgpd_cmd); #if defined (ENABLE_BGP_VNC) install_element (BGP_VRF_POLICY_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_VRF_POLICY_NODE, &vtysh_quit_bgpd_cmd); @@ -3276,12 +3309,14 @@ vtysh_init_vty (void) install_element (BGP_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV4_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV4M_NODE, &vtysh_end_all_cmd); + install_element (BGP_IPV4L_NODE, &vtysh_end_all_cmd); install_element (BGP_VPNV4_NODE, &vtysh_end_all_cmd); install_element (BGP_VPNV6_NODE, &vtysh_end_all_cmd); install_element (BGP_ENCAP_NODE, &vtysh_end_all_cmd); install_element (BGP_ENCAPV6_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV6_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV6M_NODE, &vtysh_end_all_cmd); + install_element (BGP_IPV6L_NODE, &vtysh_end_all_cmd); install_element (BGP_VRF_POLICY_NODE, &vtysh_end_all_cmd); install_element (BGP_EVPN_NODE, &vtysh_end_all_cmd); install_element (BGP_VNC_DEFAULTS_NODE, &vtysh_end_all_cmd); @@ -3337,7 +3372,7 @@ vtysh_init_vty (void) install_element (BGP_NODE, &vnc_nve_group_cmd); install_element (BGP_NODE, &vnc_l2_group_cmd); #endif - install_element (BGP_NODE, &address_family_ipv4_unicast_cmd); + install_element (BGP_NODE, &address_family_ipv4_cmd); install_element (BGP_NODE, &address_family_ipv6_cmd); install_element (BGP_NODE, &address_family_evpn_cmd); install_element (BGP_VPNV4_NODE, &exit_address_family_cmd); @@ -3346,9 +3381,11 @@ vtysh_init_vty (void) install_element (BGP_ENCAPV6_NODE, &exit_address_family_cmd); install_element (BGP_IPV4_NODE, &exit_address_family_cmd); install_element (BGP_IPV4M_NODE, &exit_address_family_cmd); + install_element (BGP_IPV4L_NODE, &exit_address_family_cmd); install_element (BGP_IPV6_NODE, &exit_address_family_cmd); install_element (BGP_IPV6M_NODE, &exit_address_family_cmd); install_element (BGP_EVPN_NODE, &exit_address_family_cmd); + install_element (BGP_IPV6L_NODE, &exit_address_family_cmd); install_element (BGP_VRF_POLICY_NODE, &exit_vrf_policy_cmd); install_element (BGP_VNC_DEFAULTS_NODE, &exit_vnc_config_cmd); |