mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-30 12:01:43 +00:00
*: new cli-nodes for BGP SRv6 VPNv4 (step4)
This commit add just CLI-nodes for MP-BGP VPN configuration with SRv6 backend rather than MPLS. Actual configuration cli will be implemented after this commit. Example Configuration follow. This cli design is based on Cisco IOS-XR but actual cli tree design is defferent between FRR and Cisco. It's just based on cisco. ref: https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k-r6-6/segment-routing/configuration/guide/b-segment-routing-cg-asr9000-66x/b-segment-routing-cg-asr9000-66x_chapter_011.html#concept_hwj_trf_dlb router bgp 1 bgp router-id 1.1.1.1 ! segment-routing srv6 ! new cli-node locator LOC1 ! this cli will be added after this commit. ! ! Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
This commit is contained in:
parent
b83127e156
commit
bfaab44d1e
@ -9858,6 +9858,17 @@ DEFUN_NOSH (address_family_evpn,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN_NOSH (bgp_segment_routing_srv6,
|
||||||
|
bgp_segment_routing_srv6_cmd,
|
||||||
|
"segment-routing srv6",
|
||||||
|
"Segment-Routing configuration\n"
|
||||||
|
"Segment-Routing SRv6 configuration\n")
|
||||||
|
{
|
||||||
|
VTY_DECLVAR_CONTEXT(bgp, bgp);
|
||||||
|
vty->node = BGP_SRV6_NODE;
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN_NOSH (exit_address_family,
|
DEFUN_NOSH (exit_address_family,
|
||||||
exit_address_family_cmd,
|
exit_address_family_cmd,
|
||||||
"exit-address-family",
|
"exit-address-family",
|
||||||
@ -18020,6 +18031,13 @@ static struct cmd_node bgp_flowspecv6_node = {
|
|||||||
.prompt = "%s(config-router-af-vpnv6)# ",
|
.prompt = "%s(config-router-af-vpnv6)# ",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct cmd_node bgp_srv6_node = {
|
||||||
|
.name = "bgp srv6",
|
||||||
|
.node = BGP_SRV6_NODE,
|
||||||
|
.parent_node = BGP_NODE,
|
||||||
|
.prompt = "%s(config-router-srv6)# ",
|
||||||
|
};
|
||||||
|
|
||||||
static void community_list_vty(void);
|
static void community_list_vty(void);
|
||||||
|
|
||||||
static void bgp_ac_neighbor(vector comps, struct cmd_token *token)
|
static void bgp_ac_neighbor(vector comps, struct cmd_token *token)
|
||||||
@ -18094,6 +18112,7 @@ void bgp_vty_init(void)
|
|||||||
install_node(&bgp_evpn_vni_node);
|
install_node(&bgp_evpn_vni_node);
|
||||||
install_node(&bgp_flowspecv4_node);
|
install_node(&bgp_flowspecv4_node);
|
||||||
install_node(&bgp_flowspecv6_node);
|
install_node(&bgp_flowspecv6_node);
|
||||||
|
install_node(&bgp_srv6_node);
|
||||||
|
|
||||||
/* Install default VTY commands to new nodes. */
|
/* Install default VTY commands to new nodes. */
|
||||||
install_default(BGP_NODE);
|
install_default(BGP_NODE);
|
||||||
@ -18109,6 +18128,7 @@ void bgp_vty_init(void)
|
|||||||
install_default(BGP_FLOWSPECV6_NODE);
|
install_default(BGP_FLOWSPECV6_NODE);
|
||||||
install_default(BGP_EVPN_NODE);
|
install_default(BGP_EVPN_NODE);
|
||||||
install_default(BGP_EVPN_VNI_NODE);
|
install_default(BGP_EVPN_VNI_NODE);
|
||||||
|
install_default(BGP_SRV6_NODE);
|
||||||
|
|
||||||
/* "bgp local-mac" hidden commands. */
|
/* "bgp local-mac" hidden commands. */
|
||||||
install_element(CONFIG_NODE, &bgp_local_mac_cmd);
|
install_element(CONFIG_NODE, &bgp_local_mac_cmd);
|
||||||
@ -19437,6 +19457,9 @@ void bgp_vty_init(void)
|
|||||||
/* tcp-mss command */
|
/* tcp-mss command */
|
||||||
install_element(BGP_NODE, &neighbor_tcp_mss_cmd);
|
install_element(BGP_NODE, &neighbor_tcp_mss_cmd);
|
||||||
install_element(BGP_NODE, &no_neighbor_tcp_mss_cmd);
|
install_element(BGP_NODE, &no_neighbor_tcp_mss_cmd);
|
||||||
|
|
||||||
|
/* srv6 commands */
|
||||||
|
install_element(BGP_NODE, &bgp_segment_routing_srv6_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
@ -120,6 +120,7 @@ enum node_type {
|
|||||||
BGP_VNC_L2_GROUP_NODE, /* BGP VNC L2 group */
|
BGP_VNC_L2_GROUP_NODE, /* BGP VNC L2 group */
|
||||||
RFP_DEFAULTS_NODE, /* RFP defaults node */
|
RFP_DEFAULTS_NODE, /* RFP defaults node */
|
||||||
BGP_EVPN_NODE, /* BGP EVPN node. */
|
BGP_EVPN_NODE, /* BGP EVPN node. */
|
||||||
|
BGP_SRV6_NODE, /* BGP SRv6 node. */
|
||||||
OSPF_NODE, /* OSPF protocol mode */
|
OSPF_NODE, /* OSPF protocol mode */
|
||||||
OSPF6_NODE, /* OSPF protocol for IPv6 mode */
|
OSPF6_NODE, /* OSPF protocol for IPv6 mode */
|
||||||
LDP_NODE, /* LDP protocol mode */
|
LDP_NODE, /* LDP protocol mode */
|
||||||
|
@ -1507,6 +1507,13 @@ static struct cmd_node bmp_node = {
|
|||||||
.parent_node = BGP_NODE,
|
.parent_node = BGP_NODE,
|
||||||
.prompt = "%s(config-bgp-bmp)# "
|
.prompt = "%s(config-bgp-bmp)# "
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct cmd_node bgp_srv6_node = {
|
||||||
|
.name = "bgp srv6",
|
||||||
|
.node = BGP_SRV6_NODE,
|
||||||
|
.parent_node = BGP_NODE,
|
||||||
|
.prompt = "%s(config-router-srv6)# ",
|
||||||
|
};
|
||||||
#endif /* HAVE_BGPD */
|
#endif /* HAVE_BGPD */
|
||||||
|
|
||||||
#ifdef HAVE_OSPFD
|
#ifdef HAVE_OSPFD
|
||||||
@ -1862,6 +1869,39 @@ DEFUNSH(VTYSH_BGPD,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUNSH(VTYSH_BGPD,
|
||||||
|
bgp_srv6,
|
||||||
|
bgp_srv6_cmd,
|
||||||
|
"segment-routing srv6",
|
||||||
|
"Segment-Routing configuration\n"
|
||||||
|
"Segment-Routing SRv6 configuration\n")
|
||||||
|
{
|
||||||
|
vty->node = BGP_SRV6_NODE;
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUNSH(VTYSH_BGPD,
|
||||||
|
exit_bgp_srv6,
|
||||||
|
exit_bgp_srv6_cmd,
|
||||||
|
"exit",
|
||||||
|
"exit Segment-Routing SRv6 configuration\n")
|
||||||
|
{
|
||||||
|
if (vty->node == BGP_SRV6_NODE)
|
||||||
|
vty->node = BGP_NODE;
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUNSH(VTYSH_BGPD,
|
||||||
|
quit_bgp_srv6,
|
||||||
|
quit_bgp_srv6_cmd,
|
||||||
|
"quit",
|
||||||
|
"quit Segment-Routing SRv6 configuration\n")
|
||||||
|
{
|
||||||
|
if (vty->node == BGP_SRV6_NODE)
|
||||||
|
vty->node = BGP_NODE;
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
DEFUNSH(VTYSH_BGPD, address_family_evpn, address_family_evpn_cmd,
|
DEFUNSH(VTYSH_BGPD, address_family_evpn, address_family_evpn_cmd,
|
||||||
"address-family <l2vpn evpn>",
|
"address-family <l2vpn evpn>",
|
||||||
"Enter Address Family command mode\n"
|
"Enter Address Family command mode\n"
|
||||||
@ -4201,6 +4241,12 @@ void vtysh_init_vty(void)
|
|||||||
install_element(BMP_NODE, &bmp_exit_cmd);
|
install_element(BMP_NODE, &bmp_exit_cmd);
|
||||||
install_element(BMP_NODE, &bmp_quit_cmd);
|
install_element(BMP_NODE, &bmp_quit_cmd);
|
||||||
install_element(BMP_NODE, &vtysh_end_all_cmd);
|
install_element(BMP_NODE, &vtysh_end_all_cmd);
|
||||||
|
|
||||||
|
install_node(&bgp_srv6_node);
|
||||||
|
install_element(BGP_NODE, &bgp_srv6_cmd);
|
||||||
|
install_element(BGP_SRV6_NODE, &exit_bgp_srv6_cmd);
|
||||||
|
install_element(BGP_SRV6_NODE, &quit_bgp_srv6_cmd);
|
||||||
|
install_element(BGP_SRV6_NODE, &vtysh_end_all_cmd);
|
||||||
#endif /* HAVE_BGPD */
|
#endif /* HAVE_BGPD */
|
||||||
|
|
||||||
/* ripd */
|
/* ripd */
|
||||||
|
Loading…
Reference in New Issue
Block a user