Adding TestVNF netconf server
[demo.git] / vnfs / TestVNF / netconftemplates / netconftemplates / ietf-ip@2014-06-16.yang
1 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
2   <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">module ietf-ip {
3   yang-version 1;
4   namespace "urn:ietf:params:xml:ns:yang:ietf-ip";
5   prefix ip;
6
7   import ietf-interfaces {
8     prefix if;
9   }
10
11   import ietf-inet-types {
12     prefix inet;
13   }
14
15   import ietf-yang-types {
16     prefix yang;
17   }
18
19   organization
20     "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
21   contact
22     "WG Web:   &lt;http://tools.ietf.org/wg/netmod/&gt;
23      WG List:  &lt;mailto:netmod@ietf.org&gt;
24
25      WG Chair: Thomas Nadeau
26             &lt;mailto:tnadeau@lucidvision.com&gt;
27
28      WG Chair: Juergen Schoenwaelder
29             &lt;mailto:j.schoenwaelder@jacobs-university.de&gt;
30
31      Editor:   Martin Bjorklund
32             &lt;mailto:mbj@tail-f.com&gt;";
33   description
34     "This module contains a collection of YANG definitions for
35      configuring IP implementations.
36
37      Copyright (c) 2014 IETF Trust and the persons identified as
38      authors of the code.  All rights reserved.
39
40      Redistribution and use in source and binary forms, with or
41      without modification, is permitted pursuant to, and subject
42      to the license terms contained in, the Simplified BSD License
43      set forth in Section 4.c of the IETF Trust's Legal Provisions
44      Relating to IETF Documents
45      (http://trustee.ietf.org/license-info).
46
47      This version of this YANG module is part of RFC 7277; see
48      the RFC itself for full legal notices.";
49
50   revision 2014-06-16 {
51     description
52       "Initial revision.";
53     reference
54       "RFC 7277: A YANG Data Model for IP Management";
55   }
56
57   feature ipv4-non-contiguous-netmasks {
58     description
59       "Indicates support for configuring non-contiguous
60        subnet masks.";
61   }
62
63   feature ipv6-privacy-autoconf {
64     description
65       "Indicates support for Privacy Extensions for Stateless Address
66        Autoconfiguration in IPv6.";
67     reference
68       "RFC 4941: Privacy Extensions for Stateless Address
69             Autoconfiguration in IPv6";
70   }
71
72   typedef ip-address-origin {
73     type enumeration {
74       enum "other" {
75         value 0;
76         description
77           "None of the following.";
78       }
79       enum "static" {
80         value 1;
81         description
82           "Indicates that the address has been statically
83            configured - for example, using NETCONF or a Command Line
84            Interface.";
85       }
86       enum "dhcp" {
87         value 2;
88         description
89           "Indicates an address that has been assigned to this
90            system by a DHCP server.";
91       }
92       enum "link-layer" {
93         value 3;
94         description
95           "Indicates an address created by IPv6 stateless
96            autoconfiguration that embeds a link-layer address in its
97            interface identifier.";
98       }
99       enum "random" {
100         value 4;
101         description
102           "Indicates an address chosen by the system at
103
104            random, e.g., an IPv4 address within 169.254/16, an
105            RFC 4941 temporary address, or an RFC 7217 semantically
106            opaque address.";
107         reference
108           "RFC 4941: Privacy Extensions for Stateless Address
109                 Autoconfiguration in IPv6
110            RFC 7217: A Method for Generating Semantically Opaque
111                 Interface Identifiers with IPv6 Stateless
112                 Address Autoconfiguration (SLAAC)";
113       }
114     }
115     description
116       "The origin of an address.";
117   }
118
119   typedef neighbor-origin {
120     type enumeration {
121       enum "other" {
122         value 0;
123         description
124           "None of the following.";
125       }
126       enum "static" {
127         value 1;
128         description
129           "Indicates that the mapping has been statically
130            configured - for example, using NETCONF or a Command Line
131            Interface.";
132       }
133       enum "dynamic" {
134         value 2;
135         description
136           "Indicates that the mapping has been dynamically resolved
137            using, e.g., IPv4 ARP or the IPv6 Neighbor Discovery
138            protocol.";
139       }
140     }
141     description
142       "The origin of a neighbor entry.";
143   }
144
145   augment "/if:interfaces/if:interface" {
146     description
147       "Parameters for configuring IP on interfaces.
148
149        If an interface is not capable of running IP, the server
150        must not allow the client to configure these parameters.";
151     container ipv4 {
152       presence "Enables IPv4 unless the 'enabled' leaf
153        (which defaults to 'true') is set to 'false'";
154       description
155         "Parameters for the IPv4 address family.";
156       leaf enabled {
157         type boolean;
158         default "true";
159         description
160           "Controls whether IPv4 is enabled or disabled on this
161            interface.  When IPv4 is enabled, this interface is
162            connected to an IPv4 stack, and the interface can send
163            and receive IPv4 packets.";
164       }
165
166       leaf forwarding {
167         type boolean;
168         default "false";
169         description
170           "Controls IPv4 packet forwarding of datagrams received by,
171            but not addressed to, this interface.  IPv4 routers
172            forward datagrams.  IPv4 hosts do not (except those
173            source-routed via the host).";
174       }
175
176       leaf mtu {
177         type uint16 {
178           range "68..max";
179         }
180         units "octets";
181         description
182           "The size, in octets, of the largest IPv4 packet that the
183            interface will send and receive.
184
185            The server may restrict the allowed values for this leaf,
186            depending on the interface's type.
187
188            If this leaf is not configured, the operationally used MTU
189            depends on the interface's type.";
190         reference
191           "RFC 791: Internet Protocol";
192       }
193
194       list address {
195         key "ip";
196         description
197           "The list of configured IPv4 addresses on the interface.";
198         leaf ip {
199           type inet:ipv4-address-no-zone;
200           description
201             "The IPv4 address on the interface.";
202         }
203
204         choice subnet {
205           mandatory true;
206           description
207             "The subnet can be specified as a prefix-length, or,
208              if the server supports non-contiguous netmasks, as
209              a netmask.";
210           leaf prefix-length {
211             type uint8 {
212               range "0..32";
213             }
214             description
215               "The length of the subnet prefix.";
216           }
217
218           leaf netmask {
219             if-feature "ipv4-non-contiguous-netmasks";
220             type yang:dotted-quad;
221             description
222               "The subnet specified as a netmask.";
223           }
224         }
225       }
226
227       list neighbor {
228         key "ip";
229         description
230           "A list of mappings from IPv4 addresses to
231            link-layer addresses.
232
233            Entries in this list are used as static entries in the
234            ARP Cache.";
235         reference
236           "RFC 826: An Ethernet Address Resolution Protocol";
237         leaf ip {
238           type inet:ipv4-address-no-zone;
239           description
240             "The IPv4 address of the neighbor node.";
241         }
242
243         leaf link-layer-address {
244           type yang:phys-address;
245           mandatory true;
246           description
247             "The link-layer address of the neighbor node.";
248         }
249       }
250     }
251
252     container ipv6 {
253       presence "Enables IPv6 unless the 'enabled' leaf
254        (which defaults to 'true') is set to 'false'";
255       description
256         "Parameters for the IPv6 address family.";
257       leaf enabled {
258         type boolean;
259         default "true";
260         description
261           "Controls whether IPv6 is enabled or disabled on this
262            interface.  When IPv6 is enabled, this interface is
263            connected to an IPv6 stack, and the interface can send
264            and receive IPv6 packets.";
265       }
266
267       leaf forwarding {
268         type boolean;
269         default "false";
270         description
271           "Controls IPv6 packet forwarding of datagrams received by,
272            but not addressed to, this interface.  IPv6 routers
273            forward datagrams.  IPv6 hosts do not (except those
274            source-routed via the host).";
275         reference
276           "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
277                 Section 6.2.1, IsRouter";
278       }
279
280       leaf mtu {
281         type uint32 {
282           range "1280..max";
283         }
284         units "octets";
285         description
286           "The size, in octets, of the largest IPv6 packet that the
287            interface will send and receive.
288
289            The server may restrict the allowed values for this leaf,
290            depending on the interface's type.
291
292            If this leaf is not configured, the operationally used MTU
293            depends on the interface's type.";
294         reference
295           "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
296                 Section 5";
297       }
298
299       list address {
300         key "ip";
301         description
302           "The list of configured IPv6 addresses on the interface.";
303         leaf ip {
304           type inet:ipv6-address-no-zone;
305           description
306             "The IPv6 address on the interface.";
307         }
308
309         leaf prefix-length {
310           type uint8 {
311             range "0..128";
312           }
313           mandatory true;
314           description
315             "The length of the subnet prefix.";
316         }
317       }
318
319       list neighbor {
320         key "ip";
321         description
322           "A list of mappings from IPv6 addresses to
323            link-layer addresses.
324
325            Entries in this list are used as static entries in the
326            Neighbor Cache.";
327         reference
328           "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)";
329         leaf ip {
330           type inet:ipv6-address-no-zone;
331           description
332             "The IPv6 address of the neighbor node.";
333         }
334
335         leaf link-layer-address {
336           type yang:phys-address;
337           mandatory true;
338           description
339             "The link-layer address of the neighbor node.";
340         }
341       }
342
343       leaf dup-addr-detect-transmits {
344         type uint32;
345         default "1";
346         description
347           "The number of consecutive Neighbor Solicitation messages
348            sent while performing Duplicate Address Detection on a
349            tentative address.  A value of zero indicates that
350            Duplicate Address Detection is not performed on
351            tentative addresses.  A value of one indicates a single
352            transmission with no follow-up retransmissions.";
353         reference
354           "RFC 4862: IPv6 Stateless Address Autoconfiguration";
355       }
356
357       container autoconf {
358         description
359           "Parameters to control the autoconfiguration of IPv6
360            addresses, as described in RFC 4862.";
361         reference
362           "RFC 4862: IPv6 Stateless Address Autoconfiguration";
363         leaf create-global-addresses {
364           type boolean;
365           default "true";
366           description
367             "If enabled, the host creates global addresses as
368              described in RFC 4862.";
369           reference
370             "RFC 4862: IPv6 Stateless Address Autoconfiguration
371                 Section 5.5";
372         }
373
374         leaf create-temporary-addresses {
375           if-feature "ipv6-privacy-autoconf";
376           type boolean;
377           default "false";
378           description
379             "If enabled, the host creates temporary addresses as
380              described in RFC 4941.";
381           reference
382             "RFC 4941: Privacy Extensions for Stateless Address
383                 Autoconfiguration in IPv6";
384         }
385
386         leaf temporary-valid-lifetime {
387           if-feature "ipv6-privacy-autoconf";
388           type uint32;
389           units "seconds";
390           default "604800";
391           description
392             "The time period during which the temporary address
393              is valid.";
394           reference
395             "RFC 4941: Privacy Extensions for Stateless Address
396                 Autoconfiguration in IPv6
397                 - TEMP_VALID_LIFETIME";
398         }
399
400         leaf temporary-preferred-lifetime {
401           if-feature "ipv6-privacy-autoconf";
402           type uint32;
403           units "seconds";
404           default "86400";
405           description
406             "The time period during which the temporary address is
407              preferred.";
408           reference
409             "RFC 4941: Privacy Extensions for Stateless Address
410                 Autoconfiguration in IPv6
411                 - TEMP_PREFERRED_LIFETIME";
412         }
413       }
414     }
415   }
416
417   augment "/if:interfaces-state/if:interface" {
418     description
419       "Data nodes for the operational state of IP on interfaces.";
420     container ipv4 {
421       presence "Present if IPv4 is enabled on this interface";
422       config false;
423       description
424         "Interface-specific parameters for the IPv4 address family.";
425       leaf forwarding {
426         type boolean;
427         description
428           "Indicates whether IPv4 packet forwarding is enabled or
429            disabled on this interface.";
430       }
431
432       leaf mtu {
433         type uint16 {
434           range "68..max";
435         }
436         units "octets";
437         description
438           "The size, in octets, of the largest IPv4 packet that the
439            interface will send and receive.";
440         reference
441           "RFC 791: Internet Protocol";
442       }
443
444       list address {
445         key "ip";
446         description
447           "The list of IPv4 addresses on the interface.";
448         leaf ip {
449           type inet:ipv4-address-no-zone;
450           description
451             "The IPv4 address on the interface.";
452         }
453
454         choice subnet {
455           description
456             "The subnet can be specified as a prefix-length, or,
457              if the server supports non-contiguous netmasks, as
458              a netmask.";
459           leaf prefix-length {
460             type uint8 {
461               range "0..32";
462             }
463             description
464               "The length of the subnet prefix.";
465           }
466
467           leaf netmask {
468             if-feature "ipv4-non-contiguous-netmasks";
469             type yang:dotted-quad;
470             description
471               "The subnet specified as a netmask.";
472           }
473         }
474
475         leaf origin {
476           type ip-address-origin;
477           description
478             "The origin of this address.";
479         }
480       }
481
482       list neighbor {
483         key "ip";
484         description
485           "A list of mappings from IPv4 addresses to
486            link-layer addresses.
487
488            This list represents the ARP Cache.";
489         reference
490           "RFC 826: An Ethernet Address Resolution Protocol";
491         leaf ip {
492           type inet:ipv4-address-no-zone;
493           description
494             "The IPv4 address of the neighbor node.";
495         }
496
497         leaf link-layer-address {
498           type yang:phys-address;
499           description
500             "The link-layer address of the neighbor node.";
501         }
502
503         leaf origin {
504           type neighbor-origin;
505           description
506             "The origin of this neighbor entry.";
507         }
508       }
509     }
510
511     container ipv6 {
512       presence "Present if IPv6 is enabled on this interface";
513       config false;
514       description
515         "Parameters for the IPv6 address family.";
516       leaf forwarding {
517         type boolean;
518         default "false";
519         description
520           "Indicates whether IPv6 packet forwarding is enabled or
521            disabled on this interface.";
522         reference
523           "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
524                 Section 6.2.1, IsRouter";
525       }
526
527       leaf mtu {
528         type uint32 {
529           range "1280..max";
530         }
531         units "octets";
532         description
533           "The size, in octets, of the largest IPv6 packet that the
534            interface will send and receive.";
535         reference
536           "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
537                 Section 5";
538       }
539
540       list address {
541         key "ip";
542         description
543           "The list of IPv6 addresses on the interface.";
544         leaf ip {
545           type inet:ipv6-address-no-zone;
546           description
547             "The IPv6 address on the interface.";
548         }
549
550         leaf prefix-length {
551           type uint8 {
552             range "0..128";
553           }
554           mandatory true;
555           description
556             "The length of the subnet prefix.";
557         }
558
559         leaf origin {
560           type ip-address-origin;
561           description
562             "The origin of this address.";
563         }
564
565         leaf status {
566           type enumeration {
567             enum "preferred" {
568               value 0;
569               description
570                 "This is a valid address that can appear as the
571                  destination or source address of a packet.";
572             }
573             enum "deprecated" {
574               value 1;
575               description
576                 "This is a valid but deprecated address that should
577                  no longer be used as a source address in new
578                  communications, but packets addressed to such an
579                  address are processed as expected.";
580             }
581             enum "invalid" {
582               value 2;
583               description
584                 "This isn't a valid address, and it shouldn't appear
585                  as the destination or source address of a packet.";
586             }
587             enum "inaccessible" {
588               value 3;
589               description
590                 "The address is not accessible because the interface
591                  to which this address is assigned is not
592                  operational.";
593             }
594             enum "unknown" {
595               value 4;
596               description
597                 "The status cannot be determined for some reason.";
598             }
599             enum "tentative" {
600               value 5;
601               description
602                 "The uniqueness of the address on the link is being
603                  verified.  Addresses in this state should not be
604                  used for general communication and should only be
605                  used to determine the uniqueness of the address.";
606             }
607             enum "duplicate" {
608               value 6;
609               description
610                 "The address has been determined to be non-unique on
611                  the link and so must not be used.";
612             }
613             enum "optimistic" {
614               value 7;
615               description
616                 "The address is available for use, subject to
617                  restrictions, while its uniqueness on a link is
618                  being verified.";
619             }
620           }
621           description
622             "The status of an address.  Most of the states correspond
623              to states from the IPv6 Stateless Address
624              Autoconfiguration protocol.";
625           reference
626             "RFC 4293: Management Information Base for the
627                 Internet Protocol (IP)
628                 - IpAddressStatusTC
629              RFC 4862: IPv6 Stateless Address Autoconfiguration";
630         }
631       }
632
633       list neighbor {
634         key "ip";
635         description
636           "A list of mappings from IPv6 addresses to
637            link-layer addresses.
638
639            This list represents the Neighbor Cache.";
640         reference
641           "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)";
642         leaf ip {
643           type inet:ipv6-address-no-zone;
644           description
645             "The IPv6 address of the neighbor node.";
646         }
647
648         leaf link-layer-address {
649           type yang:phys-address;
650           description
651             "The link-layer address of the neighbor node.";
652         }
653
654         leaf origin {
655           type neighbor-origin;
656           description
657             "The origin of this neighbor entry.";
658         }
659
660         leaf is-router {
661           type empty;
662           description
663             "Indicates that the neighbor node acts as a router.";
664         }
665
666         leaf state {
667           type enumeration {
668             enum "incomplete" {
669               value 0;
670               description
671                 "Address resolution is in progress, and the link-layer
672                  address of the neighbor has not yet been
673                  determined.";
674             }
675             enum "reachable" {
676               value 1;
677               description
678                 "Roughly speaking, the neighbor is known to have been
679                  reachable recently (within tens of seconds ago).";
680             }
681             enum "stale" {
682               value 2;
683               description
684                 "The neighbor is no longer known to be reachable, but
685                  until traffic is sent to the neighbor no attempt
686                  should be made to verify its reachability.";
687             }
688             enum "delay" {
689               value 3;
690               description
691                 "The neighbor is no longer known to be reachable, and
692                  traffic has recently been sent to the neighbor.
693                  Rather than probe the neighbor immediately, however,
694                  delay sending probes for a short while in order to
695                  give upper-layer protocols a chance to provide
696                  reachability confirmation.";
697             }
698             enum "probe" {
699               value 4;
700               description
701                 "The neighbor is no longer known to be reachable, and
702                  unicast Neighbor Solicitation probes are being sent
703                  to verify reachability.";
704             }
705           }
706           description
707             "The Neighbor Unreachability Detection state of this
708              entry.";
709           reference
710             "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
711                 Section 7.3.2";
712         }
713       }
714     }
715   }
716 }
717 </data>
718 </rpc-reply>