summaryrefslogtreecommitdiffstats
path: root/isisd/isis_cli.c
diff options
context:
space:
mode:
authorOlivier Dugeon <olivier.dugeon@orange.com>2020-05-20 11:18:31 +0200
committerOlivier Dugeon <olivier.dugeon@orange.com>2020-06-23 16:36:56 +0200
commitd8391312733858591cd13f36f6ba6e5411f34a69 (patch)
treebe6dcc9a136f7a9ee05bf19bc464289b5dd6a07f /isisd/isis_cli.c
parentMerge pull request #6390 from opensourcerouting/bfd-cp-fix (diff)
downloadfrr-d8391312733858591cd13f36f6ba6e5411f34a69.tar.xz
frr-d8391312733858591cd13f36f6ba6e5411f34a69.zip
isisd: Add Segment Routing Local Block support
Segment Routing Local Block (SRLB) is part of RFC8667. This change introduces the possibility for isisd to advertize SRLB in LSP. Base and Range of SRLB could be configured through CLI or Yang. Adjacency-SID are now using this SRLB for label allocation. SRLB could also be used for SID-Binding (e.g. LDP to SR). Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'isisd/isis_cli.c')
-rw-r--r--isisd/isis_cli.c56
1 files changed, 51 insertions, 5 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index c421750a8..df69b1c7b 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -1400,8 +1400,8 @@ DEFPY (isis_sr_global_block_label_range,
"segment-routing global-block (16-1048575)$lower_bound (16-1048575)$upper_bound",
SR_STR
"Segment Routing Global Block label range\n"
- "The lower bound of SRGB (16-1048575)\n"
- "The upper bound of SRGB (16-1048575)\n")
+ "The lower bound of the block\n"
+ "The upper bound of the block (block size may not exceed 65535)\n")
{
nb_cli_enqueue_change(vty, "./segment-routing/srgb/lower-bound",
NB_OP_MODIFY, lower_bound_str);
@@ -1413,12 +1413,12 @@ DEFPY (isis_sr_global_block_label_range,
DEFPY (no_isis_sr_global_block_label_range,
no_isis_sr_global_block_label_range_cmd,
- "no segment-routing global-block [(0-1048575) (0-1048575)]",
+ "no segment-routing global-block [(16-1048575) (16-1048575)]",
NO_STR
SR_STR
"Segment Routing Global Block label range\n"
- "The lower bound of SRGB (16-1048575)\n"
- "The upper bound of SRGB (block size may not exceed 65535)\n")
+ "The lower bound of the block\n"
+ "The upper bound of the block (block size may not exceed 65535)\n")
{
nb_cli_enqueue_change(vty, "./segment-routing/srgb/lower-bound",
NB_OP_MODIFY, NULL);
@@ -1437,6 +1437,50 @@ void cli_show_isis_srgb(struct vty *vty, struct lyd_node *dnode,
}
/*
+ * XPath: /frr-isisd:isis/instance/segment-routing/srlb
+ */
+DEFPY (isis_sr_local_block_label_range,
+ isis_sr_local_block_label_range_cmd,
+ "segment-routing local-block (16-1048575)$lower_bound (16-1048575)$upper_bound",
+ SR_STR
+ "Segment Routing Local Block label range\n"
+ "The lower bound of the block\n"
+ "The upper bound of the block (block size may not exceed 65535)\n")
+{
+ nb_cli_enqueue_change(vty, "./segment-routing/srlb/lower-bound",
+ NB_OP_MODIFY, lower_bound_str);
+ nb_cli_enqueue_change(vty, "./segment-routing/srlb/upper-bound",
+ NB_OP_MODIFY, upper_bound_str);
+
+ return nb_cli_apply_changes(vty, NULL);
+}
+
+DEFPY (no_isis_sr_local_block_label_range,
+ no_isis_sr_local_block_label_range_cmd,
+ "no segment-routing local-block [(16-1048575) (16-1048575)]",
+ NO_STR
+ SR_STR
+ "Segment Routing Local Block label range\n"
+ "The lower bound of the block\n"
+ "The upper bound of the block (block size may not exceed 65535)\n")
+{
+ nb_cli_enqueue_change(vty, "./segment-routing/srlb/lower-bound",
+ NB_OP_MODIFY, NULL);
+ nb_cli_enqueue_change(vty, "./segment-routing/srlb/upper-bound",
+ NB_OP_MODIFY, NULL);
+
+ return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_isis_srlb(struct vty *vty, struct lyd_node *dnode,
+ bool show_defaults)
+{
+ vty_out(vty, " segment-routing local-block %s %s\n",
+ yang_dnode_get_string(dnode, "./lower-bound"),
+ yang_dnode_get_string(dnode, "./upper-bound"));
+}
+
+/*
* XPath: /frr-isisd:isis/instance/segment-routing/msd/node-msd
*/
DEFPY (isis_sr_node_msd,
@@ -2308,6 +2352,8 @@ void isis_cli_init(void)
install_element(ISIS_NODE, &no_isis_sr_enable_cmd);
install_element(ISIS_NODE, &isis_sr_global_block_label_range_cmd);
install_element(ISIS_NODE, &no_isis_sr_global_block_label_range_cmd);
+ install_element(ISIS_NODE, &isis_sr_local_block_label_range_cmd);
+ install_element(ISIS_NODE, &no_isis_sr_local_block_label_range_cmd);
install_element(ISIS_NODE, &isis_sr_node_msd_cmd);
install_element(ISIS_NODE, &no_isis_sr_node_msd_cmd);
install_element(ISIS_NODE, &isis_sr_prefix_sid_cmd);