diff options
| author | lynne <lynne@voltanet.io> | 2020-12-24 13:29:42 -0500 |
|---|---|---|
| committer | lynne <lynne@voltanet.io> | 2021-01-20 09:24:35 -0500 |
| commit | f3abc412a56a9cd3b6efbf16637231d157c73e7d (patch) | |
| tree | 8b4c1435b6f354600290ad64ea56ca24ddc471d2 /isisd/isis_cli.c | |
| parent | 44ba9e779d6165222420904c6cbe7b16c9dc35b7 (diff) | |
isisd: Fix Attach-bit processing
The purpose of the Attach-bit is to accomplish inter-area routing. In other
venders, the Attached-bit is automatically set when a router is configured
as a L1|L2 router and has two adjacencies. When a L1 router receives a LSP
with the Attached-bit set it is supposed to create a default route pointing
toward the neighbor to provide a default path out of the L1 area.
ISIS implementation has been fixed to support the above definition:
Setting the Attach-bit is now the default behavior and we allow the user to
turn it off.
We will only set the Default Attach-bit when creating a L1 LSP, if we are
a L1|L2 router and have a L2 adjacency up.
When a L1 router receives a LSP with the Attach-bit set, we will create a
default route pointing to the L1|L2 router as the nexthop.
The default route will be removed if the LSP is received with the Attach-bit
cleared.
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Diffstat (limited to 'isisd/isis_cli.c')
| -rw-r--r-- | isisd/isis_cli.c | 53 |
1 files changed, 49 insertions, 4 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index 5ca70eab0f..b48da9312f 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -593,6 +593,10 @@ void cli_show_isis_overload(struct vty *vty, struct lyd_node *dnode, vty_out(vty, " set-overload-bit\n"); } +#if CONFDATE > 20220119 +CPP_NOTICE( + "Use of `set-attached-bit` is deprecated please use attached-bit [send | receive]") +#endif /* * XPath: /frr-isisd:isis/instance/attached */ @@ -600,18 +604,57 @@ DEFPY_YANG(set_attached_bit, set_attached_bit_cmd, "[no] set-attached-bit", "Reset attached bit\n" "Set attached bit to identify as L1/L2 router for inter-area traffic\n") { - nb_cli_enqueue_change(vty, "./attached", NB_OP_MODIFY, + vty_out(vty, + "set-attached-bit deprecated please use attached-bit [send | receive]\n"); + + return CMD_SUCCESS; +} + +/* + * XPath: /frr-isisd:isis/instance/attach-send + */ +DEFPY_YANG(attached_bit_send, attached_bit_send_cmd, "[no] attached-bit send", + "Reset attached bit\n" + "Set attached bit for inter-area traffic\n" + "Set attached bit in LSP sent to L1 router\n") +{ + nb_cli_enqueue_change(vty, "./attach-send", NB_OP_MODIFY, no ? "false" : "true"); return nb_cli_apply_changes(vty, NULL); } -void cli_show_isis_attached(struct vty *vty, struct lyd_node *dnode, - bool show_defaults) +void cli_show_isis_attached_send(struct vty *vty, struct lyd_node *dnode, + bool show_defaults) +{ + if (!yang_dnode_get_bool(dnode, NULL)) + vty_out(vty, " no"); + vty_out(vty, " attached-bit send\n"); +} + +/* + * XPath: /frr-isisd:isis/instance/attach-receive-ignore + */ +DEFPY_YANG( + attached_bit_receive_ignore, attached_bit_receive_ignore_cmd, + "[no] attached-bit receive ignore", + "Reset attached bit\n" + "Set attach bit for inter-area traffic\n" + "If LSP received with attached bit set, create default route to neighbor\n" + "Do not process attached bit\n") +{ + nb_cli_enqueue_change(vty, "./attach-receive-ignore", NB_OP_MODIFY, + no ? "false" : "true"); + + return nb_cli_apply_changes(vty, NULL); +} + +void cli_show_isis_attached_receive(struct vty *vty, struct lyd_node *dnode, + bool show_defaults) { if (!yang_dnode_get_bool(dnode, NULL)) vty_out(vty, " no"); - vty_out(vty, " set-attached-bit\n"); + vty_out(vty, " attached-bit receive ignore\n"); } /* @@ -3206,6 +3249,8 @@ void isis_cli_init(void) install_element(ISIS_NODE, &set_overload_bit_cmd); install_element(ISIS_NODE, &set_attached_bit_cmd); + install_element(ISIS_NODE, &attached_bit_send_cmd); + install_element(ISIS_NODE, &attached_bit_receive_ignore_cmd); install_element(ISIS_NODE, &metric_style_cmd); install_element(ISIS_NODE, &no_metric_style_cmd); |
