2 * IS-IS Rout(e)ing protocol - isisd.c
4 * Copyright (C) 2001,2002 Sampo Saaristo
5 * Tampere University of Technology
6 * Institute of Communications Engineering
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public Licenseas published by the Free
10 * Software Foundation; either version 2 of the License, or (at your option)
13 * This program is distributed in the hope that it will be useful,but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38 #include "spf_backoff.h"
40 #include "isisd/dict.h"
41 #include "isisd/isis_constants.h"
42 #include "isisd/isis_common.h"
43 #include "isisd/isis_flags.h"
44 #include "isisd/isis_circuit.h"
45 #include "isisd/isis_csm.h"
46 #include "isisd/isisd.h"
47 #include "isisd/isis_dynhn.h"
48 #include "isisd/isis_adjacency.h"
49 #include "isisd/isis_pdu.h"
50 #include "isisd/isis_misc.h"
51 #include "isisd/isis_constants.h"
52 #include "isisd/isis_tlv.h"
53 #include "isisd/isis_lsp.h"
54 #include "isisd/isis_spf.h"
55 #include "isisd/isis_route.h"
56 #include "isisd/isis_zebra.h"
57 #include "isisd/isis_events.h"
58 #include "isisd/isis_te.h"
60 struct isis
*isis
= NULL
;
62 DEFINE_QOBJ_TYPE(isis
)
63 DEFINE_QOBJ_TYPE(isis_area
)
68 int isis_area_get(struct vty
*, const char *);
69 int isis_area_destroy(struct vty
*, const char *);
70 int area_net_title(struct vty
*, const char *);
71 int area_clear_net_title(struct vty
*, const char *);
72 int show_isis_interface_common(struct vty
*, const char *ifname
, char);
73 int show_isis_neighbor_common(struct vty
*, const char *id
, char);
74 int clear_isis_neighbor_common(struct vty
*, const char *id
);
75 int isis_config_write(struct vty
*);
80 isis_new (unsigned long process_id
)
82 isis
= XCALLOC (MTYPE_ISIS
, sizeof (struct isis
));
86 isis
->max_area_addrs
= 3;
87 isis
->process_id
= process_id
;
89 isis
->area_list
= list_new ();
90 isis
->init_circ_list
= list_new ();
91 isis
->uptime
= time (NULL
);
92 isis
->nexthops
= list_new ();
93 isis
->nexthops6
= list_new ();
96 * uncomment the next line for full debugs
98 /* isis->debugs = 0xFFFF; */
99 isisMplsTE
.status
= disable
; /* Only support TE metric */
100 QOBJ_REG (isis
, isis
);
104 isis_area_create (const char *area_tag
)
106 struct isis_area
*area
;
108 area
= XCALLOC (MTYPE_ISIS_AREA
, sizeof (struct isis_area
));
111 * The first instance is level-1-2 rest are level-1, unless otherwise
114 if (listcount (isis
->area_list
) > 0)
115 area
->is_type
= IS_LEVEL_1
;
117 area
->is_type
= IS_LEVEL_1_AND_2
;
120 * intialize the databases
122 if (area
->is_type
& IS_LEVEL_1
)
124 area
->lspdb
[0] = lsp_db_init ();
125 area
->route_table
[0] = route_table_init ();
126 area
->route_table6
[0] = route_table_init ();
128 if (area
->is_type
& IS_LEVEL_2
)
130 area
->lspdb
[1] = lsp_db_init ();
131 area
->route_table
[1] = route_table_init ();
132 area
->route_table6
[1] = route_table_init ();
135 spftree_area_init (area
);
137 area
->circuit_list
= list_new ();
138 area
->area_addrs
= list_new ();
139 THREAD_TIMER_ON (master
, area
->t_tick
, lsp_tick
, area
, 1);
140 flags_initialize (&area
->flags
);
145 area
->max_lsp_lifetime
[0] = DEFAULT_LSP_LIFETIME
; /* 1200 */
146 area
->max_lsp_lifetime
[1] = DEFAULT_LSP_LIFETIME
; /* 1200 */
147 area
->lsp_refresh
[0] = DEFAULT_MAX_LSP_GEN_INTERVAL
; /* 900 */
148 area
->lsp_refresh
[1] = DEFAULT_MAX_LSP_GEN_INTERVAL
; /* 900 */
149 area
->lsp_gen_interval
[0] = DEFAULT_MIN_LSP_GEN_INTERVAL
;
150 area
->lsp_gen_interval
[1] = DEFAULT_MIN_LSP_GEN_INTERVAL
;
151 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
152 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
153 area
->dynhostname
= 1;
156 area
->lsp_frag_threshold
= 90;
157 area
->lsp_mtu
= DEFAULT_LSP_MTU
;
159 area
->area_tag
= strdup (area_tag
);
160 listnode_add (isis
->area_list
, area
);
163 QOBJ_REG (area
, isis_area
);
169 isis_area_lookup (const char *area_tag
)
171 struct isis_area
*area
;
172 struct listnode
*node
;
174 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
175 if ((area
->area_tag
== NULL
&& area_tag
== NULL
) ||
176 (area
->area_tag
&& area_tag
177 && strcmp (area
->area_tag
, area_tag
) == 0))
184 isis_area_get (struct vty
*vty
, const char *area_tag
)
186 struct isis_area
*area
;
188 area
= isis_area_lookup (area_tag
);
192 VTY_PUSH_CONTEXT (ISIS_NODE
, area
);
196 area
= isis_area_create (area_tag
);
198 if (isis
->debugs
& DEBUG_EVENTS
)
199 zlog_debug ("New IS-IS area instance %s", area
->area_tag
);
201 VTY_PUSH_CONTEXT (ISIS_NODE
, area
);
207 isis_area_destroy (struct vty
*vty
, const char *area_tag
)
209 struct isis_area
*area
;
210 struct listnode
*node
, *nnode
;
211 struct isis_circuit
*circuit
;
212 struct area_addr
*addr
;
214 area
= isis_area_lookup (area_tag
);
218 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
219 return CMD_ERR_NO_MATCH
;
224 if (area
->circuit_list
)
226 for (ALL_LIST_ELEMENTS (area
->circuit_list
, node
, nnode
, circuit
))
228 circuit
->ip_router
= 0;
229 circuit
->ipv6_router
= 0;
230 isis_csm_state_change (ISIS_DISABLE
, circuit
, area
);
232 list_delete (area
->circuit_list
);
233 area
->circuit_list
= NULL
;
236 if (area
->lspdb
[0] != NULL
)
238 lsp_db_destroy (area
->lspdb
[0]);
239 area
->lspdb
[0] = NULL
;
241 if (area
->lspdb
[1] != NULL
)
243 lsp_db_destroy (area
->lspdb
[1]);
244 area
->lspdb
[1] = NULL
;
247 spftree_area_del (area
);
249 THREAD_TIMER_OFF(area
->spf_timer
[0]);
250 THREAD_TIMER_OFF(area
->spf_timer
[1]);
252 spf_backoff_free(area
->spf_delay_ietf
[0]);
253 spf_backoff_free(area
->spf_delay_ietf
[1]);
255 /* invalidate and validate would delete all routes from zebra */
256 isis_route_invalidate (area
);
257 isis_route_validate (area
);
259 if (area
->route_table
[0])
261 route_table_finish (area
->route_table
[0]);
262 area
->route_table
[0] = NULL
;
264 if (area
->route_table
[1])
266 route_table_finish (area
->route_table
[1]);
267 area
->route_table
[1] = NULL
;
269 if (area
->route_table6
[0])
271 route_table_finish (area
->route_table6
[0]);
272 area
->route_table6
[0] = NULL
;
274 if (area
->route_table6
[1])
276 route_table_finish (area
->route_table6
[1]);
277 area
->route_table6
[1] = NULL
;
280 isis_redist_area_finish(area
);
282 for (ALL_LIST_ELEMENTS (area
->area_addrs
, node
, nnode
, addr
))
284 list_delete_node (area
->area_addrs
, node
);
285 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
287 area
->area_addrs
= NULL
;
289 THREAD_TIMER_OFF (area
->t_tick
);
290 THREAD_TIMER_OFF (area
->t_lsp_refresh
[0]);
291 THREAD_TIMER_OFF (area
->t_lsp_refresh
[1]);
293 thread_cancel_event (master
, area
);
295 listnode_delete (isis
->area_list
, area
);
297 free (area
->area_tag
);
299 XFREE (MTYPE_ISIS_AREA
, area
);
301 if (listcount (isis
->area_list
) == 0)
303 memset (isis
->sysid
, 0, ISIS_SYS_ID_LEN
);
311 area_net_title (struct vty
*vty
, const char *net_title
)
313 VTY_DECLVAR_CONTEXT (isis_area
, area
);
314 struct area_addr
*addr
;
315 struct area_addr
*addrp
;
316 struct listnode
*node
;
320 /* We check that we are not over the maximal number of addresses */
321 if (listcount (area
->area_addrs
) >= isis
->max_area_addrs
)
323 vty_out (vty
, "Maximum of area addresses (%d) already reached %s",
324 isis
->max_area_addrs
, VTY_NEWLINE
);
325 return CMD_ERR_NOTHING_TODO
;
328 addr
= XMALLOC (MTYPE_ISIS_AREA_ADDR
, sizeof (struct area_addr
));
329 addr
->addr_len
= dotformat2buff (buff
, net_title
);
330 memcpy (addr
->area_addr
, buff
, addr
->addr_len
);
332 zlog_debug ("added area address %s for area %s (address length %d)",
333 net_title
, area
->area_tag
, addr
->addr_len
);
334 #endif /* EXTREME_DEBUG */
335 if (addr
->addr_len
< 8 || addr
->addr_len
> 20)
337 vty_out (vty
, "area address must be at least 8..20 octets long (%d)%s",
338 addr
->addr_len
, VTY_NEWLINE
);
339 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
340 return CMD_ERR_AMBIGUOUS
;
343 if (addr
->area_addr
[addr
->addr_len
-1] != 0)
345 vty_out (vty
, "nsel byte (last byte) in area address must be 0%s",
347 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
348 return CMD_ERR_AMBIGUOUS
;
351 if (isis
->sysid_set
== 0)
354 * First area address - get the SystemID for this router
356 memcpy (isis
->sysid
, GETSYSID (addr
), ISIS_SYS_ID_LEN
);
358 if (isis
->debugs
& DEBUG_EVENTS
)
359 zlog_debug ("Router has SystemID %s", sysid_print (isis
->sysid
));
364 * Check that the SystemID portions match
366 if (memcmp (isis
->sysid
, GETSYSID (addr
), ISIS_SYS_ID_LEN
))
369 "System ID must not change when defining additional area"
370 " addresses%s", VTY_NEWLINE
);
371 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
372 return CMD_ERR_AMBIGUOUS
;
375 /* now we see that we don't already have this address */
376 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node
, addrp
))
378 if ((addrp
->addr_len
+ ISIS_SYS_ID_LEN
+ ISIS_NSEL_LEN
) != (addr
->addr_len
))
380 if (!memcmp (addrp
->area_addr
, addr
->area_addr
, addr
->addr_len
))
382 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
383 return CMD_SUCCESS
; /* silent fail */
389 * Forget the systemID part of the address
391 addr
->addr_len
-= (ISIS_SYS_ID_LEN
+ ISIS_NSEL_LEN
);
392 listnode_add (area
->area_addrs
, addr
);
394 /* only now we can safely generate our LSPs for this area */
395 if (listcount (area
->area_addrs
) > 0)
397 if (area
->is_type
& IS_LEVEL_1
)
398 lsp_generate (area
, IS_LEVEL_1
);
399 if (area
->is_type
& IS_LEVEL_2
)
400 lsp_generate (area
, IS_LEVEL_2
);
407 area_clear_net_title (struct vty
*vty
, const char *net_title
)
409 VTY_DECLVAR_CONTEXT (isis_area
, area
);
410 struct area_addr addr
, *addrp
= NULL
;
411 struct listnode
*node
;
414 addr
.addr_len
= dotformat2buff (buff
, net_title
);
415 if (addr
.addr_len
< 8 || addr
.addr_len
> 20)
417 vty_out (vty
, "Unsupported area address length %d, should be 8...20 %s",
418 addr
.addr_len
, VTY_NEWLINE
);
419 return CMD_ERR_AMBIGUOUS
;
422 memcpy (addr
.area_addr
, buff
, (int) addr
.addr_len
);
424 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node
, addrp
))
425 if ((addrp
->addr_len
+ ISIS_SYS_ID_LEN
+ 1) == addr
.addr_len
&&
426 !memcmp (addrp
->area_addr
, addr
.area_addr
, addr
.addr_len
))
431 vty_out (vty
, "No area address %s for area %s %s", net_title
,
432 area
->area_tag
, VTY_NEWLINE
);
433 return CMD_ERR_NO_MATCH
;
436 listnode_delete (area
->area_addrs
, addrp
);
437 XFREE (MTYPE_ISIS_AREA_ADDR
, addrp
);
440 * Last area address - reset the SystemID for this router
442 if (listcount (area
->area_addrs
) == 0)
444 memset (isis
->sysid
, 0, ISIS_SYS_ID_LEN
);
446 if (isis
->debugs
& DEBUG_EVENTS
)
447 zlog_debug ("Router has no SystemID");
454 * 'show isis interface' command
458 show_isis_interface_common (struct vty
*vty
, const char *ifname
, char detail
)
460 struct listnode
*anode
, *cnode
;
461 struct isis_area
*area
;
462 struct isis_circuit
*circuit
;
466 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
470 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
472 vty_out (vty
, "Area %s:%s", area
->area_tag
, VTY_NEWLINE
);
474 if (detail
== ISIS_UI_LEVEL_BRIEF
)
475 vty_out (vty
, " Interface CircId State Type Level%s",
478 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, cnode
, circuit
))
480 isis_circuit_print_vty (circuit
, vty
, detail
);
481 else if (strcmp(circuit
->interface
->name
, ifname
) == 0)
482 isis_circuit_print_vty (circuit
, vty
, detail
);
488 DEFUN (show_isis_interface
,
489 show_isis_interface_cmd
,
490 "show isis interface",
492 "ISIS network information\n"
495 return show_isis_interface_common (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
498 DEFUN (show_isis_interface_detail
,
499 show_isis_interface_detail_cmd
,
500 "show isis interface detail",
502 "ISIS network information\n"
504 "show detailed information\n")
506 return show_isis_interface_common (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
509 DEFUN (show_isis_interface_arg
,
510 show_isis_interface_arg_cmd
,
511 "show isis interface WORD",
513 "ISIS network information\n"
515 "ISIS interface name\n")
518 return show_isis_interface_common (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_DETAIL
);
522 * 'show isis neighbor' command
526 show_isis_neighbor_common (struct vty
*vty
, const char *id
, char detail
)
528 struct listnode
*anode
, *cnode
, *node
;
529 struct isis_area
*area
;
530 struct isis_circuit
*circuit
;
532 struct isis_adjacency
*adj
;
533 struct isis_dynhn
*dynhn
;
534 u_char sysid
[ISIS_SYS_ID_LEN
];
539 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
543 memset (sysid
, 0, ISIS_SYS_ID_LEN
);
546 if (sysid2buff (sysid
, id
) == 0)
548 dynhn
= dynhn_find_by_name (id
);
551 vty_out (vty
, "Invalid system id %s%s", id
, VTY_NEWLINE
);
554 memcpy (sysid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
558 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
560 vty_out (vty
, "Area %s:%s", area
->area_tag
, VTY_NEWLINE
);
562 if (detail
== ISIS_UI_LEVEL_BRIEF
)
563 vty_out (vty
, " System Id Interface L State"
564 " Holdtime SNPA%s", VTY_NEWLINE
);
566 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, cnode
, circuit
))
568 if (circuit
->circ_type
== CIRCUIT_T_BROADCAST
)
570 for (i
= 0; i
< 2; i
++)
572 adjdb
= circuit
->u
.bc
.adjdb
[i
];
573 if (adjdb
&& adjdb
->count
)
575 for (ALL_LIST_ELEMENTS_RO (adjdb
, node
, adj
))
576 if (!id
|| !memcmp (adj
->sysid
, sysid
,
578 isis_adj_print_vty (adj
, vty
, detail
);
582 else if (circuit
->circ_type
== CIRCUIT_T_P2P
&&
583 circuit
->u
.p2p
.neighbor
)
585 adj
= circuit
->u
.p2p
.neighbor
;
586 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
587 isis_adj_print_vty (adj
, vty
, detail
);
596 * 'clear isis neighbor' command
599 clear_isis_neighbor_common (struct vty
*vty
, const char *id
)
601 struct listnode
*anode
, *cnode
, *cnextnode
, *node
, *nnode
;
602 struct isis_area
*area
;
603 struct isis_circuit
*circuit
;
605 struct isis_adjacency
*adj
;
606 struct isis_dynhn
*dynhn
;
607 u_char sysid
[ISIS_SYS_ID_LEN
];
612 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
616 memset (sysid
, 0, ISIS_SYS_ID_LEN
);
619 if (sysid2buff (sysid
, id
) == 0)
621 dynhn
= dynhn_find_by_name (id
);
624 vty_out (vty
, "Invalid system id %s%s", id
, VTY_NEWLINE
);
627 memcpy (sysid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
631 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
633 for (ALL_LIST_ELEMENTS (area
->circuit_list
, cnode
, cnextnode
, circuit
))
635 if (circuit
->circ_type
== CIRCUIT_T_BROADCAST
)
637 for (i
= 0; i
< 2; i
++)
639 adjdb
= circuit
->u
.bc
.adjdb
[i
];
640 if (adjdb
&& adjdb
->count
)
642 for (ALL_LIST_ELEMENTS (adjdb
, node
, nnode
, adj
))
643 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
644 isis_adj_state_change (adj
, ISIS_ADJ_DOWN
,
645 "clear user request");
649 else if (circuit
->circ_type
== CIRCUIT_T_P2P
&&
650 circuit
->u
.p2p
.neighbor
)
652 adj
= circuit
->u
.p2p
.neighbor
;
653 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
654 isis_adj_state_change (adj
, ISIS_ADJ_DOWN
,
655 "clear user request");
663 DEFUN (show_isis_neighbor
,
664 show_isis_neighbor_cmd
,
665 "show isis neighbor",
667 "ISIS network information\n"
668 "ISIS neighbor adjacencies\n")
670 return show_isis_neighbor_common (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
673 DEFUN (show_isis_neighbor_detail
,
674 show_isis_neighbor_detail_cmd
,
675 "show isis neighbor detail",
677 "ISIS network information\n"
678 "ISIS neighbor adjacencies\n"
679 "show detailed information\n")
681 return show_isis_neighbor_common (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
684 DEFUN (show_isis_neighbor_arg
,
685 show_isis_neighbor_arg_cmd
,
686 "show isis neighbor WORD",
688 "ISIS network information\n"
689 "ISIS neighbor adjacencies\n"
693 return show_isis_neighbor_common (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_DETAIL
);
696 DEFUN (clear_isis_neighbor
,
697 clear_isis_neighbor_cmd
,
698 "clear isis neighbor",
700 "Reset ISIS network information\n"
701 "Reset ISIS neighbor adjacencies\n")
703 return clear_isis_neighbor_common (vty
, NULL
);
706 DEFUN (clear_isis_neighbor_arg
,
707 clear_isis_neighbor_arg_cmd
,
708 "clear isis neighbor WORD",
710 "ISIS network information\n"
711 "ISIS neighbor adjacencies\n"
715 return clear_isis_neighbor_common (vty
, argv
[idx_word
]->arg
);
719 * 'isis debug', 'show debugging'
722 print_debug (struct vty
*vty
, int flags
, int onoff
)
726 strcpy (onoffs
, "on");
728 strcpy (onoffs
, "off");
730 if (flags
& DEBUG_ADJ_PACKETS
)
731 vty_out (vty
, "IS-IS Adjacency related packets debugging is %s%s", onoffs
,
733 if (flags
& DEBUG_CHECKSUM_ERRORS
)
734 vty_out (vty
, "IS-IS checksum errors debugging is %s%s", onoffs
,
736 if (flags
& DEBUG_LOCAL_UPDATES
)
737 vty_out (vty
, "IS-IS local updates debugging is %s%s", onoffs
,
739 if (flags
& DEBUG_PROTOCOL_ERRORS
)
740 vty_out (vty
, "IS-IS protocol errors debugging is %s%s", onoffs
,
742 if (flags
& DEBUG_SNP_PACKETS
)
743 vty_out (vty
, "IS-IS CSNP/PSNP packets debugging is %s%s", onoffs
,
745 if (flags
& DEBUG_SPF_EVENTS
)
746 vty_out (vty
, "IS-IS SPF events debugging is %s%s", onoffs
, VTY_NEWLINE
);
747 if (flags
& DEBUG_SPF_STATS
)
748 vty_out (vty
, "IS-IS SPF Timing and Statistics Data debugging is %s%s",
749 onoffs
, VTY_NEWLINE
);
750 if (flags
& DEBUG_SPF_TRIGGERS
)
751 vty_out (vty
, "IS-IS SPF triggering events debugging is %s%s", onoffs
,
753 if (flags
& DEBUG_UPDATE_PACKETS
)
754 vty_out (vty
, "IS-IS Update related packet debugging is %s%s", onoffs
,
756 if (flags
& DEBUG_RTE_EVENTS
)
757 vty_out (vty
, "IS-IS Route related debuggin is %s%s", onoffs
,
759 if (flags
& DEBUG_EVENTS
)
760 vty_out (vty
, "IS-IS Event debugging is %s%s", onoffs
, VTY_NEWLINE
);
761 if (flags
& DEBUG_PACKET_DUMP
)
762 vty_out (vty
, "IS-IS Packet dump debugging is %s%s", onoffs
, VTY_NEWLINE
);
763 if (flags
& DEBUG_LSP_GEN
)
764 vty_out (vty
, "IS-IS LSP generation debugging is %s%s", onoffs
, VTY_NEWLINE
);
765 if (flags
& DEBUG_LSP_SCHED
)
766 vty_out (vty
, "IS-IS LSP scheduling debugging is %s%s", onoffs
, VTY_NEWLINE
);
769 DEFUN (show_debugging
,
770 show_debugging_isis_cmd
,
771 "show debugging isis",
773 "State of each debugging option\n"
777 vty_out (vty
, "IS-IS:%s", VTY_NEWLINE
);
778 print_debug (vty
, isis
->debugs
, 1);
784 static struct cmd_node debug_node
= {
791 config_write_debug (struct vty
*vty
)
794 int flags
= isis
->debugs
;
796 if (flags
& DEBUG_ADJ_PACKETS
)
798 vty_out (vty
, "debug isis adj-packets%s", VTY_NEWLINE
);
801 if (flags
& DEBUG_CHECKSUM_ERRORS
)
803 vty_out (vty
, "debug isis checksum-errors%s", VTY_NEWLINE
);
806 if (flags
& DEBUG_LOCAL_UPDATES
)
808 vty_out (vty
, "debug isis local-updates%s", VTY_NEWLINE
);
811 if (flags
& DEBUG_PROTOCOL_ERRORS
)
813 vty_out (vty
, "debug isis protocol-errors%s", VTY_NEWLINE
);
816 if (flags
& DEBUG_SNP_PACKETS
)
818 vty_out (vty
, "debug isis snp-packets%s", VTY_NEWLINE
);
821 if (flags
& DEBUG_SPF_EVENTS
)
823 vty_out (vty
, "debug isis spf-events%s", VTY_NEWLINE
);
826 if (flags
& DEBUG_SPF_STATS
)
828 vty_out (vty
, "debug isis spf-statistics%s", VTY_NEWLINE
);
831 if (flags
& DEBUG_SPF_TRIGGERS
)
833 vty_out (vty
, "debug isis spf-triggers%s", VTY_NEWLINE
);
836 if (flags
& DEBUG_UPDATE_PACKETS
)
838 vty_out (vty
, "debug isis update-packets%s", VTY_NEWLINE
);
841 if (flags
& DEBUG_RTE_EVENTS
)
843 vty_out (vty
, "debug isis route-events%s", VTY_NEWLINE
);
846 if (flags
& DEBUG_EVENTS
)
848 vty_out (vty
, "debug isis events%s", VTY_NEWLINE
);
851 if (flags
& DEBUG_PACKET_DUMP
)
853 vty_out (vty
, "debug isis packet-dump%s", VTY_NEWLINE
);
856 if (flags
& DEBUG_LSP_GEN
)
858 vty_out (vty
, "debug isis lsp-gen%s", VTY_NEWLINE
);
861 if (flags
& DEBUG_LSP_SCHED
)
863 vty_out (vty
, "debug isis lsp-sched%s", VTY_NEWLINE
);
866 write
+= spf_backoff_write_config(vty
);
871 DEFUN (debug_isis_adj
,
873 "debug isis adj-packets",
875 "IS-IS information\n"
876 "IS-IS Adjacency related packets\n")
878 isis
->debugs
|= DEBUG_ADJ_PACKETS
;
879 print_debug (vty
, DEBUG_ADJ_PACKETS
, 1);
884 DEFUN (no_debug_isis_adj
,
885 no_debug_isis_adj_cmd
,
886 "no debug isis adj-packets",
889 "IS-IS information\n"
890 "IS-IS Adjacency related packets\n")
892 isis
->debugs
&= ~DEBUG_ADJ_PACKETS
;
893 print_debug (vty
, DEBUG_ADJ_PACKETS
, 0);
898 DEFUN (debug_isis_csum
,
900 "debug isis checksum-errors",
902 "IS-IS information\n"
903 "IS-IS LSP checksum errors\n")
905 isis
->debugs
|= DEBUG_CHECKSUM_ERRORS
;
906 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 1);
911 DEFUN (no_debug_isis_csum
,
912 no_debug_isis_csum_cmd
,
913 "no debug isis checksum-errors",
916 "IS-IS information\n"
917 "IS-IS LSP checksum errors\n")
919 isis
->debugs
&= ~DEBUG_CHECKSUM_ERRORS
;
920 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 0);
925 DEFUN (debug_isis_lupd
,
927 "debug isis local-updates",
929 "IS-IS information\n"
930 "IS-IS local update packets\n")
932 isis
->debugs
|= DEBUG_LOCAL_UPDATES
;
933 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 1);
938 DEFUN (no_debug_isis_lupd
,
939 no_debug_isis_lupd_cmd
,
940 "no debug isis local-updates",
943 "IS-IS information\n"
944 "IS-IS local update packets\n")
946 isis
->debugs
&= ~DEBUG_LOCAL_UPDATES
;
947 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 0);
952 DEFUN (debug_isis_err
,
954 "debug isis protocol-errors",
956 "IS-IS information\n"
957 "IS-IS LSP protocol errors\n")
959 isis
->debugs
|= DEBUG_PROTOCOL_ERRORS
;
960 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 1);
965 DEFUN (no_debug_isis_err
,
966 no_debug_isis_err_cmd
,
967 "no debug isis protocol-errors",
970 "IS-IS information\n"
971 "IS-IS LSP protocol errors\n")
973 isis
->debugs
&= ~DEBUG_PROTOCOL_ERRORS
;
974 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 0);
979 DEFUN (debug_isis_snp
,
981 "debug isis snp-packets",
983 "IS-IS information\n"
984 "IS-IS CSNP/PSNP packets\n")
986 isis
->debugs
|= DEBUG_SNP_PACKETS
;
987 print_debug (vty
, DEBUG_SNP_PACKETS
, 1);
992 DEFUN (no_debug_isis_snp
,
993 no_debug_isis_snp_cmd
,
994 "no debug isis snp-packets",
997 "IS-IS information\n"
998 "IS-IS CSNP/PSNP packets\n")
1000 isis
->debugs
&= ~DEBUG_SNP_PACKETS
;
1001 print_debug (vty
, DEBUG_SNP_PACKETS
, 0);
1006 DEFUN (debug_isis_upd
,
1008 "debug isis update-packets",
1010 "IS-IS information\n"
1011 "IS-IS Update related packets\n")
1013 isis
->debugs
|= DEBUG_UPDATE_PACKETS
;
1014 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 1);
1019 DEFUN (no_debug_isis_upd
,
1020 no_debug_isis_upd_cmd
,
1021 "no debug isis update-packets",
1024 "IS-IS information\n"
1025 "IS-IS Update related packets\n")
1027 isis
->debugs
&= ~DEBUG_UPDATE_PACKETS
;
1028 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 0);
1033 DEFUN (debug_isis_spfevents
,
1034 debug_isis_spfevents_cmd
,
1035 "debug isis spf-events",
1037 "IS-IS information\n"
1038 "IS-IS Shortest Path First Events\n")
1040 isis
->debugs
|= DEBUG_SPF_EVENTS
;
1041 print_debug (vty
, DEBUG_SPF_EVENTS
, 1);
1046 DEFUN (no_debug_isis_spfevents
,
1047 no_debug_isis_spfevents_cmd
,
1048 "no debug isis spf-events",
1051 "IS-IS information\n"
1052 "IS-IS Shortest Path First Events\n")
1054 isis
->debugs
&= ~DEBUG_SPF_EVENTS
;
1055 print_debug (vty
, DEBUG_SPF_EVENTS
, 0);
1060 DEFUN (debug_isis_spfstats
,
1061 debug_isis_spfstats_cmd
,
1062 "debug isis spf-statistics ",
1064 "IS-IS information\n"
1065 "IS-IS SPF Timing and Statistic Data\n")
1067 isis
->debugs
|= DEBUG_SPF_STATS
;
1068 print_debug (vty
, DEBUG_SPF_STATS
, 1);
1073 DEFUN (no_debug_isis_spfstats
,
1074 no_debug_isis_spfstats_cmd
,
1075 "no debug isis spf-statistics",
1078 "IS-IS information\n"
1079 "IS-IS SPF Timing and Statistic Data\n")
1081 isis
->debugs
&= ~DEBUG_SPF_STATS
;
1082 print_debug (vty
, DEBUG_SPF_STATS
, 0);
1087 DEFUN (debug_isis_spftrigg
,
1088 debug_isis_spftrigg_cmd
,
1089 "debug isis spf-triggers",
1091 "IS-IS information\n"
1092 "IS-IS SPF triggering events\n")
1094 isis
->debugs
|= DEBUG_SPF_TRIGGERS
;
1095 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 1);
1100 DEFUN (no_debug_isis_spftrigg
,
1101 no_debug_isis_spftrigg_cmd
,
1102 "no debug isis spf-triggers",
1105 "IS-IS information\n"
1106 "IS-IS SPF triggering events\n")
1108 isis
->debugs
&= ~DEBUG_SPF_TRIGGERS
;
1109 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 0);
1114 DEFUN (debug_isis_rtevents
,
1115 debug_isis_rtevents_cmd
,
1116 "debug isis route-events",
1118 "IS-IS information\n"
1119 "IS-IS Route related events\n")
1121 isis
->debugs
|= DEBUG_RTE_EVENTS
;
1122 print_debug (vty
, DEBUG_RTE_EVENTS
, 1);
1127 DEFUN (no_debug_isis_rtevents
,
1128 no_debug_isis_rtevents_cmd
,
1129 "no debug isis route-events",
1132 "IS-IS information\n"
1133 "IS-IS Route related events\n")
1135 isis
->debugs
&= ~DEBUG_RTE_EVENTS
;
1136 print_debug (vty
, DEBUG_RTE_EVENTS
, 0);
1141 DEFUN (debug_isis_events
,
1142 debug_isis_events_cmd
,
1143 "debug isis events",
1145 "IS-IS information\n"
1148 isis
->debugs
|= DEBUG_EVENTS
;
1149 print_debug (vty
, DEBUG_EVENTS
, 1);
1154 DEFUN (no_debug_isis_events
,
1155 no_debug_isis_events_cmd
,
1156 "no debug isis events",
1159 "IS-IS information\n"
1162 isis
->debugs
&= ~DEBUG_EVENTS
;
1163 print_debug (vty
, DEBUG_EVENTS
, 0);
1168 DEFUN (debug_isis_packet_dump
,
1169 debug_isis_packet_dump_cmd
,
1170 "debug isis packet-dump",
1172 "IS-IS information\n"
1173 "IS-IS packet dump\n")
1175 isis
->debugs
|= DEBUG_PACKET_DUMP
;
1176 print_debug (vty
, DEBUG_PACKET_DUMP
, 1);
1181 DEFUN (no_debug_isis_packet_dump
,
1182 no_debug_isis_packet_dump_cmd
,
1183 "no debug isis packet-dump",
1186 "IS-IS information\n"
1187 "IS-IS packet dump\n")
1189 isis
->debugs
&= ~DEBUG_PACKET_DUMP
;
1190 print_debug (vty
, DEBUG_PACKET_DUMP
, 0);
1195 DEFUN (debug_isis_lsp_gen
,
1196 debug_isis_lsp_gen_cmd
,
1197 "debug isis lsp-gen",
1199 "IS-IS information\n"
1200 "IS-IS generation of own LSPs\n")
1202 isis
->debugs
|= DEBUG_LSP_GEN
;
1203 print_debug (vty
, DEBUG_LSP_GEN
, 1);
1208 DEFUN (no_debug_isis_lsp_gen
,
1209 no_debug_isis_lsp_gen_cmd
,
1210 "no debug isis lsp-gen",
1213 "IS-IS information\n"
1214 "IS-IS generation of own LSPs\n")
1216 isis
->debugs
&= ~DEBUG_LSP_GEN
;
1217 print_debug (vty
, DEBUG_LSP_GEN
, 0);
1222 DEFUN (debug_isis_lsp_sched
,
1223 debug_isis_lsp_sched_cmd
,
1224 "debug isis lsp-sched",
1226 "IS-IS information\n"
1227 "IS-IS scheduling of LSP generation\n")
1229 isis
->debugs
|= DEBUG_LSP_SCHED
;
1230 print_debug (vty
, DEBUG_LSP_SCHED
, 1);
1235 DEFUN (no_debug_isis_lsp_sched
,
1236 no_debug_isis_lsp_sched_cmd
,
1237 "no debug isis lsp-sched",
1240 "IS-IS information\n"
1241 "IS-IS scheduling of LSP generation\n")
1243 isis
->debugs
&= ~DEBUG_LSP_SCHED
;
1244 print_debug (vty
, DEBUG_LSP_SCHED
, 0);
1249 DEFUN (show_hostname
,
1251 "show isis hostname",
1253 "IS-IS information\n"
1254 "IS-IS Dynamic hostname mapping\n")
1256 dynhn_print_all (vty
);
1262 vty_out_timestr(struct vty
*vty
, time_t uptime
)
1265 time_t difftime
= time (NULL
);
1267 tm
= gmtime (&difftime
);
1269 #define ONE_DAY_SECOND 60*60*24
1270 #define ONE_WEEK_SECOND 60*60*24*7
1271 if (difftime
< ONE_DAY_SECOND
)
1272 vty_out (vty
, "%02d:%02d:%02d",
1273 tm
->tm_hour
, tm
->tm_min
, tm
->tm_sec
);
1274 else if (difftime
< ONE_WEEK_SECOND
)
1275 vty_out (vty
, "%dd%02dh%02dm",
1276 tm
->tm_yday
, tm
->tm_hour
, tm
->tm_min
);
1278 vty_out (vty
, "%02dw%dd%02dh",
1280 tm
->tm_yday
- ((tm
->tm_yday
/7) * 7), tm
->tm_hour
);
1281 vty_out (vty
, " ago");
1284 DEFUN (show_isis_spf_ietf
,
1285 show_isis_spf_ietf_cmd
,
1286 "show isis spf-delay-ietf",
1288 "IS-IS information\n"
1289 "IS-IS SPF delay IETF information\n")
1293 vty_out (vty
, "ISIS is not running%s", VTY_NEWLINE
);
1297 struct listnode
*node
;
1298 struct isis_area
*area
;
1300 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1302 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1305 for (int level
= ISIS_LEVEL1
; level
<= ISIS_LEVELS
; level
++)
1307 if ((area
->is_type
& level
) == 0)
1310 vty_out (vty
, " Level-%d:%s", level
, VTY_NEWLINE
);
1311 vty_out (vty
, " SPF delay status: ");
1312 if (area
->spf_timer
[level
-1])
1314 struct timeval remain
= thread_timer_remain(area
->spf_timer
[level
- 1]);
1315 vty_out(vty
, "Pending, due in %ld msec%s",
1316 remain
.tv_sec
* 1000 + remain
.tv_usec
/ 1000,
1321 vty_out(vty
, "Not scheduled%s", VTY_NEWLINE
);
1324 if (area
->spf_delay_ietf
[level
- 1]) {
1325 vty_out(vty
, " Using draft-ietf-rtgwg-backoff-algo-04%s", VTY_NEWLINE
);
1326 spf_backoff_show(area
->spf_delay_ietf
[level
- 1], vty
, " ");
1328 vty_out(vty
, " Using legacy backoff algo%s", VTY_NEWLINE
);
1335 DEFUN (show_isis_summary
,
1336 show_isis_summary_cmd
,
1337 "show isis summary",
1338 SHOW_STR
"IS-IS information\n" "IS-IS summary\n")
1340 struct listnode
*node
, *node2
;
1341 struct isis_area
*area
;
1342 struct isis_spftree
*spftree
;
1347 vty_out (vty
, "ISIS is not running%s", VTY_NEWLINE
);
1351 vty_out (vty
, "Process Id : %ld%s", isis
->process_id
,
1353 if (isis
->sysid_set
)
1354 vty_out (vty
, "System Id : %s%s", sysid_print (isis
->sysid
),
1357 vty_out (vty
, "Up time : ");
1358 vty_out_timestr(vty
, isis
->uptime
);
1359 vty_out (vty
, "%s", VTY_NEWLINE
);
1361 if (isis
->area_list
)
1362 vty_out (vty
, "Number of areas : %d%s", isis
->area_list
->count
,
1365 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1367 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1370 if (listcount (area
->area_addrs
) > 0)
1372 struct area_addr
*area_addr
;
1373 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
1375 vty_out (vty
, " Net: %s%s",
1376 isonet_print (area_addr
->area_addr
,
1377 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
1382 for (level
= ISIS_LEVEL1
; level
<= ISIS_LEVELS
; level
++)
1384 if ((area
->is_type
& level
) == 0)
1387 vty_out (vty
, " Level-%d:%s", level
, VTY_NEWLINE
);
1388 spftree
= area
->spftree
[level
- 1];
1389 if (area
->spf_timer
[level
- 1])
1390 vty_out (vty
, " SPF: (pending)%s", VTY_NEWLINE
);
1392 vty_out (vty
, " SPF:%s", VTY_NEWLINE
);
1394 vty_out (vty
, " minimum interval : %d",
1395 area
->min_spf_interval
[level
- 1]);
1396 if (area
->spf_delay_ietf
[level
- 1])
1397 vty_out (vty
, " (not used, IETF SPF delay activated)");
1398 vty_out (vty
, VTY_NEWLINE
);
1400 vty_out (vty
, " IPv4 route computation:%s", VTY_NEWLINE
);
1401 vty_out (vty
, " last run elapsed : ");
1402 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1403 vty_out (vty
, "%s", VTY_NEWLINE
);
1405 vty_out (vty
, " last run duration : %u usec%s",
1406 (u_int32_t
)spftree
->last_run_duration
, VTY_NEWLINE
);
1408 vty_out (vty
, " run count : %d%s",
1409 spftree
->runcount
, VTY_NEWLINE
);
1411 spftree
= area
->spftree6
[level
- 1];
1412 vty_out (vty
, " IPv6 route computation:%s", VTY_NEWLINE
);
1414 vty_out (vty
, " last run elapsed : ");
1415 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1416 vty_out (vty
, "%s", VTY_NEWLINE
);
1418 vty_out (vty
, " last run duration : %llu msec%s",
1419 (unsigned long long)spftree
->last_run_duration
, VTY_NEWLINE
);
1421 vty_out (vty
, " run count : %d%s",
1422 spftree
->runcount
, VTY_NEWLINE
);
1425 vty_out (vty
, "%s", VTY_NEWLINE
);
1431 * This function supports following display options:
1432 * [ show isis database [detail] ]
1433 * [ show isis database <sysid> [detail] ]
1434 * [ show isis database <hostname> [detail] ]
1435 * [ show isis database <sysid>.<pseudo-id> [detail] ]
1436 * [ show isis database <hostname>.<pseudo-id> [detail] ]
1437 * [ show isis database <sysid>.<pseudo-id>-<fragment-number> [detail] ]
1438 * [ show isis database <hostname>.<pseudo-id>-<fragment-number> [detail] ]
1439 * [ show isis database detail <sysid> ]
1440 * [ show isis database detail <hostname> ]
1441 * [ show isis database detail <sysid>.<pseudo-id> ]
1442 * [ show isis database detail <hostname>.<pseudo-id> ]
1443 * [ show isis database detail <sysid>.<pseudo-id>-<fragment-number> ]
1444 * [ show isis database detail <hostname>.<pseudo-id>-<fragment-number> ]
1447 show_isis_database (struct vty
*vty
, const char *argv
, int ui_level
)
1449 struct listnode
*node
;
1450 struct isis_area
*area
;
1451 struct isis_lsp
*lsp
;
1452 struct isis_dynhn
*dynhn
;
1453 const char *pos
= argv
;
1454 u_char lspid
[ISIS_SYS_ID_LEN
+2];
1457 int level
, lsp_count
;
1459 if (isis
->area_list
->count
== 0)
1462 memset (&lspid
, 0, ISIS_SYS_ID_LEN
);
1463 memset (&sysid
, 0, 255);
1466 * extract fragment and pseudo id from the string argv
1468 * (a) <systemid/hostname>.<pseudo-id>-<framenent> or
1469 * (b) <systemid/hostname>.<pseudo-id> or
1470 * (c) <systemid/hostname> or
1471 * Where systemid is in the form:
1475 strncpy (sysid
, argv
, 254);
1476 if (argv
&& strlen (argv
) > 3)
1478 pos
= argv
+ strlen (argv
) - 3;
1479 if (strncmp (pos
, "-", 1) == 0)
1481 memcpy (number
, ++pos
, 2);
1482 lspid
[ISIS_SYS_ID_LEN
+1] = (u_char
) strtol ((char *)number
, NULL
, 16);
1484 if (strncmp (pos
, ".", 1) != 0)
1485 return CMD_ERR_AMBIGUOUS
;
1487 if (strncmp (pos
, ".", 1) == 0)
1489 memcpy (number
, ++pos
, 2);
1490 lspid
[ISIS_SYS_ID_LEN
] = (u_char
) strtol ((char *)number
, NULL
, 16);
1491 sysid
[pos
- argv
- 1] = '\0';
1495 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1497 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1500 for (level
= 0; level
< ISIS_LEVELS
; level
++)
1502 if (area
->lspdb
[level
] && dict_count (area
->lspdb
[level
]) > 0)
1508 * Try to find the lsp-id if the argv string is in
1509 * the form hostname.<pseudo-id>-<fragment>
1511 if (sysid2buff (lspid
, sysid
))
1513 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1515 else if ((dynhn
= dynhn_find_by_name (sysid
)))
1517 memcpy (lspid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
1518 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1520 else if (strncmp(unix_hostname (), sysid
, 15) == 0)
1522 memcpy (lspid
, isis
->sysid
, ISIS_SYS_ID_LEN
);
1523 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1527 if (lsp
!= NULL
|| argv
== NULL
)
1529 vty_out (vty
, "IS-IS Level-%d link-state database:%s",
1530 level
+ 1, VTY_NEWLINE
);
1532 /* print the title in all cases */
1533 vty_out (vty
, "LSP ID PduLen "
1534 "SeqNumber Chksum Holdtime ATT/P/OL%s",
1540 if (ui_level
== ISIS_UI_LEVEL_DETAIL
)
1541 lsp_print_detail (lsp
, vty
, area
->dynhostname
);
1543 lsp_print (lsp
, vty
, area
->dynhostname
);
1545 else if (argv
== NULL
)
1547 lsp_count
= lsp_print_all (vty
, area
->lspdb
[level
],
1551 vty_out (vty
, " %u LSPs%s%s",
1552 lsp_count
, VTY_NEWLINE
, VTY_NEWLINE
);
1561 DEFUN (show_database
,
1563 "show isis database [detail] [WORD]",
1565 "IS-IS information\n"
1566 "IS-IS link state database\n"
1567 "Detailed information\n"
1571 int uilevel
= argv_find (argv
, argc
, "detail", &idx
) ? ISIS_UI_LEVEL_DETAIL
: ISIS_UI_LEVEL_BRIEF
;
1572 char *id
= argv_find (argv
, argc
, "WORD", &idx
) ? argv
[idx
]->arg
: NULL
;
1573 return show_isis_database (vty
, id
, uilevel
);
1577 * 'router isis' command
1579 DEFUN_NOSH (router_isis
,
1584 "ISO Routing area tag")
1587 return isis_area_get (vty
, argv
[idx_word
]->arg
);
1591 *'no router isis' command
1593 DEFUN (no_router_isis
,
1595 "no router isis WORD",
1596 "no\n" ROUTER_STR
"ISO IS-IS\n" "ISO Routing area tag")
1599 return isis_area_destroy (vty
, argv
[idx_word
]->arg
);
1608 "A Network Entity Title for this process (OSI only)\n"
1609 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1612 return area_net_title (vty
, argv
[idx_word
]->arg
);
1622 "A Network Entity Title for this process (OSI only)\n"
1623 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1626 return area_clear_net_title (vty
, argv
[idx_word
]->arg
);
1629 void isis_area_lsp_mtu_set(struct isis_area
*area
, unsigned int lsp_mtu
)
1631 area
->lsp_mtu
= lsp_mtu
;
1632 lsp_regenerate_schedule(area
, IS_LEVEL_1_AND_2
, 1);
1636 isis_area_passwd_set(struct isis_area
*area
, int level
, u_char passwd_type
,
1637 const char *passwd
, u_char snp_auth
)
1639 struct isis_passwd
*dest
;
1640 struct isis_passwd modified
;
1643 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1644 dest
= (level
== IS_LEVEL_1
) ? &area
->area_passwd
: &area
->domain_passwd
;
1645 memset(&modified
, 0, sizeof(modified
));
1647 if (passwd_type
!= ISIS_PASSWD_TYPE_UNUSED
)
1652 len
= strlen(passwd
);
1657 strncpy((char*)modified
.passwd
, passwd
, 255);
1658 modified
.type
= passwd_type
;
1659 modified
.snp_auth
= snp_auth
;
1662 if (memcmp(&modified
, dest
, sizeof(modified
)))
1664 memcpy(dest
, &modified
, sizeof(modified
));
1665 lsp_regenerate_schedule(area
, IS_LEVEL_1
|IS_LEVEL_2
, 1);
1672 isis_area_passwd_unset (struct isis_area
*area
, int level
)
1674 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_UNUSED
, NULL
, 0);
1678 isis_area_passwd_cleartext_set (struct isis_area
*area
, int level
,
1679 const char *passwd
, u_char snp_auth
)
1681 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_CLEARTXT
,
1686 isis_area_passwd_hmac_md5_set (struct isis_area
*area
, int level
,
1687 const char *passwd
, u_char snp_auth
)
1689 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_HMAC_MD5
,
1694 area_resign_level (struct isis_area
*area
, int level
)
1696 if (area
->lspdb
[level
- 1])
1698 lsp_db_destroy (area
->lspdb
[level
- 1]);
1699 area
->lspdb
[level
- 1] = NULL
;
1701 if (area
->spftree
[level
- 1])
1703 isis_spftree_del (area
->spftree
[level
- 1]);
1704 area
->spftree
[level
- 1] = NULL
;
1706 if (area
->spftree6
[level
- 1])
1708 isis_spftree_del (area
->spftree6
[level
- 1]);
1709 area
->spftree6
[level
- 1] = NULL
;
1711 THREAD_TIMER_OFF(area
->spf_timer
[level
- 1]);
1712 if (area
->route_table
[level
- 1])
1714 route_table_finish (area
->route_table
[level
- 1]);
1715 area
->route_table
[level
- 1] = NULL
;
1717 if (area
->route_table6
[level
- 1])
1719 route_table_finish (area
->route_table6
[level
- 1]);
1720 area
->route_table6
[level
- 1] = NULL
;
1723 sched_debug("ISIS (%s): Resigned from L%d - canceling LSP regeneration timer.",
1724 area
->area_tag
, level
);
1725 THREAD_TIMER_OFF (area
->t_lsp_refresh
[level
- 1]);
1726 area
->lsp_regenerate_pending
[level
- 1] = 0;
1730 isis_area_is_type_set(struct isis_area
*area
, int is_type
)
1732 struct listnode
*node
;
1733 struct isis_circuit
*circuit
;
1735 if (isis
->debugs
& DEBUG_EVENTS
)
1736 zlog_debug ("ISIS-Evt (%s) system type change %s -> %s", area
->area_tag
,
1737 circuit_t2string (area
->is_type
), circuit_t2string (is_type
));
1739 if (area
->is_type
== is_type
)
1740 return; /* No change */
1742 switch (area
->is_type
)
1745 if (is_type
== IS_LEVEL_2
)
1746 area_resign_level (area
, IS_LEVEL_1
);
1748 if (area
->lspdb
[1] == NULL
)
1749 area
->lspdb
[1] = lsp_db_init ();
1750 if (area
->route_table
[1] == NULL
)
1751 area
->route_table
[1] = route_table_init ();
1752 if (area
->route_table6
[1] == NULL
)
1753 area
->route_table6
[1] = route_table_init ();
1756 case IS_LEVEL_1_AND_2
:
1757 if (is_type
== IS_LEVEL_1
)
1758 area_resign_level (area
, IS_LEVEL_2
);
1760 area_resign_level (area
, IS_LEVEL_1
);
1764 if (is_type
== IS_LEVEL_1
)
1765 area_resign_level (area
, IS_LEVEL_2
);
1767 if (area
->lspdb
[0] == NULL
)
1768 area
->lspdb
[0] = lsp_db_init ();
1769 if (area
->route_table
[0] == NULL
)
1770 area
->route_table
[0] = route_table_init ();
1771 if (area
->route_table6
[0] == NULL
)
1772 area
->route_table6
[0] = route_table_init ();
1779 area
->is_type
= is_type
;
1781 /* override circuit's is_type */
1782 if (area
->is_type
!= IS_LEVEL_1_AND_2
)
1784 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, node
, circuit
))
1785 isis_circuit_is_type_set (circuit
, is_type
);
1788 spftree_area_init (area
);
1790 if (listcount (area
->area_addrs
) > 0)
1792 if (is_type
& IS_LEVEL_1
)
1793 lsp_generate (area
, IS_LEVEL_1
);
1794 if (is_type
& IS_LEVEL_2
)
1795 lsp_generate (area
, IS_LEVEL_2
);
1797 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1802 void isis_area_metricstyle_set(struct isis_area
*area
, bool old_metric
,
1805 if (area
->oldmetric
!= old_metric
1806 || area
->newmetric
!= new_metric
)
1808 area
->oldmetric
= old_metric
;
1809 area
->newmetric
= new_metric
;
1810 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1814 void isis_area_overload_bit_set(struct isis_area
*area
, bool overload_bit
)
1816 char new_overload_bit
= overload_bit
? LSPBIT_OL
: 0;
1818 if (new_overload_bit
!= area
->overload_bit
)
1820 area
->overload_bit
= new_overload_bit
;
1821 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1825 void isis_area_attached_bit_set(struct isis_area
*area
, bool attached_bit
)
1827 char new_attached_bit
= attached_bit
? LSPBIT_ATT
: 0;
1829 if (new_attached_bit
!= area
->attached_bit
)
1831 area
->attached_bit
= new_attached_bit
;
1832 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1836 void isis_area_dynhostname_set(struct isis_area
*area
, bool dynhostname
)
1838 if (area
->dynhostname
!= dynhostname
)
1840 area
->dynhostname
= dynhostname
;
1841 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
1846 isis_area_max_lsp_lifetime_set(struct isis_area
*area
, int level
,
1847 uint16_t max_lsp_lifetime
)
1849 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1851 if (area
->max_lsp_lifetime
[level
-1] == max_lsp_lifetime
)
1854 area
->max_lsp_lifetime
[level
-1] = max_lsp_lifetime
;
1855 lsp_regenerate_schedule(area
, level
, 1);
1859 isis_area_lsp_refresh_set(struct isis_area
*area
, int level
,
1860 uint16_t lsp_refresh
)
1862 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1864 if (area
->lsp_refresh
[level
-1] == lsp_refresh
)
1867 area
->lsp_refresh
[level
-1] = lsp_refresh
;
1868 lsp_regenerate_schedule(area
, level
, 1);
1871 DEFUN (log_adj_changes
,
1872 log_adj_changes_cmd
,
1873 "log-adjacency-changes",
1874 "Log changes in adjacency state\n")
1876 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1878 area
->log_adj_changes
= 1;
1883 DEFUN (no_log_adj_changes
,
1884 no_log_adj_changes_cmd
,
1885 "no log-adjacency-changes",
1887 "Stop logging changes in adjacency state\n")
1889 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1891 area
->log_adj_changes
= 0;
1896 /* IS-IS configuration write function */
1898 isis_config_write (struct vty
*vty
)
1904 struct isis_area
*area
;
1905 struct listnode
*node
, *node2
;
1907 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1909 /* ISIS - Area name */
1910 vty_out (vty
, "router isis %s%s", area
->area_tag
, VTY_NEWLINE
);
1913 if (listcount (area
->area_addrs
) > 0)
1915 struct area_addr
*area_addr
;
1916 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
1918 vty_out (vty
, " net %s%s",
1919 isonet_print (area_addr
->area_addr
,
1920 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
1925 /* ISIS - Dynamic hostname - Defaults to true so only display if
1927 if (!area
->dynhostname
)
1929 vty_out (vty
, " no hostname dynamic%s", VTY_NEWLINE
);
1932 /* ISIS - Metric-Style - when true displays wide */
1933 if (area
->newmetric
)
1935 if (!area
->oldmetric
)
1936 vty_out (vty
, " metric-style wide%s", VTY_NEWLINE
);
1938 vty_out (vty
, " metric-style transition%s", VTY_NEWLINE
);
1943 vty_out (vty
, " metric-style narrow%s", VTY_NEWLINE
);
1946 /* ISIS - overload-bit */
1947 if (area
->overload_bit
)
1949 vty_out (vty
, " set-overload-bit%s", VTY_NEWLINE
);
1952 /* ISIS - Area is-type (level-1-2 is default) */
1953 if (area
->is_type
== IS_LEVEL_1
)
1955 vty_out (vty
, " is-type level-1%s", VTY_NEWLINE
);
1958 else if (area
->is_type
== IS_LEVEL_2
)
1960 vty_out (vty
, " is-type level-2-only%s", VTY_NEWLINE
);
1963 write
+= isis_redist_config_write(vty
, area
, AF_INET
);
1964 write
+= isis_redist_config_write(vty
, area
, AF_INET6
);
1965 /* ISIS - Lsp generation interval */
1966 if (area
->lsp_gen_interval
[0] == area
->lsp_gen_interval
[1])
1968 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
1970 vty_out (vty
, " lsp-gen-interval %d%s",
1971 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
1977 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
1979 vty_out (vty
, " lsp-gen-interval level-1 %d%s",
1980 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
1983 if (area
->lsp_gen_interval
[1] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
1985 vty_out (vty
, " lsp-gen-interval level-2 %d%s",
1986 area
->lsp_gen_interval
[1], VTY_NEWLINE
);
1990 /* ISIS - LSP lifetime */
1991 if (area
->max_lsp_lifetime
[0] == area
->max_lsp_lifetime
[1])
1993 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
1995 vty_out (vty
, " max-lsp-lifetime %u%s", area
->max_lsp_lifetime
[0],
2002 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2004 vty_out (vty
, " max-lsp-lifetime level-1 %u%s",
2005 area
->max_lsp_lifetime
[0], VTY_NEWLINE
);
2008 if (area
->max_lsp_lifetime
[1] != DEFAULT_LSP_LIFETIME
)
2010 vty_out (vty
, " max-lsp-lifetime level-2 %u%s",
2011 area
->max_lsp_lifetime
[1], VTY_NEWLINE
);
2015 /* ISIS - LSP refresh interval */
2016 if (area
->lsp_refresh
[0] == area
->lsp_refresh
[1])
2018 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2020 vty_out (vty
, " lsp-refresh-interval %u%s", area
->lsp_refresh
[0],
2027 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2029 vty_out (vty
, " lsp-refresh-interval level-1 %u%s",
2030 area
->lsp_refresh
[0], VTY_NEWLINE
);
2033 if (area
->lsp_refresh
[1] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2035 vty_out (vty
, " lsp-refresh-interval level-2 %u%s",
2036 area
->lsp_refresh
[1], VTY_NEWLINE
);
2040 if (area
->lsp_mtu
!= DEFAULT_LSP_MTU
)
2042 vty_out(vty
, " lsp-mtu %u%s", area
->lsp_mtu
, VTY_NEWLINE
);
2046 /* Minimum SPF interval. */
2047 if (area
->min_spf_interval
[0] == area
->min_spf_interval
[1])
2049 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2051 vty_out (vty
, " spf-interval %d%s",
2052 area
->min_spf_interval
[0], VTY_NEWLINE
);
2058 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2060 vty_out (vty
, " spf-interval level-1 %d%s",
2061 area
->min_spf_interval
[0], VTY_NEWLINE
);
2064 if (area
->min_spf_interval
[1] != MINIMUM_SPF_INTERVAL
)
2066 vty_out (vty
, " spf-interval level-2 %d%s",
2067 area
->min_spf_interval
[1], VTY_NEWLINE
);
2072 /* IETF SPF interval */
2073 if (area
->spf_delay_ietf
[0])
2075 vty_out (vty
, " spf-delay-ietf init-delay %ld short-delay %ld long-delay %ld holddown %ld time-to-learn %ld%s",
2076 spf_backoff_init_delay(area
->spf_delay_ietf
[0]),
2077 spf_backoff_short_delay(area
->spf_delay_ietf
[0]),
2078 spf_backoff_long_delay(area
->spf_delay_ietf
[0]),
2079 spf_backoff_holddown(area
->spf_delay_ietf
[0]),
2080 spf_backoff_timetolearn(area
->spf_delay_ietf
[0]),
2085 /* Authentication passwords. */
2086 if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
2088 vty_out(vty
, " area-password md5 %s", area
->area_passwd
.passwd
);
2089 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
2091 vty_out(vty
, " authenticate snp ");
2092 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
2093 vty_out(vty
, "validate");
2095 vty_out(vty
, "send-only");
2097 vty_out(vty
, "%s", VTY_NEWLINE
);
2100 else if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
2102 vty_out(vty
, " area-password clear %s", area
->area_passwd
.passwd
);
2103 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
2105 vty_out(vty
, " authenticate snp ");
2106 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
2107 vty_out(vty
, "validate");
2109 vty_out(vty
, "send-only");
2111 vty_out(vty
, "%s", VTY_NEWLINE
);
2114 if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
2116 vty_out(vty
, " domain-password md5 %s",
2117 area
->domain_passwd
.passwd
);
2118 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
2120 vty_out(vty
, " authenticate snp ");
2121 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
2122 vty_out(vty
, "validate");
2124 vty_out(vty
, "send-only");
2126 vty_out(vty
, "%s", VTY_NEWLINE
);
2129 else if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
2131 vty_out(vty
, " domain-password clear %s",
2132 area
->domain_passwd
.passwd
);
2133 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
2135 vty_out(vty
, " authenticate snp ");
2136 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
2137 vty_out(vty
, "validate");
2139 vty_out(vty
, "send-only");
2141 vty_out(vty
, "%s", VTY_NEWLINE
);
2145 if (area
->log_adj_changes
)
2147 vty_out (vty
, " log-adjacency-changes%s", VTY_NEWLINE
);
2152 isis_mpls_te_config_write_router(vty
);
2158 struct cmd_node isis_node
= {
2160 "%s(config-router)# ",
2167 /* Install IS-IS top node */
2168 install_node (&isis_node
, isis_config_write
);
2170 install_element (VIEW_NODE
, &show_isis_summary_cmd
);
2172 install_element (VIEW_NODE
, &show_isis_spf_ietf_cmd
);
2174 install_element (VIEW_NODE
, &show_isis_interface_cmd
);
2175 install_element (VIEW_NODE
, &show_isis_interface_detail_cmd
);
2176 install_element (VIEW_NODE
, &show_isis_interface_arg_cmd
);
2178 install_element (VIEW_NODE
, &show_isis_neighbor_cmd
);
2179 install_element (VIEW_NODE
, &show_isis_neighbor_detail_cmd
);
2180 install_element (VIEW_NODE
, &show_isis_neighbor_arg_cmd
);
2181 install_element (VIEW_NODE
, &clear_isis_neighbor_cmd
);
2182 install_element (VIEW_NODE
, &clear_isis_neighbor_arg_cmd
);
2184 install_element (VIEW_NODE
, &show_hostname_cmd
);
2185 install_element (VIEW_NODE
, &show_database_cmd
);
2187 install_element (ENABLE_NODE
, &show_debugging_isis_cmd
);
2189 install_node (&debug_node
, config_write_debug
);
2191 install_element (ENABLE_NODE
, &debug_isis_adj_cmd
);
2192 install_element (ENABLE_NODE
, &no_debug_isis_adj_cmd
);
2193 install_element (ENABLE_NODE
, &debug_isis_csum_cmd
);
2194 install_element (ENABLE_NODE
, &no_debug_isis_csum_cmd
);
2195 install_element (ENABLE_NODE
, &debug_isis_lupd_cmd
);
2196 install_element (ENABLE_NODE
, &no_debug_isis_lupd_cmd
);
2197 install_element (ENABLE_NODE
, &debug_isis_err_cmd
);
2198 install_element (ENABLE_NODE
, &no_debug_isis_err_cmd
);
2199 install_element (ENABLE_NODE
, &debug_isis_snp_cmd
);
2200 install_element (ENABLE_NODE
, &no_debug_isis_snp_cmd
);
2201 install_element (ENABLE_NODE
, &debug_isis_upd_cmd
);
2202 install_element (ENABLE_NODE
, &no_debug_isis_upd_cmd
);
2203 install_element (ENABLE_NODE
, &debug_isis_spfevents_cmd
);
2204 install_element (ENABLE_NODE
, &no_debug_isis_spfevents_cmd
);
2205 install_element (ENABLE_NODE
, &debug_isis_spfstats_cmd
);
2206 install_element (ENABLE_NODE
, &no_debug_isis_spfstats_cmd
);
2207 install_element (ENABLE_NODE
, &debug_isis_spftrigg_cmd
);
2208 install_element (ENABLE_NODE
, &no_debug_isis_spftrigg_cmd
);
2209 install_element (ENABLE_NODE
, &debug_isis_rtevents_cmd
);
2210 install_element (ENABLE_NODE
, &no_debug_isis_rtevents_cmd
);
2211 install_element (ENABLE_NODE
, &debug_isis_events_cmd
);
2212 install_element (ENABLE_NODE
, &no_debug_isis_events_cmd
);
2213 install_element (ENABLE_NODE
, &debug_isis_packet_dump_cmd
);
2214 install_element (ENABLE_NODE
, &no_debug_isis_packet_dump_cmd
);
2215 install_element (ENABLE_NODE
, &debug_isis_lsp_gen_cmd
);
2216 install_element (ENABLE_NODE
, &no_debug_isis_lsp_gen_cmd
);
2217 install_element (ENABLE_NODE
, &debug_isis_lsp_sched_cmd
);
2218 install_element (ENABLE_NODE
, &no_debug_isis_lsp_sched_cmd
);
2220 install_element (CONFIG_NODE
, &debug_isis_adj_cmd
);
2221 install_element (CONFIG_NODE
, &no_debug_isis_adj_cmd
);
2222 install_element (CONFIG_NODE
, &debug_isis_csum_cmd
);
2223 install_element (CONFIG_NODE
, &no_debug_isis_csum_cmd
);
2224 install_element (CONFIG_NODE
, &debug_isis_lupd_cmd
);
2225 install_element (CONFIG_NODE
, &no_debug_isis_lupd_cmd
);
2226 install_element (CONFIG_NODE
, &debug_isis_err_cmd
);
2227 install_element (CONFIG_NODE
, &no_debug_isis_err_cmd
);
2228 install_element (CONFIG_NODE
, &debug_isis_snp_cmd
);
2229 install_element (CONFIG_NODE
, &no_debug_isis_snp_cmd
);
2230 install_element (CONFIG_NODE
, &debug_isis_upd_cmd
);
2231 install_element (CONFIG_NODE
, &no_debug_isis_upd_cmd
);
2232 install_element (CONFIG_NODE
, &debug_isis_spfevents_cmd
);
2233 install_element (CONFIG_NODE
, &no_debug_isis_spfevents_cmd
);
2234 install_element (CONFIG_NODE
, &debug_isis_spfstats_cmd
);
2235 install_element (CONFIG_NODE
, &no_debug_isis_spfstats_cmd
);
2236 install_element (CONFIG_NODE
, &debug_isis_spftrigg_cmd
);
2237 install_element (CONFIG_NODE
, &no_debug_isis_spftrigg_cmd
);
2238 install_element (CONFIG_NODE
, &debug_isis_rtevents_cmd
);
2239 install_element (CONFIG_NODE
, &no_debug_isis_rtevents_cmd
);
2240 install_element (CONFIG_NODE
, &debug_isis_events_cmd
);
2241 install_element (CONFIG_NODE
, &no_debug_isis_events_cmd
);
2242 install_element (CONFIG_NODE
, &debug_isis_packet_dump_cmd
);
2243 install_element (CONFIG_NODE
, &no_debug_isis_packet_dump_cmd
);
2244 install_element (CONFIG_NODE
, &debug_isis_lsp_gen_cmd
);
2245 install_element (CONFIG_NODE
, &no_debug_isis_lsp_gen_cmd
);
2246 install_element (CONFIG_NODE
, &debug_isis_lsp_sched_cmd
);
2247 install_element (CONFIG_NODE
, &no_debug_isis_lsp_sched_cmd
);
2249 install_element (CONFIG_NODE
, &router_isis_cmd
);
2250 install_element (CONFIG_NODE
, &no_router_isis_cmd
);
2252 install_default (ISIS_NODE
);
2254 install_element (ISIS_NODE
, &net_cmd
);
2255 install_element (ISIS_NODE
, &no_net_cmd
);
2257 install_element (ISIS_NODE
, &log_adj_changes_cmd
);
2258 install_element (ISIS_NODE
, &no_log_adj_changes_cmd
);
2260 spf_backoff_cmd_init();