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 "isisd/dict.h"
39 #include "isisd/include-netbsd/iso.h"
40 #include "isisd/isis_constants.h"
41 #include "isisd/isis_common.h"
42 #include "isisd/isis_flags.h"
43 #include "isisd/isis_circuit.h"
44 #include "isisd/isis_csm.h"
45 #include "isisd/isisd.h"
46 #include "isisd/isis_dynhn.h"
47 #include "isisd/isis_adjacency.h"
48 #include "isisd/isis_pdu.h"
49 #include "isisd/isis_misc.h"
50 #include "isisd/isis_constants.h"
51 #include "isisd/isis_tlv.h"
52 #include "isisd/isis_lsp.h"
53 #include "isisd/isis_spf.h"
54 #include "isisd/isis_route.h"
55 #include "isisd/isis_zebra.h"
56 #include "isisd/isis_events.h"
58 #ifdef TOPOLOGY_GENERATE
60 u_char DEFAULT_TOPOLOGY_BASEIS
[6] = { 0xFE, 0xED, 0xFE, 0xED, 0x00, 0x00 };
61 #endif /* TOPOLOGY_GENERATE */
63 struct isis
*isis
= NULL
;
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 ();
94 isis
->nexthops6
= list_new ();
95 #endif /* HAVE_IPV6 */
98 * uncomment the next line for full debugs
100 /* isis->debugs = 0xFFFF; */
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 ();
127 area
->route_table6
[0] = route_table_init ();
128 #endif /* HAVE_IPV6 */
130 if (area
->is_type
& IS_LEVEL_2
)
132 area
->lspdb
[1] = lsp_db_init ();
133 area
->route_table
[1] = route_table_init ();
135 area
->route_table6
[1] = route_table_init ();
136 #endif /* HAVE_IPV6 */
139 spftree_area_init (area
);
141 area
->circuit_list
= list_new ();
142 area
->area_addrs
= list_new ();
143 THREAD_TIMER_ON (master
, area
->t_tick
, lsp_tick
, area
, 1);
144 flags_initialize (&area
->flags
);
149 area
->max_lsp_lifetime
[0] = DEFAULT_LSP_LIFETIME
; /* 1200 */
150 area
->max_lsp_lifetime
[1] = DEFAULT_LSP_LIFETIME
; /* 1200 */
151 area
->lsp_refresh
[0] = DEFAULT_MAX_LSP_GEN_INTERVAL
; /* 900 */
152 area
->lsp_refresh
[1] = DEFAULT_MAX_LSP_GEN_INTERVAL
; /* 900 */
153 area
->lsp_gen_interval
[0] = DEFAULT_MIN_LSP_GEN_INTERVAL
;
154 area
->lsp_gen_interval
[1] = DEFAULT_MIN_LSP_GEN_INTERVAL
;
155 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
156 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
157 area
->dynhostname
= 1;
160 area
->lsp_frag_threshold
= 90;
161 #ifdef TOPOLOGY_GENERATE
162 memcpy (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
, ISIS_SYS_ID_LEN
);
163 #endif /* TOPOLOGY_GENERATE */
165 /* FIXME: Think of a better way... */
166 area
->min_bcast_mtu
= 1497;
168 area
->area_tag
= strdup (area_tag
);
169 listnode_add (isis
->area_list
, area
);
176 isis_area_lookup (const char *area_tag
)
178 struct isis_area
*area
;
179 struct listnode
*node
;
181 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
182 if ((area
->area_tag
== NULL
&& area_tag
== NULL
) ||
183 (area
->area_tag
&& area_tag
184 && strcmp (area
->area_tag
, area_tag
) == 0))
191 isis_area_get (struct vty
*vty
, const char *area_tag
)
193 struct isis_area
*area
;
195 area
= isis_area_lookup (area_tag
);
199 vty
->node
= ISIS_NODE
;
204 area
= isis_area_create (area_tag
);
206 if (isis
->debugs
& DEBUG_EVENTS
)
207 zlog_debug ("New IS-IS area instance %s", area
->area_tag
);
209 vty
->node
= ISIS_NODE
;
216 isis_area_destroy (struct vty
*vty
, const char *area_tag
)
218 struct isis_area
*area
;
219 struct listnode
*node
, *nnode
;
220 struct isis_circuit
*circuit
;
221 struct area_addr
*addr
;
223 area
= isis_area_lookup (area_tag
);
227 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
228 return CMD_ERR_NO_MATCH
;
231 if (area
->circuit_list
)
233 for (ALL_LIST_ELEMENTS (area
->circuit_list
, node
, nnode
, circuit
))
235 circuit
->ip_router
= 0;
237 circuit
->ipv6_router
= 0;
239 isis_csm_state_change (ISIS_DISABLE
, circuit
, area
);
241 list_delete (area
->circuit_list
);
242 area
->circuit_list
= NULL
;
245 if (area
->lspdb
[0] != NULL
)
247 lsp_db_destroy (area
->lspdb
[0]);
248 area
->lspdb
[0] = NULL
;
250 if (area
->lspdb
[1] != NULL
)
252 lsp_db_destroy (area
->lspdb
[1]);
253 area
->lspdb
[1] = NULL
;
256 spftree_area_del (area
);
258 /* invalidate and validate would delete all routes from zebra */
259 isis_route_invalidate (area
);
260 isis_route_validate (area
);
262 if (area
->route_table
[0])
264 route_table_finish (area
->route_table
[0]);
265 area
->route_table
[0] = NULL
;
267 if (area
->route_table
[1])
269 route_table_finish (area
->route_table
[1]);
270 area
->route_table
[1] = NULL
;
273 if (area
->route_table6
[0])
275 route_table_finish (area
->route_table6
[0]);
276 area
->route_table6
[0] = NULL
;
278 if (area
->route_table6
[1])
280 route_table_finish (area
->route_table6
[1]);
281 area
->route_table6
[1] = NULL
;
283 #endif /* HAVE_IPV6 */
285 for (ALL_LIST_ELEMENTS (area
->area_addrs
, node
, nnode
, addr
))
287 list_delete_node (area
->area_addrs
, node
);
288 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
290 area
->area_addrs
= NULL
;
292 THREAD_TIMER_OFF (area
->t_tick
);
293 THREAD_TIMER_OFF (area
->t_lsp_refresh
[0]);
294 THREAD_TIMER_OFF (area
->t_lsp_refresh
[1]);
296 thread_cancel_event (master
, area
);
298 listnode_delete (isis
->area_list
, area
);
300 free (area
->area_tag
);
302 XFREE (MTYPE_ISIS_AREA
, area
);
304 if (listcount (isis
->area_list
) == 0)
306 memset (isis
->sysid
, 0, ISIS_SYS_ID_LEN
);
314 area_net_title (struct vty
*vty
, const char *net_title
)
316 struct isis_area
*area
;
317 struct area_addr
*addr
;
318 struct area_addr
*addrp
;
319 struct listnode
*node
;
326 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
327 return CMD_ERR_NO_MATCH
;
330 /* We check that we are not over the maximal number of addresses */
331 if (listcount (area
->area_addrs
) >= isis
->max_area_addrs
)
333 vty_out (vty
, "Maximum of area addresses (%d) already reached %s",
334 isis
->max_area_addrs
, VTY_NEWLINE
);
335 return CMD_ERR_NOTHING_TODO
;
338 addr
= XMALLOC (MTYPE_ISIS_AREA_ADDR
, sizeof (struct area_addr
));
339 addr
->addr_len
= dotformat2buff (buff
, net_title
);
340 memcpy (addr
->area_addr
, buff
, addr
->addr_len
);
342 zlog_debug ("added area address %s for area %s (address length %d)",
343 net_title
, area
->area_tag
, addr
->addr_len
);
344 #endif /* EXTREME_DEBUG */
345 if (addr
->addr_len
< 8 || addr
->addr_len
> 20)
347 vty_out (vty
, "area address must be at least 8..20 octets long (%d)%s",
348 addr
->addr_len
, VTY_NEWLINE
);
349 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
350 return CMD_ERR_AMBIGUOUS
;
353 if (addr
->area_addr
[addr
->addr_len
-1] != 0)
355 vty_out (vty
, "nsel byte (last byte) in area address must be 0%s",
357 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
358 return CMD_ERR_AMBIGUOUS
;
361 if (isis
->sysid_set
== 0)
364 * First area address - get the SystemID for this router
366 memcpy (isis
->sysid
, GETSYSID (addr
), ISIS_SYS_ID_LEN
);
368 if (isis
->debugs
& DEBUG_EVENTS
)
369 zlog_debug ("Router has SystemID %s", sysid_print (isis
->sysid
));
374 * Check that the SystemID portions match
376 if (memcmp (isis
->sysid
, GETSYSID (addr
), ISIS_SYS_ID_LEN
))
379 "System ID must not change when defining additional area"
380 " addresses%s", VTY_NEWLINE
);
381 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
382 return CMD_ERR_AMBIGUOUS
;
385 /* now we see that we don't already have this address */
386 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node
, addrp
))
388 if ((addrp
->addr_len
+ ISIS_SYS_ID_LEN
+ ISIS_NSEL_LEN
) != (addr
->addr_len
))
390 if (!memcmp (addrp
->area_addr
, addr
->area_addr
, addr
->addr_len
))
392 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
393 return CMD_SUCCESS
; /* silent fail */
399 * Forget the systemID part of the address
401 addr
->addr_len
-= (ISIS_SYS_ID_LEN
+ ISIS_NSEL_LEN
);
402 listnode_add (area
->area_addrs
, addr
);
404 /* only now we can safely generate our LSPs for this area */
405 if (listcount (area
->area_addrs
) > 0)
407 if (area
->is_type
& IS_LEVEL_1
)
408 lsp_generate (area
, IS_LEVEL_1
);
409 if (area
->is_type
& IS_LEVEL_2
)
410 lsp_generate (area
, IS_LEVEL_2
);
417 area_clear_net_title (struct vty
*vty
, const char *net_title
)
419 struct isis_area
*area
;
420 struct area_addr addr
, *addrp
= NULL
;
421 struct listnode
*node
;
427 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
428 return CMD_ERR_NO_MATCH
;
431 addr
.addr_len
= dotformat2buff (buff
, net_title
);
432 if (addr
.addr_len
< 8 || addr
.addr_len
> 20)
434 vty_out (vty
, "Unsupported area address length %d, should be 8...20 %s",
435 addr
.addr_len
, VTY_NEWLINE
);
436 return CMD_ERR_AMBIGUOUS
;
439 memcpy (addr
.area_addr
, buff
, (int) addr
.addr_len
);
441 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node
, addrp
))
442 if ((addrp
->addr_len
+ ISIS_SYS_ID_LEN
+ 1) == addr
.addr_len
&&
443 !memcmp (addrp
->area_addr
, addr
.area_addr
, addr
.addr_len
))
448 vty_out (vty
, "No area address %s for area %s %s", net_title
,
449 area
->area_tag
, VTY_NEWLINE
);
450 return CMD_ERR_NO_MATCH
;
453 listnode_delete (area
->area_addrs
, addrp
);
454 XFREE (MTYPE_ISIS_AREA_ADDR
, addrp
);
457 * Last area address - reset the SystemID for this router
459 if (listcount (area
->area_addrs
) == 0)
461 memset (isis
->sysid
, 0, ISIS_SYS_ID_LEN
);
463 if (isis
->debugs
& DEBUG_EVENTS
)
464 zlog_debug ("Router has no SystemID");
471 * 'show isis interface' command
475 show_isis_interface_common (struct vty
*vty
, const char *ifname
, char detail
)
477 struct listnode
*anode
, *cnode
;
478 struct isis_area
*area
;
479 struct isis_circuit
*circuit
;
483 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
487 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
489 vty_out (vty
, "Area %s:%s", area
->area_tag
, VTY_NEWLINE
);
491 if (detail
== ISIS_UI_LEVEL_BRIEF
)
492 vty_out (vty
, " Interface CircId State Type Level%s",
495 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, cnode
, circuit
))
497 isis_circuit_print_vty (circuit
, vty
, detail
);
498 else if (strcmp(circuit
->interface
->name
, ifname
) == 0)
499 isis_circuit_print_vty (circuit
, vty
, detail
);
505 DEFUN (show_isis_interface
,
506 show_isis_interface_cmd
,
507 "show isis interface",
509 "ISIS network information\n"
512 return show_isis_interface_common (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
515 DEFUN (show_isis_interface_detail
,
516 show_isis_interface_detail_cmd
,
517 "show isis interface detail",
519 "ISIS network information\n"
521 "show detailed information\n")
523 return show_isis_interface_common (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
526 DEFUN (show_isis_interface_arg
,
527 show_isis_interface_arg_cmd
,
528 "show isis interface WORD",
530 "ISIS network information\n"
532 "ISIS interface name\n")
534 return show_isis_interface_common (vty
, argv
[0], ISIS_UI_LEVEL_DETAIL
);
538 * 'show isis neighbor' command
542 show_isis_neighbor_common (struct vty
*vty
, const char *id
, char detail
)
544 struct listnode
*anode
, *cnode
, *node
;
545 struct isis_area
*area
;
546 struct isis_circuit
*circuit
;
548 struct isis_adjacency
*adj
;
549 struct isis_dynhn
*dynhn
;
550 u_char sysid
[ISIS_SYS_ID_LEN
];
555 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
559 memset (sysid
, 0, ISIS_SYS_ID_LEN
);
562 if (sysid2buff (sysid
, id
) == 0)
564 dynhn
= dynhn_find_by_name (id
);
567 vty_out (vty
, "Invalid system id %s%s", id
, VTY_NEWLINE
);
570 memcpy (sysid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
574 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
576 vty_out (vty
, "Area %s:%s", area
->area_tag
, VTY_NEWLINE
);
578 if (detail
== ISIS_UI_LEVEL_BRIEF
)
579 vty_out (vty
, " System Id Interface L State"
580 " Holdtime SNPA%s", VTY_NEWLINE
);
582 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, cnode
, circuit
))
584 if (circuit
->circ_type
== CIRCUIT_T_BROADCAST
)
586 for (i
= 0; i
< 2; i
++)
588 adjdb
= circuit
->u
.bc
.adjdb
[i
];
589 if (adjdb
&& adjdb
->count
)
591 for (ALL_LIST_ELEMENTS_RO (adjdb
, node
, adj
))
592 if (!id
|| !memcmp (adj
->sysid
, sysid
,
594 isis_adj_print_vty (adj
, vty
, detail
);
598 else if (circuit
->circ_type
== CIRCUIT_T_P2P
&&
599 circuit
->u
.p2p
.neighbor
)
601 adj
= circuit
->u
.p2p
.neighbor
;
602 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
603 isis_adj_print_vty (adj
, vty
, detail
);
612 * 'clear isis neighbor' command
615 clear_isis_neighbor_common (struct vty
*vty
, const char *id
)
617 struct listnode
*anode
, *cnode
, *cnextnode
, *node
, *nnode
;
618 struct isis_area
*area
;
619 struct isis_circuit
*circuit
;
621 struct isis_adjacency
*adj
;
622 struct isis_dynhn
*dynhn
;
623 u_char sysid
[ISIS_SYS_ID_LEN
];
628 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
632 memset (sysid
, 0, ISIS_SYS_ID_LEN
);
635 if (sysid2buff (sysid
, id
) == 0)
637 dynhn
= dynhn_find_by_name (id
);
640 vty_out (vty
, "Invalid system id %s%s", id
, VTY_NEWLINE
);
643 memcpy (sysid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
647 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
649 for (ALL_LIST_ELEMENTS (area
->circuit_list
, cnode
, cnextnode
, circuit
))
651 if (circuit
->circ_type
== CIRCUIT_T_BROADCAST
)
653 for (i
= 0; i
< 2; i
++)
655 adjdb
= circuit
->u
.bc
.adjdb
[i
];
656 if (adjdb
&& adjdb
->count
)
658 for (ALL_LIST_ELEMENTS (adjdb
, node
, nnode
, adj
))
659 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
660 isis_adj_state_change (adj
, ISIS_ADJ_DOWN
,
661 "clear user request");
665 else if (circuit
->circ_type
== CIRCUIT_T_P2P
&&
666 circuit
->u
.p2p
.neighbor
)
668 adj
= circuit
->u
.p2p
.neighbor
;
669 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
670 isis_adj_state_change (adj
, ISIS_ADJ_DOWN
,
671 "clear user request");
679 DEFUN (show_isis_neighbor
,
680 show_isis_neighbor_cmd
,
681 "show isis neighbor",
683 "ISIS network information\n"
684 "ISIS neighbor adjacencies\n")
686 return show_isis_neighbor_common (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
689 DEFUN (show_isis_neighbor_detail
,
690 show_isis_neighbor_detail_cmd
,
691 "show isis neighbor detail",
693 "ISIS network information\n"
694 "ISIS neighbor adjacencies\n"
695 "show detailed information\n")
697 return show_isis_neighbor_common (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
700 DEFUN (show_isis_neighbor_arg
,
701 show_isis_neighbor_arg_cmd
,
702 "show isis neighbor WORD",
704 "ISIS network information\n"
705 "ISIS neighbor adjacencies\n"
708 return show_isis_neighbor_common (vty
, argv
[0], ISIS_UI_LEVEL_DETAIL
);
711 DEFUN (clear_isis_neighbor
,
712 clear_isis_neighbor_cmd
,
713 "clear isis neighbor",
715 "Reset ISIS network information\n"
716 "Reset ISIS neighbor adjacencies\n")
718 return clear_isis_neighbor_common (vty
, NULL
);
721 DEFUN (clear_isis_neighbor_arg
,
722 clear_isis_neighbor_arg_cmd
,
723 "clear isis neighbor WORD",
725 "ISIS network information\n"
726 "ISIS neighbor adjacencies\n"
729 return clear_isis_neighbor_common (vty
, argv
[0]);
733 * 'isis debug', 'show debugging'
736 print_debug (struct vty
*vty
, int flags
, int onoff
)
740 strcpy (onoffs
, "on");
742 strcpy (onoffs
, "off");
744 if (flags
& DEBUG_ADJ_PACKETS
)
745 vty_out (vty
, "IS-IS Adjacency related packets debugging is %s%s", onoffs
,
747 if (flags
& DEBUG_CHECKSUM_ERRORS
)
748 vty_out (vty
, "IS-IS checksum errors debugging is %s%s", onoffs
,
750 if (flags
& DEBUG_LOCAL_UPDATES
)
751 vty_out (vty
, "IS-IS local updates debugging is %s%s", onoffs
,
753 if (flags
& DEBUG_PROTOCOL_ERRORS
)
754 vty_out (vty
, "IS-IS protocol errors debugging is %s%s", onoffs
,
756 if (flags
& DEBUG_SNP_PACKETS
)
757 vty_out (vty
, "IS-IS CSNP/PSNP packets debugging is %s%s", onoffs
,
759 if (flags
& DEBUG_SPF_EVENTS
)
760 vty_out (vty
, "IS-IS SPF events debugging is %s%s", onoffs
, VTY_NEWLINE
);
761 if (flags
& DEBUG_SPF_STATS
)
762 vty_out (vty
, "IS-IS SPF Timing and Statistics Data debugging is %s%s",
763 onoffs
, VTY_NEWLINE
);
764 if (flags
& DEBUG_SPF_TRIGGERS
)
765 vty_out (vty
, "IS-IS SPF triggering events debugging is %s%s", onoffs
,
767 if (flags
& DEBUG_UPDATE_PACKETS
)
768 vty_out (vty
, "IS-IS Update related packet debugging is %s%s", onoffs
,
770 if (flags
& DEBUG_RTE_EVENTS
)
771 vty_out (vty
, "IS-IS Route related debuggin is %s%s", onoffs
,
773 if (flags
& DEBUG_EVENTS
)
774 vty_out (vty
, "IS-IS Event debugging is %s%s", onoffs
, VTY_NEWLINE
);
775 if (flags
& DEBUG_PACKET_DUMP
)
776 vty_out (vty
, "IS-IS Packet dump debugging is %s%s", onoffs
, VTY_NEWLINE
);
779 DEFUN (show_debugging
,
781 "show debugging isis",
783 "State of each debugging option\n"
786 vty_out (vty
, "IS-IS:%s", VTY_NEWLINE
);
787 print_debug (vty
, isis
->debugs
, 1);
792 static struct cmd_node debug_node
= {
799 config_write_debug (struct vty
*vty
)
802 int flags
= isis
->debugs
;
804 if (flags
& DEBUG_ADJ_PACKETS
)
806 vty_out (vty
, "debug isis adj-packets%s", VTY_NEWLINE
);
809 if (flags
& DEBUG_CHECKSUM_ERRORS
)
811 vty_out (vty
, "debug isis checksum-errors%s", VTY_NEWLINE
);
814 if (flags
& DEBUG_LOCAL_UPDATES
)
816 vty_out (vty
, "debug isis local-updates%s", VTY_NEWLINE
);
819 if (flags
& DEBUG_PROTOCOL_ERRORS
)
821 vty_out (vty
, "debug isis protocol-errors%s", VTY_NEWLINE
);
824 if (flags
& DEBUG_SNP_PACKETS
)
826 vty_out (vty
, "debug isis snp-packets%s", VTY_NEWLINE
);
829 if (flags
& DEBUG_SPF_EVENTS
)
831 vty_out (vty
, "debug isis spf-events%s", VTY_NEWLINE
);
834 if (flags
& DEBUG_SPF_STATS
)
836 vty_out (vty
, "debug isis spf-statistics%s", VTY_NEWLINE
);
839 if (flags
& DEBUG_SPF_TRIGGERS
)
841 vty_out (vty
, "debug isis spf-triggers%s", VTY_NEWLINE
);
844 if (flags
& DEBUG_UPDATE_PACKETS
)
846 vty_out (vty
, "debug isis update-packets%s", VTY_NEWLINE
);
849 if (flags
& DEBUG_RTE_EVENTS
)
851 vty_out (vty
, "debug isis route-events%s", VTY_NEWLINE
);
854 if (flags
& DEBUG_EVENTS
)
856 vty_out (vty
, "debug isis events%s", VTY_NEWLINE
);
859 if (flags
& DEBUG_PACKET_DUMP
)
861 vty_out (vty
, "debug isis packet-dump%s", VTY_NEWLINE
);
868 DEFUN (debug_isis_adj
,
870 "debug isis adj-packets",
872 "IS-IS information\n"
873 "IS-IS Adjacency related packets\n")
875 isis
->debugs
|= DEBUG_ADJ_PACKETS
;
876 print_debug (vty
, DEBUG_ADJ_PACKETS
, 1);
881 DEFUN (no_debug_isis_adj
,
882 no_debug_isis_adj_cmd
,
883 "no debug isis adj-packets",
885 "IS-IS information\n"
886 "IS-IS Adjacency related packets\n")
888 isis
->debugs
&= ~DEBUG_ADJ_PACKETS
;
889 print_debug (vty
, DEBUG_ADJ_PACKETS
, 0);
894 DEFUN (debug_isis_csum
,
896 "debug isis checksum-errors",
898 "IS-IS information\n"
899 "IS-IS LSP checksum errors\n")
901 isis
->debugs
|= DEBUG_CHECKSUM_ERRORS
;
902 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 1);
907 DEFUN (no_debug_isis_csum
,
908 no_debug_isis_csum_cmd
,
909 "no debug isis checksum-errors",
911 "IS-IS information\n"
912 "IS-IS LSP checksum errors\n")
914 isis
->debugs
&= ~DEBUG_CHECKSUM_ERRORS
;
915 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 0);
920 DEFUN (debug_isis_lupd
,
922 "debug isis local-updates",
924 "IS-IS information\n"
925 "IS-IS local update packets\n")
927 isis
->debugs
|= DEBUG_LOCAL_UPDATES
;
928 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 1);
933 DEFUN (no_debug_isis_lupd
,
934 no_debug_isis_lupd_cmd
,
935 "no debug isis local-updates",
937 "IS-IS information\n"
938 "IS-IS local update packets\n")
940 isis
->debugs
&= ~DEBUG_LOCAL_UPDATES
;
941 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 0);
946 DEFUN (debug_isis_err
,
948 "debug isis protocol-errors",
950 "IS-IS information\n"
951 "IS-IS LSP protocol errors\n")
953 isis
->debugs
|= DEBUG_PROTOCOL_ERRORS
;
954 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 1);
959 DEFUN (no_debug_isis_err
,
960 no_debug_isis_err_cmd
,
961 "no debug isis protocol-errors",
963 "IS-IS information\n"
964 "IS-IS LSP protocol errors\n")
966 isis
->debugs
&= ~DEBUG_PROTOCOL_ERRORS
;
967 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 0);
972 DEFUN (debug_isis_snp
,
974 "debug isis snp-packets",
976 "IS-IS information\n"
977 "IS-IS CSNP/PSNP packets\n")
979 isis
->debugs
|= DEBUG_SNP_PACKETS
;
980 print_debug (vty
, DEBUG_SNP_PACKETS
, 1);
985 DEFUN (no_debug_isis_snp
,
986 no_debug_isis_snp_cmd
,
987 "no debug isis snp-packets",
989 "IS-IS information\n"
990 "IS-IS CSNP/PSNP packets\n")
992 isis
->debugs
&= ~DEBUG_SNP_PACKETS
;
993 print_debug (vty
, DEBUG_SNP_PACKETS
, 0);
998 DEFUN (debug_isis_upd
,
1000 "debug isis update-packets",
1002 "IS-IS information\n"
1003 "IS-IS Update related packets\n")
1005 isis
->debugs
|= DEBUG_UPDATE_PACKETS
;
1006 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 1);
1011 DEFUN (no_debug_isis_upd
,
1012 no_debug_isis_upd_cmd
,
1013 "no debug isis update-packets",
1015 "IS-IS information\n"
1016 "IS-IS Update related packets\n")
1018 isis
->debugs
&= ~DEBUG_UPDATE_PACKETS
;
1019 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 0);
1024 DEFUN (debug_isis_spfevents
,
1025 debug_isis_spfevents_cmd
,
1026 "debug isis spf-events",
1028 "IS-IS information\n"
1029 "IS-IS Shortest Path First Events\n")
1031 isis
->debugs
|= DEBUG_SPF_EVENTS
;
1032 print_debug (vty
, DEBUG_SPF_EVENTS
, 1);
1037 DEFUN (no_debug_isis_spfevents
,
1038 no_debug_isis_spfevents_cmd
,
1039 "no debug isis spf-events",
1041 "IS-IS information\n"
1042 "IS-IS Shortest Path First Events\n")
1044 isis
->debugs
&= ~DEBUG_SPF_EVENTS
;
1045 print_debug (vty
, DEBUG_SPF_EVENTS
, 0);
1050 DEFUN (debug_isis_spfstats
,
1051 debug_isis_spfstats_cmd
,
1052 "debug isis spf-statistics ",
1054 "IS-IS information\n"
1055 "IS-IS SPF Timing and Statistic Data\n")
1057 isis
->debugs
|= DEBUG_SPF_STATS
;
1058 print_debug (vty
, DEBUG_SPF_STATS
, 1);
1063 DEFUN (no_debug_isis_spfstats
,
1064 no_debug_isis_spfstats_cmd
,
1065 "no debug isis spf-statistics",
1067 "IS-IS information\n"
1068 "IS-IS SPF Timing and Statistic Data\n")
1070 isis
->debugs
&= ~DEBUG_SPF_STATS
;
1071 print_debug (vty
, DEBUG_SPF_STATS
, 0);
1076 DEFUN (debug_isis_spftrigg
,
1077 debug_isis_spftrigg_cmd
,
1078 "debug isis spf-triggers",
1080 "IS-IS information\n"
1081 "IS-IS SPF triggering events\n")
1083 isis
->debugs
|= DEBUG_SPF_TRIGGERS
;
1084 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 1);
1089 DEFUN (no_debug_isis_spftrigg
,
1090 no_debug_isis_spftrigg_cmd
,
1091 "no debug isis spf-triggers",
1093 "IS-IS information\n"
1094 "IS-IS SPF triggering events\n")
1096 isis
->debugs
&= ~DEBUG_SPF_TRIGGERS
;
1097 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 0);
1102 DEFUN (debug_isis_rtevents
,
1103 debug_isis_rtevents_cmd
,
1104 "debug isis route-events",
1106 "IS-IS information\n"
1107 "IS-IS Route related events\n")
1109 isis
->debugs
|= DEBUG_RTE_EVENTS
;
1110 print_debug (vty
, DEBUG_RTE_EVENTS
, 1);
1115 DEFUN (no_debug_isis_rtevents
,
1116 no_debug_isis_rtevents_cmd
,
1117 "no debug isis route-events",
1119 "IS-IS information\n"
1120 "IS-IS Route related events\n")
1122 isis
->debugs
&= ~DEBUG_RTE_EVENTS
;
1123 print_debug (vty
, DEBUG_RTE_EVENTS
, 0);
1128 DEFUN (debug_isis_events
,
1129 debug_isis_events_cmd
,
1130 "debug isis events",
1132 "IS-IS information\n"
1135 isis
->debugs
|= DEBUG_EVENTS
;
1136 print_debug (vty
, DEBUG_EVENTS
, 1);
1141 DEFUN (no_debug_isis_events
,
1142 no_debug_isis_events_cmd
,
1143 "no debug isis events",
1145 "IS-IS information\n"
1148 isis
->debugs
&= ~DEBUG_EVENTS
;
1149 print_debug (vty
, DEBUG_EVENTS
, 0);
1154 DEFUN (debug_isis_packet_dump
,
1155 debug_isis_packet_dump_cmd
,
1156 "debug isis packet-dump",
1158 "IS-IS information\n"
1159 "IS-IS packet dump\n")
1161 isis
->debugs
|= DEBUG_PACKET_DUMP
;
1162 print_debug (vty
, DEBUG_PACKET_DUMP
, 1);
1167 DEFUN (no_debug_isis_packet_dump
,
1168 no_debug_isis_packet_dump_cmd
,
1169 "no debug isis packet-dump",
1171 "IS-IS information\n"
1172 "IS-IS packet dump\n")
1174 isis
->debugs
&= ~DEBUG_PACKET_DUMP
;
1175 print_debug (vty
, DEBUG_PACKET_DUMP
, 0);
1180 DEFUN (show_hostname
,
1182 "show isis hostname",
1184 "IS-IS information\n"
1185 "IS-IS Dynamic hostname mapping\n")
1187 dynhn_print_all (vty
);
1193 vty_out_timestr(struct vty
*vty
, time_t uptime
)
1196 time_t difftime
= time (NULL
);
1198 tm
= gmtime (&difftime
);
1200 #define ONE_DAY_SECOND 60*60*24
1201 #define ONE_WEEK_SECOND 60*60*24*7
1202 if (difftime
< ONE_DAY_SECOND
)
1203 vty_out (vty
, "%02d:%02d:%02d",
1204 tm
->tm_hour
, tm
->tm_min
, tm
->tm_sec
);
1205 else if (difftime
< ONE_WEEK_SECOND
)
1206 vty_out (vty
, "%dd%02dh%02dm",
1207 tm
->tm_yday
, tm
->tm_hour
, tm
->tm_min
);
1209 vty_out (vty
, "%02dw%dd%02dh",
1211 tm
->tm_yday
- ((tm
->tm_yday
/7) * 7), tm
->tm_hour
);
1212 vty_out (vty
, " ago");
1215 DEFUN (show_isis_summary
,
1216 show_isis_summary_cmd
,
1217 "show isis summary",
1218 SHOW_STR
"IS-IS information\n" "IS-IS summary\n")
1220 struct listnode
*node
, *node2
;
1221 struct isis_area
*area
;
1222 struct isis_spftree
*spftree
;
1227 vty_out (vty
, "ISIS is not running%s", VTY_NEWLINE
);
1231 vty_out (vty
, "Process Id : %ld%s", isis
->process_id
,
1233 if (isis
->sysid_set
)
1234 vty_out (vty
, "System Id : %s%s", sysid_print (isis
->sysid
),
1237 vty_out (vty
, "Up time : ");
1238 vty_out_timestr(vty
, isis
->uptime
);
1239 vty_out (vty
, "%s", VTY_NEWLINE
);
1241 if (isis
->area_list
)
1242 vty_out (vty
, "Number of areas : %d%s", isis
->area_list
->count
,
1245 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1247 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1250 if (listcount (area
->area_addrs
) > 0)
1252 struct area_addr
*area_addr
;
1253 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
1255 vty_out (vty
, " Net: %s%s",
1256 isonet_print (area_addr
->area_addr
,
1257 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
1262 for (level
= ISIS_LEVEL1
; level
<= ISIS_LEVELS
; level
++)
1264 if ((area
->is_type
& level
) == 0)
1267 vty_out (vty
, " Level-%d:%s", level
, VTY_NEWLINE
);
1268 spftree
= area
->spftree
[level
- 1];
1269 if (spftree
->pending
)
1270 vty_out (vty
, " IPv4 SPF: (pending)%s", VTY_NEWLINE
);
1272 vty_out (vty
, " IPv4 SPF:%s", VTY_NEWLINE
);
1274 vty_out (vty
, " minimum interval : %d%s",
1275 area
->min_spf_interval
[level
- 1], VTY_NEWLINE
);
1277 vty_out (vty
, " last run elapsed : ");
1278 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1279 vty_out (vty
, "%s", VTY_NEWLINE
);
1281 vty_out (vty
, " last run duration : %u usec%s",
1282 (u_int32_t
)spftree
->last_run_duration
, VTY_NEWLINE
);
1284 vty_out (vty
, " run count : %d%s",
1285 spftree
->runcount
, VTY_NEWLINE
);
1288 spftree
= area
->spftree6
[level
- 1];
1289 if (spftree
->pending
)
1290 vty_out (vty
, " IPv6 SPF: (pending)%s", VTY_NEWLINE
);
1292 vty_out (vty
, " IPv6 SPF:%s", VTY_NEWLINE
);
1294 vty_out (vty
, " minimum interval : %d%s",
1295 area
->min_spf_interval
[level
- 1], VTY_NEWLINE
);
1297 vty_out (vty
, " last run elapsed : ");
1298 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1299 vty_out (vty
, "%s", VTY_NEWLINE
);
1301 vty_out (vty
, " last run duration : %ld msec%s",
1302 spftree
->last_run_duration
, VTY_NEWLINE
);
1304 vty_out (vty
, " run count : %d%s",
1305 spftree
->runcount
, VTY_NEWLINE
);
1309 vty_out (vty
, "%s", VTY_NEWLINE
);
1315 * This function supports following display options:
1316 * [ show isis database [detail] ]
1317 * [ show isis database <sysid> [detail] ]
1318 * [ show isis database <hostname> [detail] ]
1319 * [ show isis database <sysid>.<pseudo-id> [detail] ]
1320 * [ show isis database <hostname>.<pseudo-id> [detail] ]
1321 * [ show isis database <sysid>.<pseudo-id>-<fragment-number> [detail] ]
1322 * [ show isis database <hostname>.<pseudo-id>-<fragment-number> [detail] ]
1323 * [ show isis database detail <sysid> ]
1324 * [ show isis database detail <hostname> ]
1325 * [ show isis database detail <sysid>.<pseudo-id> ]
1326 * [ show isis database detail <hostname>.<pseudo-id> ]
1327 * [ show isis database detail <sysid>.<pseudo-id>-<fragment-number> ]
1328 * [ show isis database detail <hostname>.<pseudo-id>-<fragment-number> ]
1331 show_isis_database (struct vty
*vty
, const char *argv
, int ui_level
)
1333 struct listnode
*node
;
1334 struct isis_area
*area
;
1335 struct isis_lsp
*lsp
;
1336 struct isis_dynhn
*dynhn
;
1337 const char *pos
= argv
;
1338 u_char lspid
[ISIS_SYS_ID_LEN
+2];
1341 int level
, lsp_count
;
1343 if (isis
->area_list
->count
== 0)
1346 memset (&lspid
, 0, ISIS_SYS_ID_LEN
);
1347 memset (&sysid
, 0, 255);
1350 * extract fragment and pseudo id from the string argv
1352 * (a) <systemid/hostname>.<pseudo-id>-<framenent> or
1353 * (b) <systemid/hostname>.<pseudo-id> or
1354 * (c) <systemid/hostname> or
1355 * Where systemid is in the form:
1359 strncpy (sysid
, argv
, 254);
1360 if (argv
&& strlen (argv
) > 3)
1362 pos
= argv
+ strlen (argv
) - 3;
1363 if (strncmp (pos
, "-", 1) == 0)
1365 memcpy (number
, ++pos
, 2);
1366 lspid
[ISIS_SYS_ID_LEN
+1] = (u_char
) strtol ((char *)number
, NULL
, 16);
1368 if (strncmp (pos
, ".", 1) != 0)
1369 return CMD_ERR_AMBIGUOUS
;
1371 if (strncmp (pos
, ".", 1) == 0)
1373 memcpy (number
, ++pos
, 2);
1374 lspid
[ISIS_SYS_ID_LEN
] = (u_char
) strtol ((char *)number
, NULL
, 16);
1375 sysid
[pos
- argv
- 1] = '\0';
1379 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1381 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1384 for (level
= 0; level
< ISIS_LEVELS
; level
++)
1386 if (area
->lspdb
[level
] && dict_count (area
->lspdb
[level
]) > 0)
1392 * Try to find the lsp-id if the argv string is in
1393 * the form hostname.<pseudo-id>-<fragment>
1395 if (sysid2buff (lspid
, sysid
))
1397 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1399 else if ((dynhn
= dynhn_find_by_name (sysid
)))
1401 memcpy (lspid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
1402 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1404 else if (strncmp(unix_hostname (), sysid
, 15) == 0)
1406 memcpy (lspid
, isis
->sysid
, ISIS_SYS_ID_LEN
);
1407 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1411 if (lsp
!= NULL
|| argv
== NULL
)
1413 vty_out (vty
, "IS-IS Level-%d link-state database:%s",
1414 level
+ 1, VTY_NEWLINE
);
1416 /* print the title in all cases */
1417 vty_out (vty
, "LSP ID PduLen "
1418 "SeqNumber Chksum Holdtime ATT/P/OL%s",
1424 if (ui_level
== ISIS_UI_LEVEL_DETAIL
)
1425 lsp_print_detail (lsp
, vty
, area
->dynhostname
);
1427 lsp_print (lsp
, vty
, area
->dynhostname
);
1429 else if (argv
== NULL
)
1431 lsp_count
= lsp_print_all (vty
, area
->lspdb
[level
],
1435 vty_out (vty
, " %u LSPs%s%s",
1436 lsp_count
, VTY_NEWLINE
, VTY_NEWLINE
);
1445 DEFUN (show_database_brief
,
1447 "show isis database",
1449 "IS-IS information\n"
1450 "IS-IS link state database\n")
1452 return show_isis_database (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
1455 DEFUN (show_database_lsp_brief
,
1456 show_database_arg_cmd
,
1457 "show isis database WORD",
1459 "IS-IS information\n"
1460 "IS-IS link state database\n"
1463 return show_isis_database (vty
, argv
[0], ISIS_UI_LEVEL_BRIEF
);
1466 DEFUN (show_database_lsp_detail
,
1467 show_database_arg_detail_cmd
,
1468 "show isis database WORD detail",
1470 "IS-IS information\n"
1471 "IS-IS link state database\n"
1473 "Detailed information\n")
1475 return show_isis_database (vty
, argv
[0], ISIS_UI_LEVEL_DETAIL
);
1478 DEFUN (show_database_detail
,
1479 show_database_detail_cmd
,
1480 "show isis database detail",
1482 "IS-IS information\n"
1483 "IS-IS link state database\n")
1485 return show_isis_database (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
1488 DEFUN (show_database_detail_lsp
,
1489 show_database_detail_arg_cmd
,
1490 "show isis database detail WORD",
1492 "IS-IS information\n"
1493 "IS-IS link state database\n"
1494 "Detailed information\n"
1497 return show_isis_database (vty
, argv
[0], ISIS_UI_LEVEL_DETAIL
);
1501 * 'router isis' command
1508 "ISO Routing area tag")
1510 return isis_area_get (vty
, argv
[0]);
1514 *'no router isis' command
1516 DEFUN (no_router_isis
,
1518 "no router isis WORD",
1519 "no\n" ROUTER_STR
"ISO IS-IS\n" "ISO Routing area tag")
1521 return isis_area_destroy (vty
, argv
[0]);
1530 "A Network Entity Title for this process (OSI only)\n"
1531 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1533 return area_net_title (vty
, argv
[0]);
1543 "A Network Entity Title for this process (OSI only)\n"
1544 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1546 return area_clear_net_title (vty
, argv
[0]);
1549 DEFUN (area_passwd_md5
,
1550 area_passwd_md5_cmd
,
1551 "area-password md5 WORD",
1552 "Configure the authentication password for an area\n"
1553 "Authentication type\n"
1556 struct isis_area
*area
;
1563 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1564 return CMD_ERR_NO_MATCH
;
1567 len
= strlen (argv
[0]);
1570 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1571 return CMD_ERR_AMBIGUOUS
;
1574 area
->area_passwd
.len
= (u_char
) len
;
1575 area
->area_passwd
.type
= ISIS_PASSWD_TYPE_HMAC_MD5
;
1576 strncpy ((char *)area
->area_passwd
.passwd
, argv
[0], 255);
1580 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1581 if (strncmp(argv
[1], "v", 1) == 0)
1582 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1584 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1588 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1589 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1591 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1596 ALIAS (area_passwd_md5
,
1597 area_passwd_md5_snpauth_cmd
,
1598 "area-password md5 WORD authenticate snp (send-only|validate)",
1599 "Configure the authentication password for an area\n"
1600 "Authentication type\n"
1604 "Send but do not check PDUs on receiving\n"
1605 "Send and check PDUs on receiving\n");
1607 DEFUN (area_passwd_clear
,
1608 area_passwd_clear_cmd
,
1609 "area-password clear WORD",
1610 "Configure the authentication password for an area\n"
1611 "Authentication type\n"
1614 struct isis_area
*area
;
1621 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1622 return CMD_ERR_NO_MATCH
;
1625 len
= strlen (argv
[0]);
1628 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1629 return CMD_ERR_AMBIGUOUS
;
1632 area
->area_passwd
.len
= (u_char
) len
;
1633 area
->area_passwd
.type
= ISIS_PASSWD_TYPE_CLEARTXT
;
1634 strncpy ((char *)area
->area_passwd
.passwd
, argv
[0], 255);
1638 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1639 if (strncmp(argv
[1], "v", 1) == 0)
1640 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1642 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1646 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1647 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1649 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1654 ALIAS (area_passwd_clear
,
1655 area_passwd_clear_snpauth_cmd
,
1656 "area-password clear WORD authenticate snp (send-only|validate)",
1657 "Configure the authentication password for an area\n"
1658 "Authentication type\n"
1662 "Send but do not check PDUs on receiving\n"
1663 "Send and check PDUs on receiving\n");
1665 DEFUN (no_area_passwd
,
1669 "Configure the authentication password for an area\n")
1671 struct isis_area
*area
;
1677 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1678 return CMD_ERR_NO_MATCH
;
1681 memset (&area
->area_passwd
, 0, sizeof (struct isis_passwd
));
1682 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1687 DEFUN (domain_passwd_md5
,
1688 domain_passwd_md5_cmd
,
1689 "domain-password md5 WORD",
1690 "Set the authentication password for a routing domain\n"
1691 "Authentication type\n"
1692 "Routing domain password\n")
1694 struct isis_area
*area
;
1701 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1702 return CMD_ERR_NO_MATCH
;
1705 len
= strlen (argv
[0]);
1708 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1709 return CMD_ERR_AMBIGUOUS
;
1712 area
->domain_passwd
.len
= (u_char
) len
;
1713 area
->domain_passwd
.type
= ISIS_PASSWD_TYPE_HMAC_MD5
;
1714 strncpy ((char *)area
->domain_passwd
.passwd
, argv
[0], 255);
1718 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1719 if (strncmp(argv
[1], "v", 1) == 0)
1720 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1722 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1726 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1727 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1729 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1734 ALIAS (domain_passwd_md5
,
1735 domain_passwd_md5_snpauth_cmd
,
1736 "domain-password md5 WORD authenticate snp (send-only|validate)",
1737 "Set the authentication password for a routing domain\n"
1738 "Authentication type\n"
1739 "Routing domain password\n"
1742 "Send but do not check PDUs on receiving\n"
1743 "Send and check PDUs on receiving\n");
1745 DEFUN (domain_passwd_clear
,
1746 domain_passwd_clear_cmd
,
1747 "domain-password clear WORD",
1748 "Set the authentication password for a routing domain\n"
1749 "Authentication type\n"
1750 "Routing domain password\n")
1752 struct isis_area
*area
;
1759 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1760 return CMD_ERR_NO_MATCH
;
1763 len
= strlen (argv
[0]);
1766 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1767 return CMD_ERR_AMBIGUOUS
;
1770 area
->domain_passwd
.len
= (u_char
) len
;
1771 area
->domain_passwd
.type
= ISIS_PASSWD_TYPE_CLEARTXT
;
1772 strncpy ((char *)area
->domain_passwd
.passwd
, argv
[0], 255);
1776 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1777 if (strncmp(argv
[1], "v", 1) == 0)
1778 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1780 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1784 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1785 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1787 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1792 ALIAS (domain_passwd_clear
,
1793 domain_passwd_clear_snpauth_cmd
,
1794 "domain-password clear WORD authenticate snp (send-only|validate)",
1795 "Set the authentication password for a routing domain\n"
1796 "Authentication type\n"
1797 "Routing domain password\n"
1800 "Send but do not check PDUs on receiving\n"
1801 "Send and check PDUs on receiving\n");
1803 DEFUN (no_domain_passwd
,
1804 no_domain_passwd_cmd
,
1805 "no domain-password",
1807 "Set the authentication password for a routing domain\n")
1809 struct isis_area
*area
;
1815 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1816 return CMD_ERR_NO_MATCH
;
1819 memset (&area
->domain_passwd
, 0, sizeof (struct isis_passwd
));
1820 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1827 "is-type (level-1|level-1-2|level-2-only)",
1828 "IS Level for this routing process (OSI only)\n"
1829 "Act as a station router only\n"
1830 "Act as both a station router and an area router\n"
1831 "Act as an area router only\n")
1833 struct isis_area
*area
;
1840 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1841 return CMD_ERR_NO_MATCH
;
1844 type
= string2circuit_t (argv
[0]);
1847 vty_out (vty
, "Unknown IS level %s", VTY_NEWLINE
);
1851 isis_event_system_type_change (area
, type
);
1858 "no is-type (level-1|level-1-2|level-2-only)",
1860 "IS Level for this routing process (OSI only)\n"
1861 "Act as a station router only\n"
1862 "Act as both a station router and an area router\n"
1863 "Act as an area router only\n")
1865 struct isis_area
*area
;
1872 * Put the is-type back to defaults:
1873 * - level-1-2 on first area
1874 * - level-1 for the rest
1876 if (listgetdata (listhead (isis
->area_list
)) == area
)
1877 type
= IS_LEVEL_1_AND_2
;
1881 isis_event_system_type_change (area
, type
);
1887 set_lsp_gen_interval (struct vty
*vty
, struct isis_area
*area
,
1888 uint16_t interval
, int level
)
1892 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
1897 if (interval
>= area
->lsp_refresh
[lvl
-1])
1899 vty_out (vty
, "LSP gen interval %us must be less than "
1900 "the LSP refresh interval %us%s",
1901 interval
, area
->lsp_refresh
[lvl
-1], VTY_NEWLINE
);
1902 return CMD_ERR_AMBIGUOUS
;
1906 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
1910 area
->lsp_gen_interval
[lvl
-1] = interval
;
1916 DEFUN (lsp_gen_interval
,
1917 lsp_gen_interval_cmd
,
1918 "lsp-gen-interval <1-120>",
1919 "Minimum interval between regenerating same LSP\n"
1920 "Minimum interval in seconds\n")
1922 struct isis_area
*area
;
1927 interval
= atoi (argv
[0]);
1928 level
= IS_LEVEL_1
| IS_LEVEL_2
;
1929 return set_lsp_gen_interval (vty
, area
, interval
, level
);
1932 DEFUN (no_lsp_gen_interval
,
1933 no_lsp_gen_interval_cmd
,
1934 "no lsp-gen-interval",
1936 "Minimum interval between regenerating same LSP\n")
1938 struct isis_area
*area
;
1943 interval
= DEFAULT_MIN_LSP_GEN_INTERVAL
;
1944 level
= IS_LEVEL_1
| IS_LEVEL_2
;
1945 return set_lsp_gen_interval (vty
, area
, interval
, level
);
1948 ALIAS (no_lsp_gen_interval
,
1949 no_lsp_gen_interval_arg_cmd
,
1950 "no lsp-gen-interval <1-120>",
1952 "Minimum interval between regenerating same LSP\n"
1953 "Minimum interval in seconds\n")
1955 DEFUN (lsp_gen_interval_l1
,
1956 lsp_gen_interval_l1_cmd
,
1957 "lsp-gen-interval level-1 <1-120>",
1958 "Minimum interval between regenerating same LSP\n"
1959 "Set interval for level 1 only\n"
1960 "Minimum interval in seconds\n")
1962 struct isis_area
*area
;
1967 interval
= atoi (argv
[0]);
1969 return set_lsp_gen_interval (vty
, area
, interval
, level
);
1972 DEFUN (no_lsp_gen_interval_l1
,
1973 no_lsp_gen_interval_l1_cmd
,
1974 "no lsp-gen-interval level-1",
1976 "Minimum interval between regenerating same LSP\n"
1977 "Set interval for level 1 only\n")
1979 struct isis_area
*area
;
1984 interval
= DEFAULT_MIN_LSP_GEN_INTERVAL
;
1986 return set_lsp_gen_interval (vty
, area
, interval
, level
);
1989 ALIAS (no_lsp_gen_interval_l1
,
1990 no_lsp_gen_interval_l1_arg_cmd
,
1991 "no lsp-gen-interval level-1 <1-120>",
1993 "Minimum interval between regenerating same LSP\n"
1994 "Set interval for level 1 only\n"
1995 "Minimum interval in seconds\n")
1997 DEFUN (lsp_gen_interval_l2
,
1998 lsp_gen_interval_l2_cmd
,
1999 "lsp-gen-interval level-2 <1-120>",
2000 "Minimum interval between regenerating same LSP\n"
2001 "Set interval for level 2 only\n"
2002 "Minimum interval in seconds\n")
2004 struct isis_area
*area
;
2009 interval
= atoi (argv
[0]);
2011 return set_lsp_gen_interval (vty
, area
, interval
, level
);
2014 DEFUN (no_lsp_gen_interval_l2
,
2015 no_lsp_gen_interval_l2_cmd
,
2016 "no lsp-gen-interval level-2",
2018 "Minimum interval between regenerating same LSP\n"
2019 "Set interval for level 2 only\n")
2021 struct isis_area
*area
;
2026 interval
= DEFAULT_MIN_LSP_GEN_INTERVAL
;
2028 return set_lsp_gen_interval (vty
, area
, interval
, level
);
2031 ALIAS (no_lsp_gen_interval_l2
,
2032 no_lsp_gen_interval_l2_arg_cmd
,
2033 "no lsp-gen-interval level-2 <1-120>",
2035 "Minimum interval between regenerating same LSP\n"
2036 "Set interval for level 2 only\n"
2037 "Minimum interval in seconds\n")
2040 validate_metric_style_narrow (struct vty
*vty
, struct isis_area
*area
)
2042 struct isis_circuit
*circuit
;
2043 struct listnode
*node
;
2046 return CMD_ERR_AMBIGUOUS
;
2050 vty_out (vty
, "ISIS area is invalid%s", VTY_NEWLINE
);
2051 return CMD_ERR_AMBIGUOUS
;
2054 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, node
, circuit
))
2056 if ((area
->is_type
& IS_LEVEL_1
) &&
2057 (circuit
->is_type
& IS_LEVEL_1
) &&
2058 (circuit
->te_metric
[0] > MAX_NARROW_LINK_METRIC
))
2060 vty_out (vty
, "ISIS circuit %s metric is invalid%s",
2061 circuit
->interface
->name
, VTY_NEWLINE
);
2062 return CMD_ERR_AMBIGUOUS
;
2064 if ((area
->is_type
& IS_LEVEL_2
) &&
2065 (circuit
->is_type
& IS_LEVEL_2
) &&
2066 (circuit
->te_metric
[1] > MAX_NARROW_LINK_METRIC
))
2068 vty_out (vty
, "ISIS circuit %s metric is invalid%s",
2069 circuit
->interface
->name
, VTY_NEWLINE
);
2070 return CMD_ERR_AMBIGUOUS
;
2077 DEFUN (metric_style
,
2079 "metric-style (narrow|transition|wide)",
2080 "Use old-style (ISO 10589) or new-style packet formats\n"
2081 "Use old style of TLVs with narrow metric\n"
2082 "Send and accept both styles of TLVs during transition\n"
2083 "Use new style of TLVs to carry wider metric\n")
2085 struct isis_area
*area
;
2091 if (strncmp (argv
[0], "w", 1) == 0)
2093 area
->newmetric
= 1;
2094 area
->oldmetric
= 0;
2098 ret
= validate_metric_style_narrow (vty
, area
);
2099 if (ret
!= CMD_SUCCESS
)
2102 if (strncmp (argv
[0], "t", 1) == 0)
2104 area
->newmetric
= 1;
2105 area
->oldmetric
= 1;
2107 else if (strncmp (argv
[0], "n", 1) == 0)
2109 area
->newmetric
= 0;
2110 area
->oldmetric
= 1;
2117 DEFUN (no_metric_style
,
2118 no_metric_style_cmd
,
2121 "Use old-style (ISO 10589) or new-style packet formats\n")
2123 struct isis_area
*area
;
2129 ret
= validate_metric_style_narrow (vty
, area
);
2130 if (ret
!= CMD_SUCCESS
)
2133 /* Default is narrow metric. */
2134 area
->newmetric
= 0;
2135 area
->oldmetric
= 1;
2140 DEFUN (set_overload_bit
,
2141 set_overload_bit_cmd
,
2143 "Set overload bit to avoid any transit traffic\n"
2144 "Set overload bit\n")
2146 struct isis_area
*area
;
2151 area
->overload_bit
= LSPBIT_OL
;
2152 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2157 DEFUN (no_set_overload_bit
,
2158 no_set_overload_bit_cmd
,
2159 "no set-overload-bit",
2160 "Reset overload bit to accept transit traffic\n"
2161 "Reset overload bit\n")
2163 struct isis_area
*area
;
2168 area
->overload_bit
= 0;
2169 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2174 DEFUN (set_attached_bit
,
2175 set_attached_bit_cmd
,
2177 "Set attached bit to identify as L1/L2 router for inter-area traffic\n"
2178 "Set attached bit\n")
2180 struct isis_area
*area
;
2185 area
->attached_bit
= LSPBIT_ATT
;
2186 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2191 DEFUN (no_set_attached_bit
,
2192 no_set_attached_bit_cmd
,
2193 "no set-attached-bit",
2194 "Reset attached bit\n")
2196 struct isis_area
*area
;
2201 area
->attached_bit
= 0;
2202 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2207 DEFUN (dynamic_hostname
,
2208 dynamic_hostname_cmd
,
2210 "Dynamic hostname for IS-IS\n"
2211 "Dynamic hostname\n")
2213 struct isis_area
*area
;
2218 if (!area
->dynhostname
)
2220 area
->dynhostname
= 1;
2221 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
2227 DEFUN (no_dynamic_hostname
,
2228 no_dynamic_hostname_cmd
,
2229 "no hostname dynamic",
2231 "Dynamic hostname for IS-IS\n"
2232 "Dynamic hostname\n")
2234 struct isis_area
*area
;
2239 if (area
->dynhostname
)
2241 area
->dynhostname
= 0;
2242 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
2248 DEFUN (spf_interval
,
2250 "spf-interval <1-120>",
2251 "Minimum interval between SPF calculations\n"
2252 "Minimum interval between consecutive SPFs in seconds\n")
2254 struct isis_area
*area
;
2258 interval
= atoi (argv
[0]);
2259 area
->min_spf_interval
[0] = interval
;
2260 area
->min_spf_interval
[1] = interval
;
2265 DEFUN (no_spf_interval
,
2266 no_spf_interval_cmd
,
2269 "Minimum interval between SPF calculations\n")
2271 struct isis_area
*area
;
2275 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
2276 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
2281 ALIAS (no_spf_interval
,
2282 no_spf_interval_arg_cmd
,
2283 "no spf-interval <1-120>",
2285 "Minimum interval between SPF calculations\n"
2286 "Minimum interval between consecutive SPFs in seconds\n")
2288 DEFUN (spf_interval_l1
,
2289 spf_interval_l1_cmd
,
2290 "spf-interval level-1 <1-120>",
2291 "Minimum interval between SPF calculations\n"
2292 "Set interval for level 1 only\n"
2293 "Minimum interval between consecutive SPFs in seconds\n")
2295 struct isis_area
*area
;
2299 interval
= atoi (argv
[0]);
2300 area
->min_spf_interval
[0] = interval
;
2305 DEFUN (no_spf_interval_l1
,
2306 no_spf_interval_l1_cmd
,
2307 "no spf-interval level-1",
2309 "Minimum interval between SPF calculations\n"
2310 "Set interval for level 1 only\n")
2312 struct isis_area
*area
;
2316 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
2321 ALIAS (no_spf_interval
,
2322 no_spf_interval_l1_arg_cmd
,
2323 "no spf-interval level-1 <1-120>",
2325 "Minimum interval between SPF calculations\n"
2326 "Set interval for level 1 only\n"
2327 "Minimum interval between consecutive SPFs in seconds\n")
2329 DEFUN (spf_interval_l2
,
2330 spf_interval_l2_cmd
,
2331 "spf-interval level-2 <1-120>",
2332 "Minimum interval between SPF calculations\n"
2333 "Set interval for level 2 only\n"
2334 "Minimum interval between consecutive SPFs in seconds\n")
2336 struct isis_area
*area
;
2340 interval
= atoi (argv
[0]);
2341 area
->min_spf_interval
[1] = interval
;
2346 DEFUN (no_spf_interval_l2
,
2347 no_spf_interval_l2_cmd
,
2348 "no spf-interval level-2",
2350 "Minimum interval between SPF calculations\n"
2351 "Set interval for level 2 only\n")
2353 struct isis_area
*area
;
2357 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
2362 ALIAS (no_spf_interval
,
2363 no_spf_interval_l2_arg_cmd
,
2364 "no spf-interval level-2 <1-120>",
2366 "Minimum interval between SPF calculations\n"
2367 "Set interval for level 2 only\n"
2368 "Minimum interval between consecutive SPFs in seconds\n")
2371 set_lsp_max_lifetime (struct vty
*vty
, struct isis_area
*area
,
2372 uint16_t interval
, int level
)
2375 int set_refresh_interval
[ISIS_LEVELS
] = {0, 0};
2376 uint16_t refresh_interval
;
2378 refresh_interval
= interval
- 300;
2380 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; lvl
++)
2384 if (refresh_interval
< area
->lsp_refresh
[lvl
-1])
2386 vty_out (vty
, "Level %d Max LSP lifetime %us must be 300s greater than "
2387 "the configured LSP refresh interval %us%s",
2388 lvl
, interval
, area
->lsp_refresh
[lvl
-1], VTY_NEWLINE
);
2389 vty_out (vty
, "Automatically reducing level %d LSP refresh interval "
2390 "to %us%s", lvl
, refresh_interval
, VTY_NEWLINE
);
2391 set_refresh_interval
[lvl
-1] = 1;
2393 if (refresh_interval
<= area
->lsp_gen_interval
[lvl
-1])
2395 vty_out (vty
, "LSP refresh interval %us must be greater than "
2396 "the configured LSP gen interval %us%s",
2397 refresh_interval
, area
->lsp_gen_interval
[lvl
-1],
2399 return CMD_ERR_AMBIGUOUS
;
2404 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; lvl
++)
2408 area
->max_lsp_lifetime
[lvl
-1] = interval
;
2409 /* Automatically reducing lsp_refresh_interval to interval - 300 */
2410 if (set_refresh_interval
[lvl
-1])
2411 area
->lsp_refresh
[lvl
-1] = refresh_interval
;
2414 lsp_regenerate_schedule (area
, level
, 1);
2419 DEFUN (max_lsp_lifetime
,
2420 max_lsp_lifetime_cmd
,
2421 "max-lsp-lifetime <350-65535>",
2422 "Maximum LSP lifetime\n"
2423 "LSP lifetime in seconds\n")
2425 struct isis_area
*area
;
2430 interval
= atoi (argv
[0]);
2431 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2432 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2435 DEFUN (no_max_lsp_lifetime
,
2436 no_max_lsp_lifetime_cmd
,
2437 "no max-lsp-lifetime",
2439 "LSP lifetime in seconds\n")
2441 struct isis_area
*area
;
2446 interval
= DEFAULT_LSP_LIFETIME
;
2447 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2448 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2451 ALIAS (no_max_lsp_lifetime
,
2452 no_max_lsp_lifetime_arg_cmd
,
2453 "no max-lsp-lifetime <350-65535>",
2455 "Maximum LSP lifetime\n"
2456 "LSP lifetime in seconds\n")
2458 DEFUN (max_lsp_lifetime_l1
,
2459 max_lsp_lifetime_l1_cmd
,
2460 "max-lsp-lifetime level-1 <350-65535>",
2461 "Maximum LSP lifetime for Level 1 only\n"
2462 "LSP lifetime for Level 1 only in seconds\n")
2464 struct isis_area
*area
;
2469 interval
= atoi (argv
[0]);
2471 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2474 DEFUN (no_max_lsp_lifetime_l1
,
2475 no_max_lsp_lifetime_l1_cmd
,
2476 "no max-lsp-lifetime level-1",
2478 "LSP lifetime for Level 1 only in seconds\n")
2480 struct isis_area
*area
;
2485 interval
= DEFAULT_LSP_LIFETIME
;
2487 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2490 ALIAS (no_max_lsp_lifetime_l1
,
2491 no_max_lsp_lifetime_l1_arg_cmd
,
2492 "no max-lsp-lifetime level-1 <350-65535>",
2494 "Maximum LSP lifetime for Level 1 only\n"
2495 "LSP lifetime for Level 1 only in seconds\n")
2497 DEFUN (max_lsp_lifetime_l2
,
2498 max_lsp_lifetime_l2_cmd
,
2499 "max-lsp-lifetime level-2 <350-65535>",
2500 "Maximum LSP lifetime for Level 2 only\n"
2501 "LSP lifetime for Level 2 only in seconds\n")
2503 struct isis_area
*area
;
2508 interval
= atoi (argv
[0]);
2510 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2513 DEFUN (no_max_lsp_lifetime_l2
,
2514 no_max_lsp_lifetime_l2_cmd
,
2515 "no max-lsp-lifetime level-2",
2517 "LSP lifetime for Level 2 only in seconds\n")
2519 struct isis_area
*area
;
2524 interval
= DEFAULT_LSP_LIFETIME
;
2526 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2529 ALIAS (no_max_lsp_lifetime_l2
,
2530 no_max_lsp_lifetime_l2_arg_cmd
,
2531 "no max-lsp-lifetime level-2 <350-65535>",
2533 "Maximum LSP lifetime for Level 2 only\n"
2534 "LSP lifetime for Level 2 only in seconds\n")
2537 set_lsp_refresh_interval (struct vty
*vty
, struct isis_area
*area
,
2538 uint16_t interval
, int level
)
2542 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
2546 if (interval
<= area
->lsp_gen_interval
[lvl
-1])
2548 vty_out (vty
, "LSP refresh interval %us must be greater than "
2549 "the configured LSP gen interval %us%s",
2550 interval
, area
->lsp_gen_interval
[lvl
-1],
2552 return CMD_ERR_AMBIGUOUS
;
2554 if (interval
> (area
->max_lsp_lifetime
[lvl
-1] - 300))
2556 vty_out (vty
, "LSP refresh interval %us must be less than "
2557 "the configured LSP lifetime %us less 300%s",
2558 interval
, area
->max_lsp_lifetime
[lvl
-1],
2560 return CMD_ERR_AMBIGUOUS
;
2564 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
2568 area
->lsp_refresh
[lvl
-1] = interval
;
2570 lsp_regenerate_schedule (area
, level
, 1);
2575 DEFUN (lsp_refresh_interval
,
2576 lsp_refresh_interval_cmd
,
2577 "lsp-refresh-interval <1-65235>",
2578 "LSP refresh interval\n"
2579 "LSP refresh interval in seconds\n")
2581 struct isis_area
*area
;
2586 interval
= atoi (argv
[0]);
2587 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2588 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2591 DEFUN (no_lsp_refresh_interval
,
2592 no_lsp_refresh_interval_cmd
,
2593 "no lsp-refresh-interval",
2595 "LSP refresh interval in seconds\n")
2597 struct isis_area
*area
;
2602 interval
= DEFAULT_MAX_LSP_GEN_INTERVAL
;
2603 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2604 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2607 ALIAS (no_lsp_refresh_interval
,
2608 no_lsp_refresh_interval_arg_cmd
,
2609 "no lsp-refresh-interval <1-65235>",
2611 "LSP refresh interval\n"
2612 "LSP refresh interval in seconds\n")
2614 DEFUN (lsp_refresh_interval_l1
,
2615 lsp_refresh_interval_l1_cmd
,
2616 "lsp-refresh-interval level-1 <1-65235>",
2617 "LSP refresh interval for Level 1 only\n"
2618 "LSP refresh interval for Level 1 only in seconds\n")
2620 struct isis_area
*area
;
2625 interval
= atoi (argv
[0]);
2627 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2630 DEFUN (no_lsp_refresh_interval_l1
,
2631 no_lsp_refresh_interval_l1_cmd
,
2632 "no lsp-refresh-interval level-1",
2634 "LSP refresh interval for Level 1 only in seconds\n")
2636 struct isis_area
*area
;
2641 interval
= DEFAULT_MAX_LSP_GEN_INTERVAL
;
2643 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2646 ALIAS (no_lsp_refresh_interval_l1
,
2647 no_lsp_refresh_interval_l1_arg_cmd
,
2648 "no lsp-refresh-interval level-1 <1-65235>",
2650 "LSP refresh interval for Level 1 only\n"
2651 "LSP refresh interval for Level 1 only in seconds\n")
2653 DEFUN (lsp_refresh_interval_l2
,
2654 lsp_refresh_interval_l2_cmd
,
2655 "lsp-refresh-interval level-2 <1-65235>",
2656 "LSP refresh interval for Level 2 only\n"
2657 "LSP refresh interval for Level 2 only in seconds\n")
2659 struct isis_area
*area
;
2664 interval
= atoi (argv
[0]);
2666 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2669 DEFUN (no_lsp_refresh_interval_l2
,
2670 no_lsp_refresh_interval_l2_cmd
,
2671 "no lsp-refresh-interval level-2",
2673 "LSP refresh interval for Level 2 only in seconds\n")
2675 struct isis_area
*area
;
2680 interval
= DEFAULT_MAX_LSP_GEN_INTERVAL
;
2682 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2685 ALIAS (no_lsp_refresh_interval_l2
,
2686 no_lsp_refresh_interval_l2_arg_cmd
,
2687 "no lsp-refresh-interval level-2 <1-65235>",
2689 "LSP refresh interval for Level 2 only\n"
2690 "LSP refresh interval for Level 2 only in seconds\n")
2692 DEFUN (log_adj_changes
,
2693 log_adj_changes_cmd
,
2694 "log-adjacency-changes",
2695 "Log changes in adjacency state\n")
2697 struct isis_area
*area
;
2702 area
->log_adj_changes
= 1;
2707 DEFUN (no_log_adj_changes
,
2708 no_log_adj_changes_cmd
,
2709 "no log-adjacency-changes",
2710 "Stop logging changes in adjacency state\n")
2712 struct isis_area
*area
;
2717 area
->log_adj_changes
= 0;
2722 #ifdef TOPOLOGY_GENERATE
2724 DEFUN (topology_generate_grid
,
2725 topology_generate_grid_cmd
,
2726 "topology generate grid <1-100> <1-100> <1-65000> [param] [param] "
2728 "Topology generation for IS-IS\n"
2729 "Topology generation\n"
2731 "X parameter of the grid\n"
2732 "Y parameter of the grid\n"
2734 "Optional param 1\n"
2735 "Optional param 2\n"
2736 "Optional param 3\n"
2739 struct isis_area
*area
;
2744 if (!spgrid_check_params (vty
, argc
, argv
))
2747 list_delete (area
->topology
);
2748 area
->topology
= list_new ();
2749 memcpy (area
->top_params
, vty
->buf
, 200);
2750 gen_spgrid_topology (vty
, area
->topology
);
2751 remove_topology_lsps (area
);
2752 generate_topology_lsps (area
);
2753 /* Regenerate L1 LSP to get two way connection to the generated
2755 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2761 DEFUN (show_isis_generated_topology
,
2762 show_isis_generated_topology_cmd
,
2763 "show isis generated-topologies",
2765 "ISIS network information\n"
2766 "Show generated topologies\n")
2768 struct isis_area
*area
;
2769 struct listnode
*node
;
2770 struct listnode
*node2
;
2773 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
2775 if (!area
->topology
)
2778 vty_out (vty
, "Topology for isis area: %s%s", area
->area_tag
,
2780 vty_out (vty
, "From node To node Distance%s", VTY_NEWLINE
);
2782 for (ALL_LIST_ELEMENTS_RO (area
->topology
, node2
, arc
))
2783 vty_out (vty
, "%9ld %11ld %12ld%s", arc
->from_node
, arc
->to_node
,
2784 arc
->distance
, VTY_NEWLINE
);
2789 /* Base IS for topology generation. */
2790 DEFUN (topology_baseis
,
2791 topology_baseis_cmd
,
2792 "topology base-is WORD",
2793 "Topology generation for IS-IS\n"
2794 "A Network IS Base for this topology\n"
2795 "XXXX.XXXX.XXXX Network entity title (NET)\n")
2797 struct isis_area
*area
;
2798 u_char buff
[ISIS_SYS_ID_LEN
];
2803 if (sysid2buff (buff
, argv
[0]))
2804 sysid2buff (area
->topology_baseis
, argv
[0]);
2809 DEFUN (no_topology_baseis
,
2810 no_topology_baseis_cmd
,
2811 "no topology base-is WORD",
2813 "Topology generation for IS-IS\n"
2814 "A Network IS Base for this topology\n"
2815 "XXXX.XXXX.XXXX Network entity title (NET)\n")
2817 struct isis_area
*area
;
2822 memcpy (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
, ISIS_SYS_ID_LEN
);
2826 ALIAS (no_topology_baseis
,
2827 no_topology_baseis_noid_cmd
,
2828 "no topology base-is",
2830 "Topology generation for IS-IS\n"
2831 "A Network IS Base for this topology\n")
2833 DEFUN (topology_basedynh
,
2834 topology_basedynh_cmd
,
2835 "topology base-dynh WORD",
2836 "Topology generation for IS-IS\n"
2837 "Dynamic hostname base for this topology\n"
2838 "Dynamic hostname base\n")
2840 struct isis_area
*area
;
2845 /* I hope that it's enough. */
2846 area
->topology_basedynh
= strndup (argv
[0], 16);
2850 #endif /* TOPOLOGY_GENERATE */
2852 /* IS-IS configuration write function */
2854 isis_config_write (struct vty
*vty
)
2860 struct isis_area
*area
;
2861 struct listnode
*node
, *node2
;
2863 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
2865 /* ISIS - Area name */
2866 vty_out (vty
, "router isis %s%s", area
->area_tag
, VTY_NEWLINE
);
2869 if (listcount (area
->area_addrs
) > 0)
2871 struct area_addr
*area_addr
;
2872 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
2874 vty_out (vty
, " net %s%s",
2875 isonet_print (area_addr
->area_addr
,
2876 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
2881 /* ISIS - Dynamic hostname - Defaults to true so only display if
2883 if (!area
->dynhostname
)
2885 vty_out (vty
, " no hostname dynamic%s", VTY_NEWLINE
);
2888 /* ISIS - Metric-Style - when true displays wide */
2889 if (area
->newmetric
)
2891 if (!area
->oldmetric
)
2892 vty_out (vty
, " metric-style wide%s", VTY_NEWLINE
);
2894 vty_out (vty
, " metric-style transition%s", VTY_NEWLINE
);
2899 vty_out (vty
, " metric-style narrow%s", VTY_NEWLINE
);
2902 /* ISIS - overload-bit */
2903 if (area
->overload_bit
)
2905 vty_out (vty
, " set-overload-bit%s", VTY_NEWLINE
);
2908 /* ISIS - Area is-type (level-1-2 is default) */
2909 if (area
->is_type
== IS_LEVEL_1
)
2911 vty_out (vty
, " is-type level-1%s", VTY_NEWLINE
);
2914 else if (area
->is_type
== IS_LEVEL_2
)
2916 vty_out (vty
, " is-type level-2-only%s", VTY_NEWLINE
);
2919 /* ISIS - Lsp generation interval */
2920 if (area
->lsp_gen_interval
[0] == area
->lsp_gen_interval
[1])
2922 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2924 vty_out (vty
, " lsp-gen-interval %d%s",
2925 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
2931 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2933 vty_out (vty
, " lsp-gen-interval level-1 %d%s",
2934 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
2937 if (area
->lsp_gen_interval
[1] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2939 vty_out (vty
, " lsp-gen-interval level-2 %d%s",
2940 area
->lsp_gen_interval
[1], VTY_NEWLINE
);
2944 /* ISIS - LSP lifetime */
2945 if (area
->max_lsp_lifetime
[0] == area
->max_lsp_lifetime
[1])
2947 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2949 vty_out (vty
, " max-lsp-lifetime %u%s", area
->max_lsp_lifetime
[0],
2956 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2958 vty_out (vty
, " max-lsp-lifetime level-1 %u%s",
2959 area
->max_lsp_lifetime
[0], VTY_NEWLINE
);
2962 if (area
->max_lsp_lifetime
[1] != DEFAULT_LSP_LIFETIME
)
2964 vty_out (vty
, " max-lsp-lifetime level-2 %u%s",
2965 area
->max_lsp_lifetime
[1], VTY_NEWLINE
);
2969 /* ISIS - LSP refresh interval */
2970 if (area
->lsp_refresh
[0] == area
->lsp_refresh
[1])
2972 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2974 vty_out (vty
, " lsp-refresh-interval %u%s", area
->lsp_refresh
[0],
2981 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2983 vty_out (vty
, " lsp-refresh-interval level-1 %u%s",
2984 area
->lsp_refresh
[0], VTY_NEWLINE
);
2987 if (area
->lsp_refresh
[1] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2989 vty_out (vty
, " lsp-refresh-interval level-2 %u%s",
2990 area
->lsp_refresh
[1], VTY_NEWLINE
);
2994 /* Minimum SPF interval. */
2995 if (area
->min_spf_interval
[0] == area
->min_spf_interval
[1])
2997 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2999 vty_out (vty
, " spf-interval %d%s",
3000 area
->min_spf_interval
[0], VTY_NEWLINE
);
3006 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
3008 vty_out (vty
, " spf-interval level-1 %d%s",
3009 area
->min_spf_interval
[0], VTY_NEWLINE
);
3012 if (area
->min_spf_interval
[1] != MINIMUM_SPF_INTERVAL
)
3014 vty_out (vty
, " spf-interval level-2 %d%s",
3015 area
->min_spf_interval
[1], VTY_NEWLINE
);
3019 /* Authentication passwords. */
3020 if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
3022 vty_out(vty
, " area-password md5 %s", area
->area_passwd
.passwd
);
3023 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
3025 vty_out(vty
, " authenticate snp ");
3026 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
3027 vty_out(vty
, "validate");
3029 vty_out(vty
, "send-only");
3031 vty_out(vty
, "%s", VTY_NEWLINE
);
3034 else if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
3036 vty_out(vty
, " area-password clear %s", area
->area_passwd
.passwd
);
3037 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
3039 vty_out(vty
, " authenticate snp ");
3040 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
3041 vty_out(vty
, "validate");
3043 vty_out(vty
, "send-only");
3045 vty_out(vty
, "%s", VTY_NEWLINE
);
3048 if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
3050 vty_out(vty
, " domain-password md5 %s",
3051 area
->domain_passwd
.passwd
);
3052 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
3054 vty_out(vty
, " authenticate snp ");
3055 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
3056 vty_out(vty
, "validate");
3058 vty_out(vty
, "send-only");
3060 vty_out(vty
, "%s", VTY_NEWLINE
);
3063 else if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
3065 vty_out(vty
, " domain-password clear %s",
3066 area
->domain_passwd
.passwd
);
3067 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
3069 vty_out(vty
, " authenticate snp ");
3070 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
3071 vty_out(vty
, "validate");
3073 vty_out(vty
, "send-only");
3075 vty_out(vty
, "%s", VTY_NEWLINE
);
3079 if (area
->log_adj_changes
)
3081 vty_out (vty
, " log-adjacency-changes%s", VTY_NEWLINE
);
3085 #ifdef TOPOLOGY_GENERATE
3086 if (memcmp (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
,
3089 vty_out (vty
, " topology base-is %s%s",
3090 sysid_print ((u_char
*)area
->topology_baseis
), VTY_NEWLINE
);
3093 if (area
->topology_basedynh
)
3095 vty_out (vty
, " topology base-dynh %s%s",
3096 area
->topology_basedynh
, VTY_NEWLINE
);
3099 /* We save the whole command line here. */
3100 if (strlen(area
->top_params
))
3102 vty_out (vty
, " %s%s", area
->top_params
, VTY_NEWLINE
);
3105 #endif /* TOPOLOGY_GENERATE */
3113 struct cmd_node isis_node
= {
3115 "%s(config-router)# ",
3122 /* Install IS-IS top node */
3123 install_node (&isis_node
, isis_config_write
);
3125 install_element (VIEW_NODE
, &show_isis_summary_cmd
);
3127 install_element (VIEW_NODE
, &show_isis_interface_cmd
);
3128 install_element (VIEW_NODE
, &show_isis_interface_detail_cmd
);
3129 install_element (VIEW_NODE
, &show_isis_interface_arg_cmd
);
3131 install_element (VIEW_NODE
, &show_isis_neighbor_cmd
);
3132 install_element (VIEW_NODE
, &show_isis_neighbor_detail_cmd
);
3133 install_element (VIEW_NODE
, &show_isis_neighbor_arg_cmd
);
3134 install_element (VIEW_NODE
, &clear_isis_neighbor_cmd
);
3135 install_element (VIEW_NODE
, &clear_isis_neighbor_arg_cmd
);
3137 install_element (VIEW_NODE
, &show_hostname_cmd
);
3138 install_element (VIEW_NODE
, &show_database_cmd
);
3139 install_element (VIEW_NODE
, &show_database_arg_cmd
);
3140 install_element (VIEW_NODE
, &show_database_arg_detail_cmd
);
3141 install_element (VIEW_NODE
, &show_database_detail_cmd
);
3142 install_element (VIEW_NODE
, &show_database_detail_arg_cmd
);
3144 install_element (ENABLE_NODE
, &show_isis_summary_cmd
);
3146 install_element (ENABLE_NODE
, &show_isis_interface_cmd
);
3147 install_element (ENABLE_NODE
, &show_isis_interface_detail_cmd
);
3148 install_element (ENABLE_NODE
, &show_isis_interface_arg_cmd
);
3150 install_element (ENABLE_NODE
, &show_isis_neighbor_cmd
);
3151 install_element (ENABLE_NODE
, &show_isis_neighbor_detail_cmd
);
3152 install_element (ENABLE_NODE
, &show_isis_neighbor_arg_cmd
);
3153 install_element (ENABLE_NODE
, &clear_isis_neighbor_cmd
);
3154 install_element (ENABLE_NODE
, &clear_isis_neighbor_arg_cmd
);
3156 install_element (ENABLE_NODE
, &show_hostname_cmd
);
3157 install_element (ENABLE_NODE
, &show_database_cmd
);
3158 install_element (ENABLE_NODE
, &show_database_arg_cmd
);
3159 install_element (ENABLE_NODE
, &show_database_arg_detail_cmd
);
3160 install_element (ENABLE_NODE
, &show_database_detail_cmd
);
3161 install_element (ENABLE_NODE
, &show_database_detail_arg_cmd
);
3162 install_element (ENABLE_NODE
, &show_debugging_cmd
);
3164 install_node (&debug_node
, config_write_debug
);
3166 install_element (ENABLE_NODE
, &debug_isis_adj_cmd
);
3167 install_element (ENABLE_NODE
, &no_debug_isis_adj_cmd
);
3168 install_element (ENABLE_NODE
, &debug_isis_csum_cmd
);
3169 install_element (ENABLE_NODE
, &no_debug_isis_csum_cmd
);
3170 install_element (ENABLE_NODE
, &debug_isis_lupd_cmd
);
3171 install_element (ENABLE_NODE
, &no_debug_isis_lupd_cmd
);
3172 install_element (ENABLE_NODE
, &debug_isis_err_cmd
);
3173 install_element (ENABLE_NODE
, &no_debug_isis_err_cmd
);
3174 install_element (ENABLE_NODE
, &debug_isis_snp_cmd
);
3175 install_element (ENABLE_NODE
, &no_debug_isis_snp_cmd
);
3176 install_element (ENABLE_NODE
, &debug_isis_upd_cmd
);
3177 install_element (ENABLE_NODE
, &no_debug_isis_upd_cmd
);
3178 install_element (ENABLE_NODE
, &debug_isis_spfevents_cmd
);
3179 install_element (ENABLE_NODE
, &no_debug_isis_spfevents_cmd
);
3180 install_element (ENABLE_NODE
, &debug_isis_spfstats_cmd
);
3181 install_element (ENABLE_NODE
, &no_debug_isis_spfstats_cmd
);
3182 install_element (ENABLE_NODE
, &debug_isis_spftrigg_cmd
);
3183 install_element (ENABLE_NODE
, &no_debug_isis_spftrigg_cmd
);
3184 install_element (ENABLE_NODE
, &debug_isis_rtevents_cmd
);
3185 install_element (ENABLE_NODE
, &no_debug_isis_rtevents_cmd
);
3186 install_element (ENABLE_NODE
, &debug_isis_events_cmd
);
3187 install_element (ENABLE_NODE
, &no_debug_isis_events_cmd
);
3188 install_element (ENABLE_NODE
, &debug_isis_packet_dump_cmd
);
3189 install_element (ENABLE_NODE
, &no_debug_isis_packet_dump_cmd
);
3191 install_element (CONFIG_NODE
, &debug_isis_adj_cmd
);
3192 install_element (CONFIG_NODE
, &no_debug_isis_adj_cmd
);
3193 install_element (CONFIG_NODE
, &debug_isis_csum_cmd
);
3194 install_element (CONFIG_NODE
, &no_debug_isis_csum_cmd
);
3195 install_element (CONFIG_NODE
, &debug_isis_lupd_cmd
);
3196 install_element (CONFIG_NODE
, &no_debug_isis_lupd_cmd
);
3197 install_element (CONFIG_NODE
, &debug_isis_err_cmd
);
3198 install_element (CONFIG_NODE
, &no_debug_isis_err_cmd
);
3199 install_element (CONFIG_NODE
, &debug_isis_snp_cmd
);
3200 install_element (CONFIG_NODE
, &no_debug_isis_snp_cmd
);
3201 install_element (CONFIG_NODE
, &debug_isis_upd_cmd
);
3202 install_element (CONFIG_NODE
, &no_debug_isis_upd_cmd
);
3203 install_element (CONFIG_NODE
, &debug_isis_spfevents_cmd
);
3204 install_element (CONFIG_NODE
, &no_debug_isis_spfevents_cmd
);
3205 install_element (CONFIG_NODE
, &debug_isis_spfstats_cmd
);
3206 install_element (CONFIG_NODE
, &no_debug_isis_spfstats_cmd
);
3207 install_element (CONFIG_NODE
, &debug_isis_spftrigg_cmd
);
3208 install_element (CONFIG_NODE
, &no_debug_isis_spftrigg_cmd
);
3209 install_element (CONFIG_NODE
, &debug_isis_rtevents_cmd
);
3210 install_element (CONFIG_NODE
, &no_debug_isis_rtevents_cmd
);
3211 install_element (CONFIG_NODE
, &debug_isis_events_cmd
);
3212 install_element (CONFIG_NODE
, &no_debug_isis_events_cmd
);
3213 install_element (CONFIG_NODE
, &debug_isis_packet_dump_cmd
);
3214 install_element (CONFIG_NODE
, &no_debug_isis_packet_dump_cmd
);
3216 install_element (CONFIG_NODE
, &router_isis_cmd
);
3217 install_element (CONFIG_NODE
, &no_router_isis_cmd
);
3219 install_default (ISIS_NODE
);
3221 install_element (ISIS_NODE
, &net_cmd
);
3222 install_element (ISIS_NODE
, &no_net_cmd
);
3224 install_element (ISIS_NODE
, &is_type_cmd
);
3225 install_element (ISIS_NODE
, &no_is_type_cmd
);
3227 install_element (ISIS_NODE
, &area_passwd_md5_cmd
);
3228 install_element (ISIS_NODE
, &area_passwd_md5_snpauth_cmd
);
3229 install_element (ISIS_NODE
, &area_passwd_clear_cmd
);
3230 install_element (ISIS_NODE
, &area_passwd_clear_snpauth_cmd
);
3231 install_element (ISIS_NODE
, &no_area_passwd_cmd
);
3233 install_element (ISIS_NODE
, &domain_passwd_md5_cmd
);
3234 install_element (ISIS_NODE
, &domain_passwd_md5_snpauth_cmd
);
3235 install_element (ISIS_NODE
, &domain_passwd_clear_cmd
);
3236 install_element (ISIS_NODE
, &domain_passwd_clear_snpauth_cmd
);
3237 install_element (ISIS_NODE
, &no_domain_passwd_cmd
);
3239 install_element (ISIS_NODE
, &lsp_gen_interval_cmd
);
3240 install_element (ISIS_NODE
, &no_lsp_gen_interval_cmd
);
3241 install_element (ISIS_NODE
, &no_lsp_gen_interval_arg_cmd
);
3242 install_element (ISIS_NODE
, &lsp_gen_interval_l1_cmd
);
3243 install_element (ISIS_NODE
, &no_lsp_gen_interval_l1_cmd
);
3244 install_element (ISIS_NODE
, &no_lsp_gen_interval_l1_arg_cmd
);
3245 install_element (ISIS_NODE
, &lsp_gen_interval_l2_cmd
);
3246 install_element (ISIS_NODE
, &no_lsp_gen_interval_l2_cmd
);
3247 install_element (ISIS_NODE
, &no_lsp_gen_interval_l2_arg_cmd
);
3249 install_element (ISIS_NODE
, &spf_interval_cmd
);
3250 install_element (ISIS_NODE
, &no_spf_interval_cmd
);
3251 install_element (ISIS_NODE
, &no_spf_interval_arg_cmd
);
3252 install_element (ISIS_NODE
, &spf_interval_l1_cmd
);
3253 install_element (ISIS_NODE
, &no_spf_interval_l1_cmd
);
3254 install_element (ISIS_NODE
, &no_spf_interval_l1_arg_cmd
);
3255 install_element (ISIS_NODE
, &spf_interval_l2_cmd
);
3256 install_element (ISIS_NODE
, &no_spf_interval_l2_cmd
);
3257 install_element (ISIS_NODE
, &no_spf_interval_l2_arg_cmd
);
3259 install_element (ISIS_NODE
, &max_lsp_lifetime_cmd
);
3260 install_element (ISIS_NODE
, &no_max_lsp_lifetime_cmd
);
3261 install_element (ISIS_NODE
, &no_max_lsp_lifetime_arg_cmd
);
3262 install_element (ISIS_NODE
, &max_lsp_lifetime_l1_cmd
);
3263 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l1_cmd
);
3264 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l1_arg_cmd
);
3265 install_element (ISIS_NODE
, &max_lsp_lifetime_l2_cmd
);
3266 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l2_cmd
);
3267 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l2_arg_cmd
);
3269 install_element (ISIS_NODE
, &lsp_refresh_interval_cmd
);
3270 install_element (ISIS_NODE
, &no_lsp_refresh_interval_cmd
);
3271 install_element (ISIS_NODE
, &no_lsp_refresh_interval_arg_cmd
);
3272 install_element (ISIS_NODE
, &lsp_refresh_interval_l1_cmd
);
3273 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l1_cmd
);
3274 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l1_arg_cmd
);
3275 install_element (ISIS_NODE
, &lsp_refresh_interval_l2_cmd
);
3276 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l2_cmd
);
3277 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l2_arg_cmd
);
3279 install_element (ISIS_NODE
, &set_overload_bit_cmd
);
3280 install_element (ISIS_NODE
, &no_set_overload_bit_cmd
);
3282 install_element (ISIS_NODE
, &set_attached_bit_cmd
);
3283 install_element (ISIS_NODE
, &no_set_attached_bit_cmd
);
3285 install_element (ISIS_NODE
, &dynamic_hostname_cmd
);
3286 install_element (ISIS_NODE
, &no_dynamic_hostname_cmd
);
3288 install_element (ISIS_NODE
, &metric_style_cmd
);
3289 install_element (ISIS_NODE
, &no_metric_style_cmd
);
3291 install_element (ISIS_NODE
, &log_adj_changes_cmd
);
3292 install_element (ISIS_NODE
, &no_log_adj_changes_cmd
);
3294 #ifdef TOPOLOGY_GENERATE
3295 install_element (ISIS_NODE
, &topology_generate_grid_cmd
);
3296 install_element (ISIS_NODE
, &topology_baseis_cmd
);
3297 install_element (ISIS_NODE
, &topology_basedynh_cmd
);
3298 install_element (ISIS_NODE
, &no_topology_baseis_cmd
);
3299 install_element (ISIS_NODE
, &no_topology_baseis_noid_cmd
);
3300 install_element (VIEW_NODE
, &show_isis_generated_topology_cmd
);
3301 install_element (ENABLE_NODE
, &show_isis_generated_topology_cmd
);
3302 #endif /* TOPOLOGY_GENERATE */