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 area
->lsp_mtu
= DEFAULT_LSP_MTU
;
162 #ifdef TOPOLOGY_GENERATE
163 memcpy (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
, ISIS_SYS_ID_LEN
);
164 #endif /* TOPOLOGY_GENERATE */
166 area
->area_tag
= strdup (area_tag
);
167 listnode_add (isis
->area_list
, area
);
174 isis_area_lookup (const char *area_tag
)
176 struct isis_area
*area
;
177 struct listnode
*node
;
179 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
180 if ((area
->area_tag
== NULL
&& area_tag
== NULL
) ||
181 (area
->area_tag
&& area_tag
182 && strcmp (area
->area_tag
, area_tag
) == 0))
189 isis_area_get (struct vty
*vty
, const char *area_tag
)
191 struct isis_area
*area
;
193 area
= isis_area_lookup (area_tag
);
197 vty
->node
= ISIS_NODE
;
202 area
= isis_area_create (area_tag
);
204 if (isis
->debugs
& DEBUG_EVENTS
)
205 zlog_debug ("New IS-IS area instance %s", area
->area_tag
);
207 vty
->node
= ISIS_NODE
;
214 isis_area_destroy (struct vty
*vty
, const char *area_tag
)
216 struct isis_area
*area
;
217 struct listnode
*node
, *nnode
;
218 struct isis_circuit
*circuit
;
219 struct area_addr
*addr
;
221 area
= isis_area_lookup (area_tag
);
225 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
226 return CMD_ERR_NO_MATCH
;
229 if (area
->circuit_list
)
231 for (ALL_LIST_ELEMENTS (area
->circuit_list
, node
, nnode
, circuit
))
233 circuit
->ip_router
= 0;
235 circuit
->ipv6_router
= 0;
237 isis_csm_state_change (ISIS_DISABLE
, circuit
, area
);
239 list_delete (area
->circuit_list
);
240 area
->circuit_list
= NULL
;
243 if (area
->lspdb
[0] != NULL
)
245 lsp_db_destroy (area
->lspdb
[0]);
246 area
->lspdb
[0] = NULL
;
248 if (area
->lspdb
[1] != NULL
)
250 lsp_db_destroy (area
->lspdb
[1]);
251 area
->lspdb
[1] = NULL
;
254 spftree_area_del (area
);
256 /* invalidate and validate would delete all routes from zebra */
257 isis_route_invalidate (area
);
258 isis_route_validate (area
);
260 if (area
->route_table
[0])
262 route_table_finish (area
->route_table
[0]);
263 area
->route_table
[0] = NULL
;
265 if (area
->route_table
[1])
267 route_table_finish (area
->route_table
[1]);
268 area
->route_table
[1] = NULL
;
271 if (area
->route_table6
[0])
273 route_table_finish (area
->route_table6
[0]);
274 area
->route_table6
[0] = NULL
;
276 if (area
->route_table6
[1])
278 route_table_finish (area
->route_table6
[1]);
279 area
->route_table6
[1] = NULL
;
281 #endif /* HAVE_IPV6 */
283 isis_redist_area_finish(area
);
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
);
777 if (flags
& DEBUG_LSP_GEN
)
778 vty_out (vty
, "IS-IS LSP generation debugging is %s%s", onoffs
, VTY_NEWLINE
);
779 if (flags
& DEBUG_LSP_SCHED
)
780 vty_out (vty
, "IS-IS LSP scheduling debugging is %s%s", onoffs
, VTY_NEWLINE
);
783 DEFUN (show_debugging
,
785 "show debugging isis",
787 "State of each debugging option\n"
790 vty_out (vty
, "IS-IS:%s", VTY_NEWLINE
);
791 print_debug (vty
, isis
->debugs
, 1);
796 static struct cmd_node debug_node
= {
803 config_write_debug (struct vty
*vty
)
806 int flags
= isis
->debugs
;
808 if (flags
& DEBUG_ADJ_PACKETS
)
810 vty_out (vty
, "debug isis adj-packets%s", VTY_NEWLINE
);
813 if (flags
& DEBUG_CHECKSUM_ERRORS
)
815 vty_out (vty
, "debug isis checksum-errors%s", VTY_NEWLINE
);
818 if (flags
& DEBUG_LOCAL_UPDATES
)
820 vty_out (vty
, "debug isis local-updates%s", VTY_NEWLINE
);
823 if (flags
& DEBUG_PROTOCOL_ERRORS
)
825 vty_out (vty
, "debug isis protocol-errors%s", VTY_NEWLINE
);
828 if (flags
& DEBUG_SNP_PACKETS
)
830 vty_out (vty
, "debug isis snp-packets%s", VTY_NEWLINE
);
833 if (flags
& DEBUG_SPF_EVENTS
)
835 vty_out (vty
, "debug isis spf-events%s", VTY_NEWLINE
);
838 if (flags
& DEBUG_SPF_STATS
)
840 vty_out (vty
, "debug isis spf-statistics%s", VTY_NEWLINE
);
843 if (flags
& DEBUG_SPF_TRIGGERS
)
845 vty_out (vty
, "debug isis spf-triggers%s", VTY_NEWLINE
);
848 if (flags
& DEBUG_UPDATE_PACKETS
)
850 vty_out (vty
, "debug isis update-packets%s", VTY_NEWLINE
);
853 if (flags
& DEBUG_RTE_EVENTS
)
855 vty_out (vty
, "debug isis route-events%s", VTY_NEWLINE
);
858 if (flags
& DEBUG_EVENTS
)
860 vty_out (vty
, "debug isis events%s", VTY_NEWLINE
);
863 if (flags
& DEBUG_PACKET_DUMP
)
865 vty_out (vty
, "debug isis packet-dump%s", VTY_NEWLINE
);
868 if (flags
& DEBUG_LSP_GEN
)
870 vty_out (vty
, "debug isis lsp-gen%s", VTY_NEWLINE
);
873 if (flags
& DEBUG_LSP_SCHED
)
875 vty_out (vty
, "debug isis lsp-sched%s", VTY_NEWLINE
);
882 DEFUN (debug_isis_adj
,
884 "debug isis adj-packets",
886 "IS-IS information\n"
887 "IS-IS Adjacency related packets\n")
889 isis
->debugs
|= DEBUG_ADJ_PACKETS
;
890 print_debug (vty
, DEBUG_ADJ_PACKETS
, 1);
895 DEFUN (no_debug_isis_adj
,
896 no_debug_isis_adj_cmd
,
897 "no debug isis adj-packets",
899 "IS-IS information\n"
900 "IS-IS Adjacency related packets\n")
902 isis
->debugs
&= ~DEBUG_ADJ_PACKETS
;
903 print_debug (vty
, DEBUG_ADJ_PACKETS
, 0);
908 DEFUN (debug_isis_csum
,
910 "debug isis checksum-errors",
912 "IS-IS information\n"
913 "IS-IS LSP checksum errors\n")
915 isis
->debugs
|= DEBUG_CHECKSUM_ERRORS
;
916 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 1);
921 DEFUN (no_debug_isis_csum
,
922 no_debug_isis_csum_cmd
,
923 "no debug isis checksum-errors",
925 "IS-IS information\n"
926 "IS-IS LSP checksum errors\n")
928 isis
->debugs
&= ~DEBUG_CHECKSUM_ERRORS
;
929 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 0);
934 DEFUN (debug_isis_lupd
,
936 "debug isis local-updates",
938 "IS-IS information\n"
939 "IS-IS local update packets\n")
941 isis
->debugs
|= DEBUG_LOCAL_UPDATES
;
942 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 1);
947 DEFUN (no_debug_isis_lupd
,
948 no_debug_isis_lupd_cmd
,
949 "no debug isis local-updates",
951 "IS-IS information\n"
952 "IS-IS local update packets\n")
954 isis
->debugs
&= ~DEBUG_LOCAL_UPDATES
;
955 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 0);
960 DEFUN (debug_isis_err
,
962 "debug isis protocol-errors",
964 "IS-IS information\n"
965 "IS-IS LSP protocol errors\n")
967 isis
->debugs
|= DEBUG_PROTOCOL_ERRORS
;
968 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 1);
973 DEFUN (no_debug_isis_err
,
974 no_debug_isis_err_cmd
,
975 "no debug isis protocol-errors",
977 "IS-IS information\n"
978 "IS-IS LSP protocol errors\n")
980 isis
->debugs
&= ~DEBUG_PROTOCOL_ERRORS
;
981 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 0);
986 DEFUN (debug_isis_snp
,
988 "debug isis snp-packets",
990 "IS-IS information\n"
991 "IS-IS CSNP/PSNP packets\n")
993 isis
->debugs
|= DEBUG_SNP_PACKETS
;
994 print_debug (vty
, DEBUG_SNP_PACKETS
, 1);
999 DEFUN (no_debug_isis_snp
,
1000 no_debug_isis_snp_cmd
,
1001 "no debug isis snp-packets",
1003 "IS-IS information\n"
1004 "IS-IS CSNP/PSNP packets\n")
1006 isis
->debugs
&= ~DEBUG_SNP_PACKETS
;
1007 print_debug (vty
, DEBUG_SNP_PACKETS
, 0);
1012 DEFUN (debug_isis_upd
,
1014 "debug isis update-packets",
1016 "IS-IS information\n"
1017 "IS-IS Update related packets\n")
1019 isis
->debugs
|= DEBUG_UPDATE_PACKETS
;
1020 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 1);
1025 DEFUN (no_debug_isis_upd
,
1026 no_debug_isis_upd_cmd
,
1027 "no debug isis update-packets",
1029 "IS-IS information\n"
1030 "IS-IS Update related packets\n")
1032 isis
->debugs
&= ~DEBUG_UPDATE_PACKETS
;
1033 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 0);
1038 DEFUN (debug_isis_spfevents
,
1039 debug_isis_spfevents_cmd
,
1040 "debug isis spf-events",
1042 "IS-IS information\n"
1043 "IS-IS Shortest Path First Events\n")
1045 isis
->debugs
|= DEBUG_SPF_EVENTS
;
1046 print_debug (vty
, DEBUG_SPF_EVENTS
, 1);
1051 DEFUN (no_debug_isis_spfevents
,
1052 no_debug_isis_spfevents_cmd
,
1053 "no debug isis spf-events",
1055 "IS-IS information\n"
1056 "IS-IS Shortest Path First Events\n")
1058 isis
->debugs
&= ~DEBUG_SPF_EVENTS
;
1059 print_debug (vty
, DEBUG_SPF_EVENTS
, 0);
1064 DEFUN (debug_isis_spfstats
,
1065 debug_isis_spfstats_cmd
,
1066 "debug isis spf-statistics ",
1068 "IS-IS information\n"
1069 "IS-IS SPF Timing and Statistic Data\n")
1071 isis
->debugs
|= DEBUG_SPF_STATS
;
1072 print_debug (vty
, DEBUG_SPF_STATS
, 1);
1077 DEFUN (no_debug_isis_spfstats
,
1078 no_debug_isis_spfstats_cmd
,
1079 "no debug isis spf-statistics",
1081 "IS-IS information\n"
1082 "IS-IS SPF Timing and Statistic Data\n")
1084 isis
->debugs
&= ~DEBUG_SPF_STATS
;
1085 print_debug (vty
, DEBUG_SPF_STATS
, 0);
1090 DEFUN (debug_isis_spftrigg
,
1091 debug_isis_spftrigg_cmd
,
1092 "debug isis spf-triggers",
1094 "IS-IS information\n"
1095 "IS-IS SPF triggering events\n")
1097 isis
->debugs
|= DEBUG_SPF_TRIGGERS
;
1098 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 1);
1103 DEFUN (no_debug_isis_spftrigg
,
1104 no_debug_isis_spftrigg_cmd
,
1105 "no debug isis spf-triggers",
1107 "IS-IS information\n"
1108 "IS-IS SPF triggering events\n")
1110 isis
->debugs
&= ~DEBUG_SPF_TRIGGERS
;
1111 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 0);
1116 DEFUN (debug_isis_rtevents
,
1117 debug_isis_rtevents_cmd
,
1118 "debug isis route-events",
1120 "IS-IS information\n"
1121 "IS-IS Route related events\n")
1123 isis
->debugs
|= DEBUG_RTE_EVENTS
;
1124 print_debug (vty
, DEBUG_RTE_EVENTS
, 1);
1129 DEFUN (no_debug_isis_rtevents
,
1130 no_debug_isis_rtevents_cmd
,
1131 "no debug isis route-events",
1133 "IS-IS information\n"
1134 "IS-IS Route related events\n")
1136 isis
->debugs
&= ~DEBUG_RTE_EVENTS
;
1137 print_debug (vty
, DEBUG_RTE_EVENTS
, 0);
1142 DEFUN (debug_isis_events
,
1143 debug_isis_events_cmd
,
1144 "debug isis events",
1146 "IS-IS information\n"
1149 isis
->debugs
|= DEBUG_EVENTS
;
1150 print_debug (vty
, DEBUG_EVENTS
, 1);
1155 DEFUN (no_debug_isis_events
,
1156 no_debug_isis_events_cmd
,
1157 "no debug isis events",
1159 "IS-IS information\n"
1162 isis
->debugs
&= ~DEBUG_EVENTS
;
1163 print_debug (vty
, DEBUG_EVENTS
, 0);
1168 DEFUN (debug_isis_packet_dump
,
1169 debug_isis_packet_dump_cmd
,
1170 "debug isis packet-dump",
1172 "IS-IS information\n"
1173 "IS-IS packet dump\n")
1175 isis
->debugs
|= DEBUG_PACKET_DUMP
;
1176 print_debug (vty
, DEBUG_PACKET_DUMP
, 1);
1181 DEFUN (no_debug_isis_packet_dump
,
1182 no_debug_isis_packet_dump_cmd
,
1183 "no debug isis packet-dump",
1185 "IS-IS information\n"
1186 "IS-IS packet dump\n")
1188 isis
->debugs
&= ~DEBUG_PACKET_DUMP
;
1189 print_debug (vty
, DEBUG_PACKET_DUMP
, 0);
1194 DEFUN (debug_isis_lsp_gen
,
1195 debug_isis_lsp_gen_cmd
,
1196 "debug isis lsp-gen",
1198 "IS-IS information\n"
1199 "IS-IS generation of own LSPs\n")
1201 isis
->debugs
|= DEBUG_LSP_GEN
;
1202 print_debug (vty
, DEBUG_LSP_GEN
, 1);
1207 DEFUN (no_debug_isis_lsp_gen
,
1208 no_debug_isis_lsp_gen_cmd
,
1209 "no debug isis lsp-gen",
1211 "IS-IS information\n"
1212 "IS-IS generation of own LSPs\n")
1214 isis
->debugs
&= ~DEBUG_LSP_GEN
;
1215 print_debug (vty
, DEBUG_LSP_GEN
, 0);
1220 DEFUN (debug_isis_lsp_sched
,
1221 debug_isis_lsp_sched_cmd
,
1222 "debug isis lsp-sched",
1224 "IS-IS information\n"
1225 "IS-IS scheduling of LSP generation\n")
1227 isis
->debugs
|= DEBUG_LSP_SCHED
;
1228 print_debug (vty
, DEBUG_LSP_SCHED
, 1);
1233 DEFUN (no_debug_isis_lsp_sched
,
1234 no_debug_isis_lsp_sched_cmd
,
1235 "no debug isis lsp-gen",
1237 "IS-IS information\n"
1238 "IS-IS scheduling of LSP generation\n")
1240 isis
->debugs
&= ~DEBUG_LSP_SCHED
;
1241 print_debug (vty
, DEBUG_LSP_SCHED
, 0);
1246 DEFUN (show_hostname
,
1248 "show isis hostname",
1250 "IS-IS information\n"
1251 "IS-IS Dynamic hostname mapping\n")
1253 dynhn_print_all (vty
);
1259 vty_out_timestr(struct vty
*vty
, time_t uptime
)
1262 time_t difftime
= time (NULL
);
1264 tm
= gmtime (&difftime
);
1266 #define ONE_DAY_SECOND 60*60*24
1267 #define ONE_WEEK_SECOND 60*60*24*7
1268 if (difftime
< ONE_DAY_SECOND
)
1269 vty_out (vty
, "%02d:%02d:%02d",
1270 tm
->tm_hour
, tm
->tm_min
, tm
->tm_sec
);
1271 else if (difftime
< ONE_WEEK_SECOND
)
1272 vty_out (vty
, "%dd%02dh%02dm",
1273 tm
->tm_yday
, tm
->tm_hour
, tm
->tm_min
);
1275 vty_out (vty
, "%02dw%dd%02dh",
1277 tm
->tm_yday
- ((tm
->tm_yday
/7) * 7), tm
->tm_hour
);
1278 vty_out (vty
, " ago");
1281 DEFUN (show_isis_summary
,
1282 show_isis_summary_cmd
,
1283 "show isis summary",
1284 SHOW_STR
"IS-IS information\n" "IS-IS summary\n")
1286 struct listnode
*node
, *node2
;
1287 struct isis_area
*area
;
1288 struct isis_spftree
*spftree
;
1293 vty_out (vty
, "ISIS is not running%s", VTY_NEWLINE
);
1297 vty_out (vty
, "Process Id : %ld%s", isis
->process_id
,
1299 if (isis
->sysid_set
)
1300 vty_out (vty
, "System Id : %s%s", sysid_print (isis
->sysid
),
1303 vty_out (vty
, "Up time : ");
1304 vty_out_timestr(vty
, isis
->uptime
);
1305 vty_out (vty
, "%s", VTY_NEWLINE
);
1307 if (isis
->area_list
)
1308 vty_out (vty
, "Number of areas : %d%s", isis
->area_list
->count
,
1311 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1313 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1316 if (listcount (area
->area_addrs
) > 0)
1318 struct area_addr
*area_addr
;
1319 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
1321 vty_out (vty
, " Net: %s%s",
1322 isonet_print (area_addr
->area_addr
,
1323 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
1328 for (level
= ISIS_LEVEL1
; level
<= ISIS_LEVELS
; level
++)
1330 if ((area
->is_type
& level
) == 0)
1333 vty_out (vty
, " Level-%d:%s", level
, VTY_NEWLINE
);
1334 spftree
= area
->spftree
[level
- 1];
1335 if (spftree
->pending
)
1336 vty_out (vty
, " IPv4 SPF: (pending)%s", VTY_NEWLINE
);
1338 vty_out (vty
, " IPv4 SPF:%s", VTY_NEWLINE
);
1340 vty_out (vty
, " minimum interval : %d%s",
1341 area
->min_spf_interval
[level
- 1], VTY_NEWLINE
);
1343 vty_out (vty
, " last run elapsed : ");
1344 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1345 vty_out (vty
, "%s", VTY_NEWLINE
);
1347 vty_out (vty
, " last run duration : %u usec%s",
1348 (u_int32_t
)spftree
->last_run_duration
, VTY_NEWLINE
);
1350 vty_out (vty
, " run count : %d%s",
1351 spftree
->runcount
, VTY_NEWLINE
);
1354 spftree
= area
->spftree6
[level
- 1];
1355 if (spftree
->pending
)
1356 vty_out (vty
, " IPv6 SPF: (pending)%s", VTY_NEWLINE
);
1358 vty_out (vty
, " IPv6 SPF:%s", VTY_NEWLINE
);
1360 vty_out (vty
, " minimum interval : %d%s",
1361 area
->min_spf_interval
[level
- 1], VTY_NEWLINE
);
1363 vty_out (vty
, " last run elapsed : ");
1364 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1365 vty_out (vty
, "%s", VTY_NEWLINE
);
1367 vty_out (vty
, " last run duration : %ld msec%s",
1368 spftree
->last_run_duration
, VTY_NEWLINE
);
1370 vty_out (vty
, " run count : %d%s",
1371 spftree
->runcount
, VTY_NEWLINE
);
1375 vty_out (vty
, "%s", VTY_NEWLINE
);
1381 * This function supports following display options:
1382 * [ show isis database [detail] ]
1383 * [ show isis database <sysid> [detail] ]
1384 * [ show isis database <hostname> [detail] ]
1385 * [ show isis database <sysid>.<pseudo-id> [detail] ]
1386 * [ show isis database <hostname>.<pseudo-id> [detail] ]
1387 * [ show isis database <sysid>.<pseudo-id>-<fragment-number> [detail] ]
1388 * [ show isis database <hostname>.<pseudo-id>-<fragment-number> [detail] ]
1389 * [ show isis database detail <sysid> ]
1390 * [ show isis database detail <hostname> ]
1391 * [ show isis database detail <sysid>.<pseudo-id> ]
1392 * [ show isis database detail <hostname>.<pseudo-id> ]
1393 * [ show isis database detail <sysid>.<pseudo-id>-<fragment-number> ]
1394 * [ show isis database detail <hostname>.<pseudo-id>-<fragment-number> ]
1397 show_isis_database (struct vty
*vty
, const char *argv
, int ui_level
)
1399 struct listnode
*node
;
1400 struct isis_area
*area
;
1401 struct isis_lsp
*lsp
;
1402 struct isis_dynhn
*dynhn
;
1403 const char *pos
= argv
;
1404 u_char lspid
[ISIS_SYS_ID_LEN
+2];
1407 int level
, lsp_count
;
1409 if (isis
->area_list
->count
== 0)
1412 memset (&lspid
, 0, ISIS_SYS_ID_LEN
);
1413 memset (&sysid
, 0, 255);
1416 * extract fragment and pseudo id from the string argv
1418 * (a) <systemid/hostname>.<pseudo-id>-<framenent> or
1419 * (b) <systemid/hostname>.<pseudo-id> or
1420 * (c) <systemid/hostname> or
1421 * Where systemid is in the form:
1425 strncpy (sysid
, argv
, 254);
1426 if (argv
&& strlen (argv
) > 3)
1428 pos
= argv
+ strlen (argv
) - 3;
1429 if (strncmp (pos
, "-", 1) == 0)
1431 memcpy (number
, ++pos
, 2);
1432 lspid
[ISIS_SYS_ID_LEN
+1] = (u_char
) strtol ((char *)number
, NULL
, 16);
1434 if (strncmp (pos
, ".", 1) != 0)
1435 return CMD_ERR_AMBIGUOUS
;
1437 if (strncmp (pos
, ".", 1) == 0)
1439 memcpy (number
, ++pos
, 2);
1440 lspid
[ISIS_SYS_ID_LEN
] = (u_char
) strtol ((char *)number
, NULL
, 16);
1441 sysid
[pos
- argv
- 1] = '\0';
1445 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1447 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1450 for (level
= 0; level
< ISIS_LEVELS
; level
++)
1452 if (area
->lspdb
[level
] && dict_count (area
->lspdb
[level
]) > 0)
1458 * Try to find the lsp-id if the argv string is in
1459 * the form hostname.<pseudo-id>-<fragment>
1461 if (sysid2buff (lspid
, sysid
))
1463 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1465 else if ((dynhn
= dynhn_find_by_name (sysid
)))
1467 memcpy (lspid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
1468 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1470 else if (strncmp(unix_hostname (), sysid
, 15) == 0)
1472 memcpy (lspid
, isis
->sysid
, ISIS_SYS_ID_LEN
);
1473 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1477 if (lsp
!= NULL
|| argv
== NULL
)
1479 vty_out (vty
, "IS-IS Level-%d link-state database:%s",
1480 level
+ 1, VTY_NEWLINE
);
1482 /* print the title in all cases */
1483 vty_out (vty
, "LSP ID PduLen "
1484 "SeqNumber Chksum Holdtime ATT/P/OL%s",
1490 if (ui_level
== ISIS_UI_LEVEL_DETAIL
)
1491 lsp_print_detail (lsp
, vty
, area
->dynhostname
);
1493 lsp_print (lsp
, vty
, area
->dynhostname
);
1495 else if (argv
== NULL
)
1497 lsp_count
= lsp_print_all (vty
, area
->lspdb
[level
],
1501 vty_out (vty
, " %u LSPs%s%s",
1502 lsp_count
, VTY_NEWLINE
, VTY_NEWLINE
);
1511 DEFUN (show_database_brief
,
1513 "show isis database",
1515 "IS-IS information\n"
1516 "IS-IS link state database\n")
1518 return show_isis_database (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
1521 DEFUN (show_database_lsp_brief
,
1522 show_database_arg_cmd
,
1523 "show isis database WORD",
1525 "IS-IS information\n"
1526 "IS-IS link state database\n"
1529 return show_isis_database (vty
, argv
[0], ISIS_UI_LEVEL_BRIEF
);
1532 DEFUN (show_database_lsp_detail
,
1533 show_database_arg_detail_cmd
,
1534 "show isis database WORD detail",
1536 "IS-IS information\n"
1537 "IS-IS link state database\n"
1539 "Detailed information\n")
1541 return show_isis_database (vty
, argv
[0], ISIS_UI_LEVEL_DETAIL
);
1544 DEFUN (show_database_detail
,
1545 show_database_detail_cmd
,
1546 "show isis database detail",
1548 "IS-IS information\n"
1549 "IS-IS link state database\n")
1551 return show_isis_database (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
1554 DEFUN (show_database_detail_lsp
,
1555 show_database_detail_arg_cmd
,
1556 "show isis database detail WORD",
1558 "IS-IS information\n"
1559 "IS-IS link state database\n"
1560 "Detailed information\n"
1563 return show_isis_database (vty
, argv
[0], ISIS_UI_LEVEL_DETAIL
);
1567 * 'router isis' command
1574 "ISO Routing area tag")
1576 return isis_area_get (vty
, argv
[0]);
1580 *'no router isis' command
1582 DEFUN (no_router_isis
,
1584 "no router isis WORD",
1585 "no\n" ROUTER_STR
"ISO IS-IS\n" "ISO Routing area tag")
1587 return isis_area_destroy (vty
, argv
[0]);
1596 "A Network Entity Title for this process (OSI only)\n"
1597 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1599 return area_net_title (vty
, argv
[0]);
1609 "A Network Entity Title for this process (OSI only)\n"
1610 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1612 return area_clear_net_title (vty
, argv
[0]);
1616 int area_set_lsp_mtu(struct vty
*vty
, struct isis_area
*area
, unsigned int lsp_mtu
)
1618 struct isis_circuit
*circuit
;
1619 struct listnode
*node
;
1621 for (ALL_LIST_ELEMENTS_RO(area
->circuit_list
, node
, circuit
))
1623 if(lsp_mtu
> isis_circuit_pdu_size(circuit
))
1625 vty_out(vty
, "ISIS area contains circuit %s, which has a maximum PDU size of %zu.%s",
1626 circuit
->interface
->name
, isis_circuit_pdu_size(circuit
),
1628 return CMD_ERR_AMBIGUOUS
;
1632 area
->lsp_mtu
= lsp_mtu
;
1633 lsp_regenerate_schedule(area
, IS_LEVEL_1_AND_2
, 1);
1638 DEFUN (area_lsp_mtu
,
1640 "lsp-mtu <128-4352>",
1641 "Configure the maximum size of generated LSPs\n"
1642 "Maximum size of generated LSPs\n")
1644 struct isis_area
*area
;
1649 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
1650 return CMD_ERR_NO_MATCH
;
1653 unsigned int lsp_mtu
;
1655 VTY_GET_INTEGER_RANGE("lsp-mtu", lsp_mtu
, argv
[0], 128, 4352);
1657 return area_set_lsp_mtu(vty
, area
, lsp_mtu
);
1660 DEFUN(no_area_lsp_mtu
,
1661 no_area_lsp_mtu_cmd
,
1664 "Configure the maximum size of generated LSPs\n")
1666 struct isis_area
*area
;
1671 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
1672 return CMD_ERR_NO_MATCH
;
1675 return area_set_lsp_mtu(vty
, area
, DEFAULT_LSP_MTU
);
1678 ALIAS(no_area_lsp_mtu
,
1679 no_area_lsp_mtu_arg_cmd
,
1680 "no lsp-mtu <128-4352>",
1682 "Configure the maximum size of generated LSPs\n"
1683 "Maximum size of generated LSPs\n");
1685 DEFUN (area_passwd_md5
,
1686 area_passwd_md5_cmd
,
1687 "area-password md5 WORD",
1688 "Configure the authentication password for an area\n"
1689 "Authentication type\n"
1692 struct isis_area
*area
;
1699 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1700 return CMD_ERR_NO_MATCH
;
1703 len
= strlen (argv
[0]);
1706 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1707 return CMD_ERR_AMBIGUOUS
;
1710 area
->area_passwd
.len
= (u_char
) len
;
1711 area
->area_passwd
.type
= ISIS_PASSWD_TYPE_HMAC_MD5
;
1712 strncpy ((char *)area
->area_passwd
.passwd
, argv
[0], 255);
1716 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1717 if (strncmp(argv
[1], "v", 1) == 0)
1718 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1720 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1724 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1725 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1727 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1732 ALIAS (area_passwd_md5
,
1733 area_passwd_md5_snpauth_cmd
,
1734 "area-password md5 WORD authenticate snp (send-only|validate)",
1735 "Configure the authentication password for an area\n"
1736 "Authentication type\n"
1740 "Send but do not check PDUs on receiving\n"
1741 "Send and check PDUs on receiving\n");
1743 DEFUN (area_passwd_clear
,
1744 area_passwd_clear_cmd
,
1745 "area-password clear WORD",
1746 "Configure the authentication password for an area\n"
1747 "Authentication type\n"
1750 struct isis_area
*area
;
1757 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1758 return CMD_ERR_NO_MATCH
;
1761 len
= strlen (argv
[0]);
1764 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1765 return CMD_ERR_AMBIGUOUS
;
1768 area
->area_passwd
.len
= (u_char
) len
;
1769 area
->area_passwd
.type
= ISIS_PASSWD_TYPE_CLEARTXT
;
1770 strncpy ((char *)area
->area_passwd
.passwd
, argv
[0], 255);
1774 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1775 if (strncmp(argv
[1], "v", 1) == 0)
1776 SET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1778 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1782 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
);
1783 UNSET_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
);
1785 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1790 ALIAS (area_passwd_clear
,
1791 area_passwd_clear_snpauth_cmd
,
1792 "area-password clear WORD authenticate snp (send-only|validate)",
1793 "Configure the authentication password for an area\n"
1794 "Authentication type\n"
1798 "Send but do not check PDUs on receiving\n"
1799 "Send and check PDUs on receiving\n");
1801 DEFUN (no_area_passwd
,
1805 "Configure the authentication password for an area\n")
1807 struct isis_area
*area
;
1813 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1814 return CMD_ERR_NO_MATCH
;
1817 memset (&area
->area_passwd
, 0, sizeof (struct isis_passwd
));
1818 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1823 DEFUN (domain_passwd_md5
,
1824 domain_passwd_md5_cmd
,
1825 "domain-password md5 WORD",
1826 "Set the authentication password for a routing domain\n"
1827 "Authentication type\n"
1828 "Routing domain password\n")
1830 struct isis_area
*area
;
1837 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1838 return CMD_ERR_NO_MATCH
;
1841 len
= strlen (argv
[0]);
1844 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1845 return CMD_ERR_AMBIGUOUS
;
1848 area
->domain_passwd
.len
= (u_char
) len
;
1849 area
->domain_passwd
.type
= ISIS_PASSWD_TYPE_HMAC_MD5
;
1850 strncpy ((char *)area
->domain_passwd
.passwd
, argv
[0], 255);
1854 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1855 if (strncmp(argv
[1], "v", 1) == 0)
1856 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1858 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1862 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1863 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1865 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1870 ALIAS (domain_passwd_md5
,
1871 domain_passwd_md5_snpauth_cmd
,
1872 "domain-password md5 WORD authenticate snp (send-only|validate)",
1873 "Set the authentication password for a routing domain\n"
1874 "Authentication type\n"
1875 "Routing domain password\n"
1878 "Send but do not check PDUs on receiving\n"
1879 "Send and check PDUs on receiving\n");
1881 DEFUN (domain_passwd_clear
,
1882 domain_passwd_clear_cmd
,
1883 "domain-password clear WORD",
1884 "Set the authentication password for a routing domain\n"
1885 "Authentication type\n"
1886 "Routing domain password\n")
1888 struct isis_area
*area
;
1895 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1896 return CMD_ERR_NO_MATCH
;
1899 len
= strlen (argv
[0]);
1902 vty_out (vty
, "Too long area password (>254)%s", VTY_NEWLINE
);
1903 return CMD_ERR_AMBIGUOUS
;
1906 area
->domain_passwd
.len
= (u_char
) len
;
1907 area
->domain_passwd
.type
= ISIS_PASSWD_TYPE_CLEARTXT
;
1908 strncpy ((char *)area
->domain_passwd
.passwd
, argv
[0], 255);
1912 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1913 if (strncmp(argv
[1], "v", 1) == 0)
1914 SET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1916 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1920 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
);
1921 UNSET_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
);
1923 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1928 ALIAS (domain_passwd_clear
,
1929 domain_passwd_clear_snpauth_cmd
,
1930 "domain-password clear WORD authenticate snp (send-only|validate)",
1931 "Set the authentication password for a routing domain\n"
1932 "Authentication type\n"
1933 "Routing domain password\n"
1936 "Send but do not check PDUs on receiving\n"
1937 "Send and check PDUs on receiving\n");
1939 DEFUN (no_domain_passwd
,
1940 no_domain_passwd_cmd
,
1941 "no domain-password",
1943 "Set the authentication password for a routing domain\n")
1945 struct isis_area
*area
;
1951 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1952 return CMD_ERR_NO_MATCH
;
1955 memset (&area
->domain_passwd
, 0, sizeof (struct isis_passwd
));
1956 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1963 "is-type (level-1|level-1-2|level-2-only)",
1964 "IS Level for this routing process (OSI only)\n"
1965 "Act as a station router only\n"
1966 "Act as both a station router and an area router\n"
1967 "Act as an area router only\n")
1969 struct isis_area
*area
;
1976 vty_out (vty
, "Can't find IS-IS instance%s", VTY_NEWLINE
);
1977 return CMD_ERR_NO_MATCH
;
1980 type
= string2circuit_t (argv
[0]);
1983 vty_out (vty
, "Unknown IS level %s", VTY_NEWLINE
);
1987 isis_event_system_type_change (area
, type
);
1994 "no is-type (level-1|level-1-2|level-2-only)",
1996 "IS Level for this routing process (OSI only)\n"
1997 "Act as a station router only\n"
1998 "Act as both a station router and an area router\n"
1999 "Act as an area router only\n")
2001 struct isis_area
*area
;
2008 * Put the is-type back to defaults:
2009 * - level-1-2 on first area
2010 * - level-1 for the rest
2012 if (listgetdata (listhead (isis
->area_list
)) == area
)
2013 type
= IS_LEVEL_1_AND_2
;
2017 isis_event_system_type_change (area
, type
);
2023 set_lsp_gen_interval (struct vty
*vty
, struct isis_area
*area
,
2024 uint16_t interval
, int level
)
2028 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
2033 if (interval
>= area
->lsp_refresh
[lvl
-1])
2035 vty_out (vty
, "LSP gen interval %us must be less than "
2036 "the LSP refresh interval %us%s",
2037 interval
, area
->lsp_refresh
[lvl
-1], VTY_NEWLINE
);
2038 return CMD_ERR_AMBIGUOUS
;
2042 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
2046 area
->lsp_gen_interval
[lvl
-1] = interval
;
2052 DEFUN (lsp_gen_interval
,
2053 lsp_gen_interval_cmd
,
2054 "lsp-gen-interval <1-120>",
2055 "Minimum interval between regenerating same LSP\n"
2056 "Minimum interval in seconds\n")
2058 struct isis_area
*area
;
2063 interval
= atoi (argv
[0]);
2064 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2065 return set_lsp_gen_interval (vty
, area
, interval
, level
);
2068 DEFUN (no_lsp_gen_interval
,
2069 no_lsp_gen_interval_cmd
,
2070 "no lsp-gen-interval",
2072 "Minimum interval between regenerating same LSP\n")
2074 struct isis_area
*area
;
2079 interval
= DEFAULT_MIN_LSP_GEN_INTERVAL
;
2080 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2081 return set_lsp_gen_interval (vty
, area
, interval
, level
);
2084 ALIAS (no_lsp_gen_interval
,
2085 no_lsp_gen_interval_arg_cmd
,
2086 "no lsp-gen-interval <1-120>",
2088 "Minimum interval between regenerating same LSP\n"
2089 "Minimum interval in seconds\n")
2091 DEFUN (lsp_gen_interval_l1
,
2092 lsp_gen_interval_l1_cmd
,
2093 "lsp-gen-interval level-1 <1-120>",
2094 "Minimum interval between regenerating same LSP\n"
2095 "Set interval for level 1 only\n"
2096 "Minimum interval in seconds\n")
2098 struct isis_area
*area
;
2103 interval
= atoi (argv
[0]);
2105 return set_lsp_gen_interval (vty
, area
, interval
, level
);
2108 DEFUN (no_lsp_gen_interval_l1
,
2109 no_lsp_gen_interval_l1_cmd
,
2110 "no lsp-gen-interval level-1",
2112 "Minimum interval between regenerating same LSP\n"
2113 "Set interval for level 1 only\n")
2115 struct isis_area
*area
;
2120 interval
= DEFAULT_MIN_LSP_GEN_INTERVAL
;
2122 return set_lsp_gen_interval (vty
, area
, interval
, level
);
2125 ALIAS (no_lsp_gen_interval_l1
,
2126 no_lsp_gen_interval_l1_arg_cmd
,
2127 "no lsp-gen-interval level-1 <1-120>",
2129 "Minimum interval between regenerating same LSP\n"
2130 "Set interval for level 1 only\n"
2131 "Minimum interval in seconds\n")
2133 DEFUN (lsp_gen_interval_l2
,
2134 lsp_gen_interval_l2_cmd
,
2135 "lsp-gen-interval level-2 <1-120>",
2136 "Minimum interval between regenerating same LSP\n"
2137 "Set interval for level 2 only\n"
2138 "Minimum interval in seconds\n")
2140 struct isis_area
*area
;
2145 interval
= atoi (argv
[0]);
2147 return set_lsp_gen_interval (vty
, area
, interval
, level
);
2150 DEFUN (no_lsp_gen_interval_l2
,
2151 no_lsp_gen_interval_l2_cmd
,
2152 "no lsp-gen-interval level-2",
2154 "Minimum interval between regenerating same LSP\n"
2155 "Set interval for level 2 only\n")
2157 struct isis_area
*area
;
2162 interval
= DEFAULT_MIN_LSP_GEN_INTERVAL
;
2164 return set_lsp_gen_interval (vty
, area
, interval
, level
);
2167 ALIAS (no_lsp_gen_interval_l2
,
2168 no_lsp_gen_interval_l2_arg_cmd
,
2169 "no lsp-gen-interval level-2 <1-120>",
2171 "Minimum interval between regenerating same LSP\n"
2172 "Set interval for level 2 only\n"
2173 "Minimum interval in seconds\n")
2176 validate_metric_style_narrow (struct vty
*vty
, struct isis_area
*area
)
2178 struct isis_circuit
*circuit
;
2179 struct listnode
*node
;
2182 return CMD_ERR_AMBIGUOUS
;
2186 vty_out (vty
, "ISIS area is invalid%s", VTY_NEWLINE
);
2187 return CMD_ERR_AMBIGUOUS
;
2190 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, node
, circuit
))
2192 if ((area
->is_type
& IS_LEVEL_1
) &&
2193 (circuit
->is_type
& IS_LEVEL_1
) &&
2194 (circuit
->te_metric
[0] > MAX_NARROW_LINK_METRIC
))
2196 vty_out (vty
, "ISIS circuit %s metric is invalid%s",
2197 circuit
->interface
->name
, VTY_NEWLINE
);
2198 return CMD_ERR_AMBIGUOUS
;
2200 if ((area
->is_type
& IS_LEVEL_2
) &&
2201 (circuit
->is_type
& IS_LEVEL_2
) &&
2202 (circuit
->te_metric
[1] > MAX_NARROW_LINK_METRIC
))
2204 vty_out (vty
, "ISIS circuit %s metric is invalid%s",
2205 circuit
->interface
->name
, VTY_NEWLINE
);
2206 return CMD_ERR_AMBIGUOUS
;
2213 DEFUN (metric_style
,
2215 "metric-style (narrow|transition|wide)",
2216 "Use old-style (ISO 10589) or new-style packet formats\n"
2217 "Use old style of TLVs with narrow metric\n"
2218 "Send and accept both styles of TLVs during transition\n"
2219 "Use new style of TLVs to carry wider metric\n")
2221 struct isis_area
*area
;
2227 if (strncmp (argv
[0], "w", 1) == 0)
2229 area
->newmetric
= 1;
2230 area
->oldmetric
= 0;
2234 ret
= validate_metric_style_narrow (vty
, area
);
2235 if (ret
!= CMD_SUCCESS
)
2238 if (strncmp (argv
[0], "t", 1) == 0)
2240 area
->newmetric
= 1;
2241 area
->oldmetric
= 1;
2243 else if (strncmp (argv
[0], "n", 1) == 0)
2245 area
->newmetric
= 0;
2246 area
->oldmetric
= 1;
2253 DEFUN (no_metric_style
,
2254 no_metric_style_cmd
,
2257 "Use old-style (ISO 10589) or new-style packet formats\n")
2259 struct isis_area
*area
;
2265 ret
= validate_metric_style_narrow (vty
, area
);
2266 if (ret
!= CMD_SUCCESS
)
2269 /* Default is narrow metric. */
2270 area
->newmetric
= 0;
2271 area
->oldmetric
= 1;
2276 DEFUN (set_overload_bit
,
2277 set_overload_bit_cmd
,
2279 "Set overload bit to avoid any transit traffic\n"
2280 "Set overload bit\n")
2282 struct isis_area
*area
;
2287 area
->overload_bit
= LSPBIT_OL
;
2288 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2293 DEFUN (no_set_overload_bit
,
2294 no_set_overload_bit_cmd
,
2295 "no set-overload-bit",
2296 "Reset overload bit to accept transit traffic\n"
2297 "Reset overload bit\n")
2299 struct isis_area
*area
;
2304 area
->overload_bit
= 0;
2305 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2310 DEFUN (set_attached_bit
,
2311 set_attached_bit_cmd
,
2313 "Set attached bit to identify as L1/L2 router for inter-area traffic\n"
2314 "Set attached bit\n")
2316 struct isis_area
*area
;
2321 area
->attached_bit
= LSPBIT_ATT
;
2322 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2327 DEFUN (no_set_attached_bit
,
2328 no_set_attached_bit_cmd
,
2329 "no set-attached-bit",
2330 "Reset attached bit\n")
2332 struct isis_area
*area
;
2337 area
->attached_bit
= 0;
2338 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2343 DEFUN (dynamic_hostname
,
2344 dynamic_hostname_cmd
,
2346 "Dynamic hostname for IS-IS\n"
2347 "Dynamic hostname\n")
2349 struct isis_area
*area
;
2354 if (!area
->dynhostname
)
2356 area
->dynhostname
= 1;
2357 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
2363 DEFUN (no_dynamic_hostname
,
2364 no_dynamic_hostname_cmd
,
2365 "no hostname dynamic",
2367 "Dynamic hostname for IS-IS\n"
2368 "Dynamic hostname\n")
2370 struct isis_area
*area
;
2375 if (area
->dynhostname
)
2377 area
->dynhostname
= 0;
2378 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
2384 DEFUN (spf_interval
,
2386 "spf-interval <1-120>",
2387 "Minimum interval between SPF calculations\n"
2388 "Minimum interval between consecutive SPFs in seconds\n")
2390 struct isis_area
*area
;
2394 interval
= atoi (argv
[0]);
2395 area
->min_spf_interval
[0] = interval
;
2396 area
->min_spf_interval
[1] = interval
;
2401 DEFUN (no_spf_interval
,
2402 no_spf_interval_cmd
,
2405 "Minimum interval between SPF calculations\n")
2407 struct isis_area
*area
;
2411 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
2412 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
2417 ALIAS (no_spf_interval
,
2418 no_spf_interval_arg_cmd
,
2419 "no spf-interval <1-120>",
2421 "Minimum interval between SPF calculations\n"
2422 "Minimum interval between consecutive SPFs in seconds\n")
2424 DEFUN (spf_interval_l1
,
2425 spf_interval_l1_cmd
,
2426 "spf-interval level-1 <1-120>",
2427 "Minimum interval between SPF calculations\n"
2428 "Set interval for level 1 only\n"
2429 "Minimum interval between consecutive SPFs in seconds\n")
2431 struct isis_area
*area
;
2435 interval
= atoi (argv
[0]);
2436 area
->min_spf_interval
[0] = interval
;
2441 DEFUN (no_spf_interval_l1
,
2442 no_spf_interval_l1_cmd
,
2443 "no spf-interval level-1",
2445 "Minimum interval between SPF calculations\n"
2446 "Set interval for level 1 only\n")
2448 struct isis_area
*area
;
2452 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
2457 ALIAS (no_spf_interval
,
2458 no_spf_interval_l1_arg_cmd
,
2459 "no spf-interval level-1 <1-120>",
2461 "Minimum interval between SPF calculations\n"
2462 "Set interval for level 1 only\n"
2463 "Minimum interval between consecutive SPFs in seconds\n")
2465 DEFUN (spf_interval_l2
,
2466 spf_interval_l2_cmd
,
2467 "spf-interval level-2 <1-120>",
2468 "Minimum interval between SPF calculations\n"
2469 "Set interval for level 2 only\n"
2470 "Minimum interval between consecutive SPFs in seconds\n")
2472 struct isis_area
*area
;
2476 interval
= atoi (argv
[0]);
2477 area
->min_spf_interval
[1] = interval
;
2482 DEFUN (no_spf_interval_l2
,
2483 no_spf_interval_l2_cmd
,
2484 "no spf-interval level-2",
2486 "Minimum interval between SPF calculations\n"
2487 "Set interval for level 2 only\n")
2489 struct isis_area
*area
;
2493 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
2498 ALIAS (no_spf_interval
,
2499 no_spf_interval_l2_arg_cmd
,
2500 "no spf-interval level-2 <1-120>",
2502 "Minimum interval between SPF calculations\n"
2503 "Set interval for level 2 only\n"
2504 "Minimum interval between consecutive SPFs in seconds\n")
2507 set_lsp_max_lifetime (struct vty
*vty
, struct isis_area
*area
,
2508 uint16_t interval
, int level
)
2511 int set_refresh_interval
[ISIS_LEVELS
] = {0, 0};
2512 uint16_t refresh_interval
;
2514 refresh_interval
= interval
- 300;
2516 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; lvl
++)
2520 if (refresh_interval
< area
->lsp_refresh
[lvl
-1])
2522 vty_out (vty
, "Level %d Max LSP lifetime %us must be 300s greater than "
2523 "the configured LSP refresh interval %us%s",
2524 lvl
, interval
, area
->lsp_refresh
[lvl
-1], VTY_NEWLINE
);
2525 vty_out (vty
, "Automatically reducing level %d LSP refresh interval "
2526 "to %us%s", lvl
, refresh_interval
, VTY_NEWLINE
);
2527 set_refresh_interval
[lvl
-1] = 1;
2529 if (refresh_interval
<= area
->lsp_gen_interval
[lvl
-1])
2531 vty_out (vty
, "LSP refresh interval %us must be greater than "
2532 "the configured LSP gen interval %us%s",
2533 refresh_interval
, area
->lsp_gen_interval
[lvl
-1],
2535 return CMD_ERR_AMBIGUOUS
;
2540 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; lvl
++)
2544 area
->max_lsp_lifetime
[lvl
-1] = interval
;
2545 /* Automatically reducing lsp_refresh_interval to interval - 300 */
2546 if (set_refresh_interval
[lvl
-1])
2547 area
->lsp_refresh
[lvl
-1] = refresh_interval
;
2550 lsp_regenerate_schedule (area
, level
, 1);
2555 DEFUN (max_lsp_lifetime
,
2556 max_lsp_lifetime_cmd
,
2557 "max-lsp-lifetime <350-65535>",
2558 "Maximum LSP lifetime\n"
2559 "LSP lifetime in seconds\n")
2561 struct isis_area
*area
;
2566 interval
= atoi (argv
[0]);
2567 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2568 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2571 DEFUN (no_max_lsp_lifetime
,
2572 no_max_lsp_lifetime_cmd
,
2573 "no max-lsp-lifetime",
2575 "LSP lifetime in seconds\n")
2577 struct isis_area
*area
;
2582 interval
= DEFAULT_LSP_LIFETIME
;
2583 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2584 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2587 ALIAS (no_max_lsp_lifetime
,
2588 no_max_lsp_lifetime_arg_cmd
,
2589 "no max-lsp-lifetime <350-65535>",
2591 "Maximum LSP lifetime\n"
2592 "LSP lifetime in seconds\n")
2594 DEFUN (max_lsp_lifetime_l1
,
2595 max_lsp_lifetime_l1_cmd
,
2596 "max-lsp-lifetime level-1 <350-65535>",
2597 "Maximum LSP lifetime for Level 1 only\n"
2598 "LSP lifetime for Level 1 only in seconds\n")
2600 struct isis_area
*area
;
2605 interval
= atoi (argv
[0]);
2607 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2610 DEFUN (no_max_lsp_lifetime_l1
,
2611 no_max_lsp_lifetime_l1_cmd
,
2612 "no max-lsp-lifetime level-1",
2614 "LSP lifetime for Level 1 only in seconds\n")
2616 struct isis_area
*area
;
2621 interval
= DEFAULT_LSP_LIFETIME
;
2623 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2626 ALIAS (no_max_lsp_lifetime_l1
,
2627 no_max_lsp_lifetime_l1_arg_cmd
,
2628 "no max-lsp-lifetime level-1 <350-65535>",
2630 "Maximum LSP lifetime for Level 1 only\n"
2631 "LSP lifetime for Level 1 only in seconds\n")
2633 DEFUN (max_lsp_lifetime_l2
,
2634 max_lsp_lifetime_l2_cmd
,
2635 "max-lsp-lifetime level-2 <350-65535>",
2636 "Maximum LSP lifetime for Level 2 only\n"
2637 "LSP lifetime for Level 2 only in seconds\n")
2639 struct isis_area
*area
;
2644 interval
= atoi (argv
[0]);
2646 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2649 DEFUN (no_max_lsp_lifetime_l2
,
2650 no_max_lsp_lifetime_l2_cmd
,
2651 "no max-lsp-lifetime level-2",
2653 "LSP lifetime for Level 2 only in seconds\n")
2655 struct isis_area
*area
;
2660 interval
= DEFAULT_LSP_LIFETIME
;
2662 return set_lsp_max_lifetime (vty
, area
, interval
, level
);
2665 ALIAS (no_max_lsp_lifetime_l2
,
2666 no_max_lsp_lifetime_l2_arg_cmd
,
2667 "no max-lsp-lifetime level-2 <350-65535>",
2669 "Maximum LSP lifetime for Level 2 only\n"
2670 "LSP lifetime for Level 2 only in seconds\n")
2673 set_lsp_refresh_interval (struct vty
*vty
, struct isis_area
*area
,
2674 uint16_t interval
, int level
)
2678 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
2682 if (interval
<= area
->lsp_gen_interval
[lvl
-1])
2684 vty_out (vty
, "LSP refresh interval %us must be greater than "
2685 "the configured LSP gen interval %us%s",
2686 interval
, area
->lsp_gen_interval
[lvl
-1],
2688 return CMD_ERR_AMBIGUOUS
;
2690 if (interval
> (area
->max_lsp_lifetime
[lvl
-1] - 300))
2692 vty_out (vty
, "LSP refresh interval %us must be less than "
2693 "the configured LSP lifetime %us less 300%s",
2694 interval
, area
->max_lsp_lifetime
[lvl
-1],
2696 return CMD_ERR_AMBIGUOUS
;
2700 for (lvl
= IS_LEVEL_1
; lvl
<= IS_LEVEL_2
; ++lvl
)
2704 area
->lsp_refresh
[lvl
-1] = interval
;
2706 lsp_regenerate_schedule (area
, level
, 1);
2711 DEFUN (lsp_refresh_interval
,
2712 lsp_refresh_interval_cmd
,
2713 "lsp-refresh-interval <1-65235>",
2714 "LSP refresh interval\n"
2715 "LSP refresh interval in seconds\n")
2717 struct isis_area
*area
;
2722 interval
= atoi (argv
[0]);
2723 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2724 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2727 DEFUN (no_lsp_refresh_interval
,
2728 no_lsp_refresh_interval_cmd
,
2729 "no lsp-refresh-interval",
2731 "LSP refresh interval in seconds\n")
2733 struct isis_area
*area
;
2738 interval
= DEFAULT_MAX_LSP_GEN_INTERVAL
;
2739 level
= IS_LEVEL_1
| IS_LEVEL_2
;
2740 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2743 ALIAS (no_lsp_refresh_interval
,
2744 no_lsp_refresh_interval_arg_cmd
,
2745 "no lsp-refresh-interval <1-65235>",
2747 "LSP refresh interval\n"
2748 "LSP refresh interval in seconds\n")
2750 DEFUN (lsp_refresh_interval_l1
,
2751 lsp_refresh_interval_l1_cmd
,
2752 "lsp-refresh-interval level-1 <1-65235>",
2753 "LSP refresh interval for Level 1 only\n"
2754 "LSP refresh interval for Level 1 only in seconds\n")
2756 struct isis_area
*area
;
2761 interval
= atoi (argv
[0]);
2763 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2766 DEFUN (no_lsp_refresh_interval_l1
,
2767 no_lsp_refresh_interval_l1_cmd
,
2768 "no lsp-refresh-interval level-1",
2770 "LSP refresh interval for Level 1 only in seconds\n")
2772 struct isis_area
*area
;
2777 interval
= DEFAULT_MAX_LSP_GEN_INTERVAL
;
2779 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2782 ALIAS (no_lsp_refresh_interval_l1
,
2783 no_lsp_refresh_interval_l1_arg_cmd
,
2784 "no lsp-refresh-interval level-1 <1-65235>",
2786 "LSP refresh interval for Level 1 only\n"
2787 "LSP refresh interval for Level 1 only in seconds\n")
2789 DEFUN (lsp_refresh_interval_l2
,
2790 lsp_refresh_interval_l2_cmd
,
2791 "lsp-refresh-interval level-2 <1-65235>",
2792 "LSP refresh interval for Level 2 only\n"
2793 "LSP refresh interval for Level 2 only in seconds\n")
2795 struct isis_area
*area
;
2800 interval
= atoi (argv
[0]);
2802 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2805 DEFUN (no_lsp_refresh_interval_l2
,
2806 no_lsp_refresh_interval_l2_cmd
,
2807 "no lsp-refresh-interval level-2",
2809 "LSP refresh interval for Level 2 only in seconds\n")
2811 struct isis_area
*area
;
2816 interval
= DEFAULT_MAX_LSP_GEN_INTERVAL
;
2818 return set_lsp_refresh_interval (vty
, area
, interval
, level
);
2821 ALIAS (no_lsp_refresh_interval_l2
,
2822 no_lsp_refresh_interval_l2_arg_cmd
,
2823 "no lsp-refresh-interval level-2 <1-65235>",
2825 "LSP refresh interval for Level 2 only\n"
2826 "LSP refresh interval for Level 2 only in seconds\n")
2828 DEFUN (log_adj_changes
,
2829 log_adj_changes_cmd
,
2830 "log-adjacency-changes",
2831 "Log changes in adjacency state\n")
2833 struct isis_area
*area
;
2838 area
->log_adj_changes
= 1;
2843 DEFUN (no_log_adj_changes
,
2844 no_log_adj_changes_cmd
,
2845 "no log-adjacency-changes",
2846 "Stop logging changes in adjacency state\n")
2848 struct isis_area
*area
;
2853 area
->log_adj_changes
= 0;
2858 #ifdef TOPOLOGY_GENERATE
2860 DEFUN (topology_generate_grid
,
2861 topology_generate_grid_cmd
,
2862 "topology generate grid <1-100> <1-100> <1-65000> [param] [param] "
2864 "Topology generation for IS-IS\n"
2865 "Topology generation\n"
2867 "X parameter of the grid\n"
2868 "Y parameter of the grid\n"
2870 "Optional param 1\n"
2871 "Optional param 2\n"
2872 "Optional param 3\n"
2875 struct isis_area
*area
;
2880 if (!spgrid_check_params (vty
, argc
, argv
))
2883 list_delete (area
->topology
);
2884 area
->topology
= list_new ();
2885 memcpy (area
->top_params
, vty
->buf
, 200);
2886 gen_spgrid_topology (vty
, area
->topology
);
2887 remove_topology_lsps (area
);
2888 generate_topology_lsps (area
);
2889 /* Regenerate L1 LSP to get two way connection to the generated
2891 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
2897 DEFUN (show_isis_generated_topology
,
2898 show_isis_generated_topology_cmd
,
2899 "show isis generated-topologies",
2901 "ISIS network information\n"
2902 "Show generated topologies\n")
2904 struct isis_area
*area
;
2905 struct listnode
*node
;
2906 struct listnode
*node2
;
2909 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
2911 if (!area
->topology
)
2914 vty_out (vty
, "Topology for isis area: %s%s", area
->area_tag
,
2916 vty_out (vty
, "From node To node Distance%s", VTY_NEWLINE
);
2918 for (ALL_LIST_ELEMENTS_RO (area
->topology
, node2
, arc
))
2919 vty_out (vty
, "%9ld %11ld %12ld%s", arc
->from_node
, arc
->to_node
,
2920 arc
->distance
, VTY_NEWLINE
);
2925 /* Base IS for topology generation. */
2926 DEFUN (topology_baseis
,
2927 topology_baseis_cmd
,
2928 "topology base-is WORD",
2929 "Topology generation for IS-IS\n"
2930 "A Network IS Base for this topology\n"
2931 "XXXX.XXXX.XXXX Network entity title (NET)\n")
2933 struct isis_area
*area
;
2934 u_char buff
[ISIS_SYS_ID_LEN
];
2939 if (sysid2buff (buff
, argv
[0]))
2940 sysid2buff (area
->topology_baseis
, argv
[0]);
2945 DEFUN (no_topology_baseis
,
2946 no_topology_baseis_cmd
,
2947 "no topology base-is WORD",
2949 "Topology generation for IS-IS\n"
2950 "A Network IS Base for this topology\n"
2951 "XXXX.XXXX.XXXX Network entity title (NET)\n")
2953 struct isis_area
*area
;
2958 memcpy (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
, ISIS_SYS_ID_LEN
);
2962 ALIAS (no_topology_baseis
,
2963 no_topology_baseis_noid_cmd
,
2964 "no topology base-is",
2966 "Topology generation for IS-IS\n"
2967 "A Network IS Base for this topology\n")
2969 DEFUN (topology_basedynh
,
2970 topology_basedynh_cmd
,
2971 "topology base-dynh WORD",
2972 "Topology generation for IS-IS\n"
2973 "Dynamic hostname base for this topology\n"
2974 "Dynamic hostname base\n")
2976 struct isis_area
*area
;
2981 /* I hope that it's enough. */
2982 area
->topology_basedynh
= strndup (argv
[0], 16);
2986 #endif /* TOPOLOGY_GENERATE */
2988 /* IS-IS configuration write function */
2990 isis_config_write (struct vty
*vty
)
2996 struct isis_area
*area
;
2997 struct listnode
*node
, *node2
;
2999 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
3001 /* ISIS - Area name */
3002 vty_out (vty
, "router isis %s%s", area
->area_tag
, VTY_NEWLINE
);
3005 if (listcount (area
->area_addrs
) > 0)
3007 struct area_addr
*area_addr
;
3008 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
3010 vty_out (vty
, " net %s%s",
3011 isonet_print (area_addr
->area_addr
,
3012 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
3017 /* ISIS - Dynamic hostname - Defaults to true so only display if
3019 if (!area
->dynhostname
)
3021 vty_out (vty
, " no hostname dynamic%s", VTY_NEWLINE
);
3024 /* ISIS - Metric-Style - when true displays wide */
3025 if (area
->newmetric
)
3027 if (!area
->oldmetric
)
3028 vty_out (vty
, " metric-style wide%s", VTY_NEWLINE
);
3030 vty_out (vty
, " metric-style transition%s", VTY_NEWLINE
);
3035 vty_out (vty
, " metric-style narrow%s", VTY_NEWLINE
);
3038 /* ISIS - overload-bit */
3039 if (area
->overload_bit
)
3041 vty_out (vty
, " set-overload-bit%s", VTY_NEWLINE
);
3044 /* ISIS - Area is-type (level-1-2 is default) */
3045 if (area
->is_type
== IS_LEVEL_1
)
3047 vty_out (vty
, " is-type level-1%s", VTY_NEWLINE
);
3050 else if (area
->is_type
== IS_LEVEL_2
)
3052 vty_out (vty
, " is-type level-2-only%s", VTY_NEWLINE
);
3055 write
+= isis_redist_config_write(vty
, area
, AF_INET
);
3056 write
+= isis_redist_config_write(vty
, area
, AF_INET6
);
3057 /* ISIS - Lsp generation interval */
3058 if (area
->lsp_gen_interval
[0] == area
->lsp_gen_interval
[1])
3060 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
3062 vty_out (vty
, " lsp-gen-interval %d%s",
3063 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
3069 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
3071 vty_out (vty
, " lsp-gen-interval level-1 %d%s",
3072 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
3075 if (area
->lsp_gen_interval
[1] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
3077 vty_out (vty
, " lsp-gen-interval level-2 %d%s",
3078 area
->lsp_gen_interval
[1], VTY_NEWLINE
);
3082 /* ISIS - LSP lifetime */
3083 if (area
->max_lsp_lifetime
[0] == area
->max_lsp_lifetime
[1])
3085 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
3087 vty_out (vty
, " max-lsp-lifetime %u%s", area
->max_lsp_lifetime
[0],
3094 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
3096 vty_out (vty
, " max-lsp-lifetime level-1 %u%s",
3097 area
->max_lsp_lifetime
[0], VTY_NEWLINE
);
3100 if (area
->max_lsp_lifetime
[1] != DEFAULT_LSP_LIFETIME
)
3102 vty_out (vty
, " max-lsp-lifetime level-2 %u%s",
3103 area
->max_lsp_lifetime
[1], VTY_NEWLINE
);
3107 /* ISIS - LSP refresh interval */
3108 if (area
->lsp_refresh
[0] == area
->lsp_refresh
[1])
3110 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
3112 vty_out (vty
, " lsp-refresh-interval %u%s", area
->lsp_refresh
[0],
3119 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
3121 vty_out (vty
, " lsp-refresh-interval level-1 %u%s",
3122 area
->lsp_refresh
[0], VTY_NEWLINE
);
3125 if (area
->lsp_refresh
[1] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
3127 vty_out (vty
, " lsp-refresh-interval level-2 %u%s",
3128 area
->lsp_refresh
[1], VTY_NEWLINE
);
3132 if (area
->lsp_mtu
!= DEFAULT_LSP_MTU
)
3134 vty_out(vty
, " lsp-mtu %u%s", area
->lsp_mtu
, VTY_NEWLINE
);
3138 /* Minimum SPF interval. */
3139 if (area
->min_spf_interval
[0] == area
->min_spf_interval
[1])
3141 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
3143 vty_out (vty
, " spf-interval %d%s",
3144 area
->min_spf_interval
[0], VTY_NEWLINE
);
3150 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
3152 vty_out (vty
, " spf-interval level-1 %d%s",
3153 area
->min_spf_interval
[0], VTY_NEWLINE
);
3156 if (area
->min_spf_interval
[1] != MINIMUM_SPF_INTERVAL
)
3158 vty_out (vty
, " spf-interval level-2 %d%s",
3159 area
->min_spf_interval
[1], VTY_NEWLINE
);
3163 /* Authentication passwords. */
3164 if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
3166 vty_out(vty
, " area-password md5 %s", area
->area_passwd
.passwd
);
3167 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
3169 vty_out(vty
, " authenticate snp ");
3170 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
3171 vty_out(vty
, "validate");
3173 vty_out(vty
, "send-only");
3175 vty_out(vty
, "%s", VTY_NEWLINE
);
3178 else if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
3180 vty_out(vty
, " area-password clear %s", area
->area_passwd
.passwd
);
3181 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
3183 vty_out(vty
, " authenticate snp ");
3184 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
3185 vty_out(vty
, "validate");
3187 vty_out(vty
, "send-only");
3189 vty_out(vty
, "%s", VTY_NEWLINE
);
3192 if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
3194 vty_out(vty
, " domain-password md5 %s",
3195 area
->domain_passwd
.passwd
);
3196 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
3198 vty_out(vty
, " authenticate snp ");
3199 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
3200 vty_out(vty
, "validate");
3202 vty_out(vty
, "send-only");
3204 vty_out(vty
, "%s", VTY_NEWLINE
);
3207 else if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
3209 vty_out(vty
, " domain-password clear %s",
3210 area
->domain_passwd
.passwd
);
3211 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
3213 vty_out(vty
, " authenticate snp ");
3214 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
3215 vty_out(vty
, "validate");
3217 vty_out(vty
, "send-only");
3219 vty_out(vty
, "%s", VTY_NEWLINE
);
3223 if (area
->log_adj_changes
)
3225 vty_out (vty
, " log-adjacency-changes%s", VTY_NEWLINE
);
3229 #ifdef TOPOLOGY_GENERATE
3230 if (memcmp (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
,
3233 vty_out (vty
, " topology base-is %s%s",
3234 sysid_print ((u_char
*)area
->topology_baseis
), VTY_NEWLINE
);
3237 if (area
->topology_basedynh
)
3239 vty_out (vty
, " topology base-dynh %s%s",
3240 area
->topology_basedynh
, VTY_NEWLINE
);
3243 /* We save the whole command line here. */
3244 if (strlen(area
->top_params
))
3246 vty_out (vty
, " %s%s", area
->top_params
, VTY_NEWLINE
);
3249 #endif /* TOPOLOGY_GENERATE */
3257 struct cmd_node isis_node
= {
3259 "%s(config-router)# ",
3266 /* Install IS-IS top node */
3267 install_node (&isis_node
, isis_config_write
);
3269 install_element (VIEW_NODE
, &show_isis_summary_cmd
);
3271 install_element (VIEW_NODE
, &show_isis_interface_cmd
);
3272 install_element (VIEW_NODE
, &show_isis_interface_detail_cmd
);
3273 install_element (VIEW_NODE
, &show_isis_interface_arg_cmd
);
3275 install_element (VIEW_NODE
, &show_isis_neighbor_cmd
);
3276 install_element (VIEW_NODE
, &show_isis_neighbor_detail_cmd
);
3277 install_element (VIEW_NODE
, &show_isis_neighbor_arg_cmd
);
3278 install_element (VIEW_NODE
, &clear_isis_neighbor_cmd
);
3279 install_element (VIEW_NODE
, &clear_isis_neighbor_arg_cmd
);
3281 install_element (VIEW_NODE
, &show_hostname_cmd
);
3282 install_element (VIEW_NODE
, &show_database_cmd
);
3283 install_element (VIEW_NODE
, &show_database_arg_cmd
);
3284 install_element (VIEW_NODE
, &show_database_arg_detail_cmd
);
3285 install_element (VIEW_NODE
, &show_database_detail_cmd
);
3286 install_element (VIEW_NODE
, &show_database_detail_arg_cmd
);
3288 install_element (ENABLE_NODE
, &show_isis_summary_cmd
);
3290 install_element (ENABLE_NODE
, &show_isis_interface_cmd
);
3291 install_element (ENABLE_NODE
, &show_isis_interface_detail_cmd
);
3292 install_element (ENABLE_NODE
, &show_isis_interface_arg_cmd
);
3294 install_element (ENABLE_NODE
, &show_isis_neighbor_cmd
);
3295 install_element (ENABLE_NODE
, &show_isis_neighbor_detail_cmd
);
3296 install_element (ENABLE_NODE
, &show_isis_neighbor_arg_cmd
);
3297 install_element (ENABLE_NODE
, &clear_isis_neighbor_cmd
);
3298 install_element (ENABLE_NODE
, &clear_isis_neighbor_arg_cmd
);
3300 install_element (ENABLE_NODE
, &show_hostname_cmd
);
3301 install_element (ENABLE_NODE
, &show_database_cmd
);
3302 install_element (ENABLE_NODE
, &show_database_arg_cmd
);
3303 install_element (ENABLE_NODE
, &show_database_arg_detail_cmd
);
3304 install_element (ENABLE_NODE
, &show_database_detail_cmd
);
3305 install_element (ENABLE_NODE
, &show_database_detail_arg_cmd
);
3306 install_element (ENABLE_NODE
, &show_debugging_cmd
);
3308 install_node (&debug_node
, config_write_debug
);
3310 install_element (ENABLE_NODE
, &debug_isis_adj_cmd
);
3311 install_element (ENABLE_NODE
, &no_debug_isis_adj_cmd
);
3312 install_element (ENABLE_NODE
, &debug_isis_csum_cmd
);
3313 install_element (ENABLE_NODE
, &no_debug_isis_csum_cmd
);
3314 install_element (ENABLE_NODE
, &debug_isis_lupd_cmd
);
3315 install_element (ENABLE_NODE
, &no_debug_isis_lupd_cmd
);
3316 install_element (ENABLE_NODE
, &debug_isis_err_cmd
);
3317 install_element (ENABLE_NODE
, &no_debug_isis_err_cmd
);
3318 install_element (ENABLE_NODE
, &debug_isis_snp_cmd
);
3319 install_element (ENABLE_NODE
, &no_debug_isis_snp_cmd
);
3320 install_element (ENABLE_NODE
, &debug_isis_upd_cmd
);
3321 install_element (ENABLE_NODE
, &no_debug_isis_upd_cmd
);
3322 install_element (ENABLE_NODE
, &debug_isis_spfevents_cmd
);
3323 install_element (ENABLE_NODE
, &no_debug_isis_spfevents_cmd
);
3324 install_element (ENABLE_NODE
, &debug_isis_spfstats_cmd
);
3325 install_element (ENABLE_NODE
, &no_debug_isis_spfstats_cmd
);
3326 install_element (ENABLE_NODE
, &debug_isis_spftrigg_cmd
);
3327 install_element (ENABLE_NODE
, &no_debug_isis_spftrigg_cmd
);
3328 install_element (ENABLE_NODE
, &debug_isis_rtevents_cmd
);
3329 install_element (ENABLE_NODE
, &no_debug_isis_rtevents_cmd
);
3330 install_element (ENABLE_NODE
, &debug_isis_events_cmd
);
3331 install_element (ENABLE_NODE
, &no_debug_isis_events_cmd
);
3332 install_element (ENABLE_NODE
, &debug_isis_packet_dump_cmd
);
3333 install_element (ENABLE_NODE
, &no_debug_isis_packet_dump_cmd
);
3334 install_element (ENABLE_NODE
, &debug_isis_lsp_gen_cmd
);
3335 install_element (ENABLE_NODE
, &no_debug_isis_lsp_gen_cmd
);
3336 install_element (ENABLE_NODE
, &debug_isis_lsp_sched_cmd
);
3337 install_element (ENABLE_NODE
, &no_debug_isis_lsp_sched_cmd
);
3339 install_element (CONFIG_NODE
, &debug_isis_adj_cmd
);
3340 install_element (CONFIG_NODE
, &no_debug_isis_adj_cmd
);
3341 install_element (CONFIG_NODE
, &debug_isis_csum_cmd
);
3342 install_element (CONFIG_NODE
, &no_debug_isis_csum_cmd
);
3343 install_element (CONFIG_NODE
, &debug_isis_lupd_cmd
);
3344 install_element (CONFIG_NODE
, &no_debug_isis_lupd_cmd
);
3345 install_element (CONFIG_NODE
, &debug_isis_err_cmd
);
3346 install_element (CONFIG_NODE
, &no_debug_isis_err_cmd
);
3347 install_element (CONFIG_NODE
, &debug_isis_snp_cmd
);
3348 install_element (CONFIG_NODE
, &no_debug_isis_snp_cmd
);
3349 install_element (CONFIG_NODE
, &debug_isis_upd_cmd
);
3350 install_element (CONFIG_NODE
, &no_debug_isis_upd_cmd
);
3351 install_element (CONFIG_NODE
, &debug_isis_spfevents_cmd
);
3352 install_element (CONFIG_NODE
, &no_debug_isis_spfevents_cmd
);
3353 install_element (CONFIG_NODE
, &debug_isis_spfstats_cmd
);
3354 install_element (CONFIG_NODE
, &no_debug_isis_spfstats_cmd
);
3355 install_element (CONFIG_NODE
, &debug_isis_spftrigg_cmd
);
3356 install_element (CONFIG_NODE
, &no_debug_isis_spftrigg_cmd
);
3357 install_element (CONFIG_NODE
, &debug_isis_rtevents_cmd
);
3358 install_element (CONFIG_NODE
, &no_debug_isis_rtevents_cmd
);
3359 install_element (CONFIG_NODE
, &debug_isis_events_cmd
);
3360 install_element (CONFIG_NODE
, &no_debug_isis_events_cmd
);
3361 install_element (CONFIG_NODE
, &debug_isis_packet_dump_cmd
);
3362 install_element (CONFIG_NODE
, &no_debug_isis_packet_dump_cmd
);
3363 install_element (CONFIG_NODE
, &debug_isis_lsp_gen_cmd
);
3364 install_element (CONFIG_NODE
, &no_debug_isis_lsp_gen_cmd
);
3365 install_element (CONFIG_NODE
, &debug_isis_lsp_sched_cmd
);
3366 install_element (CONFIG_NODE
, &no_debug_isis_lsp_sched_cmd
);
3368 install_element (CONFIG_NODE
, &router_isis_cmd
);
3369 install_element (CONFIG_NODE
, &no_router_isis_cmd
);
3371 install_default (ISIS_NODE
);
3373 install_element (ISIS_NODE
, &net_cmd
);
3374 install_element (ISIS_NODE
, &no_net_cmd
);
3376 install_element (ISIS_NODE
, &is_type_cmd
);
3377 install_element (ISIS_NODE
, &no_is_type_cmd
);
3379 install_element (ISIS_NODE
, &area_lsp_mtu_cmd
);
3380 install_element (ISIS_NODE
, &no_area_lsp_mtu_cmd
);
3381 install_element (ISIS_NODE
, &no_area_lsp_mtu_arg_cmd
);
3383 install_element (ISIS_NODE
, &area_passwd_md5_cmd
);
3384 install_element (ISIS_NODE
, &area_passwd_md5_snpauth_cmd
);
3385 install_element (ISIS_NODE
, &area_passwd_clear_cmd
);
3386 install_element (ISIS_NODE
, &area_passwd_clear_snpauth_cmd
);
3387 install_element (ISIS_NODE
, &no_area_passwd_cmd
);
3389 install_element (ISIS_NODE
, &domain_passwd_md5_cmd
);
3390 install_element (ISIS_NODE
, &domain_passwd_md5_snpauth_cmd
);
3391 install_element (ISIS_NODE
, &domain_passwd_clear_cmd
);
3392 install_element (ISIS_NODE
, &domain_passwd_clear_snpauth_cmd
);
3393 install_element (ISIS_NODE
, &no_domain_passwd_cmd
);
3395 install_element (ISIS_NODE
, &lsp_gen_interval_cmd
);
3396 install_element (ISIS_NODE
, &no_lsp_gen_interval_cmd
);
3397 install_element (ISIS_NODE
, &no_lsp_gen_interval_arg_cmd
);
3398 install_element (ISIS_NODE
, &lsp_gen_interval_l1_cmd
);
3399 install_element (ISIS_NODE
, &no_lsp_gen_interval_l1_cmd
);
3400 install_element (ISIS_NODE
, &no_lsp_gen_interval_l1_arg_cmd
);
3401 install_element (ISIS_NODE
, &lsp_gen_interval_l2_cmd
);
3402 install_element (ISIS_NODE
, &no_lsp_gen_interval_l2_cmd
);
3403 install_element (ISIS_NODE
, &no_lsp_gen_interval_l2_arg_cmd
);
3405 install_element (ISIS_NODE
, &spf_interval_cmd
);
3406 install_element (ISIS_NODE
, &no_spf_interval_cmd
);
3407 install_element (ISIS_NODE
, &no_spf_interval_arg_cmd
);
3408 install_element (ISIS_NODE
, &spf_interval_l1_cmd
);
3409 install_element (ISIS_NODE
, &no_spf_interval_l1_cmd
);
3410 install_element (ISIS_NODE
, &no_spf_interval_l1_arg_cmd
);
3411 install_element (ISIS_NODE
, &spf_interval_l2_cmd
);
3412 install_element (ISIS_NODE
, &no_spf_interval_l2_cmd
);
3413 install_element (ISIS_NODE
, &no_spf_interval_l2_arg_cmd
);
3415 install_element (ISIS_NODE
, &max_lsp_lifetime_cmd
);
3416 install_element (ISIS_NODE
, &no_max_lsp_lifetime_cmd
);
3417 install_element (ISIS_NODE
, &no_max_lsp_lifetime_arg_cmd
);
3418 install_element (ISIS_NODE
, &max_lsp_lifetime_l1_cmd
);
3419 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l1_cmd
);
3420 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l1_arg_cmd
);
3421 install_element (ISIS_NODE
, &max_lsp_lifetime_l2_cmd
);
3422 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l2_cmd
);
3423 install_element (ISIS_NODE
, &no_max_lsp_lifetime_l2_arg_cmd
);
3425 install_element (ISIS_NODE
, &lsp_refresh_interval_cmd
);
3426 install_element (ISIS_NODE
, &no_lsp_refresh_interval_cmd
);
3427 install_element (ISIS_NODE
, &no_lsp_refresh_interval_arg_cmd
);
3428 install_element (ISIS_NODE
, &lsp_refresh_interval_l1_cmd
);
3429 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l1_cmd
);
3430 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l1_arg_cmd
);
3431 install_element (ISIS_NODE
, &lsp_refresh_interval_l2_cmd
);
3432 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l2_cmd
);
3433 install_element (ISIS_NODE
, &no_lsp_refresh_interval_l2_arg_cmd
);
3435 install_element (ISIS_NODE
, &set_overload_bit_cmd
);
3436 install_element (ISIS_NODE
, &no_set_overload_bit_cmd
);
3438 install_element (ISIS_NODE
, &set_attached_bit_cmd
);
3439 install_element (ISIS_NODE
, &no_set_attached_bit_cmd
);
3441 install_element (ISIS_NODE
, &dynamic_hostname_cmd
);
3442 install_element (ISIS_NODE
, &no_dynamic_hostname_cmd
);
3444 install_element (ISIS_NODE
, &metric_style_cmd
);
3445 install_element (ISIS_NODE
, &no_metric_style_cmd
);
3447 install_element (ISIS_NODE
, &log_adj_changes_cmd
);
3448 install_element (ISIS_NODE
, &no_log_adj_changes_cmd
);
3450 #ifdef TOPOLOGY_GENERATE
3451 install_element (ISIS_NODE
, &topology_generate_grid_cmd
);
3452 install_element (ISIS_NODE
, &topology_baseis_cmd
);
3453 install_element (ISIS_NODE
, &topology_basedynh_cmd
);
3454 install_element (ISIS_NODE
, &no_topology_baseis_cmd
);
3455 install_element (ISIS_NODE
, &no_topology_baseis_noid_cmd
);
3456 install_element (VIEW_NODE
, &show_isis_generated_topology_cmd
);
3457 install_element (ENABLE_NODE
, &show_isis_generated_topology_cmd
);
3458 #endif /* TOPOLOGY_GENERATE */