2 * IS-IS Rout(e)ing protocol - isis_circuit.h
4 * Copyright (C) 2001,2002 Sampo Saaristo
5 * Tampere University of Technology
6 * Institute of Communications Engineering
7 * Copyright (C) 2016 David Lamparter, for NetDEF, Inc.
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public Licenseas published by the Free
11 * Software Foundation; either version 2 of the License, or (at your option)
14 * This program is distributed in the hope that it will be useful,but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #include "isis_circuit.h"
29 #include "isis_misc.h"
32 static struct isis_circuit *
33 isis_circuit_lookup (struct vty *vty)
35 struct interface *ifp;
36 struct isis_circuit *circuit;
38 ifp = (struct interface *) vty->index;
41 vty_out (vty, "Invalid interface %s", VTY_NEWLINE);
45 circuit = circuit_scan_by_ifp (ifp);
48 vty_out (vty, "ISIS is not enabled on circuit %s%s",
49 ifp->name, VTY_NEWLINE);
56 DEFUN (ip_router_isis,
58 "(ip|ipv6) router isis WORD",
59 "Interface Internet Protocol config commands\n"
60 "IP router interface commands\n"
61 "IS-IS Routing for IP\n"
62 "Routing process tag\n")
64 struct interface *ifp;
65 struct isis_circuit *circuit;
66 struct isis_area *area;
67 const char *af = argv[0];
68 const char *area_tag = argv[1];
70 ifp = (struct interface *) vty->index;
73 /* Prevent more than one area per circuit */
74 circuit = circuit_scan_by_ifp (ifp);
75 if (circuit && circuit->area)
77 if (strcmp (circuit->area->area_tag, area_tag))
79 vty_out (vty, "ISIS circuit is already defined on %s%s",
80 circuit->area->area_tag, VTY_NEWLINE);
81 return CMD_ERR_NOTHING_TODO;
85 area = isis_area_lookup (area_tag);
87 area = isis_area_create (area_tag);
89 if (!circuit || !circuit->area) {
90 circuit = isis_circuit_create (area, ifp);
92 if (circuit->state != C_STATE_CONF && circuit->state != C_STATE_UP)
94 vty_out(vty, "Couldn't bring up interface, please check log.%s", VTY_NEWLINE);
99 bool ip = circuit->ip_router, ipv6 = circuit->ipv6_router;
105 isis_circuit_af_set (circuit, ip, ipv6);
109 DEFUN (no_ip_router_isis,
110 no_ip_router_isis_cmd,
111 "no (ip|ipv6) router isis WORD",
113 "Interface Internet Protocol config commands\n"
114 "IP router interface commands\n"
115 "IS-IS Routing for IP\n"
116 "Routing process tag\n")
118 struct interface *ifp;
119 struct isis_area *area;
120 struct isis_circuit *circuit;
121 const char *af = argv[0];
122 const char *area_tag = argv[1];
124 ifp = (struct interface *) vty->index;
127 vty_out (vty, "Invalid interface %s", VTY_NEWLINE);
128 return CMD_ERR_NO_MATCH;
131 area = isis_area_lookup (area_tag);
134 vty_out (vty, "Can't find ISIS instance %s%s",
135 argv[0], VTY_NEWLINE);
136 return CMD_ERR_NO_MATCH;
139 circuit = circuit_lookup_by_ifp (ifp, area->circuit_list);
142 vty_out (vty, "ISIS is not enabled on circuit %s%s",
143 ifp->name, VTY_NEWLINE);
144 return CMD_ERR_NO_MATCH;
147 bool ip = circuit->ip_router, ipv6 = circuit->ipv6_router;
153 isis_circuit_af_set (circuit, ip, ipv6);
161 "Configure the passive mode for interface\n")
163 struct isis_circuit *circuit = isis_circuit_lookup (vty);
165 return CMD_ERR_NO_MATCH;
167 isis_circuit_passive_set (circuit, 1);
171 DEFUN (no_isis_passive,
176 "Configure the passive mode for interface\n")
178 struct isis_circuit *circuit = isis_circuit_lookup (vty);
180 return CMD_ERR_NO_MATCH;
182 if (if_is_loopback (circuit->interface))
184 vty_out (vty, "Can't set no passive for loopback interface%s",
186 return CMD_ERR_AMBIGUOUS;
189 isis_circuit_passive_set (circuit, 0);
193 DEFUN (isis_circuit_type,
194 isis_circuit_type_cmd,
195 "isis circuit-type (level-1|level-1-2|level-2-only)",
197 "Configure circuit type for interface\n"
198 "Level-1 only adjacencies are formed\n"
199 "Level-1-2 adjacencies are formed\n"
200 "Level-2 only adjacencies are formed\n")
203 struct isis_circuit *circuit = isis_circuit_lookup (vty);
205 return CMD_ERR_NO_MATCH;
207 is_type = string2circuit_t (argv[0]);
210 vty_out (vty, "Unknown circuit-type %s", VTY_NEWLINE);
211 return CMD_ERR_AMBIGUOUS;
214 if (circuit->state == C_STATE_UP &&
215 circuit->area->is_type != IS_LEVEL_1_AND_2 &&
216 circuit->area->is_type != is_type)
218 vty_out (vty, "Invalid circuit level for area %s.%s",
219 circuit->area->area_tag, VTY_NEWLINE);
220 return CMD_ERR_AMBIGUOUS;
222 isis_circuit_is_type_set (circuit, is_type);
227 DEFUN (no_isis_circuit_type,
228 no_isis_circuit_type_cmd,
229 "no isis circuit-type (level-1|level-1-2|level-2-only)",
232 "Configure circuit type for interface\n"
233 "Level-1 only adjacencies are formed\n"
234 "Level-1-2 adjacencies are formed\n"
235 "Level-2 only adjacencies are formed\n")
238 struct isis_circuit *circuit = isis_circuit_lookup (vty);
240 return CMD_ERR_NO_MATCH;
243 * Set the circuits level to its default value
245 if (circuit->state == C_STATE_UP)
246 is_type = circuit->area->is_type;
248 is_type = IS_LEVEL_1_AND_2;
249 isis_circuit_is_type_set (circuit, is_type);
256 "isis network point-to-point",
259 "point-to-point network type\n")
261 struct isis_circuit *circuit = isis_circuit_lookup (vty);
263 return CMD_ERR_NO_MATCH;
265 if (isis_circuit_circ_type_set(circuit, CIRCUIT_T_P2P))
267 vty_out (vty, "isis network point-to-point "
268 "is valid only on broadcast interfaces%s",
270 return CMD_ERR_AMBIGUOUS;
276 DEFUN (no_isis_network,
278 "no isis network point-to-point",
281 "Set network type for circuit\n"
282 "point-to-point network type\n")
284 struct isis_circuit *circuit = isis_circuit_lookup (vty);
286 return CMD_ERR_NO_MATCH;
288 if (isis_circuit_circ_type_set(circuit, CIRCUIT_T_BROADCAST))
290 vty_out (vty, "isis network point-to-point "
291 "is valid only on broadcast interfaces%s",
293 return CMD_ERR_AMBIGUOUS;
301 "isis password (md5|clear) WORD",
303 "Configure the authentication password for a circuit\n"
304 "HMAC-MD5 authentication\n"
305 "Cleartext password\n"
306 "Circuit password\n")
308 struct isis_circuit *circuit = isis_circuit_lookup (vty);
311 return CMD_ERR_NO_MATCH;
313 if (argv[0][0] == 'm')
314 rv = isis_circuit_passwd_hmac_md5_set(circuit, argv[1]);
316 rv = isis_circuit_passwd_cleartext_set(circuit, argv[1]);
319 vty_out (vty, "Too long circuit password (>254)%s", VTY_NEWLINE);
320 return CMD_ERR_AMBIGUOUS;
326 DEFUN (no_isis_passwd,
331 "Configure the authentication password for a circuit\n")
333 struct isis_circuit *circuit = isis_circuit_lookup (vty);
335 return CMD_ERR_NO_MATCH;
337 isis_circuit_passwd_unset(circuit);
342 ALIAS (no_isis_passwd,
343 no_isis_passwd_arg_cmd,
344 "no isis password (md5|clear) WORD",
347 "Configure the authentication password for a circuit\n"
348 "HMAC-MD5 authentication\n"
349 "Cleartext password\n"
350 "Circuit password\n")
352 DEFUN (isis_priority,
354 "isis priority <0-127>",
356 "Set priority for Designated Router election\n"
360 struct isis_circuit *circuit = isis_circuit_lookup (vty);
362 return CMD_ERR_NO_MATCH;
364 prio = atoi (argv[0]);
365 if (prio < MIN_PRIORITY || prio > MAX_PRIORITY)
367 vty_out (vty, "Invalid priority %d - should be <0-127>%s",
369 return CMD_ERR_AMBIGUOUS;
372 circuit->priority[0] = prio;
373 circuit->priority[1] = prio;
378 DEFUN (no_isis_priority,
379 no_isis_priority_cmd,
383 "Set priority for Designated Router election\n")
385 struct isis_circuit *circuit = isis_circuit_lookup (vty);
387 return CMD_ERR_NO_MATCH;
389 circuit->priority[0] = DEFAULT_PRIORITY;
390 circuit->priority[1] = DEFAULT_PRIORITY;
395 ALIAS (no_isis_priority,
396 no_isis_priority_arg_cmd,
397 "no isis priority <0-127>",
400 "Set priority for Designated Router election\n"
403 DEFUN (isis_priority_l1,
404 isis_priority_l1_cmd,
405 "isis priority <0-127> level-1",
407 "Set priority for Designated Router election\n"
409 "Specify priority for level-1 routing\n")
412 struct isis_circuit *circuit = isis_circuit_lookup (vty);
414 return CMD_ERR_NO_MATCH;
416 prio = atoi (argv[0]);
417 if (prio < MIN_PRIORITY || prio > MAX_PRIORITY)
419 vty_out (vty, "Invalid priority %d - should be <0-127>%s",
421 return CMD_ERR_AMBIGUOUS;
424 circuit->priority[0] = prio;
429 DEFUN (no_isis_priority_l1,
430 no_isis_priority_l1_cmd,
431 "no isis priority level-1",
434 "Set priority for Designated Router election\n"
435 "Specify priority for level-1 routing\n")
437 struct isis_circuit *circuit = isis_circuit_lookup (vty);
439 return CMD_ERR_NO_MATCH;
441 circuit->priority[0] = DEFAULT_PRIORITY;
446 ALIAS (no_isis_priority_l1,
447 no_isis_priority_l1_arg_cmd,
448 "no isis priority <0-127> level-1",
451 "Set priority for Designated Router election\n"
453 "Specify priority for level-1 routing\n")
455 DEFUN (isis_priority_l2,
456 isis_priority_l2_cmd,
457 "isis priority <0-127> level-2",
459 "Set priority for Designated Router election\n"
461 "Specify priority for level-2 routing\n")
464 struct isis_circuit *circuit = isis_circuit_lookup (vty);
466 return CMD_ERR_NO_MATCH;
468 prio = atoi (argv[0]);
469 if (prio < MIN_PRIORITY || prio > MAX_PRIORITY)
471 vty_out (vty, "Invalid priority %d - should be <0-127>%s",
473 return CMD_ERR_AMBIGUOUS;
476 circuit->priority[1] = prio;
481 DEFUN (no_isis_priority_l2,
482 no_isis_priority_l2_cmd,
483 "no isis priority level-2",
486 "Set priority for Designated Router election\n"
487 "Specify priority for level-2 routing\n")
489 struct isis_circuit *circuit = isis_circuit_lookup (vty);
491 return CMD_ERR_NO_MATCH;
493 circuit->priority[1] = DEFAULT_PRIORITY;
498 ALIAS (no_isis_priority_l2,
499 no_isis_priority_l2_arg_cmd,
500 "no isis priority <0-127> level-2",
503 "Set priority for Designated Router election\n"
505 "Specify priority for level-2 routing\n")
510 "isis metric <0-16777215>",
512 "Set default metric for circuit\n"
513 "Default metric value\n")
516 struct isis_circuit *circuit = isis_circuit_lookup (vty);
518 return CMD_ERR_NO_MATCH;
520 met = atoi (argv[0]);
522 /* RFC3787 section 5.1 */
523 if (circuit->area && circuit->area->oldmetric == 1 &&
524 met > MAX_NARROW_LINK_METRIC)
526 vty_out (vty, "Invalid metric %d - should be <0-63> "
527 "when narrow metric type enabled%s",
529 return CMD_ERR_AMBIGUOUS;
533 if (circuit->area && circuit->area->newmetric == 1 &&
534 met > MAX_WIDE_LINK_METRIC)
536 vty_out (vty, "Invalid metric %d - should be <0-16777215> "
537 "when wide metric type enabled%s",
539 return CMD_ERR_AMBIGUOUS;
542 isis_circuit_metric_set (circuit, IS_LEVEL_1, met);
543 isis_circuit_metric_set (circuit, IS_LEVEL_2, met);
547 DEFUN (no_isis_metric,
552 "Set default metric for circuit\n")
554 struct isis_circuit *circuit = isis_circuit_lookup (vty);
556 return CMD_ERR_NO_MATCH;
558 isis_circuit_metric_set (circuit, IS_LEVEL_1, DEFAULT_CIRCUIT_METRIC);
559 isis_circuit_metric_set (circuit, IS_LEVEL_2, DEFAULT_CIRCUIT_METRIC);
563 ALIAS (no_isis_metric,
564 no_isis_metric_arg_cmd,
565 "no isis metric <0-16777215>",
568 "Set default metric for circuit\n"
569 "Default metric value\n")
571 DEFUN (isis_metric_l1,
573 "isis metric <0-16777215> level-1",
575 "Set default metric for circuit\n"
576 "Default metric value\n"
577 "Specify metric for level-1 routing\n")
580 struct isis_circuit *circuit = isis_circuit_lookup (vty);
582 return CMD_ERR_NO_MATCH;
584 met = atoi (argv[0]);
586 /* RFC3787 section 5.1 */
587 if (circuit->area && circuit->area->oldmetric == 1 &&
588 met > MAX_NARROW_LINK_METRIC)
590 vty_out (vty, "Invalid metric %d - should be <0-63> "
591 "when narrow metric type enabled%s",
593 return CMD_ERR_AMBIGUOUS;
597 if (circuit->area && circuit->area->newmetric == 1 &&
598 met > MAX_WIDE_LINK_METRIC)
600 vty_out (vty, "Invalid metric %d - should be <0-16777215> "
601 "when wide metric type enabled%s",
603 return CMD_ERR_AMBIGUOUS;
606 isis_circuit_metric_set (circuit, IS_LEVEL_1, met);
610 DEFUN (no_isis_metric_l1,
611 no_isis_metric_l1_cmd,
612 "no isis metric level-1",
615 "Set default metric for circuit\n"
616 "Specify metric for level-1 routing\n")
618 struct isis_circuit *circuit = isis_circuit_lookup (vty);
620 return CMD_ERR_NO_MATCH;
622 isis_circuit_metric_set (circuit, IS_LEVEL_1, DEFAULT_CIRCUIT_METRIC);
626 ALIAS (no_isis_metric_l1,
627 no_isis_metric_l1_arg_cmd,
628 "no isis metric <0-16777215> level-1",
631 "Set default metric for circuit\n"
632 "Default metric value\n"
633 "Specify metric for level-1 routing\n")
635 DEFUN (isis_metric_l2,
637 "isis metric <0-16777215> level-2",
639 "Set default metric for circuit\n"
640 "Default metric value\n"
641 "Specify metric for level-2 routing\n")
644 struct isis_circuit *circuit = isis_circuit_lookup (vty);
646 return CMD_ERR_NO_MATCH;
648 met = atoi (argv[0]);
650 /* RFC3787 section 5.1 */
651 if (circuit->area && circuit->area->oldmetric == 1 &&
652 met > MAX_NARROW_LINK_METRIC)
654 vty_out (vty, "Invalid metric %d - should be <0-63> "
655 "when narrow metric type enabled%s",
657 return CMD_ERR_AMBIGUOUS;
661 if (circuit->area && circuit->area->newmetric == 1 &&
662 met > MAX_WIDE_LINK_METRIC)
664 vty_out (vty, "Invalid metric %d - should be <0-16777215> "
665 "when wide metric type enabled%s",
667 return CMD_ERR_AMBIGUOUS;
670 isis_circuit_metric_set (circuit, IS_LEVEL_2, met);
674 DEFUN (no_isis_metric_l2,
675 no_isis_metric_l2_cmd,
676 "no isis metric level-2",
679 "Set default metric for circuit\n"
680 "Specify metric for level-2 routing\n")
682 struct isis_circuit *circuit = isis_circuit_lookup (vty);
684 return CMD_ERR_NO_MATCH;
686 isis_circuit_metric_set (circuit, IS_LEVEL_2, DEFAULT_CIRCUIT_METRIC);
690 ALIAS (no_isis_metric_l2,
691 no_isis_metric_l2_arg_cmd,
692 "no isis metric <0-16777215> level-2",
695 "Set default metric for circuit\n"
696 "Default metric value\n"
697 "Specify metric for level-2 routing\n")
700 DEFUN (isis_hello_interval,
701 isis_hello_interval_cmd,
702 "isis hello-interval <1-600>",
704 "Set Hello interval\n"
705 "Hello interval value\n"
706 "Holdtime 1 seconds, interval depends on multiplier\n")
709 struct isis_circuit *circuit = isis_circuit_lookup (vty);
711 return CMD_ERR_NO_MATCH;
713 interval = atoi (argv[0]);
714 if (interval < MIN_HELLO_INTERVAL || interval > MAX_HELLO_INTERVAL)
716 vty_out (vty, "Invalid hello-interval %d - should be <1-600>%s",
717 interval, VTY_NEWLINE);
718 return CMD_ERR_AMBIGUOUS;
721 circuit->hello_interval[0] = (u_int16_t) interval;
722 circuit->hello_interval[1] = (u_int16_t) interval;
727 DEFUN (no_isis_hello_interval,
728 no_isis_hello_interval_cmd,
729 "no isis hello-interval",
732 "Set Hello interval\n")
734 struct isis_circuit *circuit = isis_circuit_lookup (vty);
736 return CMD_ERR_NO_MATCH;
738 circuit->hello_interval[0] = DEFAULT_HELLO_INTERVAL;
739 circuit->hello_interval[1] = DEFAULT_HELLO_INTERVAL;
744 ALIAS (no_isis_hello_interval,
745 no_isis_hello_interval_arg_cmd,
746 "no isis hello-interval <1-600>",
749 "Set Hello interval\n"
750 "Hello interval value\n"
751 "Holdtime 1 second, interval depends on multiplier\n")
753 DEFUN (isis_hello_interval_l1,
754 isis_hello_interval_l1_cmd,
755 "isis hello-interval <1-600> level-1",
757 "Set Hello interval\n"
758 "Hello interval value\n"
759 "Holdtime 1 second, interval depends on multiplier\n"
760 "Specify hello-interval for level-1 IIHs\n")
763 struct isis_circuit *circuit = isis_circuit_lookup (vty);
765 return CMD_ERR_NO_MATCH;
767 interval = atoi (argv[0]);
768 if (interval < MIN_HELLO_INTERVAL || interval > MAX_HELLO_INTERVAL)
770 vty_out (vty, "Invalid hello-interval %ld - should be <1-600>%s",
771 interval, VTY_NEWLINE);
772 return CMD_ERR_AMBIGUOUS;
775 circuit->hello_interval[0] = (u_int16_t) interval;
780 DEFUN (no_isis_hello_interval_l1,
781 no_isis_hello_interval_l1_cmd,
782 "no isis hello-interval level-1",
785 "Set Hello interval\n"
786 "Specify hello-interval for level-1 IIHs\n")
788 struct isis_circuit *circuit = isis_circuit_lookup (vty);
790 return CMD_ERR_NO_MATCH;
792 circuit->hello_interval[0] = DEFAULT_HELLO_INTERVAL;
797 ALIAS (no_isis_hello_interval_l1,
798 no_isis_hello_interval_l1_arg_cmd,
799 "no isis hello-interval <1-600> level-1",
802 "Set Hello interval\n"
803 "Hello interval value\n"
804 "Holdtime 1 second, interval depends on multiplier\n"
805 "Specify hello-interval for level-1 IIHs\n")
807 DEFUN (isis_hello_interval_l2,
808 isis_hello_interval_l2_cmd,
809 "isis hello-interval <1-600> level-2",
811 "Set Hello interval\n"
812 "Hello interval value\n"
813 "Holdtime 1 second, interval depends on multiplier\n"
814 "Specify hello-interval for level-2 IIHs\n")
817 struct isis_circuit *circuit = isis_circuit_lookup (vty);
819 return CMD_ERR_NO_MATCH;
821 interval = atoi (argv[0]);
822 if (interval < MIN_HELLO_INTERVAL || interval > MAX_HELLO_INTERVAL)
824 vty_out (vty, "Invalid hello-interval %ld - should be <1-600>%s",
825 interval, VTY_NEWLINE);
826 return CMD_ERR_AMBIGUOUS;
829 circuit->hello_interval[1] = (u_int16_t) interval;
834 DEFUN (no_isis_hello_interval_l2,
835 no_isis_hello_interval_l2_cmd,
836 "no isis hello-interval level-2",
839 "Set Hello interval\n"
840 "Specify hello-interval for level-2 IIHs\n")
842 struct isis_circuit *circuit = isis_circuit_lookup (vty);
844 return CMD_ERR_NO_MATCH;
846 circuit->hello_interval[1] = DEFAULT_HELLO_INTERVAL;
851 ALIAS (no_isis_hello_interval_l2,
852 no_isis_hello_interval_l2_arg_cmd,
853 "no isis hello-interval <1-600> level-2",
856 "Set Hello interval\n"
857 "Hello interval value\n"
858 "Holdtime 1 second, interval depends on multiplier\n"
859 "Specify hello-interval for level-2 IIHs\n")
861 DEFUN (isis_hello_multiplier,
862 isis_hello_multiplier_cmd,
863 "isis hello-multiplier <2-100>",
865 "Set multiplier for Hello holding time\n"
866 "Hello multiplier value\n")
869 struct isis_circuit *circuit = isis_circuit_lookup (vty);
871 return CMD_ERR_NO_MATCH;
873 mult = atoi (argv[0]);
874 if (mult < MIN_HELLO_MULTIPLIER || mult > MAX_HELLO_MULTIPLIER)
876 vty_out (vty, "Invalid hello-multiplier %d - should be <2-100>%s",
878 return CMD_ERR_AMBIGUOUS;
881 circuit->hello_multiplier[0] = (u_int16_t) mult;
882 circuit->hello_multiplier[1] = (u_int16_t) mult;
887 DEFUN (no_isis_hello_multiplier,
888 no_isis_hello_multiplier_cmd,
889 "no isis hello-multiplier",
892 "Set multiplier for Hello holding time\n")
894 struct isis_circuit *circuit = isis_circuit_lookup (vty);
896 return CMD_ERR_NO_MATCH;
898 circuit->hello_multiplier[0] = DEFAULT_HELLO_MULTIPLIER;
899 circuit->hello_multiplier[1] = DEFAULT_HELLO_MULTIPLIER;
904 ALIAS (no_isis_hello_multiplier,
905 no_isis_hello_multiplier_arg_cmd,
906 "no isis hello-multiplier <2-100>",
909 "Set multiplier for Hello holding time\n"
910 "Hello multiplier value\n")
912 DEFUN (isis_hello_multiplier_l1,
913 isis_hello_multiplier_l1_cmd,
914 "isis hello-multiplier <2-100> level-1",
916 "Set multiplier for Hello holding time\n"
917 "Hello multiplier value\n"
918 "Specify hello multiplier for level-1 IIHs\n")
921 struct isis_circuit *circuit = isis_circuit_lookup (vty);
923 return CMD_ERR_NO_MATCH;
925 mult = atoi (argv[0]);
926 if (mult < MIN_HELLO_MULTIPLIER || mult > MAX_HELLO_MULTIPLIER)
928 vty_out (vty, "Invalid hello-multiplier %d - should be <2-100>%s",
930 return CMD_ERR_AMBIGUOUS;
933 circuit->hello_multiplier[0] = (u_int16_t) mult;
938 DEFUN (no_isis_hello_multiplier_l1,
939 no_isis_hello_multiplier_l1_cmd,
940 "no isis hello-multiplier level-1",
943 "Set multiplier for Hello holding time\n"
944 "Specify hello multiplier for level-1 IIHs\n")
946 struct isis_circuit *circuit = isis_circuit_lookup (vty);
948 return CMD_ERR_NO_MATCH;
950 circuit->hello_multiplier[0] = DEFAULT_HELLO_MULTIPLIER;
955 ALIAS (no_isis_hello_multiplier_l1,
956 no_isis_hello_multiplier_l1_arg_cmd,
957 "no isis hello-multiplier <2-100> level-1",
960 "Set multiplier for Hello holding time\n"
961 "Hello multiplier value\n"
962 "Specify hello multiplier for level-1 IIHs\n")
964 DEFUN (isis_hello_multiplier_l2,
965 isis_hello_multiplier_l2_cmd,
966 "isis hello-multiplier <2-100> level-2",
968 "Set multiplier for Hello holding time\n"
969 "Hello multiplier value\n"
970 "Specify hello multiplier for level-2 IIHs\n")
973 struct isis_circuit *circuit = isis_circuit_lookup (vty);
975 return CMD_ERR_NO_MATCH;
977 mult = atoi (argv[0]);
978 if (mult < MIN_HELLO_MULTIPLIER || mult > MAX_HELLO_MULTIPLIER)
980 vty_out (vty, "Invalid hello-multiplier %d - should be <2-100>%s",
982 return CMD_ERR_AMBIGUOUS;
985 circuit->hello_multiplier[1] = (u_int16_t) mult;
990 DEFUN (no_isis_hello_multiplier_l2,
991 no_isis_hello_multiplier_l2_cmd,
992 "no isis hello-multiplier level-2",
995 "Set multiplier for Hello holding time\n"
996 "Specify hello multiplier for level-2 IIHs\n")
998 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1000 return CMD_ERR_NO_MATCH;
1002 circuit->hello_multiplier[1] = DEFAULT_HELLO_MULTIPLIER;
1007 ALIAS (no_isis_hello_multiplier_l2,
1008 no_isis_hello_multiplier_l2_arg_cmd,
1009 "no isis hello-multiplier <2-100> level-2",
1012 "Set multiplier for Hello holding time\n"
1013 "Hello multiplier value\n"
1014 "Specify hello multiplier for level-2 IIHs\n")
1016 DEFUN (isis_hello_padding,
1017 isis_hello_padding_cmd,
1018 "isis hello padding",
1020 "Add padding to IS-IS hello packets\n"
1021 "Pad hello packets\n"
1024 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1026 return CMD_ERR_NO_MATCH;
1028 circuit->pad_hellos = 1;
1033 DEFUN (no_isis_hello_padding,
1034 no_isis_hello_padding_cmd,
1035 "no isis hello padding",
1038 "Add padding to IS-IS hello packets\n"
1039 "Pad hello packets\n"
1042 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1044 return CMD_ERR_NO_MATCH;
1046 circuit->pad_hellos = 0;
1051 DEFUN (csnp_interval,
1053 "isis csnp-interval <1-600>",
1055 "Set CSNP interval in seconds\n"
1056 "CSNP interval value\n")
1058 unsigned long interval;
1059 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1061 return CMD_ERR_NO_MATCH;
1063 interval = atol (argv[0]);
1064 if (interval < MIN_CSNP_INTERVAL || interval > MAX_CSNP_INTERVAL)
1066 vty_out (vty, "Invalid csnp-interval %lu - should be <1-600>%s",
1067 interval, VTY_NEWLINE);
1068 return CMD_ERR_AMBIGUOUS;
1071 circuit->csnp_interval[0] = (u_int16_t) interval;
1072 circuit->csnp_interval[1] = (u_int16_t) interval;
1077 DEFUN (no_csnp_interval,
1078 no_csnp_interval_cmd,
1079 "no isis csnp-interval",
1082 "Set CSNP interval in seconds\n")
1084 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1086 return CMD_ERR_NO_MATCH;
1088 circuit->csnp_interval[0] = DEFAULT_CSNP_INTERVAL;
1089 circuit->csnp_interval[1] = DEFAULT_CSNP_INTERVAL;
1094 ALIAS (no_csnp_interval,
1095 no_csnp_interval_arg_cmd,
1096 "no isis csnp-interval <1-600>",
1099 "Set CSNP interval in seconds\n"
1100 "CSNP interval value\n")
1102 DEFUN (csnp_interval_l1,
1103 csnp_interval_l1_cmd,
1104 "isis csnp-interval <1-600> level-1",
1106 "Set CSNP interval in seconds\n"
1107 "CSNP interval value\n"
1108 "Specify interval for level-1 CSNPs\n")
1110 unsigned long interval;
1111 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1113 return CMD_ERR_NO_MATCH;
1115 interval = atol (argv[0]);
1116 if (interval < MIN_CSNP_INTERVAL || interval > MAX_CSNP_INTERVAL)
1118 vty_out (vty, "Invalid csnp-interval %lu - should be <1-600>%s",
1119 interval, VTY_NEWLINE);
1120 return CMD_ERR_AMBIGUOUS;
1123 circuit->csnp_interval[0] = (u_int16_t) interval;
1128 DEFUN (no_csnp_interval_l1,
1129 no_csnp_interval_l1_cmd,
1130 "no isis csnp-interval level-1",
1133 "Set CSNP interval in seconds\n"
1134 "Specify interval for level-1 CSNPs\n")
1136 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1138 return CMD_ERR_NO_MATCH;
1140 circuit->csnp_interval[0] = DEFAULT_CSNP_INTERVAL;
1145 ALIAS (no_csnp_interval_l1,
1146 no_csnp_interval_l1_arg_cmd,
1147 "no isis csnp-interval <1-600> level-1",
1150 "Set CSNP interval in seconds\n"
1151 "CSNP interval value\n"
1152 "Specify interval for level-1 CSNPs\n")
1154 DEFUN (csnp_interval_l2,
1155 csnp_interval_l2_cmd,
1156 "isis csnp-interval <1-600> level-2",
1158 "Set CSNP interval in seconds\n"
1159 "CSNP interval value\n"
1160 "Specify interval for level-2 CSNPs\n")
1162 unsigned long interval;
1163 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1165 return CMD_ERR_NO_MATCH;
1167 interval = atol (argv[0]);
1168 if (interval < MIN_CSNP_INTERVAL || interval > MAX_CSNP_INTERVAL)
1170 vty_out (vty, "Invalid csnp-interval %lu - should be <1-600>%s",
1171 interval, VTY_NEWLINE);
1172 return CMD_ERR_AMBIGUOUS;
1175 circuit->csnp_interval[1] = (u_int16_t) interval;
1180 DEFUN (no_csnp_interval_l2,
1181 no_csnp_interval_l2_cmd,
1182 "no isis csnp-interval level-2",
1185 "Set CSNP interval in seconds\n"
1186 "Specify interval for level-2 CSNPs\n")
1188 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1190 return CMD_ERR_NO_MATCH;
1192 circuit->csnp_interval[1] = DEFAULT_CSNP_INTERVAL;
1197 ALIAS (no_csnp_interval_l2,
1198 no_csnp_interval_l2_arg_cmd,
1199 "no isis csnp-interval <1-600> level-2",
1202 "Set CSNP interval in seconds\n"
1203 "CSNP interval value\n"
1204 "Specify interval for level-2 CSNPs\n")
1206 DEFUN (psnp_interval,
1208 "isis psnp-interval <1-120>",
1210 "Set PSNP interval in seconds\n"
1211 "PSNP interval value\n")
1213 unsigned long interval;
1214 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1216 return CMD_ERR_NO_MATCH;
1218 interval = atol (argv[0]);
1219 if (interval < MIN_PSNP_INTERVAL || interval > MAX_PSNP_INTERVAL)
1221 vty_out (vty, "Invalid psnp-interval %lu - should be <1-120>%s",
1222 interval, VTY_NEWLINE);
1223 return CMD_ERR_AMBIGUOUS;
1226 circuit->psnp_interval[0] = (u_int16_t) interval;
1227 circuit->psnp_interval[1] = (u_int16_t) interval;
1232 DEFUN (no_psnp_interval,
1233 no_psnp_interval_cmd,
1234 "no isis psnp-interval",
1237 "Set PSNP interval in seconds\n")
1239 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1241 return CMD_ERR_NO_MATCH;
1243 circuit->psnp_interval[0] = DEFAULT_PSNP_INTERVAL;
1244 circuit->psnp_interval[1] = DEFAULT_PSNP_INTERVAL;
1249 ALIAS (no_psnp_interval,
1250 no_psnp_interval_arg_cmd,
1251 "no isis psnp-interval <1-120>",
1254 "Set PSNP interval in seconds\n"
1255 "PSNP interval value\n")
1257 DEFUN (psnp_interval_l1,
1258 psnp_interval_l1_cmd,
1259 "isis psnp-interval <1-120> level-1",
1261 "Set PSNP interval in seconds\n"
1262 "PSNP interval value\n"
1263 "Specify interval for level-1 PSNPs\n")
1265 unsigned long interval;
1266 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1268 return CMD_ERR_NO_MATCH;
1270 interval = atol (argv[0]);
1271 if (interval < MIN_PSNP_INTERVAL || interval > MAX_PSNP_INTERVAL)
1273 vty_out (vty, "Invalid psnp-interval %lu - should be <1-120>%s",
1274 interval, VTY_NEWLINE);
1275 return CMD_ERR_AMBIGUOUS;
1278 circuit->psnp_interval[0] = (u_int16_t) interval;
1283 DEFUN (no_psnp_interval_l1,
1284 no_psnp_interval_l1_cmd,
1285 "no isis psnp-interval level-1",
1288 "Set PSNP interval in seconds\n"
1289 "Specify interval for level-1 PSNPs\n")
1291 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1293 return CMD_ERR_NO_MATCH;
1295 circuit->psnp_interval[0] = DEFAULT_PSNP_INTERVAL;
1300 ALIAS (no_psnp_interval_l1,
1301 no_psnp_interval_l1_arg_cmd,
1302 "no isis psnp-interval <1-120> level-1",
1305 "Set PSNP interval in seconds\n"
1306 "PSNP interval value\n"
1307 "Specify interval for level-1 PSNPs\n")
1309 DEFUN (psnp_interval_l2,
1310 psnp_interval_l2_cmd,
1311 "isis psnp-interval <1-120> level-2",
1313 "Set PSNP interval in seconds\n"
1314 "PSNP interval value\n"
1315 "Specify interval for level-2 PSNPs\n")
1317 unsigned long interval;
1318 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1320 return CMD_ERR_NO_MATCH;
1322 interval = atol (argv[0]);
1323 if (interval < MIN_PSNP_INTERVAL || interval > MAX_PSNP_INTERVAL)
1325 vty_out (vty, "Invalid psnp-interval %lu - should be <1-120>%s",
1326 interval, VTY_NEWLINE);
1327 return CMD_ERR_AMBIGUOUS;
1330 circuit->psnp_interval[1] = (u_int16_t) interval;
1335 DEFUN (no_psnp_interval_l2,
1336 no_psnp_interval_l2_cmd,
1337 "no isis psnp-interval level-2",
1340 "Set PSNP interval in seconds\n"
1341 "Specify interval for level-2 PSNPs\n")
1343 struct isis_circuit *circuit = isis_circuit_lookup (vty);
1345 return CMD_ERR_NO_MATCH;
1347 circuit->psnp_interval[1] = DEFAULT_PSNP_INTERVAL;
1352 ALIAS (no_psnp_interval_l2,
1353 no_psnp_interval_l2_arg_cmd,
1354 "no isis psnp-interval <1-120> level-2",
1357 "Set PSNP interval in seconds\n"
1358 "PSNP interval value\n"
1359 "Specify interval for level-2 PSNPs\n")
1362 validate_metric_style_narrow (struct vty *vty, struct isis_area *area)
1364 struct isis_circuit *circuit;
1365 struct listnode *node;
1368 return CMD_ERR_AMBIGUOUS;
1372 vty_out (vty, "ISIS area is invalid%s", VTY_NEWLINE);
1373 return CMD_ERR_AMBIGUOUS;
1376 for (ALL_LIST_ELEMENTS_RO (area->circuit_list, node, circuit))
1378 if ((area->is_type & IS_LEVEL_1) &&
1379 (circuit->is_type & IS_LEVEL_1) &&
1380 (circuit->te_metric[0] > MAX_NARROW_LINK_METRIC))
1382 vty_out (vty, "ISIS circuit %s metric is invalid%s",
1383 circuit->interface->name, VTY_NEWLINE);
1384 return CMD_ERR_AMBIGUOUS;
1386 if ((area->is_type & IS_LEVEL_2) &&
1387 (circuit->is_type & IS_LEVEL_2) &&
1388 (circuit->te_metric[1] > MAX_NARROW_LINK_METRIC))
1390 vty_out (vty, "ISIS circuit %s metric is invalid%s",
1391 circuit->interface->name, VTY_NEWLINE);
1392 return CMD_ERR_AMBIGUOUS;
1399 DEFUN (metric_style,
1401 "metric-style (narrow|transition|wide)",
1402 "Use old-style (ISO 10589) or new-style packet formats\n"
1403 "Use old style of TLVs with narrow metric\n"
1404 "Send and accept both styles of TLVs during transition\n"
1405 "Use new style of TLVs to carry wider metric\n")
1407 struct isis_area *area = vty->index;
1412 if (strncmp (argv[0], "w", 1) == 0)
1414 isis_area_metricstyle_set(area, false, true);
1418 ret = validate_metric_style_narrow (vty, area);
1419 if (ret != CMD_SUCCESS)
1422 if (strncmp (argv[0], "t", 1) == 0)
1423 isis_area_metricstyle_set(area, true, true);
1424 else if (strncmp (argv[0], "n", 1) == 0)
1425 isis_area_metricstyle_set(area, true, false);
1431 DEFUN (no_metric_style,
1432 no_metric_style_cmd,
1435 "Use old-style (ISO 10589) or new-style packet formats\n")
1437 struct isis_area *area = vty->index;
1441 ret = validate_metric_style_narrow (vty, area);
1442 if (ret != CMD_SUCCESS)
1445 isis_area_metricstyle_set(area, true, false);
1449 DEFUN (set_overload_bit,
1450 set_overload_bit_cmd,
1452 "Set overload bit to avoid any transit traffic\n"
1453 "Set overload bit\n")
1455 struct isis_area *area = vty->index;
1458 isis_area_overload_bit_set(area, true);
1462 DEFUN (no_set_overload_bit,
1463 no_set_overload_bit_cmd,
1464 "no set-overload-bit",
1465 "Reset overload bit to accept transit traffic\n"
1466 "Reset overload bit\n")
1468 struct isis_area *area = vty->index;
1471 isis_area_overload_bit_set(area, false);
1475 DEFUN (set_attached_bit,
1476 set_attached_bit_cmd,
1478 "Set attached bit to identify as L1/L2 router for inter-area traffic\n"
1479 "Set attached bit\n")
1481 struct isis_area *area = vty->index;
1484 isis_area_attached_bit_set(area, true);
1488 DEFUN (no_set_attached_bit,
1489 no_set_attached_bit_cmd,
1490 "no set-attached-bit",
1491 "Reset attached bit\n")
1493 struct isis_area *area = vty->index;
1496 isis_area_attached_bit_set(area, false);
1500 DEFUN (dynamic_hostname,
1501 dynamic_hostname_cmd,
1503 "Dynamic hostname for IS-IS\n"
1504 "Dynamic hostname\n")
1506 struct isis_area *area = vty->index;
1509 isis_area_dynhostname_set(area, true);
1513 DEFUN (no_dynamic_hostname,
1514 no_dynamic_hostname_cmd,
1515 "no hostname dynamic",
1517 "Dynamic hostname for IS-IS\n"
1518 "Dynamic hostname\n")
1520 struct isis_area *area = vty->index;
1523 isis_area_dynhostname_set(area, false);
1527 static int area_lsp_mtu_set(struct vty *vty, unsigned int lsp_mtu)
1529 struct isis_area *area = vty->index;
1530 struct listnode *node;
1531 struct isis_circuit *circuit;
1535 vty_out (vty, "Can't find ISIS instance %s", VTY_NEWLINE);
1536 return CMD_ERR_NO_MATCH;
1539 for (ALL_LIST_ELEMENTS_RO(area->circuit_list, node, circuit))
1541 if(circuit->state != C_STATE_INIT && circuit->state != C_STATE_UP)
1543 if(lsp_mtu > isis_circuit_pdu_size(circuit))
1545 vty_out(vty, "ISIS area contains circuit %s, which has a maximum PDU size of %zu.%s",
1546 circuit->interface->name, isis_circuit_pdu_size(circuit),
1548 return CMD_ERR_AMBIGUOUS;
1552 isis_area_lsp_mtu_set(area, lsp_mtu);
1556 DEFUN (area_lsp_mtu,
1558 "lsp-mtu <128-4352>",
1559 "Configure the maximum size of generated LSPs\n"
1560 "Maximum size of generated LSPs\n")
1562 unsigned int lsp_mtu;
1564 VTY_GET_INTEGER_RANGE("lsp-mtu", lsp_mtu, argv[0], 128, 4352);
1566 return area_lsp_mtu_set(vty, lsp_mtu);
1569 DEFUN(no_area_lsp_mtu,
1570 no_area_lsp_mtu_cmd,
1573 "Configure the maximum size of generated LSPs\n")
1575 return area_lsp_mtu_set(vty, DEFAULT_LSP_MTU);
1578 ALIAS(no_area_lsp_mtu,
1579 no_area_lsp_mtu_arg_cmd,
1580 "no lsp-mtu <128-4352>",
1582 "Configure the maximum size of generated LSPs\n"
1583 "Maximum size of generated LSPs\n");
1587 "is-type (level-1|level-1-2|level-2-only)",
1588 "IS Level for this routing process (OSI only)\n"
1589 "Act as a station router only\n"
1590 "Act as both a station router and an area router\n"
1591 "Act as an area router only\n")
1593 struct isis_area *area;
1600 vty_out (vty, "Can't find IS-IS instance%s", VTY_NEWLINE);
1601 return CMD_ERR_NO_MATCH;
1604 type = string2circuit_t (argv[0]);
1607 vty_out (vty, "Unknown IS level %s", VTY_NEWLINE);
1611 isis_area_is_type_set(area, type);
1618 "no is-type (level-1|level-1-2|level-2-only)",
1620 "IS Level for this routing process (OSI only)\n"
1621 "Act as a station router only\n"
1622 "Act as both a station router and an area router\n"
1623 "Act as an area router only\n")
1625 struct isis_area *area;
1632 * Put the is-type back to defaults:
1633 * - level-1-2 on first area
1634 * - level-1 for the rest
1636 if (listgetdata (listhead (isis->area_list)) == area)
1637 type = IS_LEVEL_1_AND_2;
1641 isis_area_is_type_set(area, type);
1647 set_lsp_gen_interval (struct vty *vty, struct isis_area *area,
1648 uint16_t interval, int level)
1652 for (lvl = IS_LEVEL_1; lvl <= IS_LEVEL_2; ++lvl)
1657 if (interval >= area->lsp_refresh[lvl-1])
1659 vty_out (vty, "LSP gen interval %us must be less than "
1660 "the LSP refresh interval %us%s",
1661 interval, area->lsp_refresh[lvl-1], VTY_NEWLINE);
1662 return CMD_ERR_AMBIGUOUS;
1666 for (lvl = IS_LEVEL_1; lvl <= IS_LEVEL_2; ++lvl)
1670 area->lsp_gen_interval[lvl-1] = interval;
1676 DEFUN (lsp_gen_interval,
1677 lsp_gen_interval_cmd,
1678 "lsp-gen-interval <1-120>",
1679 "Minimum interval between regenerating same LSP\n"
1680 "Minimum interval in seconds\n")
1682 struct isis_area *area;
1687 interval = atoi (argv[0]);
1688 level = IS_LEVEL_1 | IS_LEVEL_2;
1689 return set_lsp_gen_interval (vty, area, interval, level);
1692 DEFUN (no_lsp_gen_interval,
1693 no_lsp_gen_interval_cmd,
1694 "no lsp-gen-interval",
1696 "Minimum interval between regenerating same LSP\n")
1698 struct isis_area *area;
1703 interval = DEFAULT_MIN_LSP_GEN_INTERVAL;
1704 level = IS_LEVEL_1 | IS_LEVEL_2;
1705 return set_lsp_gen_interval (vty, area, interval, level);
1708 ALIAS (no_lsp_gen_interval,
1709 no_lsp_gen_interval_arg_cmd,
1710 "no lsp-gen-interval <1-120>",
1712 "Minimum interval between regenerating same LSP\n"
1713 "Minimum interval in seconds\n")
1715 DEFUN (lsp_gen_interval_l1,
1716 lsp_gen_interval_l1_cmd,
1717 "lsp-gen-interval level-1 <1-120>",
1718 "Minimum interval between regenerating same LSP\n"
1719 "Set interval for level 1 only\n"
1720 "Minimum interval in seconds\n")
1722 struct isis_area *area;
1727 interval = atoi (argv[0]);
1729 return set_lsp_gen_interval (vty, area, interval, level);
1732 DEFUN (no_lsp_gen_interval_l1,
1733 no_lsp_gen_interval_l1_cmd,
1734 "no lsp-gen-interval level-1",
1736 "Minimum interval between regenerating same LSP\n"
1737 "Set interval for level 1 only\n")
1739 struct isis_area *area;
1744 interval = DEFAULT_MIN_LSP_GEN_INTERVAL;
1746 return set_lsp_gen_interval (vty, area, interval, level);
1749 ALIAS (no_lsp_gen_interval_l1,
1750 no_lsp_gen_interval_l1_arg_cmd,
1751 "no lsp-gen-interval level-1 <1-120>",
1753 "Minimum interval between regenerating same LSP\n"
1754 "Set interval for level 1 only\n"
1755 "Minimum interval in seconds\n")
1757 DEFUN (lsp_gen_interval_l2,
1758 lsp_gen_interval_l2_cmd,
1759 "lsp-gen-interval level-2 <1-120>",
1760 "Minimum interval between regenerating same LSP\n"
1761 "Set interval for level 2 only\n"
1762 "Minimum interval in seconds\n")
1764 struct isis_area *area;
1769 interval = atoi (argv[0]);
1771 return set_lsp_gen_interval (vty, area, interval, level);
1774 DEFUN (no_lsp_gen_interval_l2,
1775 no_lsp_gen_interval_l2_cmd,
1776 "no lsp-gen-interval level-2",
1778 "Minimum interval between regenerating same LSP\n"
1779 "Set interval for level 2 only\n")
1781 struct isis_area *area;
1786 interval = DEFAULT_MIN_LSP_GEN_INTERVAL;
1788 return set_lsp_gen_interval (vty, area, interval, level);
1791 ALIAS (no_lsp_gen_interval_l2,
1792 no_lsp_gen_interval_l2_arg_cmd,
1793 "no lsp-gen-interval level-2 <1-120>",
1795 "Minimum interval between regenerating same LSP\n"
1796 "Set interval for level 2 only\n"
1797 "Minimum interval in seconds\n")
1799 DEFUN (spf_interval,
1801 "spf-interval <1-120>",
1802 "Minimum interval between SPF calculations\n"
1803 "Minimum interval between consecutive SPFs in seconds\n")
1805 struct isis_area *area;
1809 interval = atoi (argv[0]);
1810 area->min_spf_interval[0] = interval;
1811 area->min_spf_interval[1] = interval;
1816 DEFUN (no_spf_interval,
1817 no_spf_interval_cmd,
1820 "Minimum interval between SPF calculations\n")
1822 struct isis_area *area;
1826 area->min_spf_interval[0] = MINIMUM_SPF_INTERVAL;
1827 area->min_spf_interval[1] = MINIMUM_SPF_INTERVAL;
1832 ALIAS (no_spf_interval,
1833 no_spf_interval_arg_cmd,
1834 "no spf-interval <1-120>",
1836 "Minimum interval between SPF calculations\n"
1837 "Minimum interval between consecutive SPFs in seconds\n")
1839 DEFUN (spf_interval_l1,
1840 spf_interval_l1_cmd,
1841 "spf-interval level-1 <1-120>",
1842 "Minimum interval between SPF calculations\n"
1843 "Set interval for level 1 only\n"
1844 "Minimum interval between consecutive SPFs in seconds\n")
1846 struct isis_area *area;
1850 interval = atoi (argv[0]);
1851 area->min_spf_interval[0] = interval;
1856 DEFUN (no_spf_interval_l1,
1857 no_spf_interval_l1_cmd,
1858 "no spf-interval level-1",
1860 "Minimum interval between SPF calculations\n"
1861 "Set interval for level 1 only\n")
1863 struct isis_area *area;
1867 area->min_spf_interval[0] = MINIMUM_SPF_INTERVAL;
1872 ALIAS (no_spf_interval,
1873 no_spf_interval_l1_arg_cmd,
1874 "no spf-interval level-1 <1-120>",
1876 "Minimum interval between SPF calculations\n"
1877 "Set interval for level 1 only\n"
1878 "Minimum interval between consecutive SPFs in seconds\n")
1880 DEFUN (spf_interval_l2,
1881 spf_interval_l2_cmd,
1882 "spf-interval level-2 <1-120>",
1883 "Minimum interval between SPF calculations\n"
1884 "Set interval for level 2 only\n"
1885 "Minimum interval between consecutive SPFs in seconds\n")
1887 struct isis_area *area;
1891 interval = atoi (argv[0]);
1892 area->min_spf_interval[1] = interval;
1897 DEFUN (no_spf_interval_l2,
1898 no_spf_interval_l2_cmd,
1899 "no spf-interval level-2",
1901 "Minimum interval between SPF calculations\n"
1902 "Set interval for level 2 only\n")
1904 struct isis_area *area;
1908 area->min_spf_interval[1] = MINIMUM_SPF_INTERVAL;
1913 ALIAS (no_spf_interval,
1914 no_spf_interval_l2_arg_cmd,
1915 "no spf-interval level-2 <1-120>",
1917 "Minimum interval between SPF calculations\n"
1918 "Set interval for level 2 only\n"
1919 "Minimum interval between consecutive SPFs in seconds\n")
1922 area_max_lsp_lifetime_set(struct vty *vty, int level,
1925 struct isis_area *area = vty->index;
1927 uint16_t refresh_interval = interval - 300;
1928 int set_refresh_interval[ISIS_LEVELS] = {0, 0};
1932 vty_out (vty, "Can't find ISIS instance %s", VTY_NEWLINE);
1933 return CMD_ERR_NO_MATCH;
1936 for (lvl = IS_LEVEL_1; lvl <= IS_LEVEL_2; lvl++)
1941 if (refresh_interval < area->lsp_refresh[lvl-1])
1943 vty_out (vty, "Level %d Max LSP lifetime %us must be 300s greater than "
1944 "the configured LSP refresh interval %us%s",
1945 lvl, interval, area->lsp_refresh[lvl-1], VTY_NEWLINE);
1946 vty_out (vty, "Automatically reducing level %d LSP refresh interval "
1947 "to %us%s", lvl, refresh_interval, VTY_NEWLINE);
1948 set_refresh_interval[lvl-1] = 1;
1950 if (refresh_interval <= area->lsp_gen_interval[lvl-1])
1952 vty_out (vty, "LSP refresh interval %us must be greater than "
1953 "the configured LSP gen interval %us%s",
1954 refresh_interval, area->lsp_gen_interval[lvl-1],
1956 return CMD_ERR_AMBIGUOUS;
1961 for (lvl = IS_LEVEL_1; lvl <= IS_LEVEL_2; lvl++)
1965 isis_area_max_lsp_lifetime_set(area, lvl, interval);
1966 if (set_refresh_interval[lvl-1])
1967 isis_area_lsp_refresh_set(area, lvl, refresh_interval);
1973 DEFUN (max_lsp_lifetime,
1974 max_lsp_lifetime_cmd,
1975 "max-lsp-lifetime <350-65535>",
1976 "Maximum LSP lifetime\n"
1977 "LSP lifetime in seconds\n")
1979 return area_max_lsp_lifetime_set(vty, IS_LEVEL_1_AND_2, atoi(argv[0]));
1982 DEFUN (no_max_lsp_lifetime,
1983 no_max_lsp_lifetime_cmd,
1984 "no max-lsp-lifetime",
1986 "LSP lifetime in seconds\n")
1988 return area_max_lsp_lifetime_set(vty, IS_LEVEL_1_AND_2,
1989 DEFAULT_LSP_LIFETIME);
1992 ALIAS (no_max_lsp_lifetime,
1993 no_max_lsp_lifetime_arg_cmd,
1994 "no max-lsp-lifetime <350-65535>",
1996 "Maximum LSP lifetime\n"
1997 "LSP lifetime in seconds\n")
1999 DEFUN (max_lsp_lifetime_l1,
2000 max_lsp_lifetime_l1_cmd,
2001 "max-lsp-lifetime level-1 <350-65535>",
2002 "Maximum LSP lifetime for Level 1 only\n"
2003 "LSP lifetime for Level 1 only in seconds\n")
2005 return area_max_lsp_lifetime_set(vty, IS_LEVEL_1, atoi(argv[0]));
2008 DEFUN (no_max_lsp_lifetime_l1,
2009 no_max_lsp_lifetime_l1_cmd,
2010 "no max-lsp-lifetime level-1",
2012 "LSP lifetime for Level 1 only in seconds\n")
2014 return area_max_lsp_lifetime_set(vty, IS_LEVEL_1, DEFAULT_LSP_LIFETIME);
2017 ALIAS (no_max_lsp_lifetime_l1,
2018 no_max_lsp_lifetime_l1_arg_cmd,
2019 "no max-lsp-lifetime level-1 <350-65535>",
2021 "Maximum LSP lifetime for Level 1 only\n"
2022 "LSP lifetime for Level 1 only in seconds\n")
2024 DEFUN (max_lsp_lifetime_l2,
2025 max_lsp_lifetime_l2_cmd,
2026 "max-lsp-lifetime level-2 <350-65535>",
2027 "Maximum LSP lifetime for Level 2 only\n"
2028 "LSP lifetime for Level 2 only in seconds\n")
2030 return area_max_lsp_lifetime_set(vty, IS_LEVEL_2, atoi(argv[0]));
2033 DEFUN (no_max_lsp_lifetime_l2,
2034 no_max_lsp_lifetime_l2_cmd,
2035 "no max-lsp-lifetime level-2",
2037 "LSP lifetime for Level 2 only in seconds\n")
2039 return area_max_lsp_lifetime_set(vty, IS_LEVEL_2, DEFAULT_LSP_LIFETIME);
2042 ALIAS (no_max_lsp_lifetime_l2,
2043 no_max_lsp_lifetime_l2_arg_cmd,
2044 "no max-lsp-lifetime level-2 <350-65535>",
2046 "Maximum LSP lifetime for Level 2 only\n"
2047 "LSP lifetime for Level 2 only in seconds\n")
2050 area_lsp_refresh_interval_set(struct vty *vty, int level, uint16_t interval)
2052 struct isis_area *area = vty->index;
2057 vty_out (vty, "Can't find ISIS instance %s", VTY_NEWLINE);
2058 return CMD_ERR_NO_MATCH;
2061 for (lvl = IS_LEVEL_1; lvl <= IS_LEVEL_2; ++lvl)
2065 if (interval <= area->lsp_gen_interval[lvl-1])
2067 vty_out (vty, "LSP refresh interval %us must be greater than "
2068 "the configured LSP gen interval %us%s",
2069 interval, area->lsp_gen_interval[lvl-1],
2071 return CMD_ERR_AMBIGUOUS;
2073 if (interval > (area->max_lsp_lifetime[lvl-1] - 300))
2075 vty_out (vty, "LSP refresh interval %us must be less than "
2076 "the configured LSP lifetime %us less 300%s",
2077 interval, area->max_lsp_lifetime[lvl-1],
2079 return CMD_ERR_AMBIGUOUS;
2083 for (lvl = IS_LEVEL_1; lvl <= IS_LEVEL_2; ++lvl)
2087 isis_area_lsp_refresh_set(area, lvl, interval);
2093 DEFUN (lsp_refresh_interval,
2094 lsp_refresh_interval_cmd,
2095 "lsp-refresh-interval <1-65235>",
2096 "LSP refresh interval\n"
2097 "LSP refresh interval in seconds\n")
2099 return area_lsp_refresh_interval_set(vty, IS_LEVEL_1_AND_2, atoi(argv[0]));
2102 DEFUN (no_lsp_refresh_interval,
2103 no_lsp_refresh_interval_cmd,
2104 "no lsp-refresh-interval",
2106 "LSP refresh interval in seconds\n")
2108 return area_lsp_refresh_interval_set(vty, IS_LEVEL_1_AND_2,
2109 DEFAULT_MAX_LSP_GEN_INTERVAL);
2112 ALIAS (no_lsp_refresh_interval,
2113 no_lsp_refresh_interval_arg_cmd,
2114 "no lsp-refresh-interval <1-65235>",
2116 "LSP refresh interval\n"
2117 "LSP refresh interval in seconds\n")
2119 DEFUN (lsp_refresh_interval_l1,
2120 lsp_refresh_interval_l1_cmd,
2121 "lsp-refresh-interval level-1 <1-65235>",
2122 "LSP refresh interval for Level 1 only\n"
2123 "LSP refresh interval for Level 1 only in seconds\n")
2125 return area_lsp_refresh_interval_set(vty, IS_LEVEL_1, atoi(argv[0]));
2128 DEFUN (no_lsp_refresh_interval_l1,
2129 no_lsp_refresh_interval_l1_cmd,
2130 "no lsp-refresh-interval level-1",
2132 "LSP refresh interval for Level 1 only in seconds\n")
2134 return area_lsp_refresh_interval_set(vty, IS_LEVEL_1,
2135 DEFAULT_MAX_LSP_GEN_INTERVAL);
2138 ALIAS (no_lsp_refresh_interval_l1,
2139 no_lsp_refresh_interval_l1_arg_cmd,
2140 "no lsp-refresh-interval level-1 <1-65235>",
2142 "LSP refresh interval for Level 1 only\n"
2143 "LSP refresh interval for Level 1 only in seconds\n")
2145 DEFUN (lsp_refresh_interval_l2,
2146 lsp_refresh_interval_l2_cmd,
2147 "lsp-refresh-interval level-2 <1-65235>",
2148 "LSP refresh interval for Level 2 only\n"
2149 "LSP refresh interval for Level 2 only in seconds\n")
2151 return area_lsp_refresh_interval_set(vty, IS_LEVEL_2, atoi(argv[0]));
2154 DEFUN (no_lsp_refresh_interval_l2,
2155 no_lsp_refresh_interval_l2_cmd,
2156 "no lsp-refresh-interval level-2",
2158 "LSP refresh interval for Level 2 only in seconds\n")
2160 return area_lsp_refresh_interval_set(vty, IS_LEVEL_2,
2161 DEFAULT_MAX_LSP_GEN_INTERVAL);
2164 ALIAS (no_lsp_refresh_interval_l2,
2165 no_lsp_refresh_interval_l2_arg_cmd,
2166 "no lsp-refresh-interval level-2 <1-65235>",
2168 "LSP refresh interval for Level 2 only\n"
2169 "LSP refresh interval for Level 2 only in seconds\n")
2172 area_passwd_set(struct vty *vty, int level,
2173 int (*type_set)(struct isis_area *area, int level,
2174 const char *passwd, u_char snp_auth),
2175 const char *passwd, u_char snp_auth)
2177 struct isis_area *area = vty->index;
2181 vty_out (vty, "Can't find IS-IS instance%s", VTY_NEWLINE);
2182 return CMD_ERR_NO_MATCH;
2185 if (passwd && strlen(passwd) > 254)
2187 vty_out (vty, "Too long area password (>254)%s", VTY_NEWLINE);
2188 return CMD_ERR_AMBIGUOUS;
2191 type_set(area, level, passwd, snp_auth);
2195 DEFUN (area_passwd_md5,
2196 area_passwd_md5_cmd,
2197 "(area-password|domain-password) md5 WORD",
2198 "Configure the authentication password for an area\n"
2199 "Set the authentication password for a routing domain\n"
2200 "Authentication type\n"
2201 "Level-wide password\n")
2203 u_char snp_auth = 0;
2204 int level = (argv[0][0] == 'd') ? IS_LEVEL_2 : IS_LEVEL_1;
2208 snp_auth = SNP_AUTH_SEND;
2209 if (strncmp(argv[2], "v", 1) == 0)
2210 snp_auth |= SNP_AUTH_RECV;
2213 return area_passwd_set(vty, level, isis_area_passwd_hmac_md5_set,
2217 ALIAS (area_passwd_md5,
2218 area_passwd_md5_snpauth_cmd,
2219 "(area-password|domain-password) md5 WORD authenticate snp (send-only|validate)",
2220 "Configure the authentication password for an area\n"
2221 "Set the authentication password for a routing domain\n"
2222 "Authentication type\n"
2223 "Level-wide password\n"
2226 "Send but do not check PDUs on receiving\n"
2227 "Send and check PDUs on receiving\n")
2229 DEFUN (area_passwd_clear,
2230 area_passwd_clear_cmd,
2231 "(area-password|domain-password) clear WORD",
2232 "Configure the authentication password for an area\n"
2233 "Set the authentication password for a routing domain\n"
2234 "Authentication type\n"
2237 u_char snp_auth = 0;
2238 int level = (argv[0][0] == 'd') ? IS_LEVEL_2 : IS_LEVEL_1;
2242 snp_auth = SNP_AUTH_SEND;
2243 if (strncmp(argv[2], "v", 1) == 0)
2244 snp_auth |= SNP_AUTH_RECV;
2247 return area_passwd_set(vty, level, isis_area_passwd_cleartext_set,
2251 ALIAS (area_passwd_clear,
2252 area_passwd_clear_snpauth_cmd,
2253 "(area-password|domain-password) clear WORD authenticate snp (send-only|validate)",
2254 "Configure the authentication password for an area\n"
2255 "Set the authentication password for a routing domain\n"
2256 "Authentication type\n"
2260 "Send but do not check PDUs on receiving\n"
2261 "Send and check PDUs on receiving\n")
2263 DEFUN (no_area_passwd,
2265 "no (area-password|domain-password)",
2267 "Configure the authentication password for an area\n"
2268 "Set the authentication password for a routing domain\n")
2270 int level = (argv[0][0] == 'd') ? IS_LEVEL_2 : IS_LEVEL_1;
2271 struct isis_area *area = vty->index;
2275 vty_out (vty, "Can't find IS-IS instance%s", VTY_NEWLINE);
2276 return CMD_ERR_NO_MATCH;
2279 return isis_area_passwd_unset (area, level);
2283 isis_vty_init (void)
2285 install_element (INTERFACE_NODE, &ip_router_isis_cmd);
2286 install_element (INTERFACE_NODE, &no_ip_router_isis_cmd);
2288 install_element (INTERFACE_NODE, &isis_passive_cmd);
2289 install_element (INTERFACE_NODE, &no_isis_passive_cmd);
2291 install_element (INTERFACE_NODE, &isis_circuit_type_cmd);
2292 install_element (INTERFACE_NODE, &no_isis_circuit_type_cmd);
2294 install_element (INTERFACE_NODE, &isis_network_cmd);
2295 install_element (INTERFACE_NODE, &no_isis_network_cmd);
2297 install_element (INTERFACE_NODE, &isis_passwd_cmd);
2298 install_element (INTERFACE_NODE, &no_isis_passwd_cmd);
2299 install_element (INTERFACE_NODE, &no_isis_passwd_arg_cmd);
2301 install_element (INTERFACE_NODE, &isis_priority_cmd);
2302 install_element (INTERFACE_NODE, &no_isis_priority_cmd);
2303 install_element (INTERFACE_NODE, &no_isis_priority_arg_cmd);
2304 install_element (INTERFACE_NODE, &isis_priority_l1_cmd);
2305 install_element (INTERFACE_NODE, &no_isis_priority_l1_cmd);
2306 install_element (INTERFACE_NODE, &no_isis_priority_l1_arg_cmd);
2307 install_element (INTERFACE_NODE, &isis_priority_l2_cmd);
2308 install_element (INTERFACE_NODE, &no_isis_priority_l2_cmd);
2309 install_element (INTERFACE_NODE, &no_isis_priority_l2_arg_cmd);
2311 install_element (INTERFACE_NODE, &isis_metric_cmd);
2312 install_element (INTERFACE_NODE, &no_isis_metric_cmd);
2313 install_element (INTERFACE_NODE, &no_isis_metric_arg_cmd);
2314 install_element (INTERFACE_NODE, &isis_metric_l1_cmd);
2315 install_element (INTERFACE_NODE, &no_isis_metric_l1_cmd);
2316 install_element (INTERFACE_NODE, &no_isis_metric_l1_arg_cmd);
2317 install_element (INTERFACE_NODE, &isis_metric_l2_cmd);
2318 install_element (INTERFACE_NODE, &no_isis_metric_l2_cmd);
2319 install_element (INTERFACE_NODE, &no_isis_metric_l2_arg_cmd);
2321 install_element (INTERFACE_NODE, &isis_hello_interval_cmd);
2322 install_element (INTERFACE_NODE, &no_isis_hello_interval_cmd);
2323 install_element (INTERFACE_NODE, &no_isis_hello_interval_arg_cmd);
2324 install_element (INTERFACE_NODE, &isis_hello_interval_l1_cmd);
2325 install_element (INTERFACE_NODE, &no_isis_hello_interval_l1_cmd);
2326 install_element (INTERFACE_NODE, &no_isis_hello_interval_l1_arg_cmd);
2327 install_element (INTERFACE_NODE, &isis_hello_interval_l2_cmd);
2328 install_element (INTERFACE_NODE, &no_isis_hello_interval_l2_cmd);
2329 install_element (INTERFACE_NODE, &no_isis_hello_interval_l2_arg_cmd);
2331 install_element (INTERFACE_NODE, &isis_hello_multiplier_cmd);
2332 install_element (INTERFACE_NODE, &no_isis_hello_multiplier_cmd);
2333 install_element (INTERFACE_NODE, &no_isis_hello_multiplier_arg_cmd);
2334 install_element (INTERFACE_NODE, &isis_hello_multiplier_l1_cmd);
2335 install_element (INTERFACE_NODE, &no_isis_hello_multiplier_l1_cmd);
2336 install_element (INTERFACE_NODE, &no_isis_hello_multiplier_l1_arg_cmd);
2337 install_element (INTERFACE_NODE, &isis_hello_multiplier_l2_cmd);
2338 install_element (INTERFACE_NODE, &no_isis_hello_multiplier_l2_cmd);
2339 install_element (INTERFACE_NODE, &no_isis_hello_multiplier_l2_arg_cmd);
2341 install_element (INTERFACE_NODE, &isis_hello_padding_cmd);
2342 install_element (INTERFACE_NODE, &no_isis_hello_padding_cmd);
2344 install_element (INTERFACE_NODE, &csnp_interval_cmd);
2345 install_element (INTERFACE_NODE, &no_csnp_interval_cmd);
2346 install_element (INTERFACE_NODE, &no_csnp_interval_arg_cmd);
2347 install_element (INTERFACE_NODE, &csnp_interval_l1_cmd);
2348 install_element (INTERFACE_NODE, &no_csnp_interval_l1_cmd);
2349 install_element (INTERFACE_NODE, &no_csnp_interval_l1_arg_cmd);
2350 install_element (INTERFACE_NODE, &csnp_interval_l2_cmd);
2351 install_element (INTERFACE_NODE, &no_csnp_interval_l2_cmd);
2352 install_element (INTERFACE_NODE, &no_csnp_interval_l2_arg_cmd);
2354 install_element (INTERFACE_NODE, &psnp_interval_cmd);
2355 install_element (INTERFACE_NODE, &no_psnp_interval_cmd);
2356 install_element (INTERFACE_NODE, &no_psnp_interval_arg_cmd);
2357 install_element (INTERFACE_NODE, &psnp_interval_l1_cmd);
2358 install_element (INTERFACE_NODE, &no_psnp_interval_l1_cmd);
2359 install_element (INTERFACE_NODE, &no_psnp_interval_l1_arg_cmd);
2360 install_element (INTERFACE_NODE, &psnp_interval_l2_cmd);
2361 install_element (INTERFACE_NODE, &no_psnp_interval_l2_cmd);
2362 install_element (INTERFACE_NODE, &no_psnp_interval_l2_arg_cmd);
2364 install_element (ISIS_NODE, &metric_style_cmd);
2365 install_element (ISIS_NODE, &no_metric_style_cmd);
2367 install_element (ISIS_NODE, &set_overload_bit_cmd);
2368 install_element (ISIS_NODE, &no_set_overload_bit_cmd);
2370 install_element (ISIS_NODE, &set_attached_bit_cmd);
2371 install_element (ISIS_NODE, &no_set_attached_bit_cmd);
2373 install_element (ISIS_NODE, &dynamic_hostname_cmd);
2374 install_element (ISIS_NODE, &no_dynamic_hostname_cmd);
2376 install_element (ISIS_NODE, &area_lsp_mtu_cmd);
2377 install_element (ISIS_NODE, &no_area_lsp_mtu_cmd);
2378 install_element (ISIS_NODE, &no_area_lsp_mtu_arg_cmd);
2380 install_element (ISIS_NODE, &is_type_cmd);
2381 install_element (ISIS_NODE, &no_is_type_cmd);
2383 install_element (ISIS_NODE, &lsp_gen_interval_cmd);
2384 install_element (ISIS_NODE, &no_lsp_gen_interval_cmd);
2385 install_element (ISIS_NODE, &no_lsp_gen_interval_arg_cmd);
2386 install_element (ISIS_NODE, &lsp_gen_interval_l1_cmd);
2387 install_element (ISIS_NODE, &no_lsp_gen_interval_l1_cmd);
2388 install_element (ISIS_NODE, &no_lsp_gen_interval_l1_arg_cmd);
2389 install_element (ISIS_NODE, &lsp_gen_interval_l2_cmd);
2390 install_element (ISIS_NODE, &no_lsp_gen_interval_l2_cmd);
2391 install_element (ISIS_NODE, &no_lsp_gen_interval_l2_arg_cmd);
2393 install_element (ISIS_NODE, &spf_interval_cmd);
2394 install_element (ISIS_NODE, &no_spf_interval_cmd);
2395 install_element (ISIS_NODE, &no_spf_interval_arg_cmd);
2396 install_element (ISIS_NODE, &spf_interval_l1_cmd);
2397 install_element (ISIS_NODE, &no_spf_interval_l1_cmd);
2398 install_element (ISIS_NODE, &no_spf_interval_l1_arg_cmd);
2399 install_element (ISIS_NODE, &spf_interval_l2_cmd);
2400 install_element (ISIS_NODE, &no_spf_interval_l2_cmd);
2401 install_element (ISIS_NODE, &no_spf_interval_l2_arg_cmd);
2403 install_element (ISIS_NODE, &max_lsp_lifetime_cmd);
2404 install_element (ISIS_NODE, &no_max_lsp_lifetime_cmd);
2405 install_element (ISIS_NODE, &no_max_lsp_lifetime_arg_cmd);
2406 install_element (ISIS_NODE, &max_lsp_lifetime_l1_cmd);
2407 install_element (ISIS_NODE, &no_max_lsp_lifetime_l1_cmd);
2408 install_element (ISIS_NODE, &no_max_lsp_lifetime_l1_arg_cmd);
2409 install_element (ISIS_NODE, &max_lsp_lifetime_l2_cmd);
2410 install_element (ISIS_NODE, &no_max_lsp_lifetime_l2_cmd);
2411 install_element (ISIS_NODE, &no_max_lsp_lifetime_l2_arg_cmd);
2413 install_element (ISIS_NODE, &lsp_refresh_interval_cmd);
2414 install_element (ISIS_NODE, &no_lsp_refresh_interval_cmd);
2415 install_element (ISIS_NODE, &no_lsp_refresh_interval_arg_cmd);
2416 install_element (ISIS_NODE, &lsp_refresh_interval_l1_cmd);
2417 install_element (ISIS_NODE, &no_lsp_refresh_interval_l1_cmd);
2418 install_element (ISIS_NODE, &no_lsp_refresh_interval_l1_arg_cmd);
2419 install_element (ISIS_NODE, &lsp_refresh_interval_l2_cmd);
2420 install_element (ISIS_NODE, &no_lsp_refresh_interval_l2_cmd);
2421 install_element (ISIS_NODE, &no_lsp_refresh_interval_l2_arg_cmd);
2423 install_element (ISIS_NODE, &area_passwd_md5_cmd);
2424 install_element (ISIS_NODE, &area_passwd_md5_snpauth_cmd);
2425 install_element (ISIS_NODE, &area_passwd_clear_cmd);
2426 install_element (ISIS_NODE, &area_passwd_clear_snpauth_cmd);
2427 install_element (ISIS_NODE, &no_area_passwd_cmd);