blob: cc291de550ecf5ff1103df33d7ebe3321bedf54e [file] [log] [blame]
Thomas Vachuska8ca75a22017-08-24 16:12:59 -07001module openconfig-if-ip {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/interfaces/ip";
7
8 prefix "oc-ip";
9
10 // import some basic types
11 import openconfig-inet-types { prefix oc-inet; }
12 import openconfig-interfaces { prefix oc-if; }
13 import openconfig-vlan { prefix oc-vlan; }
14 import openconfig-yang-types { prefix oc-yang; }
15 import openconfig-extensions { prefix oc-ext; }
16
17 // meta
18 organization "OpenConfig working group";
19
20 contact
21 "OpenConfig working group
22 netopenconfig@googlegroups.com";
23
24 description
25 "This model defines data for managing configuration and
26 operational state on IP (IPv4 and IPv6) interfaces.
27
28 This model reuses data items defined in the IETF YANG model for
29 interfaces described by RFC 7277 with an alternate structure
30 (particularly for operational state data) and with
31 additional configuration items.
32
33 Portions of this code were derived from IETF RFC 7277.
34 Please reproduce this note if possible.
35
36 IETF code is subject to the following copyright and license:
37 Copyright (c) IETF Trust and the persons identified as authors of
38 the code.
39 All rights reserved.
40
41 Redistribution and use in source and binary forms, with or without
42 modification, is permitted pursuant to, and subject to the license
43 terms contained in, the Simplified BSD License set forth in
44 Section 4.c of the IETF Trust's Legal Provisions Relating
45 to IETF Documents (http://trustee.ietf.org/license-info).";
46
47 oc-ext:openconfig-version "2.0.0";
48
49 revision "2017-07-14" {
50 description
51 "Added Ethernet/IP state data; Add dhcp-client;
52 migrate to OpenConfig types modules; Removed or
53 renamed opstate values";
54 reference "2.0.0";
55 }
56
57 revision "2017-04-03"{
58 description
59 "Update copyright notice.";
60 reference "1.1.1";
61 }
62
63 revision "2016-12-22" {
64 description
65 "Fixes to Ethernet interfaces model";
66 reference "1.1.0";
67 }
68
69
70 // typedef statements
71
72 typedef ip-address-origin {
73 type enumeration {
74 enum OTHER {
75 description
76 "None of the following.";
77 }
78 enum STATIC {
79 description
80 "Indicates that the address has been statically
81 configured - for example, using NETCONF or a Command Line
82 Interface.";
83 }
84 enum DHCP {
85 description
86 "Indicates an address that has been assigned to this
87 system by a DHCP server.";
88 }
89 enum LINK_LAYER {
90 description
91 "Indicates an address created by IPv6 stateless
92 autoconfiguration that embeds a link-layer address in its
93 interface identifier.";
94 }
95 enum RANDOM {
96 description
97 "Indicates an address chosen by the system at
98 random, e.g., an IPv4 address within 169.254/16, an
99 RFC 4941 temporary address, or an RFC 7217 semantically
100 opaque address.";
101 reference
102 "RFC 4941: Privacy Extensions for Stateless Address
103 Autoconfiguration in IPv6
104 RFC 7217: A Method for Generating Semantically Opaque
105 Interface Identifiers with IPv6 Stateless
106 Address Autoconfiguration (SLAAC)";
107 }
108 }
109 description
110 "The origin of an address.";
111 }
112
113 typedef neighbor-origin {
114 type enumeration {
115 enum OTHER {
116 description
117 "None of the following.";
118 }
119 enum STATIC {
120 description
121 "Indicates that the mapping has been statically
122 configured - for example, using NETCONF or a Command Line
123 Interface.";
124 }
125 enum DYNAMIC {
126 description
127 "Indicates that the mapping has been dynamically resolved
128 using, e.g., IPv4 ARP or the IPv6 Neighbor Discovery
129 protocol.";
130 }
131 }
132 description
133 "The origin of a neighbor entry.";
134 }
135
136 // grouping statements
137
138 grouping ip-common-global-config {
139 description
140 "Shared configuration data for IPv4 or IPv6 assigned
141 globally on an interface.";
142
143 leaf dhcp-client {
144 type boolean;
145 default false;
146 description
147 "Enables a DHCP client on the interface in order to request
148 an address";
149 }
150 }
151
152 grouping ip-common-counters-state {
153 description
154 "Operational state for IP traffic statistics for IPv4 and
155 IPv6";
156
157 container counters {
158 description
159 "Packet and byte counters for IP transmission and
160 reception for the address family.";
161
162
163 leaf in-pkts {
164 type oc-yang:counter64;
165 description
166 "The total number of IP packets received for the specified
167 address family, including those received in error";
168 reference
169 "RFC 4293 - Management Information Base for the
170 Internet Protocol (IP)";
171 }
172
173 leaf in-octets {
174 type oc-yang:counter64;
175 description
176 "The total number of octets received in input IP packets
177 for the specified address family, including those received
178 in error.";
179 reference
180 "RFC 4293 - Management Information Base for the
181 Internet Protocol (IP)";
182 }
183
184 leaf in-error-pkts {
185 // TODO: this counter combines several error conditions --
186 // could consider breaking them out to separate leaf nodes
187 type oc-yang:counter64;
188 description
189 "Number of IP packets discarded due to errors for the
190 specified address family, including errors in the IP
191 header, no route found to the IP destination, invalid
192 address, unknown protocol, etc.";
193 reference
194 "RFC 4293 - Management Information Base for the
195 Internet Protocol (IP)";
196 }
197
198 leaf in-forwarded-pkts {
199 type oc-yang:counter64;
200 description
201 "The number of input packets for which the device was not
202 their final IP destination and for which the device
203 attempted to find a route to forward them to that final
204 destination.";
205 reference
206 "RFC 4293 - Management Information Base for the
207 Internet Protocol (IP)";
208 }
209
210 leaf in-forwarded-octets {
211 type oc-yang:counter64;
212 description
213 "The number of octets received in input IP packets
214 for the specified address family for which the device was
215 not their final IP destination and for which the
216 device attempted to find a route to forward them to that
217 final destination.";
218 reference
219 "RFC 4293 - Management Information Base for the
220 Internet Protocol (IP)";
221 }
222
223 leaf in-discarded-pkts {
224 type oc-yang:counter64;
225 description
226 "The number of input IP packets for the
227 specified address family, for which no problems were
228 encountered to prevent their continued processing, but
229 were discarded (e.g., for lack of buffer space).";
230 reference
231 "RFC 4293 - Management Information Base for the
232 Internet Protocol (IP)";
233 }
234
235 leaf out-pkts {
236 type oc-yang:counter64;
237 description
238 "The total number of IP packets for the
239 specified address family that the device supplied
240 to the lower layers for transmission. This includes
241 packets generated locally and those forwarded by the
242 device.";
243 reference
244 "RFC 4293 - Management Information Base for the
245 Internet Protocol (IP)";
246 }
247
248 leaf out-octets {
249 type oc-yang:counter64;
250 description
251 "The total number of octets in IP packets for the
252 specified address family that the device
253 supplied to the lower layers for transmission. This
254 includes packets generated locally and those forwarded by
255 the device.";
256 reference
257 "RFC 4293 - Management Information Base for the
258 Internet Protocol (IP)";
259 }
260
261 leaf out-error-pkts {
262 // TODO: this counter combines several error conditions --
263 // could consider breaking them out to separate leaf nodes
264 type oc-yang:counter64;
265 description
266 "Number of IP packets for the specified address family
267 locally generated and discarded due to errors, including
268 no route found to the IP destination.";
269 reference
270 "RFC 4293 - Management Information Base for the
271 Internet Protocol (IP)";
272 }
273
274 leaf out-forwarded-pkts {
275 type oc-yang:counter64;
276 description
277 "The number of packets for which this entity was not their
278 final IP destination and for which it was successful in
279 finding a path to their final destination.";
280 reference
281 "RFC 4293 - Management Information Base for the
282 Internet Protocol (IP)";
283 }
284
285 leaf out-forwarded-octets {
286 type oc-yang:counter64;
287 description
288 "The number of octets in packets for which this entity was
289 not their final IP destination and for which it was
290 successful in finding a path to their final destination.";
291 reference
292 "RFC 4293 - Management Information Base for the
293 Internet Protocol (IP)";
294 }
295
296 leaf out-discarded-pkts {
297 type oc-yang:counter64;
298 description
299 "The number of output IP packets for the
300 specified address family for which no problem was
301 encountered to prevent their transmission to their
302 destination, but were discarded (e.g., for lack of
303 buffer space).";
304 reference
305 "RFC 4293 - Management Information Base for the
306 Internet Protocol (IP)";
307 }
308 }
309
310 }
311
312
313
314 grouping ipv4-global-config {
315 description
316 "Configuration data for IPv4 interfaces across
317 all addresses assigned to the interface";
318
319 leaf enabled {
320 type boolean;
321 default true;
322 description
323 "Controls whether IPv4 is enabled or disabled on this
324 interface. When IPv4 is enabled, this interface is
325 connected to an IPv4 stack, and the interface can send
326 and receive IPv4 packets.";
327 }
328
329 leaf mtu {
330 type uint16 {
331 range "68..max";
332 }
333 units octets;
334 description
335 "The size, in octets, of the largest IPv4 packet that the
336 interface will send and receive.
337
338 The server may restrict the allowed values for this leaf,
339 depending on the interface's type.
340
341 If this leaf is not configured, the operationally used MTU
342 depends on the interface's type.";
343 reference
344 "RFC 791: Internet Protocol";
345 }
346
347 uses ip-common-global-config;
348
349
350 }
351
352 grouping ipv4-address-config {
353
354 description
355 "Per IPv4 adresss configuration data for the
356 interface.";
357
358 leaf ip {
359 type oc-inet:ipv4-address;
360 description
361 "The IPv4 address on the interface.";
362 }
363
364 leaf prefix-length {
365 type uint8 {
366 range "0..32";
367 }
368 description
369 "The length of the subnet prefix.";
370 }
371 }
372
373 grouping ipv4-neighbor-config {
374 description
375 "Per IPv4 neighbor configuration data. Neighbor
376 entries are analagous to static ARP entries, i.e., they
377 create a correspondence between IP and link-layer addresses";
378
379 leaf ip {
380 type oc-inet:ipv4-address;
381 description
382 "The IPv4 address of the neighbor node.";
383 }
384 leaf link-layer-address {
385 type oc-yang:phys-address;
386 mandatory true;
387 description
388 "The link-layer address of the neighbor node.";
389 }
390 }
391
392 grouping ipv4-address-state {
393 description
394 "State variables for IPv4 addresses on the interface";
395
396 leaf origin {
397 type ip-address-origin;
398 description
399 "The origin of this address, e.g., statically configured,
400 assigned by DHCP, etc..";
401 }
402 }
403
404 grouping ipv4-neighbor-state {
405 description
406 "State variables for IPv4 neighbor entries on the interface.";
407
408 leaf origin {
409 type neighbor-origin;
410 description
411 "The origin of this neighbor entry, static or dynamic.";
412 }
413 }
414
415 grouping ipv6-global-config {
416 description
417 "Configuration data at the global level for each
418 IPv6 interface";
419
420 leaf enabled {
421 type boolean;
422 default true;
423 description
424 "Controls whether IPv6 is enabled or disabled on this
425 interface. When IPv6 is enabled, this interface is
426 connected to an IPv6 stack, and the interface can send
427 and receive IPv6 packets.";
428 }
429
430 leaf mtu {
431 type uint32 {
432 range "1280..max";
433 }
434 units octets;
435 description
436 "The size, in octets, of the largest IPv6 packet that the
437 interface will send and receive.
438
439 The server may restrict the allowed values for this leaf,
440 depending on the interface's type.
441
442 If this leaf is not configured, the operationally used MTU
443 depends on the interface's type.";
444 reference
445 "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
446 Section 5";
447 }
448
449 leaf dup-addr-detect-transmits {
450 type uint32;
451 default 1;
452 description
453 "The number of consecutive Neighbor Solicitation messages
454 sent while performing Duplicate Address Detection on a
455 tentative address. A value of zero indicates that
456 Duplicate Address Detection is not performed on
457 tentative addresses. A value of one indicates a single
458 transmission with no follow-up retransmissions.";
459 reference
460 "RFC 4862: IPv6 Stateless Address Autoconfiguration";
461 }
462
463 uses ip-common-global-config;
464 }
465
466 grouping ipv6-address-config {
467 description "Per-address configuration data for IPv6 interfaces";
468
469 leaf ip {
470 type oc-inet:ipv6-address;
471 description
472 "The IPv6 address on the interface.";
473 }
474
475 leaf prefix-length {
476 type uint8 {
477 range "0..128";
478 }
479 mandatory true;
480 description
481 "The length of the subnet prefix.";
482 }
483 }
484
485 grouping ipv6-address-state {
486 description
487 "Per-address operational state data for IPv6 interfaces";
488
489 leaf origin {
490 type ip-address-origin;
491 description
492 "The origin of this address, e.g., static, dhcp, etc.";
493 }
494
495 leaf status {
496 type enumeration {
497 enum PREFERRED {
498 description
499 "This is a valid address that can appear as the
500 destination or source address of a packet.";
501 }
502 enum DEPRECATED {
503 description
504 "This is a valid but deprecated address that should
505 no longer be used as a source address in new
506 communications, but packets addressed to such an
507 address are processed as expected.";
508 }
509 enum INVALID {
510 description
511 "This isn't a valid address, and it shouldn't appear
512 as the destination or source address of a packet.";
513 }
514 enum INACCESSIBLE {
515 description
516 "The address is not accessible because the interface
517 to which this address is assigned is not
518 operational.";
519 }
520 enum UNKNOWN {
521 description
522 "The status cannot be determined for some reason.";
523 }
524 enum TENTATIVE {
525 description
526 "The uniqueness of the address on the link is being
527 verified. Addresses in this state should not be
528 used for general communication and should only be
529 used to determine the uniqueness of the address.";
530 }
531 enum DUPLICATE {
532 description
533 "The address has been determined to be non-unique on
534 the link and so must not be used.";
535 }
536 enum OPTIMISTIC {
537 description
538 "The address is available for use, subject to
539 restrictions, while its uniqueness on a link is
540 being verified.";
541 }
542 }
543 description
544 "The status of an address. Most of the states correspond
545 to states from the IPv6 Stateless Address
546 Autoconfiguration protocol.";
547 reference
548 "RFC 4293: Management Information Base for the
549 Internet Protocol (IP)
550 - IpAddressStatusTC
551 RFC 4862: IPv6 Stateless Address Autoconfiguration";
552 }
553 }
554
555 grouping ipv6-neighbor-config {
556 description
557 "Per-neighbor configuration data for IPv6 interfaces";
558
559 leaf ip {
560 type oc-inet:ipv6-address;
561 description
562 "The IPv6 address of the neighbor node.";
563 }
564
565 leaf link-layer-address {
566 type oc-yang:phys-address;
567 mandatory true;
568 description
569 "The link-layer address of the neighbor node.";
570 }
571 }
572
573 grouping ipv6-neighbor-state {
574 description "Per-neighbor state variables for IPv6 interfaces";
575
576 leaf origin {
577 type neighbor-origin;
578 description
579 "The origin of this neighbor entry.";
580 }
581 leaf is-router {
582 type empty;
583 description
584 "Indicates that the neighbor node acts as a router.";
585 }
586 leaf neighbor-state {
587 type enumeration {
588 enum INCOMPLETE {
589 description
590 "Address resolution is in progress, and the link-layer
591 address of the neighbor has not yet been
592 determined.";
593 }
594 enum REACHABLE {
595 description
596 "Roughly speaking, the neighbor is known to have been
597 reachable recently (within tens of seconds ago).";
598 }
599 enum STALE {
600 description
601 "The neighbor is no longer known to be reachable, but
602 until traffic is sent to the neighbor no attempt
603 should be made to verify its reachability.";
604 }
605 enum DELAY {
606 description
607 "The neighbor is no longer known to be reachable, and
608 traffic has recently been sent to the neighbor.
609 Rather than probe the neighbor immediately, however,
610 delay sending probes for a short while in order to
611 give upper-layer protocols a chance to provide
612 reachability confirmation.";
613 }
614 enum PROBE {
615 description
616 "The neighbor is no longer known to be reachable, and
617 unicast Neighbor Solicitation probes are being sent
618 to verify reachability.";
619 }
620 }
621 description
622 "The Neighbor Unreachability Detection state of this
623 entry.";
624 reference
625 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
626 Section 7.3.2";
627 }
628 }
629
630 grouping ip-vrrp-ipv6-config {
631 description
632 "IPv6-specific configuration data for VRRP on IPv6
633 interfaces";
634
635 leaf virtual-link-local {
636 type oc-inet:ip-address;
637 description
638 "For VRRP on IPv6 interfaces, sets the virtual link local
639 address";
640 }
641 }
642
643 grouping ip-vrrp-ipv6-state {
644 description
645 "IPv6-specific operational state for VRRP on IPv6 interfaces";
646
647 uses ip-vrrp-ipv6-config;
648 }
649
650 grouping ip-vrrp-tracking-config {
651 description
652 "Configuration data for tracking interfaces
653 in a VRRP group";
654
655 leaf-list track-interface {
656 type leafref {
657 path "/oc-if:interfaces/oc-if:interface/oc-if:name";
658 }
659 // TODO: we may need to add some restriction to ethernet
660 // or IP interfaces.
661 description
662 "Sets a list of one or more interfaces that should
663 be tracked for up/down events to dynamically change the
664 priority state of the VRRP group, and potentially
665 change the mastership if the tracked interface going
666 down lowers the priority sufficiently. Any of the tracked
667 interfaces going down will cause the priority to be lowered.
668 Some implementations may only support a single
669 tracked interface.";
670 }
671
672 leaf priority-decrement {
673 type uint8 {
674 range 0..254;
675 }
676 default 0;
677 description "Set the value to subtract from priority when
678 the tracked interface goes down";
679 }
680 }
681
682 grouping ip-vrrp-tracking-state {
683 description
684 "Operational state data for tracking interfaces in a VRRP
685 group";
686 }
687
688 grouping ip-vrrp-tracking-top {
689 description
690 "Top-level grouping for VRRP interface tracking";
691
692 container interface-tracking {
693 description
694 "Top-level container for VRRP interface tracking";
695
696 container config {
697 description
698 "Configuration data for VRRP interface tracking";
699
700 uses ip-vrrp-tracking-config;
701 }
702
703 container state {
704
705 config false;
706
707 description
708 "Operational state data for VRRP interface tracking";
709
710 uses ip-vrrp-tracking-config;
711 uses ip-vrrp-tracking-state;
712 }
713 }
714 }
715
716 grouping ip-vrrp-config {
717 description
718 "Configuration data for VRRP on IP interfaces";
719
720 leaf virtual-router-id {
721 type uint8 {
722 range 1..255;
723 }
724 description
725 "Set the virtual router id for use by the VRRP group. This
726 usually also determines the virtual MAC address that is
727 generated for the VRRP group";
728 }
729
730 leaf-list virtual-address {
731 type oc-inet:ip-address;
732 description
733 "Configure one or more virtual addresses for the
734 VRRP group";
735 }
736
737 leaf priority {
738 type uint8 {
739 range 1..254;
740 }
741 default 100;
742 description
743 "Specifies the sending VRRP interface's priority
744 for the virtual router. Higher values equal higher
745 priority";
746 }
747
748 leaf preempt {
749 type boolean;
750 default true;
751 description
752 "When set to true, enables preemption by a higher
753 priority backup router of a lower priority master router";
754 }
755
756 leaf preempt-delay {
757 type uint16 {
758 range 0..3600;
759 }
760 default 0;
761 description
762 "Set the delay the higher priority router waits
763 before preempting";
764 }
765
766 leaf accept-mode {
767 type boolean;
768 // TODO: should we adopt the RFC default given the common
769 // operational practice of setting to true?
770 default false;
771 description
772 "Configure whether packets destined for
773 virtual addresses are accepted even when the virtual
774 address is not owned by the router interface";
775 }
776
777 leaf advertisement-interval {
778 type uint16 {
779 range 1..4095;
780 }
781 // TODO this range is theoretical -- needs to be validated
782 // against major implementations.
783 units "centiseconds";
784 default 100;
785 description
786 "Sets the interval between successive VRRP
787 advertisements -- RFC 5798 defines this as a 12-bit
788 value expressed as 0.1 seconds, with default 100, i.e.,
789 1 second. Several implementation express this in units of
790 seconds";
791 }
792 }
793
794 grouping ip-vrrp-state {
795 description
796 "Operational state data for VRRP on IP interfaces";
797
798 leaf current-priority {
799 type uint8;
800 description "Operational value of the priority for the
801 interface in the VRRP group";
802 }
803 }
804
805 grouping ip-vrrp-top {
806 description
807 "Top-level grouping for Virtual Router Redundancy Protocol";
808
809 container vrrp {
810 description
811 "Enclosing container for VRRP groups handled by this
812 IP interface";
813
814 reference "RFC 5798 - Virtual Router Redundancy Protocol
815 (VRRP) Version 3 for IPv4 and IPv6";
816
817 list vrrp-group {
818 key "virtual-router-id";
819 description
820 "List of VRRP groups, keyed by virtual router id";
821
822 leaf virtual-router-id {
823 type leafref {
824 path "../config/virtual-router-id";
825 }
826 description
827 "References the configured virtual router id for this
828 VRRP group";
829 }
830
831 container config {
832 description
833 "Configuration data for the VRRP group";
834
835 uses ip-vrrp-config;
836 }
837
838 container state {
839
840 config false;
841
842 description
843 "Operational state data for the VRRP group";
844
845 uses ip-vrrp-config;
846 uses ip-vrrp-state;
847 }
848
849 uses ip-vrrp-tracking-top;
850 }
851 }
852 }
853
854 grouping ipv4-top {
855 description "Top-level configuration and state for IPv4
856 interfaces";
857
858 container ipv4 {
859 description
860 "Parameters for the IPv4 address family.";
861
862 container addresses {
863 description
864 "Enclosing container for address list";
865
866 list address {
867 key "ip";
868 description
869 "The list of configured IPv4 addresses on the interface.";
870
871 leaf ip {
872 type leafref {
873 path "../oc-ip:config/oc-ip:ip";
874 }
875 description "References the configured IP address";
876 }
877
878 container config {
879 description "Configuration data for each configured IPv4
880 address on the interface";
881
882 uses ipv4-address-config;
883
884 }
885
886 container state {
887
888 config false;
889 description "Operational state data for each IPv4 address
890 configured on the interface";
891
892 uses ipv4-address-config;
893 uses ipv4-address-state;
894 }
895
896 }
897 }
898
899 container neighbors {
900 description
901 "Enclosing container for neighbor list";
902
903 list neighbor {
904 key "ip";
905 description
906 "A list of mappings from IPv4 addresses to
907 link-layer addresses.
908
909 Entries in this list are used as static entries in the
910 ARP Cache.";
911 reference
912 "RFC 826: An Ethernet Address Resolution Protocol";
913
914 leaf ip {
915 type leafref {
916 path "../oc-ip:config/oc-ip:ip";
917 }
918 description "References the configured IP address";
919 }
920
921 container config {
922 description "Configuration data for each configured IPv4
923 address on the interface";
924
925 uses ipv4-neighbor-config;
926
927 }
928
929 container state {
930
931 config false;
932 description "Operational state data for each IPv4 address
933 configured on the interface";
934
935 uses ipv4-neighbor-config;
936 uses ipv4-neighbor-state;
937 }
938 }
939 }
940
941 uses oc-if:sub-unnumbered-top;
942
943 container config {
944 description
945 "Top-level IPv4 configuration data for the interface";
946
947 uses ipv4-global-config;
948 }
949
950 container state {
951
952 config false;
953 description
954 "Top level IPv4 operational state data";
955
956 uses ipv4-global-config;
957 uses ip-common-counters-state;
958 }
959 }
960 }
961
962 grouping ipv6-top {
963 description
964 "Top-level configuration and state for IPv6 interfaces";
965
966 container ipv6 {
967 description
968 "Parameters for the IPv6 address family.";
969
970 container addresses {
971 description
972 "Enclosing container for address list";
973
974 list address {
975 key "ip";
976 description
977 "The list of configured IPv6 addresses on the interface.";
978
979 leaf ip {
980 type leafref {
981 path "../oc-ip:config/oc-ip:ip";
982 }
983 description "References the configured IP address";
984 }
985
986 container config {
987 description
988 "Configuration data for each IPv6 address on
989 the interface";
990
991 uses ipv6-address-config;
992
993 }
994
995 container state {
996
997 config false;
998 description
999 "State data for each IPv6 address on the
1000 interface";
1001
1002 uses ipv6-address-config;
1003 uses ipv6-address-state;
1004 }
1005 }
1006 }
1007
1008 container neighbors {
1009 description
1010 "Enclosing container for list of IPv6 neighbors";
1011
1012 list neighbor {
1013 key "ip";
1014 description
1015 "List of IPv6 neighbors";
1016
1017 leaf ip {
1018 type leafref {
1019 path "../oc-ip:config/oc-ip:ip";
1020 }
1021 description
1022 "References the configured IP neighbor address";
1023 }
1024
1025 container config {
1026 description "Configuration data for each IPv6 address on
1027 the interface";
1028
1029 uses ipv6-neighbor-config;
1030
1031 }
1032
1033 container state {
1034
1035 config false;
1036 description "State data for each IPv6 address on the
1037 interface";
1038
1039 uses ipv6-neighbor-config;
1040 uses ipv6-neighbor-state;
1041 }
1042 }
1043 }
1044 uses oc-if:sub-unnumbered-top;
1045
1046 container config {
1047 description "Top-level config data for the IPv6 interface";
1048
1049 uses ipv6-global-config;
1050 }
1051
1052 container state {
1053 config false;
1054 description
1055 "Top-level operational state data for the IPv6 interface";
1056
1057 uses ipv6-global-config;
1058 uses ip-common-counters-state;
1059
1060 }
1061 }
1062 }
1063
1064 // augment statements
1065
1066 augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
1067 "oc-if:subinterface" {
1068 description
1069 "IPv4 addr family configuration for
1070 interfaces";
1071
1072 uses ipv4-top;
1073
1074 }
1075
1076 augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
1077 "oc-if:subinterface" {
1078 description
1079 "IPv6 addr family configuration for
1080 interfaces";
1081
1082 uses ipv6-top;
1083
1084 }
1085
1086 // VRRP for IPv4 interfaces
1087
1088 augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
1089 "oc-if:subinterface/oc-ip:ipv4/oc-ip:addresses/oc-ip:address" {
1090
1091 description
1092 "Additional IP addr family configuration for
1093 interfaces";
1094
1095 uses ip-vrrp-top;
1096
1097 }
1098
1099 // VRRP for IPv6 interfaces
1100
1101 augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
1102 "oc-if:subinterface/oc-ip:ipv6/oc-ip:addresses/oc-ip:address" {
1103 description
1104 "Additional IP addr family configuration for
1105 interfaces";
1106
1107 uses ip-vrrp-top;
1108
1109 }
1110
1111 augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
1112 "oc-if:subinterface/oc-ip:ipv6/oc-ip:addresses/oc-ip:address/" +
1113 "vrrp/vrrp-group/config" {
1114 description
1115 "Additional VRRP data for IPv6 interfaces";
1116
1117 uses ip-vrrp-ipv6-config;
1118 }
1119
1120 augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
1121 "oc-if:subinterface/oc-ip:ipv6/oc-ip:addresses/oc-ip:address/vrrp/" +
1122 "vrrp-group/state" {
1123 description
1124 "Additional VRRP data for IPv6 interfaces";
1125
1126 uses ip-vrrp-ipv6-state;
1127 }
1128
1129 // Augments for for routed VLANs
1130
1131 augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan" {
1132 description
1133 "IPv4 addr family configuration for
1134 interfaces";
1135
1136 uses ipv4-top;
1137
1138 }
1139
1140 augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan" {
1141 description
1142 "IPv6 addr family configuration for
1143 interfaces";
1144
1145 uses ipv6-top;
1146
1147 }
1148
1149 // VRRP for routed VLAN interfaces
1150
1151 augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan/" +
1152 "oc-ip:ipv4/oc-ip:addresses/oc-ip:address" {
1153 description
1154 "Additional IP addr family configuration for
1155 interfaces";
1156
1157 uses ip-vrrp-top;
1158
1159 }
1160
1161 augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan/" +
1162 "oc-ip:ipv6/oc-ip:addresses/oc-ip:address" {
1163 description
1164 "Additional IP addr family configuration for
1165 interfaces";
1166
1167 uses ip-vrrp-top;
1168
1169 }
1170
1171 augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan/" +
1172 "oc-ip:ipv6/oc-ip:addresses/oc-ip:address/vrrp/vrrp-group/config" {
1173 description
1174 "Additional VRRP data for IPv6 interfaces";
1175
1176 uses ip-vrrp-ipv6-config;
1177 }
1178
1179
1180 augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan/" +
1181 "oc-ip:ipv6/oc-ip:addresses/oc-ip:address/vrrp/vrrp-group/state" {
1182 description
1183 "Additional VRRP data for IPv6 interfaces";
1184
1185 uses ip-vrrp-ipv6-state;
1186 }
1187
1188 // rpc statements
1189
1190 // notification statements
1191}