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
,
783 "State of each debugging option\n")
785 vty_out (vty
, "IS-IS:%s", VTY_NEWLINE
);
786 print_debug (vty
, isis
->debugs
, 1);
791 static struct cmd_node debug_node
= {
798 config_write_debug (struct vty
*vty
)
801 int flags
= isis
->debugs
;
803 if (flags
& DEBUG_ADJ_PACKETS
)
805 vty_out (vty
, "debug isis adj-packets%s", VTY_NEWLINE
);
808 if (flags
& DEBUG_CHECKSUM_ERRORS
)
810 vty_out (vty
, "debug isis checksum-errors%s", VTY_NEWLINE
);
813 if (flags
& DEBUG_LOCAL_UPDATES
)
815 vty_out (vty
, "debug isis local-updates%s", VTY_NEWLINE
);
818 if (flags
& DEBUG_PROTOCOL_ERRORS
)
820 vty_out (vty
, "debug isis protocol-errors%s", VTY_NEWLINE
);
823 if (flags
& DEBUG_SNP_PACKETS
)
825 vty_out (vty
, "debug isis snp-packets%s", VTY_NEWLINE
);
828 if (flags
& DEBUG_SPF_EVENTS
)
830 vty_out (vty
, "debug isis spf-events%s", VTY_NEWLINE
);
833 if (flags
& DEBUG_SPF_STATS
)
835 vty_out (vty
, "debug isis spf-statistics%s", VTY_NEWLINE
);
838 if (flags
& DEBUG_SPF_TRIGGERS
)
840 vty_out (vty
, "debug isis spf-triggers%s", VTY_NEWLINE
);
843 if (flags
& DEBUG_UPDATE_PACKETS
)
845 vty_out (vty
, "debug isis update-packets%s", VTY_NEWLINE
);
848 if (flags
& DEBUG_RTE_EVENTS
)
850 vty_out (vty
, "debug isis route-events%s", VTY_NEWLINE
);
853 if (flags
& DEBUG_EVENTS
)
855 vty_out (vty
, "debug isis events%s", VTY_NEWLINE
);
858 if (flags
& DEBUG_PACKET_DUMP
)
860 vty_out (vty
, "debug isis packet-dump%s", VTY_NEWLINE
);
867 DEFUN (debug_isis_adj
,
869 "debug isis adj-packets",
871 "IS-IS information\n"
872 "IS-IS Adjacency related packets\n")
874 isis
->debugs
|= DEBUG_ADJ_PACKETS
;
875 print_debug (vty
, DEBUG_ADJ_PACKETS
, 1);
880 DEFUN (no_debug_isis_adj
,
881 no_debug_isis_adj_cmd
,
882 "no debug isis adj-packets",
884 "IS-IS information\n"
885 "IS-IS Adjacency related packets\n")
887 isis
->debugs
&= ~DEBUG_ADJ_PACKETS
;
888 print_debug (vty
, DEBUG_ADJ_PACKETS
, 0);
893 DEFUN (debug_isis_csum
,
895 "debug isis checksum-errors",
897 "IS-IS information\n"
898 "IS-IS LSP checksum errors\n")
900 isis
->debugs
|= DEBUG_CHECKSUM_ERRORS
;
901 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 1);
906 DEFUN (no_debug_isis_csum
,
907 no_debug_isis_csum_cmd
,
908 "no debug isis checksum-errors",
910 "IS-IS information\n"
911 "IS-IS LSP checksum errors\n")
913 isis
->debugs
&= ~DEBUG_CHECKSUM_ERRORS
;
914 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 0);
919 DEFUN (debug_isis_lupd
,
921 "debug isis local-updates",
923 "IS-IS information\n"
924 "IS-IS local update packets\n")
926 isis
->debugs
|= DEBUG_LOCAL_UPDATES
;
927 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 1);
932 DEFUN (no_debug_isis_lupd
,
933 no_debug_isis_lupd_cmd
,
934 "no debug isis local-updates",
936 "IS-IS information\n"
937 "IS-IS local update packets\n")
939 isis
->debugs
&= ~DEBUG_LOCAL_UPDATES
;
940 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 0);
945 DEFUN (debug_isis_err
,
947 "debug isis protocol-errors",
949 "IS-IS information\n"
950 "IS-IS LSP protocol errors\n")
952 isis
->debugs
|= DEBUG_PROTOCOL_ERRORS
;
953 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 1);
958 DEFUN (no_debug_isis_err
,
959 no_debug_isis_err_cmd
,
960 "no debug isis protocol-errors",
962 "IS-IS information\n"
963 "IS-IS LSP protocol errors\n")
965 isis
->debugs
&= ~DEBUG_PROTOCOL_ERRORS
;
966 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 0);
971 DEFUN (debug_isis_snp
,
973 "debug isis snp-packets",
975 "IS-IS information\n"
976 "IS-IS CSNP/PSNP packets\n")
978 isis
->debugs
|= DEBUG_SNP_PACKETS
;
979 print_debug (vty
, DEBUG_SNP_PACKETS
, 1);
984 DEFUN (no_debug_isis_snp
,
985 no_debug_isis_snp_cmd
,
986 "no debug isis snp-packets",
988 "IS-IS information\n"
989 "IS-IS CSNP/PSNP packets\n")
991 isis
->debugs
&= ~DEBUG_SNP_PACKETS
;
992 print_debug (vty
, DEBUG_SNP_PACKETS
, 0);
997 DEFUN (debug_isis_upd
,
999 "debug isis update-packets",
1001 "IS-IS information\n"
1002 "IS-IS Update related packets\n")
1004 isis
->debugs
|= DEBUG_UPDATE_PACKETS
;
1005 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 1);
1010 DEFUN (no_debug_isis_upd
,
1011 no_debug_isis_upd_cmd
,
1012 "no debug isis update-packets",
1014 "IS-IS information\n"
1015 "IS-IS Update related packets\n")
1017 isis
->debugs
&= ~DEBUG_UPDATE_PACKETS
;
1018 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 0);
1023 DEFUN (debug_isis_spfevents
,
1024 debug_isis_spfevents_cmd
,
1025 "debug isis spf-events",
1027 "IS-IS information\n"
1028 "IS-IS Shortest Path First Events\n")
1030 isis
->debugs
|= DEBUG_SPF_EVENTS
;
1031 print_debug (vty
, DEBUG_SPF_EVENTS
, 1);
1036 DEFUN (no_debug_isis_spfevents
,
1037 no_debug_isis_spfevents_cmd
,
1038 "no debug isis spf-events",
1040 "IS-IS information\n"
1041 "IS-IS Shortest Path First Events\n")
1043 isis
->debugs
&= ~DEBUG_SPF_EVENTS
;
1044 print_debug (vty
, DEBUG_SPF_EVENTS
, 0);
1049 DEFUN (debug_isis_spfstats
,
1050 debug_isis_spfstats_cmd
,
1051 "debug isis spf-statistics ",
1053 "IS-IS information\n"
1054 "IS-IS SPF Timing and Statistic Data\n")
1056 isis
->debugs
|= DEBUG_SPF_STATS
;
1057 print_debug (vty
, DEBUG_SPF_STATS
, 1);
1062 DEFUN (no_debug_isis_spfstats
,
1063 no_debug_isis_spfstats_cmd
,
1064 "no debug isis spf-statistics",
1066 "IS-IS information\n"
1067 "IS-IS SPF Timing and Statistic Data\n")
1069 isis
->debugs
&= ~DEBUG_SPF_STATS
;
1070 print_debug (vty
, DEBUG_SPF_STATS
, 0);
1075 DEFUN (debug_isis_spftrigg
,
1076 debug_isis_spftrigg_cmd
,
1077 "debug isis spf-triggers",
1079 "IS-IS information\n"
1080 "IS-IS SPF triggering events\n")
1082 isis
->debugs
|= DEBUG_SPF_TRIGGERS
;
1083 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 1);
1088 DEFUN (no_debug_isis_spftrigg
,
1089 no_debug_isis_spftrigg_cmd
,
1090 "no debug isis spf-triggers",
1092 "IS-IS information\n"
1093 "IS-IS SPF triggering events\n")
1095 isis
->debugs
&= ~DEBUG_SPF_TRIGGERS
;
1096 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 0);
1101 DEFUN (debug_isis_rtevents
,
1102 debug_isis_rtevents_cmd
,
1103 "debug isis route-events",
1105 "IS-IS information\n"
1106 "IS-IS Route related events\n")
1108 isis
->debugs
|= DEBUG_RTE_EVENTS
;
1109 print_debug (vty
, DEBUG_RTE_EVENTS
, 1);
1114 DEFUN (no_debug_isis_rtevents
,
1115 no_debug_isis_rtevents_cmd
,
1116 "no 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
, 0);
1127 DEFUN (debug_isis_events
,
1128 debug_isis_events_cmd
,
1129 "debug isis events",
1131 "IS-IS information\n"
1134 isis
->debugs
|= DEBUG_EVENTS
;
1135 print_debug (vty
, DEBUG_EVENTS
, 1);
1140 DEFUN (no_debug_isis_events
,
1141 no_debug_isis_events_cmd
,
1142 "no debug isis events",
1144 "IS-IS information\n"
1147 isis
->debugs
&= ~DEBUG_EVENTS
;
1148 print_debug (vty
, DEBUG_EVENTS
, 0);
1153 DEFUN (debug_isis_packet_dump
,
1154 debug_isis_packet_dump_cmd
,
1155 "debug isis packet-dump",
1157 "IS-IS information\n"
1158 "IS-IS packet dump\n")
1160 isis
->debugs
|= DEBUG_PACKET_DUMP
;
1161 print_debug (vty
, DEBUG_PACKET_DUMP
, 1);
1166 DEFUN (no_debug_isis_packet_dump
,
1167 no_debug_isis_packet_dump_cmd
,
1168 "no debug isis packet-dump",
1170 "IS-IS information\n"
1171 "IS-IS packet dump\n")
1173 isis
->debugs
&= ~DEBUG_PACKET_DUMP
;
1174 print_debug (vty
, DEBUG_PACKET_DUMP
, 0);
1179 DEFUN (show_hostname
,
1181 "show isis hostname",
1183 "IS-IS information\n"
1184 "IS-IS Dynamic hostname mapping\n")
1186 dynhn_print_all (vty
);
1192 vty_out_timestr(struct vty
*vty
, time_t uptime
)
1195 time_t difftime
= time (NULL
);
1197 tm
= gmtime (&difftime
);
1199 #define ONE_DAY_SECOND 60*60*24
1200 #define ONE_WEEK_SECOND 60*60*24*7
1201 if (difftime
< ONE_DAY_SECOND
)
1202 vty_out (vty
, "%02d:%02d:%02d",
1203 tm
->tm_hour
, tm
->tm_min
, tm
->tm_sec
);
1204 else if (difftime
< ONE_WEEK_SECOND
)
1205 vty_out (vty
, "%dd%02dh%02dm",
1206 tm
->tm_yday
, tm
->tm_hour
, tm
->tm_min
);
1208 vty_out (vty
, "%02dw%dd%02dh",
1210 tm
->tm_yday
- ((tm
->tm_yday
/7) * 7), tm
->tm_hour
);
1211 vty_out (vty
, " ago");
1214 DEFUN (show_isis_summary
,
1215 show_isis_summary_cmd
,
1216 "show isis summary",
1217 SHOW_STR
"IS-IS information\n" "IS-IS summary\n")
1219 struct listnode
*node
, *node2
;
1220 struct isis_area
*area
;
1221 struct isis_spftree
*spftree
;
1226 vty_out (vty
, "ISIS is not running%s", VTY_NEWLINE
);
1230 vty_out (vty
, "Process Id : %ld%s", isis
->process_id
,
1232 if (isis
->sysid_set
)
1233 vty_out (vty
, "System Id : %s%s", sysid_print (isis
->sysid
),
1236 vty_out (vty
, "Up time : ");
1237 vty_out_timestr(vty
, isis
->uptime
);
1238 vty_out (vty
, "%s", VTY_NEWLINE
);
1240 if (isis
->area_list
)
1241 vty_out (vty
, "Number of areas : %d%s", isis
->area_list
->count
,
1244 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1246 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1249 if (listcount (area
->area_addrs
) > 0)
1251 struct area_addr
*area_addr
;
1252 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
1254 vty_out (vty
, " Net: %s%s",
1255 isonet_print (area_addr
->area_addr
,
1256 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
1261 for (level
= ISIS_LEVEL1
; level
<= ISIS_LEVELS
; level
++)
1263 if ((area
->is_type
& level
) == 0)
1266 vty_out (vty
, " Level-%d:%s", level
, VTY_NEWLINE
);
1267 spftree
= area
->spftree
[level
- 1];
1268 if (spftree
->pending
)
1269 vty_out (vty
, " IPv4 SPF: (pending)%s", VTY_NEWLINE
);
1271 vty_out (vty
, " IPv4 SPF:%s", VTY_NEWLINE
);
1273 vty_out (vty
, " minimum interval : %d%s",
1274 area
->min_spf_interval
[level
- 1], VTY_NEWLINE
);
1276 vty_out (vty
, " last run elapsed : ");
1277 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1278 vty_out (vty
, "%s", VTY_NEWLINE
);
1280 vty_out (vty
, " last run duration : %u usec%s",
1281 (u_int32_t
)spftree
->last_run_duration
, VTY_NEWLINE
);
1283 vty_out (vty
, " run count : %d%s",
1284 spftree
->runcount
, VTY_NEWLINE
);
1287 spftree
= area
->spftree6
[level
- 1];
1288 if (spftree
->pending
)
1289 vty_out (vty
, " IPv6 SPF: (pending)%s", VTY_NEWLINE
);
1291 vty_out (vty
, " IPv6 SPF:%s", VTY_NEWLINE
);
1293 vty_out (vty
, " minimum interval : %d%s",
1294 area
->min_spf_interval
[level
- 1], VTY_NEWLINE
);
1296 vty_out (vty
, " last run elapsed : ");
1297 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1298 vty_out (vty
, "%s", VTY_NEWLINE
);
1300 vty_out (vty
, " last run duration : %u msec%s",
1301 spftree
->last_run_duration
, VTY_NEWLINE
);
1303 vty_out (vty
, " run count : %d%s",
1304 spftree
->runcount
, VTY_NEWLINE
);
1308 vty_out (vty
, "%s", VTY_NEWLINE
);
1314 * This function supports following display options:
1315 * [ show isis database [detail] ]
1316 * [ show isis database <sysid> [detail] ]
1317 * [ show isis database <hostname> [detail] ]
1318 * [ show isis database <sysid>.<pseudo-id> [detail] ]
1319 * [ show isis database <hostname>.<pseudo-id> [detail] ]
1320 * [ show isis database <sysid>.<pseudo-id>-<fragment-number> [detail] ]
1321 * [ show isis database <hostname>.<pseudo-id>-<fragment-number> [detail] ]
1322 * [ show isis database detail <sysid> ]
1323 * [ show isis database detail <hostname> ]
1324 * [ show isis database detail <sysid>.<pseudo-id> ]
1325 * [ show isis database detail <hostname>.<pseudo-id> ]
1326 * [ show isis database detail <sysid>.<pseudo-id>-<fragment-number> ]
1327 * [ show isis database detail <hostname>.<pseudo-id>-<fragment-number> ]
1330 show_isis_database (struct vty
*vty
, const char *argv
, int ui_level
)
1332 struct listnode
*node
;
1333 struct isis_area
*area
;
1334 struct isis_lsp
*lsp
;
1335 struct isis_dynhn
*dynhn
;
1336 const char *pos
= argv
;
1337 u_char lspid
[ISIS_SYS_ID_LEN
+2];
1340 int level
, lsp_count
;
1342 if (isis
->area_list
->count
== 0)
1345 memset (&lspid
, 0, ISIS_SYS_ID_LEN
);
1346 memset (&sysid
, 0, 255);
1349 * extract fragment and pseudo id from the string argv
1351 * (a) <systemid/hostname>.<pseudo-id>-<framenent> or
1352 * (b) <systemid/hostname>.<pseudo-id> or
1353 * (c) <systemid/hostname> or
1354 * Where systemid is in the form:
1358 strncpy (sysid
, argv
, 254);
1359 if (argv
&& strlen (argv
) > 3)
1361 pos
= argv
+ strlen (argv
) - 3;
1362 if (strncmp (pos
, "-", 1) == 0)
1364 memcpy (number
, ++pos
, 2);
1365 lspid
[ISIS_SYS_ID_LEN
+1] = (u_char
) strtol ((char *)number
, NULL
, 16);
1367 if (strncmp (pos
, ".", 1) != 0)
1368 return CMD_ERR_AMBIGUOUS
;
1370 if (strncmp (pos
, ".", 1) == 0)
1372 memcpy (number
, ++pos
, 2);
1373 lspid
[ISIS_SYS_ID_LEN
] = (u_char
) strtol ((char *)number
, NULL
, 16);
1374 sysid
[pos
- argv
- 1] = '\0';
1378 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1380 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1383 for (level
= 0; level
< ISIS_LEVELS
; level
++)
1385 if (area
->lspdb
[level
] && dict_count (area
->lspdb
[level
]) > 0)
1391 * Try to find the lsp-id if the argv string is in
1392 * the form hostname.<pseudo-id>-<fragment>
1394 if (sysid2buff (lspid
, sysid
))
1396 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1398 else if ((dynhn
= dynhn_find_by_name (sysid
)))
1400 memcpy (lspid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
1401 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1403 else if (strncmp(unix_hostname (), sysid
, 15) == 0)
1405 memcpy (lspid
, isis
->sysid
, ISIS_SYS_ID_LEN
);
1406 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1410 if (lsp
!= NULL
|| argv
== NULL
)
1412 vty_out (vty
, "IS-IS Level-%d link-state database:%s",
1413 level
+ 1, VTY_NEWLINE
);
1415 /* print the title in all cases */
1416 vty_out (vty
, "LSP ID PduLen "
1417 "SeqNumber Chksum Holdtime ATT/P/OL%s",
1423 if (ui_level
== ISIS_UI_LEVEL_DETAIL
)
1424 lsp_print_detail (lsp
, vty
, area
->dynhostname
);
1426 lsp_print (lsp
, vty
, area
->dynhostname
);
1428 else if (argv
== NULL
)
1430 lsp_count
= lsp_print_all (vty
, area
->lspdb
[level
],
1434 vty_out (vty
, " %u LSPs%s%s",
1435 lsp_count
, VTY_NEWLINE
, VTY_NEWLINE
);
1444 DEFUN (show_database_brief
,
1446 "show isis database",
1448 "IS-IS information\n"
1449 "IS-IS link state database\n")
1451 return show_isis_database (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
1454 DEFUN (show_database_lsp_brief
,
1455 show_database_arg_cmd
,
1456 "show isis database WORD",
1458 "IS-IS information\n"
1459 "IS-IS link state database\n"
1462 return show_isis_database (vty
, argv
[0], ISIS_UI_LEVEL_BRIEF
);
1465 DEFUN (show_database_lsp_detail
,
1466 show_database_arg_detail_cmd
,
1467 "show isis database WORD detail",
1469 "IS-IS information\n"
1470 "IS-IS link state database\n"
1472 "Detailed information\n")
1474 return show_isis_database (vty
, argv
[0], ISIS_UI_LEVEL_DETAIL
);
1477 DEFUN (show_database_detail
,
1478 show_database_detail_cmd
,
1479 "show isis database detail",
1481 "IS-IS information\n"
1482 "IS-IS link state database\n")
1484 return show_isis_database (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
1487 DEFUN (show_database_detail_lsp
,
1488 show_database_detail_arg_cmd
,
1489 "show isis database detail WORD",
1491 "IS-IS information\n"
1492 "IS-IS link state database\n"
1493 "Detailed information\n"
1496 return show_isis_database (vty
, argv
[0], ISIS_UI_LEVEL_DETAIL
);
1500 * 'router isis' command
1507 "ISO Routing area tag")
1509 return isis_area_get (vty
, argv
[0]);
1513 *'no router isis' command
1515 DEFUN (no_router_isis
,
1517 "no router isis WORD",
1518 "no\n" ROUTER_STR
"ISO IS-IS\n" "ISO Routing area tag")
1520 return isis_area_destroy (vty
, argv
[0]);
1529 "A Network Entity Title for this process (OSI only)\n"
1530 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1532 return area_net_title (vty
, argv
[0]);
1542 "A Network Entity Title for this process (OSI only)\n"
1543 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1545 return area_clear_net_title (vty
, argv
[0]);
1548 DEFUN (area_passwd_md5
,
1549 area_passwd_md5_cmd
,
1550 "area-password md5 WORD",
1551 "Configure the authentication password for an area\n"
1552 "Authentication type\n"
1555 struct isis_area
*area
;
1562 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1563 return CMD_ERR_NO_MATCH
;
1566 len
= strlen (argv
[0]);
1569 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1570 return CMD_ERR_AMBIGUOUS
;
1573 area
->area_passwd
.len
= (u_char
) len
;
1574 area
->area_passwd
.type
= ISIS_PASSWD_TYPE_HMAC_MD5
;
1575 strncpy ((char *)area
->area_passwd
.passwd
, argv
[0], 255);
1579 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1580 if (strncmp(argv
[1], "v", 1) == 0)
1581 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1583 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1587 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1588 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1590 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1595 ALIAS (area_passwd_md5
,
1596 area_passwd_md5_snpauth_cmd
,
1597 "area-password md5 WORD authenticate snp (send-only|validate)",
1598 "Configure the authentication password for an area\n"
1599 "Authentication type\n"
1603 "Send but do not check PDUs on receiving\n"
1604 "Send and check PDUs on receiving\n");
1606 DEFUN (area_passwd_clear
,
1607 area_passwd_clear_cmd
,
1608 "area-password clear WORD",
1609 "Configure the authentication password for an area\n"
1610 "Authentication type\n"
1613 struct isis_area
*area
;
1620 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1621 return CMD_ERR_NO_MATCH
;
1624 len
= strlen (argv
[0]);
1627 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1628 return CMD_ERR_AMBIGUOUS
;
1631 area
->area_passwd
.len
= (u_char
) len
;
1632 area
->area_passwd
.type
= ISIS_PASSWD_TYPE_CLEARTXT
;
1633 strncpy ((char *)area
->area_passwd
.passwd
, argv
[0], 255);
1637 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1638 if (strncmp(argv
[1], "v", 1) == 0)
1639 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1641 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1645 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1646 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1648 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1653 ALIAS (area_passwd_clear
,
1654 area_passwd_clear_snpauth_cmd
,
1655 "area-password clear WORD authenticate snp (send-only|validate)",
1656 "Configure the authentication password for an area\n"
1657 "Authentication type\n"
1661 "Send but do not check PDUs on receiving\n"
1662 "Send and check PDUs on receiving\n");
1664 DEFUN (no_area_passwd
,
1668 "Configure the authentication password for an area\n")
1670 struct isis_area
*area
;
1676 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1677 return CMD_ERR_NO_MATCH
;
1680 memset (&area
->area_passwd
, 0, sizeof (struct isis_passwd
));
1681 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1686 DEFUN (domain_passwd_md5
,
1687 domain_passwd_md5_cmd
,
1688 "domain-password md5 WORD",
1689 "Set the authentication password for a routing domain\n"
1690 "Authentication type\n"
1691 "Routing domain password\n")
1693 struct isis_area
*area
;
1700 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1701 return CMD_ERR_NO_MATCH
;
1704 len
= strlen (argv
[0]);
1707 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1708 return CMD_ERR_AMBIGUOUS
;
1711 area
->domain_passwd
.len
= (u_char
) len
;
1712 area
->domain_passwd
.type
= ISIS_PASSWD_TYPE_HMAC_MD5
;
1713 strncpy ((char *)area
->domain_passwd
.passwd
, argv
[0], 255);
1717 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1718 if (strncmp(argv
[1], "v", 1) == 0)
1719 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1721 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1725 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1726 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1728 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1733 ALIAS (domain_passwd_md5
,
1734 domain_passwd_md5_snpauth_cmd
,
1735 "domain-password md5 WORD authenticate snp (send-only|validate)",
1736 "Set the authentication password for a routing domain\n"
1737 "Authentication type\n"
1738 "Routing domain password\n"
1741 "Send but do not check PDUs on receiving\n"
1742 "Send and check PDUs on receiving\n");
1744 DEFUN (domain_passwd_clear
,
1745 domain_passwd_clear_cmd
,
1746 "domain-password clear WORD",
1747 "Set the authentication password for a routing domain\n"
1748 "Authentication type\n"
1749 "Routing domain password\n")
1751 struct isis_area
*area
;
1758 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1759 return CMD_ERR_NO_MATCH
;
1762 len
= strlen (argv
[0]);
1765 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1766 return CMD_ERR_AMBIGUOUS
;
1769 area
->domain_passwd
.len
= (u_char
) len
;
1770 area
->domain_passwd
.type
= ISIS_PASSWD_TYPE_CLEARTXT
;
1771 strncpy ((char *)area
->domain_passwd
.passwd
, argv
[0], 255);
1775 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1776 if (strncmp(argv
[1], "v", 1) == 0)
1777 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1779 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1783 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1784 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1786 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1791 ALIAS (domain_passwd_clear
,
1792 domain_passwd_clear_snpauth_cmd
,
1793 "domain-password clear WORD authenticate snp (send-only|validate)",
1794 "Set the authentication password for a routing domain\n"
1795 "Authentication type\n"
1796 "Routing domain password\n"
1799 "Send but do not check PDUs on receiving\n"
1800 "Send and check PDUs on receiving\n");
1802 DEFUN (no_domain_passwd
,
1803 no_domain_passwd_cmd
,
1804 "no domain-password",
1806 "Set the authentication password for a routing domain\n")
1808 struct isis_area
*area
;
1814 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1815 return CMD_ERR_NO_MATCH
;
1818 memset (&area
->domain_passwd
, 0, sizeof (struct isis_passwd
));
1819 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1826 "is-type (level-1|level-1-2|level-2-only)",
1827 "IS Level for this routing process (OSI only)\n"
1828 "Act as a station router only\n"
1829 "Act as both a station router and an area router\n"
1830 "Act as an area router only\n")
1832 struct isis_area
*area
;
1839 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1840 return CMD_ERR_NO_MATCH
;
1843 type
= string2circuit_t (argv
[0]);
1846 vty_out (vty
, "Unknown IS level %s", VTY_NEWLINE
);
1850 isis_event_system_type_change (area
, type
);
1857 "no is-type (level-1|level-1-2|level-2-only)",
1859 "IS Level for this routing process (OSI only)\n"
1860 "Act as a station router only\n"
1861 "Act as both a station router and an area router\n"
1862 "Act as an area router only\n")
1864 struct isis_area
*area
;
1871 * Put the is-type back to defaults:
1872 * - level-1-2 on first area
1873 * - level-1 for the rest
1875 if (listgetdata (listhead (isis
->area_list
)) == area
)
1876 type
= IS_LEVEL_1_AND_2
;
1880 isis_event_system_type_change (area
, type
);
1886 set_lsp_gen_interval (struct vty
*vty
, struct isis_area
*area
,
1887 uint16_t interval
, int level
)
1891 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
1896 if (interval
>= area
->lsp_refresh
[lvl
-1])
1898 vty_out (vty
, "LSP gen interval %us must be less than "
1899 "the LSP refresh interval %us%s",
1900 interval
, area
->lsp_refresh
[lvl
-1], VTY_NEWLINE
);
1901 return CMD_ERR_AMBIGUOUS
;
1905 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
1909 area
->lsp_gen_interval
[lvl
-1] = interval
;
1915 DEFUN (lsp_gen_interval
,
1916 lsp_gen_interval_cmd
,
1917 "lsp-gen-interval <1-120>",
1918 "Minimum interval between regenerating same LSP\n"
1919 "Minimum interval in seconds\n")
1921 struct isis_area
*area
;
1926 interval
= atoi (argv
[0]);
1927 level
= IS_LEVEL_1
| IS_LEVEL_2
;
1928 return set_lsp_gen_interval (vty
, area
, interval
, level
);
1931 DEFUN (no_lsp_gen_interval
,
1932 no_lsp_gen_interval_cmd
,
1933 "no lsp-gen-interval",
1935 "Minimum interval between regenerating same LSP\n")
1937 struct isis_area
*area
;
1942 interval
= DEFAULT_MIN_LSP_GEN_INTERVAL
;
1943 level
= IS_LEVEL_1
| IS_LEVEL_2
;
1944 return set_lsp_gen_interval (vty
, area
, interval
, level
);
1947 ALIAS (no_lsp_gen_interval
,
1948 no_lsp_gen_interval_arg_cmd
,
1949 "no lsp-gen-interval <1-120>",
1951 "Minimum interval between regenerating same LSP\n"
1952 "Minimum interval in seconds\n")
1954 DEFUN (lsp_gen_interval_l1
,
1955 lsp_gen_interval_l1_cmd
,
1956 "lsp-gen-interval level-1 <1-120>",
1957 "Minimum interval between regenerating same LSP\n"
1958 "Set interval for level 1 only\n"
1959 "Minimum interval in seconds\n")
1961 struct isis_area
*area
;
1966 interval
= atoi (argv
[0]);
1968 return set_lsp_gen_interval (vty
, area
, interval
, level
);
1971 DEFUN (no_lsp_gen_interval_l1
,
1972 no_lsp_gen_interval_l1_cmd
,
1973 "no lsp-gen-interval level-1",
1975 "Minimum interval between regenerating same LSP\n"
1976 "Set interval for level 1 only\n")
1978 struct isis_area
*area
;
1983 interval
= DEFAULT_MIN_LSP_GEN_INTERVAL
;
1985 return set_lsp_gen_interval (vty
, area
, interval
, level
);
1988 ALIAS (no_lsp_gen_interval_l1
,
1989 no_lsp_gen_interval_l1_arg_cmd
,
1990 "no lsp-gen-interval level-1 <1-120>",
1992 "Minimum interval between regenerating same LSP\n"
1993 "Set interval for level 1 only\n"
1994 "Minimum interval in seconds\n")
1996 DEFUN (lsp_gen_interval_l2
,
1997 lsp_gen_interval_l2_cmd
,
1998 "lsp-gen-interval level-2 <1-120>",
1999 "Minimum interval between regenerating same LSP\n"
2000 "Set interval for level 2 only\n"
2001 "Minimum interval in seconds\n")
2003 struct isis_area
*area
;
2008 interval
= atoi (argv
[0]);
2010 return set_lsp_gen_interval (vty
, area
, interval
, level
);
2013 DEFUN (no_lsp_gen_interval_l2
,
2014 no_lsp_gen_interval_l2_cmd
,
2015 "no lsp-gen-interval level-2",
2017 "Minimum interval between regenerating same LSP\n"
2018 "Set interval for level 2 only\n")
2020 struct isis_area
*area
;
2025 interval
= DEFAULT_MIN_LSP_GEN_INTERVAL
;
2027 return set_lsp_gen_interval (vty
, area
, interval
, level
);
2030 ALIAS (no_lsp_gen_interval_l2
,
2031 no_lsp_gen_interval_l2_arg_cmd
,
2032 "no lsp-gen-interval level-2 <1-120>",
2034 "Minimum interval between regenerating same LSP\n"
2035 "Set interval for level 2 only\n"
2036 "Minimum interval in seconds\n")
2039 validate_metric_style_narrow (struct vty
*vty
, struct isis_area
*area
)
2041 struct isis_circuit
*circuit
;
2042 struct listnode
*node
;
2045 return CMD_ERR_AMBIGUOUS
;
2049 vty_out (vty
, "ISIS area is invalid%s", VTY_NEWLINE
);
2050 return CMD_ERR_AMBIGUOUS
;
2053 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, node
, circuit
))
2055 if ((area
->is_type
& IS_LEVEL_1
) &&
2056 (circuit
->is_type
& IS_LEVEL_1
) &&
2057 (circuit
->te_metric
[0] > MAX_NARROW_LINK_METRIC
))
2059 vty_out (vty
, "ISIS circuit %s metric is invalid%s",
2060 circuit
->interface
->name
, VTY_NEWLINE
);
2061 return CMD_ERR_AMBIGUOUS
;
2063 if ((area
->is_type
& IS_LEVEL_2
) &&
2064 (circuit
->is_type
& IS_LEVEL_2
) &&
2065 (circuit
->te_metric
[1] > MAX_NARROW_LINK_METRIC
))
2067 vty_out (vty
, "ISIS circuit %s metric is invalid%s",
2068 circuit
->interface
->name
, VTY_NEWLINE
);
2069 return CMD_ERR_AMBIGUOUS
;
2076 DEFUN (metric_style
,
2078 "metric-style (narrow|transition|wide)",
2079 "Use old-style (ISO 10589) or new-style packet formats\n"
2080 "Use old style of TLVs with narrow metric\n"
2081 "Send and accept both styles of TLVs during transition\n"
2082 "Use new style of TLVs to carry wider metric\n")
2084 struct isis_area
*area
;
2090 if (strncmp (argv
[0], "w", 1) == 0)
2092 area
->newmetric
= 1;
2093 area
->oldmetric
= 0;
2097 ret
= validate_metric_style_narrow (vty
, area
);
2098 if (ret
!= CMD_SUCCESS
)
2101 if (strncmp (argv
[0], "t", 1) == 0)
2103 area
->newmetric
= 1;
2104 area
->oldmetric
= 1;
2106 else if (strncmp (argv
[0], "n", 1) == 0)
2108 area
->newmetric
= 0;
2109 area
->oldmetric
= 1;
2116 DEFUN (no_metric_style
,
2117 no_metric_style_cmd
,
2120 "Use old-style (ISO 10589) or new-style packet formats\n")
2122 struct isis_area
*area
;
2128 ret
= validate_metric_style_narrow (vty
, area
);
2129 if (ret
!= CMD_SUCCESS
)
2132 /* Default is narrow metric. */
2133 area
->newmetric
= 0;
2134 area
->oldmetric
= 1;
2139 DEFUN (set_overload_bit
,
2140 set_overload_bit_cmd
,
2142 "Set overload bit to avoid any transit traffic\n"
2143 "Set overload bit\n")
2145 struct isis_area
*area
;
2150 area
->overload_bit
= LSPBIT_OL
;
2151 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2156 DEFUN (no_set_overload_bit
,
2157 no_set_overload_bit_cmd
,
2158 "no set-overload-bit",
2159 "Reset overload bit to accept transit traffic\n"
2160 "Reset overload bit\n")
2162 struct isis_area
*area
;
2167 area
->overload_bit
= 0;
2168 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2173 DEFUN (dynamic_hostname
,
2174 dynamic_hostname_cmd
,
2176 "Dynamic hostname for IS-IS\n"
2177 "Dynamic hostname\n")
2179 struct isis_area
*area
;
2184 if (!area
->dynhostname
)
2186 area
->dynhostname
= 1;
2187 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
2193 DEFUN (no_dynamic_hostname
,
2194 no_dynamic_hostname_cmd
,
2195 "no hostname dynamic",
2197 "Dynamic hostname for IS-IS\n"
2198 "Dynamic hostname\n")
2200 struct isis_area
*area
;
2205 if (area
->dynhostname
)
2207 area
->dynhostname
= 0;
2208 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
2214 DEFUN (spf_interval
,
2216 "spf-interval <1-120>",
2217 "Minimum interval between SPF calculations\n"
2218 "Minimum interval between consecutive SPFs in seconds\n")
2220 struct isis_area
*area
;
2224 interval
= atoi (argv
[0]);
2225 area
->min_spf_interval
[0] = interval
;
2226 area
->min_spf_interval
[1] = interval
;
2231 DEFUN (no_spf_interval
,
2232 no_spf_interval_cmd
,
2235 "Minimum interval between SPF calculations\n")
2237 struct isis_area
*area
;
2241 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
2242 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
2247 ALIAS (no_spf_interval
,
2248 no_spf_interval_arg_cmd
,
2249 "no spf-interval <1-120>",
2251 "Minimum interval between SPF calculations\n"
2252 "Minimum interval between consecutive SPFs in seconds\n")
2254 DEFUN (spf_interval_l1
,
2255 spf_interval_l1_cmd
,
2256 "spf-interval level-1 <1-120>",
2257 "Minimum interval between SPF calculations\n"
2258 "Set interval for level 1 only\n"
2259 "Minimum interval between consecutive SPFs in seconds\n")
2261 struct isis_area
*area
;
2265 interval
= atoi (argv
[0]);
2266 area
->min_spf_interval
[0] = interval
;
2271 DEFUN (no_spf_interval_l1
,
2272 no_spf_interval_l1_cmd
,
2273 "no spf-interval level-1",
2275 "Minimum interval between SPF calculations\n"
2276 "Set interval for level 1 only\n")
2278 struct isis_area
*area
;
2282 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
2287 ALIAS (no_spf_interval
,
2288 no_spf_interval_l1_arg_cmd
,
2289 "no 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 DEFUN (spf_interval_l2
,
2296 spf_interval_l2_cmd
,
2297 "spf-interval level-2 <1-120>",
2298 "Minimum interval between SPF calculations\n"
2299 "Set interval for level 2 only\n"
2300 "Minimum interval between consecutive SPFs in seconds\n")
2302 struct isis_area
*area
;
2306 interval
= atoi (argv
[0]);
2307 area
->min_spf_interval
[1] = interval
;
2312 DEFUN (no_spf_interval_l2
,
2313 no_spf_interval_l2_cmd
,
2314 "no spf-interval level-2",
2316 "Minimum interval between SPF calculations\n"
2317 "Set interval for level 2 only\n")
2319 struct isis_area
*area
;
2323 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
2328 ALIAS (no_spf_interval
,
2329 no_spf_interval_l2_arg_cmd
,
2330 "no 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")
2337 set_lsp_max_lifetime (struct vty
*vty
, struct isis_area
*area
,
2338 uint16_t interval
, int level
)
2341 int set_refresh_interval
[ISIS_LEVELS
] = {0, 0};
2342 uint16_t refresh_interval
;
2344 refresh_interval
= interval
- 300;
2346 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; lvl
++)
2350 if (refresh_interval
< area
->lsp_refresh
[lvl
-1])
2352 vty_out (vty
, "Level %d Max LSP lifetime %us must be 300s greater than "
2353 "the configured LSP refresh interval %us%s",
2354 lvl
, interval
, area
->lsp_refresh
[lvl
-1], VTY_NEWLINE
);
2355 vty_out (vty
, "Automatically reducing level %d LSP refresh interval "
2356 "to %us%s", lvl
, refresh_interval
, VTY_NEWLINE
);
2357 set_refresh_interval
[lvl
-1] = 1;
2359 if (refresh_interval
<= area
->lsp_gen_interval
[lvl
-1])
2361 vty_out (vty
, "LSP refresh interval %us must be greater than "
2362 "the configured LSP gen interval %us%s",
2363 refresh_interval
, area
->lsp_gen_interval
[lvl
-1],
2365 return CMD_ERR_AMBIGUOUS
;
2370 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; lvl
++)
2374 area
->max_lsp_lifetime
[lvl
-1] = interval
;
2375 /* Automatically reducing lsp_refresh_interval to interval - 300 */
2376 if (set_refresh_interval
[lvl
-1])
2377 area
->lsp_refresh
[lvl
-1] = refresh_interval
;
2380 lsp_regenerate_schedule (area
, level
, 1);
2385 DEFUN (max_lsp_lifetime
,
2386 max_lsp_lifetime_cmd
,
2387 "max-lsp-lifetime <350-65535>",
2388 "Maximum LSP lifetime\n"
2389 "LSP lifetime in seconds\n")
2391 struct isis_area
*area
;
2396 interval
= atoi (argv
[0]);
2397 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2398 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2401 DEFUN (no_max_lsp_lifetime
,
2402 no_max_lsp_lifetime_cmd
,
2403 "no max-lsp-lifetime",
2405 "LSP lifetime in seconds\n")
2407 struct isis_area
*area
;
2412 interval
= DEFAULT_LSP_LIFETIME
;
2413 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2414 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2417 ALIAS (no_max_lsp_lifetime
,
2418 no_max_lsp_lifetime_arg_cmd
,
2419 "no max-lsp-lifetime <350-65535>",
2421 "Maximum LSP lifetime\n"
2422 "LSP lifetime in seconds\n")
2424 DEFUN (max_lsp_lifetime_l1
,
2425 max_lsp_lifetime_l1_cmd
,
2426 "max-lsp-lifetime level-1 <350-65535>",
2427 "Maximum LSP lifetime for Level 1 only\n"
2428 "LSP lifetime for Level 1 only in seconds\n")
2430 struct isis_area
*area
;
2435 interval
= atoi (argv
[0]);
2437 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2440 DEFUN (no_max_lsp_lifetime_l1
,
2441 no_max_lsp_lifetime_l1_cmd
,
2442 "no max-lsp-lifetime level-1",
2444 "LSP lifetime for Level 1 only in seconds\n")
2446 struct isis_area
*area
;
2451 interval
= DEFAULT_LSP_LIFETIME
;
2453 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2456 ALIAS (no_max_lsp_lifetime_l1
,
2457 no_max_lsp_lifetime_l1_arg_cmd
,
2458 "no max-lsp-lifetime level-1 <350-65535>",
2460 "Maximum LSP lifetime for Level 1 only\n"
2461 "LSP lifetime for Level 1 only in seconds\n")
2463 DEFUN (max_lsp_lifetime_l2
,
2464 max_lsp_lifetime_l2_cmd
,
2465 "max-lsp-lifetime level-2 <350-65535>",
2466 "Maximum LSP lifetime for Level 2 only\n"
2467 "LSP lifetime for Level 2 only in seconds\n")
2469 struct isis_area
*area
;
2474 interval
= atoi (argv
[0]);
2476 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2479 DEFUN (no_max_lsp_lifetime_l2
,
2480 no_max_lsp_lifetime_l2_cmd
,
2481 "no max-lsp-lifetime level-2",
2483 "LSP lifetime for Level 2 only in seconds\n")
2485 struct isis_area
*area
;
2490 interval
= DEFAULT_LSP_LIFETIME
;
2492 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2495 ALIAS (no_max_lsp_lifetime_l2
,
2496 no_max_lsp_lifetime_l2_arg_cmd
,
2497 "no max-lsp-lifetime level-2 <350-65535>",
2499 "Maximum LSP lifetime for Level 2 only\n"
2500 "LSP lifetime for Level 2 only in seconds\n")
2503 set_lsp_refresh_interval (struct vty
*vty
, struct isis_area
*area
,
2504 uint16_t interval
, int level
)
2508 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
2512 if (interval
<= area
->lsp_gen_interval
[lvl
-1])
2514 vty_out (vty
, "LSP refresh interval %us must be greater than "
2515 "the configured LSP gen interval %us%s",
2516 interval
, area
->lsp_gen_interval
[lvl
-1],
2518 return CMD_ERR_AMBIGUOUS
;
2520 if (interval
> (area
->max_lsp_lifetime
[lvl
-1] - 300))
2522 vty_out (vty
, "LSP refresh interval %us must be less than "
2523 "the configured LSP lifetime %us less 300%s",
2524 interval
, area
->max_lsp_lifetime
[lvl
-1],
2526 return CMD_ERR_AMBIGUOUS
;
2530 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
2534 area
->lsp_refresh
[lvl
-1] = interval
;
2536 lsp_regenerate_schedule (area
, level
, 1);
2541 DEFUN (lsp_refresh_interval
,
2542 lsp_refresh_interval_cmd
,
2543 "lsp-refresh-interval <1-65235>",
2544 "LSP refresh interval\n"
2545 "LSP refresh interval in seconds\n")
2547 struct isis_area
*area
;
2552 interval
= atoi (argv
[0]);
2553 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2554 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2557 DEFUN (no_lsp_refresh_interval
,
2558 no_lsp_refresh_interval_cmd
,
2559 "no lsp-refresh-interval",
2561 "LSP refresh interval in seconds\n")
2563 struct isis_area
*area
;
2568 interval
= DEFAULT_MAX_LSP_GEN_INTERVAL
;
2569 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2570 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2573 ALIAS (no_lsp_refresh_interval
,
2574 no_lsp_refresh_interval_arg_cmd
,
2575 "no lsp-refresh-interval <1-65235>",
2577 "LSP refresh interval\n"
2578 "LSP refresh interval in seconds\n")
2580 DEFUN (lsp_refresh_interval_l1
,
2581 lsp_refresh_interval_l1_cmd
,
2582 "lsp-refresh-interval level-1 <1-65235>",
2583 "LSP refresh interval for Level 1 only\n"
2584 "LSP refresh interval for Level 1 only in seconds\n")
2586 struct isis_area
*area
;
2591 interval
= atoi (argv
[0]);
2593 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2596 DEFUN (no_lsp_refresh_interval_l1
,
2597 no_lsp_refresh_interval_l1_cmd
,
2598 "no lsp-refresh-interval level-1",
2600 "LSP refresh interval for Level 1 only in seconds\n")
2602 struct isis_area
*area
;
2607 interval
= DEFAULT_MAX_LSP_GEN_INTERVAL
;
2609 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2612 ALIAS (no_lsp_refresh_interval_l1
,
2613 no_lsp_refresh_interval_l1_arg_cmd
,
2614 "no lsp-refresh-interval level-1 <1-65235>",
2616 "LSP refresh interval for Level 1 only\n"
2617 "LSP refresh interval for Level 1 only in seconds\n")
2619 DEFUN (lsp_refresh_interval_l2
,
2620 lsp_refresh_interval_l2_cmd
,
2621 "lsp-refresh-interval level-2 <1-65235>",
2622 "LSP refresh interval for Level 2 only\n"
2623 "LSP refresh interval for Level 2 only in seconds\n")
2625 struct isis_area
*area
;
2630 interval
= atoi (argv
[0]);
2632 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2635 DEFUN (no_lsp_refresh_interval_l2
,
2636 no_lsp_refresh_interval_l2_cmd
,
2637 "no lsp-refresh-interval level-2",
2639 "LSP refresh interval for Level 2 only in seconds\n")
2641 struct isis_area
*area
;
2646 interval
= DEFAULT_MAX_LSP_GEN_INTERVAL
;
2648 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2651 ALIAS (no_lsp_refresh_interval_l2
,
2652 no_lsp_refresh_interval_l2_arg_cmd
,
2653 "no lsp-refresh-interval level-2 <1-65235>",
2655 "LSP refresh interval for Level 2 only\n"
2656 "LSP refresh interval for Level 2 only in seconds\n")
2658 DEFUN (log_adj_changes
,
2659 log_adj_changes_cmd
,
2660 "log-adjacency-changes",
2661 "Log changes in adjacency state\n")
2663 struct isis_area
*area
;
2668 area
->log_adj_changes
= 1;
2673 DEFUN (no_log_adj_changes
,
2674 no_log_adj_changes_cmd
,
2675 "no log-adjacency-changes",
2676 "Stop logging changes in adjacency state\n")
2678 struct isis_area
*area
;
2683 area
->log_adj_changes
= 0;
2688 #ifdef TOPOLOGY_GENERATE
2690 DEFUN (topology_generate_grid
,
2691 topology_generate_grid_cmd
,
2692 "topology generate grid <1-100> <1-100> <1-65000> [param] [param] "
2694 "Topology generation for IS-IS\n"
2695 "Topology generation\n"
2697 "X parameter of the grid\n"
2698 "Y parameter of the grid\n"
2700 "Optional param 1\n"
2701 "Optional param 2\n"
2702 "Optional param 3\n"
2705 struct isis_area
*area
;
2710 if (!spgrid_check_params (vty
, argc
, argv
))
2713 list_delete (area
->topology
);
2714 area
->topology
= list_new ();
2715 memcpy (area
->top_params
, vty
->buf
, 200);
2716 gen_spgrid_topology (vty
, area
->topology
);
2717 remove_topology_lsps (area
);
2718 generate_topology_lsps (area
);
2719 /* Regenerate L1 LSP to get two way connection to the generated
2721 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2727 DEFUN (show_isis_generated_topology
,
2728 show_isis_generated_topology_cmd
,
2729 "show isis generated-topologies",
2731 "ISIS network information\n"
2732 "Show generated topologies\n")
2734 struct isis_area
*area
;
2735 struct listnode
*node
;
2736 struct listnode
*node2
;
2739 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
2741 if (!area
->topology
)
2744 vty_out (vty
, "Topology for isis area: %s%s", area
->area_tag
,
2746 vty_out (vty
, "From node To node Distance%s", VTY_NEWLINE
);
2748 for (ALL_LIST_ELEMENTS_RO (area
->topology
, node2
, arc
))
2749 vty_out (vty
, "%9ld %11ld %12ld%s", arc
->from_node
, arc
->to_node
,
2750 arc
->distance
, VTY_NEWLINE
);
2755 /* Base IS for topology generation. */
2756 DEFUN (topology_baseis
,
2757 topology_baseis_cmd
,
2758 "topology base-is WORD",
2759 "Topology generation for IS-IS\n"
2760 "A Network IS Base for this topology\n"
2761 "XXXX.XXXX.XXXX Network entity title (NET)\n")
2763 struct isis_area
*area
;
2764 u_char buff
[ISIS_SYS_ID_LEN
];
2769 if (sysid2buff (buff
, argv
[0]))
2770 sysid2buff (area
->topology_baseis
, argv
[0]);
2775 DEFUN (no_topology_baseis
,
2776 no_topology_baseis_cmd
,
2777 "no topology base-is WORD",
2779 "Topology generation for IS-IS\n"
2780 "A Network IS Base for this topology\n"
2781 "XXXX.XXXX.XXXX Network entity title (NET)\n")
2783 struct isis_area
*area
;
2788 memcpy (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
, ISIS_SYS_ID_LEN
);
2792 ALIAS (no_topology_baseis
,
2793 no_topology_baseis_noid_cmd
,
2794 "no topology base-is",
2796 "Topology generation for IS-IS\n"
2797 "A Network IS Base for this topology\n")
2799 DEFUN (topology_basedynh
,
2800 topology_basedynh_cmd
,
2801 "topology base-dynh WORD",
2802 "Topology generation for IS-IS\n"
2803 "Dynamic hostname base for this topology\n"
2804 "Dynamic hostname base\n")
2806 struct isis_area
*area
;
2811 /* I hope that it's enough. */
2812 area
->topology_basedynh
= strndup (argv
[0], 16);
2816 #endif /* TOPOLOGY_GENERATE */
2818 /* IS-IS configuration write function */
2820 isis_config_write (struct vty
*vty
)
2826 struct isis_area
*area
;
2827 struct listnode
*node
, *node2
;
2829 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
2831 /* ISIS - Area name */
2832 vty_out (vty
, "router isis %s%s", area
->area_tag
, VTY_NEWLINE
);
2835 if (listcount (area
->area_addrs
) > 0)
2837 struct area_addr
*area_addr
;
2838 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
2840 vty_out (vty
, " net %s%s",
2841 isonet_print (area_addr
->area_addr
,
2842 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
2847 /* ISIS - Dynamic hostname - Defaults to true so only display if
2849 if (!area
->dynhostname
)
2851 vty_out (vty
, " no hostname dynamic%s", VTY_NEWLINE
);
2854 /* ISIS - Metric-Style - when true displays wide */
2855 if (area
->newmetric
)
2857 if (!area
->oldmetric
)
2858 vty_out (vty
, " metric-style wide%s", VTY_NEWLINE
);
2860 vty_out (vty
, " metric-style transition%s", VTY_NEWLINE
);
2865 vty_out (vty
, " metric-style narrow%s", VTY_NEWLINE
);
2868 /* ISIS - overload-bit */
2869 if (area
->overload_bit
)
2871 vty_out (vty
, " set-overload-bit%s", VTY_NEWLINE
);
2874 /* ISIS - Area is-type (level-1-2 is default) */
2875 if (area
->is_type
== IS_LEVEL_1
)
2877 vty_out (vty
, " is-type level-1%s", VTY_NEWLINE
);
2880 else if (area
->is_type
== IS_LEVEL_2
)
2882 vty_out (vty
, " is-type level-2-only%s", VTY_NEWLINE
);
2885 /* ISIS - Lsp generation interval */
2886 if (area
->lsp_gen_interval
[0] == area
->lsp_gen_interval
[1])
2888 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2890 vty_out (vty
, " lsp-gen-interval %d%s",
2891 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
2897 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2899 vty_out (vty
, " lsp-gen-interval level-1 %d%s",
2900 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
2903 if (area
->lsp_gen_interval
[1] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2905 vty_out (vty
, " lsp-gen-interval level-2 %d%s",
2906 area
->lsp_gen_interval
[1], VTY_NEWLINE
);
2910 /* ISIS - LSP lifetime */
2911 if (area
->max_lsp_lifetime
[0] == area
->max_lsp_lifetime
[1])
2913 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2915 vty_out (vty
, " max-lsp-lifetime %u%s", area
->max_lsp_lifetime
[0],
2922 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2924 vty_out (vty
, " max-lsp-lifetime level-1 %u%s",
2925 area
->max_lsp_lifetime
[0], VTY_NEWLINE
);
2928 if (area
->max_lsp_lifetime
[1] != DEFAULT_LSP_LIFETIME
)
2930 vty_out (vty
, " max-lsp-lifetime level-2 %u%s",
2931 area
->max_lsp_lifetime
[1], VTY_NEWLINE
);
2935 /* ISIS - LSP refresh interval */
2936 if (area
->lsp_refresh
[0] == area
->lsp_refresh
[1])
2938 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2940 vty_out (vty
, " lsp-refresh-interval %u%s", area
->lsp_refresh
[0],
2947 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2949 vty_out (vty
, " lsp-refresh-interval level-1 %u%s",
2950 area
->lsp_refresh
[0], VTY_NEWLINE
);
2953 if (area
->lsp_refresh
[1] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2955 vty_out (vty
, " lsp-refresh-interval level-2 %u%s",
2956 area
->lsp_refresh
[1], VTY_NEWLINE
);
2960 /* Minimum SPF interval. */
2961 if (area
->min_spf_interval
[0] == area
->min_spf_interval
[1])
2963 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2965 vty_out (vty
, " spf-interval %d%s",
2966 area
->min_spf_interval
[0], VTY_NEWLINE
);
2972 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2974 vty_out (vty
, " spf-interval level-1 %d%s",
2975 area
->min_spf_interval
[0], VTY_NEWLINE
);
2978 if (area
->min_spf_interval
[1] != MINIMUM_SPF_INTERVAL
)
2980 vty_out (vty
, " spf-interval level-2 %d%s",
2981 area
->min_spf_interval
[1], VTY_NEWLINE
);
2985 /* Authentication passwords. */
2986 if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
2988 vty_out(vty
, " area-password md5 %s", area
->area_passwd
.passwd
);
2989 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
2991 vty_out(vty
, " authenticate snp ");
2992 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
2993 vty_out(vty
, "validate");
2995 vty_out(vty
, "send-only");
2997 vty_out(vty
, "%s", VTY_NEWLINE
);
3000 else if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
3002 vty_out(vty
, " area-password clear %s", area
->area_passwd
.passwd
);
3003 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
3005 vty_out(vty
, " authenticate snp ");
3006 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
3007 vty_out(vty
, "validate");
3009 vty_out(vty
, "send-only");
3011 vty_out(vty
, "%s", VTY_NEWLINE
);
3014 if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
3016 vty_out(vty
, " domain-password md5 %s",
3017 area
->domain_passwd
.passwd
);
3018 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
3020 vty_out(vty
, " authenticate snp ");
3021 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
3022 vty_out(vty
, "validate");
3024 vty_out(vty
, "send-only");
3026 vty_out(vty
, "%s", VTY_NEWLINE
);
3029 else if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
3031 vty_out(vty
, " domain-password clear %s",
3032 area
->domain_passwd
.passwd
);
3033 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
3035 vty_out(vty
, " authenticate snp ");
3036 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
3037 vty_out(vty
, "validate");
3039 vty_out(vty
, "send-only");
3041 vty_out(vty
, "%s", VTY_NEWLINE
);
3045 if (area
->log_adj_changes
)
3047 vty_out (vty
, " log-adjacency-changes%s", VTY_NEWLINE
);
3051 #ifdef TOPOLOGY_GENERATE
3052 if (memcmp (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
,
3055 vty_out (vty
, " topology base-is %s%s",
3056 sysid_print ((u_char
*)area
->topology_baseis
), VTY_NEWLINE
);
3059 if (area
->topology_basedynh
)
3061 vty_out (vty
, " topology base-dynh %s%s",
3062 area
->topology_basedynh
, VTY_NEWLINE
);
3065 /* We save the whole command line here. */
3066 if (strlen(area
->top_params
))
3068 vty_out (vty
, " %s%s", area
->top_params
, VTY_NEWLINE
);
3071 #endif /* TOPOLOGY_GENERATE */
3079 struct cmd_node isis_node
= {
3081 "%s(config-router)# ",
3088 /* Install IS-IS top node */
3089 install_node (&isis_node
, isis_config_write
);
3091 install_element (VIEW_NODE
, &show_isis_summary_cmd
);
3093 install_element (VIEW_NODE
, &show_isis_interface_cmd
);
3094 install_element (VIEW_NODE
, &show_isis_interface_detail_cmd
);
3095 install_element (VIEW_NODE
, &show_isis_interface_arg_cmd
);
3097 install_element (VIEW_NODE
, &show_isis_neighbor_cmd
);
3098 install_element (VIEW_NODE
, &show_isis_neighbor_detail_cmd
);
3099 install_element (VIEW_NODE
, &show_isis_neighbor_arg_cmd
);
3100 install_element (VIEW_NODE
, &clear_isis_neighbor_cmd
);
3101 install_element (VIEW_NODE
, &clear_isis_neighbor_arg_cmd
);
3103 install_element (VIEW_NODE
, &show_hostname_cmd
);
3104 install_element (VIEW_NODE
, &show_database_cmd
);
3105 install_element (VIEW_NODE
, &show_database_arg_cmd
);
3106 install_element (VIEW_NODE
, &show_database_arg_detail_cmd
);
3107 install_element (VIEW_NODE
, &show_database_detail_cmd
);
3108 install_element (VIEW_NODE
, &show_database_detail_arg_cmd
);
3110 install_element (ENABLE_NODE
, &show_isis_summary_cmd
);
3112 install_element (ENABLE_NODE
, &show_isis_interface_cmd
);
3113 install_element (ENABLE_NODE
, &show_isis_interface_detail_cmd
);
3114 install_element (ENABLE_NODE
, &show_isis_interface_arg_cmd
);
3116 install_element (ENABLE_NODE
, &show_isis_neighbor_cmd
);
3117 install_element (ENABLE_NODE
, &show_isis_neighbor_detail_cmd
);
3118 install_element (ENABLE_NODE
, &show_isis_neighbor_arg_cmd
);
3119 install_element (ENABLE_NODE
, &clear_isis_neighbor_cmd
);
3120 install_element (ENABLE_NODE
, &clear_isis_neighbor_arg_cmd
);
3122 install_element (ENABLE_NODE
, &show_hostname_cmd
);
3123 install_element (ENABLE_NODE
, &show_database_cmd
);
3124 install_element (ENABLE_NODE
, &show_database_arg_cmd
);
3125 install_element (ENABLE_NODE
, &show_database_arg_detail_cmd
);
3126 install_element (ENABLE_NODE
, &show_database_detail_cmd
);
3127 install_element (ENABLE_NODE
, &show_database_detail_arg_cmd
);
3128 install_element (ENABLE_NODE
, &show_debugging_cmd
);
3130 install_node (&debug_node
, config_write_debug
);
3132 install_element (ENABLE_NODE
, &debug_isis_adj_cmd
);
3133 install_element (ENABLE_NODE
, &no_debug_isis_adj_cmd
);
3134 install_element (ENABLE_NODE
, &debug_isis_csum_cmd
);
3135 install_element (ENABLE_NODE
, &no_debug_isis_csum_cmd
);
3136 install_element (ENABLE_NODE
, &debug_isis_lupd_cmd
);
3137 install_element (ENABLE_NODE
, &no_debug_isis_lupd_cmd
);
3138 install_element (ENABLE_NODE
, &debug_isis_err_cmd
);
3139 install_element (ENABLE_NODE
, &no_debug_isis_err_cmd
);
3140 install_element (ENABLE_NODE
, &debug_isis_snp_cmd
);
3141 install_element (ENABLE_NODE
, &no_debug_isis_snp_cmd
);
3142 install_element (ENABLE_NODE
, &debug_isis_upd_cmd
);
3143 install_element (ENABLE_NODE
, &no_debug_isis_upd_cmd
);
3144 install_element (ENABLE_NODE
, &debug_isis_spfevents_cmd
);
3145 install_element (ENABLE_NODE
, &no_debug_isis_spfevents_cmd
);
3146 install_element (ENABLE_NODE
, &debug_isis_spfstats_cmd
);
3147 install_element (ENABLE_NODE
, &no_debug_isis_spfstats_cmd
);
3148 install_element (ENABLE_NODE
, &debug_isis_spftrigg_cmd
);
3149 install_element (ENABLE_NODE
, &no_debug_isis_spftrigg_cmd
);
3150 install_element (ENABLE_NODE
, &debug_isis_rtevents_cmd
);
3151 install_element (ENABLE_NODE
, &no_debug_isis_rtevents_cmd
);
3152 install_element (ENABLE_NODE
, &debug_isis_events_cmd
);
3153 install_element (ENABLE_NODE
, &no_debug_isis_events_cmd
);
3154 install_element (ENABLE_NODE
, &debug_isis_packet_dump_cmd
);
3155 install_element (ENABLE_NODE
, &no_debug_isis_packet_dump_cmd
);
3157 install_element (CONFIG_NODE
, &debug_isis_adj_cmd
);
3158 install_element (CONFIG_NODE
, &no_debug_isis_adj_cmd
);
3159 install_element (CONFIG_NODE
, &debug_isis_csum_cmd
);
3160 install_element (CONFIG_NODE
, &no_debug_isis_csum_cmd
);
3161 install_element (CONFIG_NODE
, &debug_isis_lupd_cmd
);
3162 install_element (CONFIG_NODE
, &no_debug_isis_lupd_cmd
);
3163 install_element (CONFIG_NODE
, &debug_isis_err_cmd
);
3164 install_element (CONFIG_NODE
, &no_debug_isis_err_cmd
);
3165 install_element (CONFIG_NODE
, &debug_isis_snp_cmd
);
3166 install_element (CONFIG_NODE
, &no_debug_isis_snp_cmd
);
3167 install_element (CONFIG_NODE
, &debug_isis_upd_cmd
);
3168 install_element (CONFIG_NODE
, &no_debug_isis_upd_cmd
);
3169 install_element (CONFIG_NODE
, &debug_isis_spfevents_cmd
);
3170 install_element (CONFIG_NODE
, &no_debug_isis_spfevents_cmd
);
3171 install_element (CONFIG_NODE
, &debug_isis_spfstats_cmd
);
3172 install_element (CONFIG_NODE
, &no_debug_isis_spfstats_cmd
);
3173 install_element (CONFIG_NODE
, &debug_isis_spftrigg_cmd
);
3174 install_element (CONFIG_NODE
, &no_debug_isis_spftrigg_cmd
);
3175 install_element (CONFIG_NODE
, &debug_isis_rtevents_cmd
);
3176 install_element (CONFIG_NODE
, &no_debug_isis_rtevents_cmd
);
3177 install_element (CONFIG_NODE
, &debug_isis_events_cmd
);
3178 install_element (CONFIG_NODE
, &no_debug_isis_events_cmd
);
3179 install_element (CONFIG_NODE
, &debug_isis_packet_dump_cmd
);
3180 install_element (CONFIG_NODE
, &no_debug_isis_packet_dump_cmd
);
3182 install_element (CONFIG_NODE
, &router_isis_cmd
);
3183 install_element (CONFIG_NODE
, &no_router_isis_cmd
);
3185 install_default (ISIS_NODE
);
3187 install_element (ISIS_NODE
, &net_cmd
);
3188 install_element (ISIS_NODE
, &no_net_cmd
);
3190 install_element (ISIS_NODE
, &is_type_cmd
);
3191 install_element (ISIS_NODE
, &no_is_type_cmd
);
3193 install_element (ISIS_NODE
, &area_passwd_md5_cmd
);
3194 install_element (ISIS_NODE
, &area_passwd_md5_snpauth_cmd
);
3195 install_element (ISIS_NODE
, &area_passwd_clear_cmd
);
3196 install_element (ISIS_NODE
, &area_passwd_clear_snpauth_cmd
);
3197 install_element (ISIS_NODE
, &no_area_passwd_cmd
);
3199 install_element (ISIS_NODE
, &domain_passwd_md5_cmd
);
3200 install_element (ISIS_NODE
, &domain_passwd_md5_snpauth_cmd
);
3201 install_element (ISIS_NODE
, &domain_passwd_clear_cmd
);
3202 install_element (ISIS_NODE
, &domain_passwd_clear_snpauth_cmd
);
3203 install_element (ISIS_NODE
, &no_domain_passwd_cmd
);
3205 install_element (ISIS_NODE
, &lsp_gen_interval_cmd
);
3206 install_element (ISIS_NODE
, &no_lsp_gen_interval_cmd
);
3207 install_element (ISIS_NODE
, &no_lsp_gen_interval_arg_cmd
);
3208 install_element (ISIS_NODE
, &lsp_gen_interval_l1_cmd
);
3209 install_element (ISIS_NODE
, &no_lsp_gen_interval_l1_cmd
);
3210 install_element (ISIS_NODE
, &no_lsp_gen_interval_l1_arg_cmd
);
3211 install_element (ISIS_NODE
, &lsp_gen_interval_l2_cmd
);
3212 install_element (ISIS_NODE
, &no_lsp_gen_interval_l2_cmd
);
3213 install_element (ISIS_NODE
, &no_lsp_gen_interval_l2_arg_cmd
);
3215 install_element (ISIS_NODE
, &spf_interval_cmd
);
3216 install_element (ISIS_NODE
, &no_spf_interval_cmd
);
3217 install_element (ISIS_NODE
, &no_spf_interval_arg_cmd
);
3218 install_element (ISIS_NODE
, &spf_interval_l1_cmd
);
3219 install_element (ISIS_NODE
, &no_spf_interval_l1_cmd
);
3220 install_element (ISIS_NODE
, &no_spf_interval_l1_arg_cmd
);
3221 install_element (ISIS_NODE
, &spf_interval_l2_cmd
);
3222 install_element (ISIS_NODE
, &no_spf_interval_l2_cmd
);
3223 install_element (ISIS_NODE
, &no_spf_interval_l2_arg_cmd
);
3225 install_element (ISIS_NODE
, &max_lsp_lifetime_cmd
);
3226 install_element (ISIS_NODE
, &no_max_lsp_lifetime_cmd
);
3227 install_element (ISIS_NODE
, &no_max_lsp_lifetime_arg_cmd
);
3228 install_element (ISIS_NODE
, &max_lsp_lifetime_l1_cmd
);
3229 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l1_cmd
);
3230 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l1_arg_cmd
);
3231 install_element (ISIS_NODE
, &max_lsp_lifetime_l2_cmd
);
3232 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l2_cmd
);
3233 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l2_arg_cmd
);
3235 install_element (ISIS_NODE
, &lsp_refresh_interval_cmd
);
3236 install_element (ISIS_NODE
, &no_lsp_refresh_interval_cmd
);
3237 install_element (ISIS_NODE
, &no_lsp_refresh_interval_arg_cmd
);
3238 install_element (ISIS_NODE
, &lsp_refresh_interval_l1_cmd
);
3239 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l1_cmd
);
3240 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l1_arg_cmd
);
3241 install_element (ISIS_NODE
, &lsp_refresh_interval_l2_cmd
);
3242 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l2_cmd
);
3243 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l2_arg_cmd
);
3245 install_element (ISIS_NODE
, &set_overload_bit_cmd
);
3246 install_element (ISIS_NODE
, &no_set_overload_bit_cmd
);
3248 install_element (ISIS_NODE
, &dynamic_hostname_cmd
);
3249 install_element (ISIS_NODE
, &no_dynamic_hostname_cmd
);
3251 install_element (ISIS_NODE
, &metric_style_cmd
);
3252 install_element (ISIS_NODE
, &no_metric_style_cmd
);
3254 install_element (ISIS_NODE
, &log_adj_changes_cmd
);
3255 install_element (ISIS_NODE
, &no_log_adj_changes_cmd
);
3257 #ifdef TOPOLOGY_GENERATE
3258 install_element (ISIS_NODE
, &topology_generate_grid_cmd
);
3259 install_element (ISIS_NODE
, &topology_baseis_cmd
);
3260 install_element (ISIS_NODE
, &topology_basedynh_cmd
);
3261 install_element (ISIS_NODE
, &no_topology_baseis_cmd
);
3262 install_element (ISIS_NODE
, &no_topology_baseis_noid_cmd
);
3263 install_element (VIEW_NODE
, &show_isis_generated_topology_cmd
);
3264 install_element (ENABLE_NODE
, &show_isis_generated_topology_cmd
);
3265 #endif /* TOPOLOGY_GENERATE */