1 module ietf-ipv6-unicast-routing {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing";
11 import ietf-inet-types {
15 import ietf-interfaces {
23 //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
29 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
32 "WG Web: <http://tools.ietf.org/wg/netmod/>
33 WG List: <mailto:netmod@ietf.org>
35 WG Chair: Thomas Nadeau
36 <mailto:tnadeau@lucidvision.com>
38 WG Chair: Juergen Schoenwaelder
39 <mailto:j.schoenwaelder@jacobs-university.de>
41 Editor: Ladislav Lhotka
42 <mailto:lhotka@nic.cz>";
45 "This YANG module augments the 'ietf-routing' module with basic
46 configuration and operational state data for IPv6 unicast
49 Copyright (c) 2014 IETF Trust and the persons identified as
50 authors of the code. All rights reserved.
52 Redistribution and use in source and binary forms, with or
53 without modification, is permitted pursuant to, and subject to
54 the license terms contained in, the Simplified BSD License set
55 forth in Section 4.c of the IETF Trust's Legal Provisions
56 Relating to IETF Documents
57 (http://trustee.ietf.org/license-info).
59 This version of this YANG module is part of RFC XXXX; see the
60 RFC itself for full legal notices.";
66 "RFC XXXX: A YANG Data Model for Routing Management";
71 identity ipv6-unicast {
74 "This identity represents the IPv6 unicast address family.";
77 /* Operational state data */
79 augment "/rt:routing-state/rt:routing-instance/rt:interfaces/"
82 "IPv6-specific parameters of router interfaces.";
83 container ipv6-router-advertisements {
85 "Parameters of IPv6 Router Advertisements.";
86 leaf send-advertisements {
89 "A flag indicating whether or not the router sends periodic
90 Router Advertisements and responds to Router
93 leaf max-rtr-adv-interval {
99 "The maximum time allowed between sending unsolicited
100 multicast Router Advertisements from the interface.";
102 leaf min-rtr-adv-interval {
108 "The minimum time allowed between sending unsolicited
109 multicast Router Advertisements from the interface.";
114 "The value that is placed in the 'Managed address
115 configuration' flag field in the Router Advertisement.";
117 leaf other-config-flag {
120 "The value that is placed in the 'Other configuration' flag
121 field in the Router Advertisement.";
126 "The value that is placed in MTU options sent by the
127 router. A value of zero indicates that no MTU options are
130 leaf reachable-time {
134 units "milliseconds";
136 "The value that is placed in the Reachable Time field in
137 the Router Advertisement messages sent by the router. A
138 value of zero means unspecified (by this router).";
142 units "milliseconds";
144 "The value that is placed in the Retrans Timer field in the
145 Router Advertisement messages sent by the router. A value
146 of zero means unspecified (by this router).";
151 "The value that is placed in the Cur Hop Limit field in the
152 Router Advertisement messages sent by the router. A value
153 of zero means unspecified (by this router).";
155 leaf default-lifetime {
161 "The value that is placed in the Router Lifetime field of
162 Router Advertisements sent from the interface, in seconds.
163 A value of zero indicates that the router is not to be
164 used as a default router.";
166 container prefix-list {
168 "A list of prefixes that are placed in Prefix Information
169 options in Router Advertisement messages sent from the
172 By default, these are all prefixes that the router
173 advertises via routing protocols as being on-link for the
174 interface from which the advertisement is sent.";
178 "Advertised prefix entry and its parameters.";
180 type inet:ipv6-prefix;
182 "IPv6 address prefix.";
184 leaf valid-lifetime {
188 "The value that is placed in the Valid Lifetime in the
189 Prefix Information option. The designated value of all
190 1's (0xffffffff) represents infinity.";
195 "The value that is placed in the on-link flag ('L-bit')
196 field in the Prefix Information option.";
198 leaf preferred-lifetime {
202 "The value that is placed in the Preferred Lifetime in
203 the Prefix Information option, in seconds. The
204 designated value of all 1's (0xffffffff) represents
207 leaf autonomous-flag {
210 "The value that is placed in the Autonomous Flag field
211 in the Prefix Information option.";
218 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" {
219 when "../../rt:address-family = 'v6ur:ipv6-unicast'" {
221 "This augment is valid only for IPv6 unicast.";
224 "This leaf augments an IPv6 unicast route.";
225 leaf destination-prefix {
226 type inet:ipv6-prefix;
228 "IPv6 destination prefix.";
232 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
233 + "rt:next-hop-options/rt:simple-next-hop" {
234 when "../../rt:address-family = 'v6ur:ipv6-unicast'" {
236 "This augment is valid only for IPv6 unicast.";
239 "This leaf augments the 'simple-next-hop' case of IPv6 unicast
242 type inet:ipv6-address;
244 "IPv6 address of the next-hop.";
248 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
249 + "rt:next-hop-options/rt:next-hop-list/rt:next-hop-list/"
251 when "../../../../rt:address-family = 'v6ur:ipv6-unicast'" {
253 "This augment is valid only for IPv6 unicast.";
255 if-feature rt:multipath-routes;
257 "This leaf augments the 'next-hop-list' case of IPv6 unicast
260 type inet:ipv6-address;
262 "IPv6 address of the next-hop.";
266 /* Configuration data */
269 "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface" {
270 when "/if:interfaces/if:interface[if:name=current()/rt:name]/"
271 + "ip:ipv6/ip:enabled='true'" {
273 "This augment is only valid for router interfaces with
277 "Configuration of IPv6-specific parameters of router
279 container ipv6-router-advertisements {
281 "Configuration of IPv6 Router Advertisements.";
282 leaf send-advertisements {
286 "A flag indicating whether or not the router sends periodic
287 Router Advertisements and responds to Router
290 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
291 AdvSendAdvertisements.";
293 leaf max-rtr-adv-interval {
300 "The maximum time allowed between sending unsolicited
301 multicast Router Advertisements from the interface.";
303 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
306 leaf min-rtr-adv-interval {
311 must ". <= 0.75 * ../max-rtr-adv-interval" {
313 "The value MUST NOT be greater than 75 % of
314 'max-rtr-adv-interval'.";
317 "The minimum time allowed between sending unsolicited
318 multicast Router Advertisements from the interface.
320 The default value to be used operationally if this leaf is
321 not configured is determined as follows:
323 - if max-rtr-adv-interval >= 9 seconds, the default value
324 is 0.33 * max-rtr-adv-interval;
326 - otherwise it is 0.75 * max-rtr-adv-interval.";
328 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
335 "The value to be placed in the 'Managed address
336 configuration' flag field in the Router Advertisement.";
338 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
341 leaf other-config-flag {
345 "The value to be placed in the 'Other configuration' flag
346 field in the Router Advertisement.";
348 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
349 AdvOtherConfigFlag.";
355 "The value to be placed in MTU options sent by the router.
356 A value of zero indicates that no MTU options are sent.";
358 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
361 leaf reachable-time {
365 units "milliseconds";
368 "The value to be placed in the Reachable Time field in the
369 Router Advertisement messages sent by the router. A value
370 of zero means unspecified (by this router).";
372 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
377 units "milliseconds";
380 "The value to be placed in the Retrans Timer field in the
381 Router Advertisement messages sent by the router. A value
382 of zero means unspecified (by this router).";
384 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
390 "The value to be placed in the Cur Hop Limit field in the
391 Router Advertisement messages sent by the router. A value
392 of zero means unspecified (by this router).
394 If this parameter is not configured, the device SHOULD use
395 the value specified in IANA Assigned Numbers that was in
396 effect at the time of implementation.";
398 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
402 http://www.iana.org/assignments/ip-parameters";
404 leaf default-lifetime {
410 "The value to be placed in the Router Lifetime field of
411 Router Advertisements sent from the interface, in seconds.
412 It MUST be either zero or between max-rtr-adv-interval and
413 9000 seconds. A value of zero indicates that the router is
414 not to be used as a default router. These limits may be
415 overridden by specific documents that describe how IPv6
416 operates over different link layers.
418 If this parameter is not configured, the device SHOULD use
419 a value of 3 * max-rtr-adv-interval.";
421 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
422 AdvDefaultLifeTime.";
424 container prefix-list {
426 "Configuration of prefixes to be placed in Prefix
427 Information options in Router Advertisement messages sent
430 Prefixes that are advertised by default but do not have
431 their entries in the child 'prefix' list are advertised
432 with the default values of all parameters.
434 The link-local prefix SHOULD NOT be included in the list
435 of advertised prefixes.";
437 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
442 "Configuration of an advertised prefix entry.";
444 type inet:ipv6-prefix;
446 "IPv6 address prefix.";
448 choice control-adv-prefixes {
451 "The prefix either may be explicitly removed from the
452 set of advertised prefixes, or parameters with which
453 it is advertised may be specified (default case).";
457 "The prefix will not be advertised.
459 This can be used for removing the prefix from the
460 default set of advertised prefixes.";
463 leaf valid-lifetime {
468 "The value to be placed in the Valid Lifetime in
469 the Prefix Information option. The designated
470 value of all 1's (0xffffffff) represents
473 "RFC 4861: Neighbor Discovery for IP version 6
474 (IPv6) - AdvValidLifetime.";
480 "The value to be placed in the on-link flag
481 ('L-bit') field in the Prefix Information
484 "RFC 4861: Neighbor Discovery for IP version 6
485 (IPv6) - AdvOnLinkFlag.";
487 leaf preferred-lifetime {
490 must ". <= ../valid-lifetime" {
492 "This value MUST NOT be greater than
497 "The value to be placed in the Preferred Lifetime
498 in the Prefix Information option. The designated
499 value of all 1's (0xffffffff) represents
502 "RFC 4861: Neighbor Discovery for IP version 6
503 (IPv6) - AdvPreferredLifetime.";
505 leaf autonomous-flag {
509 "The value to be placed in the Autonomous Flag
510 field in the Prefix Information option.";
512 "RFC 4861: Neighbor Discovery for IP version 6
513 (IPv6) - AdvAutonomousFlag.";
522 //NOTE - added same augmentation for operational state
524 augment "/rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/rt:static-routes" {
526 "This augment defines the configuration of the 'static'
527 pseudo-protocol with data specific to IPv6 unicast.";
530 "Configuration of a 'static' pseudo-protocol instance
531 consists of a list of routes.";
536 "A user-ordered list of static routes.";
539 //WARNING - range changed from 1..max to be mappable on vpp table ids
543 "Unique numeric identifier of the route.
545 This value is unrelated to system-assigned 'id'
546 parameters of routes in RIBs.";
551 "Textual description of the route.";
553 leaf destination-prefix {
554 type inet:ipv6-prefix;
557 "IPv6 destination prefix.";
559 choice next-hop-options {
562 "Options for expressing the next-hop in static routes.";
563 case special-next-hop {
564 //WARNING - changed, see ietf-routing.yang
565 uses rt:special-next-hop-grouping;
567 case simple-next-hop {
569 type inet:ipv6-address;
571 "IPv6 address of the next-hop.";
573 //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
574 leaf outgoing-interface {
576 path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
580 "Name of the outgoing interface.
582 Only interfaces configured for the ancestor routing
583 instance can be given.";
587 if-feature rt:multipath-routes;
588 container next-hop-list {
590 "Configuration of multiple next-hops.";
594 "An entry of a next-hop list.";
598 "Unique numeric identifier of the entry.
600 This value is unrelated to system-assigned 'id'
601 parameters of next-hops in RIBs.";
604 type inet:ipv6-address;
606 "IPv6 address of the next-hop.";
608 //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
609 leaf outgoing-interface {
611 path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
615 "Name of the outgoing interface.
617 Only interfaces configured for the ancestor
618 routing instance can be given.";
620 uses rt:next-hop-classifiers {
633 //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
634 container vpp-ipv6-route-state{
635 uses vpp-r:vpp-routing-state-attributes;
641 augment "/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/rt:static-routes" {
643 "This augment defines the configuration of the 'static'
644 pseudo-protocol with data specific to IPv6 unicast.";
647 "Configuration of a 'static' pseudo-protocol instance
648 consists of a list of routes.";
653 "A user-ordered list of static routes.";
656 //WARNING - range changed from 1..max to be mappable on vpp table ids
660 "Unique numeric identifier of the route.
662 This value is unrelated to system-assigned 'id'
663 parameters of routes in RIBs.";
668 "Textual description of the route.";
670 leaf destination-prefix {
671 type inet:ipv6-prefix;
674 "IPv6 destination prefix.";
676 choice next-hop-options {
679 "Options for expressing the next-hop in static routes.";
680 case special-next-hop {
681 //WARNING - changed, see ietf-routing.yang
682 uses rt:special-next-hop-grouping;
684 case simple-next-hop {
686 type inet:ipv6-address;
688 "IPv6 address of the next-hop.";
690 //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
691 leaf outgoing-interface {
693 path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
697 "Name of the outgoing interface.
699 Only interfaces configured for the ancestor routing
700 instance can be given.";
704 if-feature rt:multipath-routes;
705 container next-hop-list {
707 "Configuration of multiple next-hops.";
711 "An entry of a next-hop list.";
715 "Unique numeric identifier of the entry.
717 This value is unrelated to system-assigned 'id'
718 parameters of next-hops in RIBs.";
721 type inet:ipv6-address;
723 "IPv6 address of the next-hop.";
725 //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
726 leaf outgoing-interface {
728 path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
732 "Name of the outgoing interface.
734 Only interfaces configured for the ancestor
735 routing instance can be given.";
737 uses rt:next-hop-classifiers {
750 //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
751 container vpp-ipv6-route{
752 uses vpp-r:vpp-routing-attributes;
760 augment "/rt:active-route/rt:input/rt:destination-address" {
761 when "rt:address-family='v6ur:ipv6-unicast'" {
763 "This augment is valid only for IPv6 unicast.";
766 "This leaf augments the 'rt:destination-address' parameter of
767 the 'rt:active-route' operation.";
769 type inet:ipv6-address;
771 "IPv6 destination address.";
775 augment "/rt:active-route/rt:output/rt:route" {
776 when "rt:address-family='v6ur:ipv6-unicast'" {
778 "This augment is valid only for IPv6 unicast.";
781 "This leaf augments the reply to the 'rt:active-route'
783 leaf destination-prefix {
784 type inet:ipv6-prefix;
786 "IPv6 destination prefix.";
790 augment "/rt:active-route/rt:output/rt:route/rt:next-hop-options/"
791 + "rt:simple-next-hop" {
792 when "rt:address-family='v6ur:ipv6-unicast'" {
794 "This augment is valid only for IPv6 unicast.";
797 "This leaf augments the 'simple-next-hop' case in the reply to
798 the 'rt:active-route' operation.";
800 type inet:ipv6-address;
802 "IPv6 address of the next-hop.";
806 augment "/rt:active-route/rt:output/rt:route/rt:next-hop-options/"
807 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" {
808 when "../../rt:address-family='v6ur:ipv6-unicast'" {
810 "This augment is valid only for IPv6 unicast.";
812 if-feature rt:multipath-routes;
814 "This leaf augments the 'next-hop-list' case in the reply to
815 the 'rt:active-route' operation.";
817 type inet:ipv6-address;
819 "IPv6 address of the next-hop.";