A YANG Data Model for Routing Management
draft-ietf-netmod-routing-cfg-10
The information below is for an old version of the document.
Document | Type |
This is an older version of an Internet-Draft that was ultimately published as RFC 8022.
|
|
---|---|---|---|
Author | Ladislav Lhotka | ||
Last updated | 2013-07-13 | ||
Replaces | draft-lhotka-netmod-routing-cfg | ||
RFC stream | Internet Engineering Task Force (IETF) | ||
Formats | |||
Reviews |
GENART Last Call review
(of
-24)
by Brian Carpenter
Ready w/issues
GENART Last Call review
(of
-24)
by Brian Carpenter
Ready w/issues
|
||
Additional resources | Mailing list discussion | ||
Stream | WG state | WG Document | |
Document shepherd | Jürgen Schönwälder | ||
IESG | IESG state | Became RFC 8022 (Proposed Standard) | |
Consensus boilerplate | Unknown | ||
Telechat date | (None) | ||
Responsible AD | (None) | ||
Send notices to | (None) |
draft-ietf-netmod-routing-cfg-10
Internet-Draft YANG Routing Management July 2013 } } augment "/rt:active-route/rt:output/rt:route" { when "rt:address-family='ipv4' and rt:safi='nlri-unicast'" { description "This augment is valid only for IPv4 unicast."; } description "Contents of the reply to 'rt:active-route' operation."; uses route-content; } /* Operational state */ augment "/rt:routing-state/rt:routing-tables/rt:routing-table/" + "rt:routes/rt:route" { when "../../rt:address-family = 'ipv4' and ../../rt:safi = " + "'nlri-unicast'" { description "This augment is valid only for IPv4 unicast."; } description "This augment defines the content of IPv4 unicast routes."; uses route-content; } /* Configuration */ augment "/rt:routing/rt:router/rt:routing-protocols/" + "rt:routing-protocol/rt:static-routes" { description "This augment defines the configuration of the 'static' pseudo-protocol with data specific for IPv4 unicast."; container ipv4 { description "Configuration of a 'static' pseudo-protocol instance consists of a list of routes."; list route { key "id"; ordered-by "user"; description "A user-ordered list of static routes."; leaf id { type uint32 { range "1..max"; } description Lhotka Expires January 14, 2014 [Page 44] Internet-Draft YANG Routing Management July 2013 "Numeric identifier of the route. It is not required that the routes be sorted by their 'id'. "; } leaf description { type string; description "Textual description of the route."; } uses rt:route-content; uses route-content { refine "dest-prefix" { mandatory "true"; } } } } } } <CODE ENDS> Lhotka Expires January 14, 2014 [Page 45] Internet-Draft YANG Routing Management July 2013 8. IPv6 Unicast Routing YANG Module RFC Ed.: In this section, replace all occurrences of 'XXXX' with the actual RFC number and all occurrences of the revision date below with the date of RFC publication (and remove this note). <CODE BEGINS> file "ietf-ipv6-unicast-routing@2013-07-13.yang" module ietf-ipv6-unicast-routing { namespace "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing"; prefix "v6ur"; import ietf-routing { prefix "rt"; } import ietf-inet-types { prefix "inet"; } import ietf-interfaces { prefix "if"; } import ietf-ip { prefix "ip"; } organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: <http://tools.ietf.org/wg/netmod/> WG List: <mailto:netmod@ietf.org> WG Chair: David Kessens <mailto:david.kessens@nsn.com> WG Chair: Juergen Schoenwaelder <mailto:j.schoenwaelder@jacobs-university.de> Editor: Ladislav Lhotka <mailto:lhotka@nic.cz> "; description Lhotka Expires January 14, 2014 [Page 46] Internet-Draft YANG Routing Management July 2013 "This YANG module augments the 'ietf-routing' module with basic configuration and operational state data for IPv6 unicast routing. Copyright (c) 2013 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices. "; revision 2013-07-13 { description "Initial revision."; reference "RFC XXXX: A YANG Data Model for Routing Management"; } /* Groupings */ grouping route-content { description "Specific parameters of IPv6 unicast routes."; leaf dest-prefix { type inet:ipv6-prefix; description "IPv6 destination prefix."; } leaf next-hop { type inet:ipv6-address; description "IPv6 address of the next hop."; } } /* RPC Methods */ augment "/rt:active-route/rt:input/rt:destination-address" { when "rt:address-family='ipv6' and rt:safi='nlri-unicast'" { description "This augment is valid only for IPv6 unicast."; Lhotka Expires January 14, 2014 [Page 47] Internet-Draft YANG Routing Management July 2013 } description "The 'address' leaf augments the 'rt:destination-address' parameter of the 'rt:active-route' operation."; leaf address { type inet:ipv6-address; description "IPv6 destination address."; } } augment "/rt:active-route/rt:output/rt:route" { when "rt:address-family='ipv6' and rt:safi='nlri-unicast'" { description "This augment is valid only for IPv6 unicast."; } description "Contents of the reply to 'rt:active-route' operation."; uses route-content; } /* Operational state data */ augment "/rt:routing-state/rt:router/rt:interfaces/rt:interface" { when "/if:interfaces/if:interface[if:name=current()/rt:name]/" + "ip:ipv6/ip:enabled='true'" { description "This augment is only valid for router interfaces with enabled IPv6."; } description "IPv6-specific parameters of router interfaces."; container ipv6-router-advertisements { description "Parameters of IPv6 Router Advertisements."; leaf send-advertisements { type boolean; default "false"; description "A flag indicating whether or not the router sends periodic Router Advertisements and responds to Router Solicitations."; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvSendAdvertisements."; } leaf max-rtr-adv-interval { type uint16 { Lhotka Expires January 14, 2014 [Page 48] Internet-Draft YANG Routing Management July 2013 range "4..1800"; } units "seconds"; default "600"; description "The maximum time allowed between sending unsolicited multicast Router Advertisements from the interface."; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - MaxRtrAdvInterval."; } leaf min-rtr-adv-interval { type uint16 { range "3..1350"; } units "seconds"; description "The minimum time allowed between sending unsolicited multicast Router Advertisements from the interface. The default value to be used operationally if this leaf is not configured is determined as follows: - if max-rtr-adv-interval >= 9 seconds, the default value is 0.33 * max-rtr-adv-interval; - otherwise it is 0.75 * max-rtr-adv-interval. "; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - MinRtrAdvInterval."; } leaf managed-flag { type boolean; default "false"; description "The boolean value to be placed in the 'Managed address configuration' flag field in the Router Advertisement."; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvManagedFlag."; } leaf other-config-flag { type boolean; default "false"; description "The boolean value to be placed in the 'Other configuration' flag field in the Router Advertisement."; Lhotka Expires January 14, 2014 [Page 49] Internet-Draft YANG Routing Management July 2013 reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvOtherConfigFlag."; } leaf link-mtu { type uint32; default "0"; description "The value to be placed in MTU options sent by the router. A value of zero indicates that no MTU options are sent."; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvLinkMTU."; } leaf reachable-time { type uint32 { range "0..3600000"; } units "milliseconds"; default "0"; description "The value to be placed in the Reachable Time field in the Router Advertisement messages sent by the router. The value zero means unspecified (by this router)."; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvReachableTime."; } leaf retrans-timer { type uint32; units "milliseconds"; default "0"; description "The value to be placed in the Retrans Timer field in the Router Advertisement messages sent by the router. The value zero means unspecified (by this router)."; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvRetransTimer."; } leaf cur-hop-limit { type uint8; default "64"; description "The default value to be placed in the Cur Hop Limit field in the Router Advertisement messages sent by the router. The value should be set to the current diameter of the Internet. The value zero means unspecified (by this Lhotka Expires January 14, 2014 [Page 50] Internet-Draft YANG Routing Management July 2013 router). The default SHOULD be set to the value specified in IANA Assigned Numbers that was in effect at the time of implementation. "; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvCurHopLimit. IANA: IP Parameters, http://www.iana.org/assignments/ip-parameters "; } leaf default-lifetime { type uint16 { range "0..9000"; } units "seconds"; description "The value to be placed in the Router Lifetime field of Router Advertisements sent from the interface, in seconds. MUST be either zero or between max-rtr-adv-interval and 9000 seconds. A value of zero indicates that the router is not to be used as a default router. These limits may be overridden by specific documents that describe how IPv6 operates over different link layers. If this parameter is not configured, a value of 3 * max-rtr-adv-interval SHOULD be used. "; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvDefaultLifeTime."; } container prefix-list { description "A list of prefixes that are placed in Prefix Information options in Router Advertisement messages sent from the interface. By default, these are all prefixes that the router advertises via routing protocols as being on-link for the interface from which the advertisement is sent. The link-local prefix SHOULD NOT be included in the list of advertised prefixes. "; Lhotka Expires January 14, 2014 [Page 51] Internet-Draft YANG Routing Management July 2013 reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvPrefixList."; list prefix { key "prefix-spec"; description "Advertised prefix entry with parameters."; leaf prefix-spec { type inet:ipv6-prefix; description "IPv6 address prefix."; } leaf valid-lifetime { type uint32; units "seconds"; default "2592000"; description "The value to be placed in the Valid Lifetime in the Prefix Information option. The designated value of all 1's (0xffffffff) represents infinity. "; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvValidLifetime."; } leaf on-link-flag { type boolean; default "true"; description "The value to be placed in the on-link flag ('L-bit') field in the Prefix Information option."; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvOnLinkFlag."; } leaf preferred-lifetime { type uint32; units "seconds"; default "604800"; description "The value to be placed in the Preferred Lifetime in the Prefix Information option, in seconds. The designated value of all 1's (0xffffffff) represents infinity."; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvPreferredLifetime."; } Lhotka Expires January 14, 2014 [Page 52] Internet-Draft YANG Routing Management July 2013 leaf autonomous-flag { type boolean; default "true"; description "The value to be placed in the Autonomous Flag field in the Prefix Information option."; reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - AdvAutonomousFlag."; } } } } } augment "/rt:routing-state/rt:routing-tables/rt:routing-table/" + "rt:routes/rt:route" { when "../../rt:address-family = 'ipv6' and ../../rt:safi = " + "'nlri-unicast'" { description "This augment is valid only for IPv6 unicast."; } description "This augment defines the content of IPv6 unicast routes."; uses route-content; } /* Configuration */ augment "/rt:routing/rt:router/rt:interfaces/rt:interface" { when "/if:interfaces/if:interface[if:name=current()/rt:name]/" + "ip:ipv6/ip:enabled='true'" { description "This augment is only valid for router interfaces with enabled IPv6."; } description "Configuration of IPv6-specific parameters of router interfaces."; container ipv6-router-advertisements { description "Configuration of IPv6 Router Advertisements. See the corresponding parameters under /rt:routing-state for detailed descriptions and references. "; leaf send-advertisements { type boolean; Lhotka Expires January 14, 2014 [Page 53] Internet-Draft YANG Routing Management July 2013 default "false"; description "A flag indicating whether or not the router sends periodic Router Advertisements and responds to Router Solicitations."; } leaf max-rtr-adv-interval { type uint16 { range "4..1800"; } units "seconds"; default "600"; description "The maximum time allowed between sending unsolicited multicast Router Advertisements from the interface."; } leaf min-rtr-adv-interval { type uint16 { range "3..1350"; } units "seconds"; must ". <= 0.75 * ../max-rtr-adv-interval" { description "The value MUST NOT be greater than 75 % of 'max-rtr-adv-interval'."; } description "The minimum time allowed between sending unsolicited multicast Router Advertisements from the interface. "; } leaf managed-flag { type boolean; default "false"; description "The boolean value to be placed in the 'Managed address configuration' flag field in the Router Advertisement."; } leaf other-config-flag { type boolean; default "false"; description "The boolean value to be placed in the 'Other configuration' flag field in the Router Advertisement."; } leaf link-mtu { type uint32; default "0"; Lhotka Expires January 14, 2014 [Page 54] Internet-Draft YANG Routing Management July 2013 description "The value to be placed in MTU options sent by the router. A value of zero indicates that no MTU options are sent."; } leaf reachable-time { type uint32 { range "0..3600000"; } units "milliseconds"; default "0"; description "The value to be placed in the Reachable Time field in the Router Advertisement messages sent by the router. The value zero means unspecified (by this router)."; } leaf retrans-timer { type uint32; units "milliseconds"; default "0"; description "The value to be placed in the Retrans Timer field in the Router Advertisement messages sent by the router. The value zero means unspecified (by this router)."; } leaf cur-hop-limit { type uint8; default "64"; description "The default value to be placed in the Cur Hop Limit field in the Router Advertisement messages sent by the router. "; } leaf default-lifetime { type uint16 { range "0..9000"; } units "seconds"; description "The value to be placed in the Router Lifetime field of Router Advertisements sent from the interface, in seconds. "; } container prefix-list { description "Configuration of prefixes to be placed in Prefix Information options in Router Advertisement messages sent from the interface. Lhotka Expires January 14, 2014 [Page 55] Internet-Draft YANG Routing Management July 2013 Prefixes that are advertised by default but do not have their entries in the child 'prefix' list are advertised with the default values of all parameters. "; list prefix { key "prefix-spec"; description "Advertised prefix entry."; leaf prefix-spec { type inet:ipv6-prefix; description "IPv6 address prefix."; } choice control-adv-prefixes { default "advertise"; description "The prefix either may be explicitly removed from the set of advertised prefixes, or parameters with which it is advertised may be specified (default case)."; leaf no-advertise { type empty; description "The prefix will not be advertised. This can be used for removing the prefix from the default set of advertised prefixes. "; } case advertise { leaf valid-lifetime { type uint32; units "seconds"; default "2592000"; description "The value to be placed in the Valid Lifetime in the Prefix Information option."; } leaf on-link-flag { type boolean; default "true"; description "The value to be placed in the on-link flag ('L-bit') field in the Prefix Information option."; } leaf preferred-lifetime { type uint32; units "seconds"; Lhotka Expires January 14, 2014 [Page 56] Internet-Draft YANG Routing Management July 2013 must ". <= ../valid-lifetime" { description "This value MUST NOT be greater than valid-lifetime."; } default "604800"; description "The value to be placed in the Preferred Lifetime in the Prefix Information option."; } leaf autonomous-flag { type boolean; default "true"; description "The value to be placed in the Autonomous Flag field in the Prefix Information option."; } } } } } } } augment "/rt:routing/rt:router/rt:routing-protocols/" + "rt:routing-protocol/rt:static-routes" { description "This augment defines the configuration of the 'static' pseudo-protocol with data specific for IPv6 unicast."; container ipv6 { description "Configuration of a 'static' pseudo-protocol instance consists of a list of routes."; list route { key "id"; ordered-by "user"; description "A user-ordered list of static routes."; leaf id { type uint32 { range "1..max"; } description "Numeric identifier of the route. It is not required that the routes be sorted by their 'id'. "; Lhotka Expires January 14, 2014 [Page 57] Internet-Draft YANG Routing Management July 2013 } leaf description { type string; description "Textual description of the route."; } uses rt:route-content; uses route-content { refine "dest-prefix" { mandatory "true"; } } } } } } <CODE ENDS> Lhotka Expires January 14, 2014 [Page 58] Internet-Draft YANG Routing Management July 2013 9. IANA Considerations RFC Ed.: In this section, replace all occurrences of 'XXXX' with the actual RFC number (and remove this note). This document registers the following namespace URIs in the IETF XML registry [RFC3688]: ---------------------------------------------------------- URI: urn:ietf:params:xml:ns:yang:ietf-routing Registrant Contact: The IESG. XML: N/A, the requested URI is an XML namespace. ---------------------------------------------------------- ---------------------------------------------------------- URI: urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing Registrant Contact: The IESG. XML: N/A, the requested URI is an XML namespace. ---------------------------------------------------------- ---------------------------------------------------------- URI: urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing Registrant Contact: The IESG. XML: N/A, the requested URI is an XML namespace. ---------------------------------------------------------- This document registers the following YANG modules in the YANG Module Names registry [RFC6020]: Lhotka Expires January 14, 2014 [Page 59] Internet-Draft YANG Routing Management July 2013 ------------------------------------------------------------------- name: ietf-routing namespace: urn:ietf:params:xml:ns:yang:ietf-routing prefix: rt reference: RFC XXXX ------------------------------------------------------------------- ------------------------------------------------------------------- name: ietf-ipv4-unicast-routing namespace: urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing prefix: v4ur reference: RFC XXXX ------------------------------------------------------------------- ------------------------------------------------------------------- name: ietf-ipv6-unicast-routing namespace: urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing prefix: v6ur reference: RFC XXXX ------------------------------------------------------------------- Lhotka Expires January 14, 2014 [Page 60] Internet-Draft YANG Routing Management July 2013 10. Security Considerations Configuration and state data conforming to the core routing data model (defined in this document) are designed to be accessed via the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the secure transport layer and the mandatory-to-implement secure transport is SSH [RFC6242]. A number of data nodes defined in the YANG modules belonging to the configuration part of the core routing data model are writable/ creatable/deletable (i.e., "config true" in YANG terms, which is the default). These data nodes may be considered sensitive or vulnerable in some network environments. Write operations to these data nodes, such as "edit-config", can have negative effects on the network if the protocol operations are not properly protected. The vulnerable "config true" subtrees and data nodes are the following: /routing/router/interfaces/interface This list assigns a network layer interface to a router instance and may also specify interface parameters related to routing. /routing/router/routing-protocols/routing-protocol This list specifies the routing protocols configured on a device. /routing/route-filters/route-filter This list specifies the configured route filters which represent administrative policies for redistributing and modifying routing information. /routing/routing-tables/routing-table This list specifies the configured routing tables used by the device. Unauthorized access to any of these lists can adversely affect the routing subsystem of both the local device and the network. This may lead to network malfunctions, delivery of packets to inappropriate destinations and other problems. Lhotka Expires January 14, 2014 [Page 61] Internet-Draft YANG Routing Management July 2013 11. Acknowledgments The author wishes to thank Martin Bjorklund, Joel Halpern, Wes Hardaker, Andrew McGregor, Xiang Li, Thomas Morin, Tom Petch, Bruno Rijsman, Juergen Schoenwaelder, Phil Shafer, Dave Thaler and Yi Yang for their helpful comments and suggestions. Lhotka Expires January 14, 2014 [Page 62] Internet-Draft YANG Routing Management July 2013 12. References 12.1. Normative References [IANA-AF] Bjorklund, M., "IANA Address Family Numbers and Subsequent Address Family Identifiers YANG Module", draft-ietf-netmod-iana-afn-safi-00 (work in progress), July 2013. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004. [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, September 2007. [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for Network Configuration Protocol (NETCONF)", RFC 6020, September 2010. [RFC6021bis] Schoenwaelder, J., Ed., "Common YANG Data Types", draft-ietf-netmod-rfc6021-bis-03 (work in progress), May 2013. [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Bierman, "NETCONF Configuration Protocol", RFC 6241, June 2011. [YANG-IF] Bjorklund, M., "A YANG Data Model for Interface Management", draft-ietf-netmod-interfaces-cfg-12 (work in progress), July 2013. [YANG-IP] Bjorklund, M., "A YANG Data Model for IP Management", draft-ietf-netmod-ip-cfg-09 (work in progress), February 2013. 12.2. Informative References [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG Data Model Documents", RFC 6087, January 2011. [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, June 2011. Lhotka Expires January 14, 2014 [Page 63] Internet-Draft YANG Routing Management July 2013 Appendix A. The Complete Data Trees This appendix presents the complete configuration and operational state data trees of the core routing data model. See Section 2.2 for an explanation of the symbols used. Data type of every leaf node is shown near the right end of the corresponding line. A.1. Configuration Data +--rw routing +--rw router* [name] | +--rw name string | +--rw type? identityref | +--rw enabled? boolean | +--rw router-id? yang:dotted-quad | +--rw description? string | +--rw default-routing-tables | | +--rw default-routing-table* [address-family safi] | | +--rw address-family ianaaf:address-family | | +--rw safi ianaaf:subsequent-address-family | | +--rw name string | +--rw interfaces | | +--rw interface* [name] | | +--rw name if:interface-ref | | +--rw v6ur:ipv6-router-advertisements | | +--rw v6ur:send-advertisements? boolean | | +--rw v6ur:max-rtr-adv-interval? uint16 | | +--rw v6ur:min-rtr-adv-interval? uint16 | | +--rw v6ur:managed-flag? boolean | | +--rw v6ur:other-config-flag? boolean | | +--rw v6ur:link-mtu? uint32 | | +--rw v6ur:reachable-time? uint32 | | +--rw v6ur:retrans-timer? uint32 | | +--rw v6ur:cur-hop-limit? uint8 | | +--rw v6ur:default-lifetime? uint16 | | +--rw v6ur:prefix-list | | +--rw v6ur:prefix* [prefix-spec] | | +--rw v6ur:prefix-spec inet:ipv6-prefix | | +--rw (control-adv-prefixes)? | | +--:(no-advertise) | | | +--rw v6ur:no-advertise? empty | | +--:(advertise) | | +--rw v6ur:valid-lifetime? uint32 | | +--rw v6ur:on-link-flag? boolean | | +--rw v6ur:preferred-lifetime? uint32 | | +--rw v6ur:autonomous-flag? boolean Lhotka Expires January 14, 2014 [Page 64] Internet-Draft YANG Routing Management July 2013 | +--rw routing-protocols | +--rw routing-protocol* [name] | +--rw name string | +--rw description? string | +--rw enabled? boolean | +--rw type identityref | +--rw connected-routing-tables | | +--rw connected-routing-table* [name] | | +--rw name routing-table-ref | | +--rw import-filter? route-filter-ref | | +--rw export-filter? route-filter-ref | +--rw static-routes | +--rw v4ur:ipv4 | | +--rw v4ur:route* [id] | | +--rw v4ur:id uint32 | | +--rw v4ur:description? string | | +--rw v4ur:outgoing-interface? if:interface-ref | | +--rw v4ur:dest-prefix inet:ipv4-prefix | | +--rw v4ur:next-hop? inet:ipv4-address | +--rw v6ur:ipv6 | +--rw v6ur:route* [id] | +--rw v6ur:id uint32 | +--rw v6ur:description? string | +--rw v6ur:outgoing-interface? if:interface-ref | +--rw v6ur:dest-prefix inet:ipv6-prefix | +--rw v6ur:next-hop? inet:ipv6-address +--rw routing-tables | +--rw routing-table* [name] | +--rw name string | +--rw address-family ianaaf:address-family | +--rw safi ianaaf:subsequent-address-family | +--rw description? string | +--rw recipient-routing-tables | +--rw recipient-routing-table* [name] | +--rw name routing-table-ref | +--rw filter? route-filter-ref +--rw route-filters +--rw route-filter* [name] +--rw name string +--rw description? string +--rw type identityref A.2. Operational State Data +--ro routing-state +--ro router* [name] | +--ro name string | +--ro type? identityref Lhotka Expires January 14, 2014 [Page 65] Internet-Draft YANG Routing Management July 2013 | +--ro router-id? yang:dotted-quad | +--ro default-routing-tables | | +--ro default-routing-table* [address-family safi] | | +--ro address-family ianaaf:address-family | | +--ro safi ianaaf:subsequent-address-family | | +--ro name routing-table-state-ref | +--ro interfaces | | +--ro interface* [name] | | +--ro name if:interface-state-ref | | +--ro v6ur:ipv6-router-advertisements | | +--ro v6ur:send-advertisements? boolean | | +--ro v6ur:max-rtr-adv-interval? uint16 | | +--ro v6ur:min-rtr-adv-interval? uint16 | | +--ro v6ur:managed-flag? boolean | | +--ro v6ur:other-config-flag? boolean | | +--ro v6ur:link-mtu? uint32 | | +--ro v6ur:reachable-time? uint32 | | +--ro v6ur:retrans-timer? uint32 | | +--ro v6ur:cur-hop-limit? uint8 | | +--ro v6ur:default-lifetime? uint16 | | +--ro v6ur:prefix-list | | +--ro v6ur:prefix* [prefix-spec] | | +--ro v6ur:prefix-spec inet:ipv6-prefix | | +--ro v6ur:valid-lifetime? uint32 | | +--ro v6ur:on-link-flag? boolean | | +--ro v6ur:preferred-lifetime? uint32 | | +--ro v6ur:autonomous-flag? boolean | +--ro routing-protocols | +--ro routing-protocol* [name] | +--ro name string | +--ro type identityref | +--ro connected-routing-tables | +--ro connected-routing-table* [name] | +--ro name routing-table-state-ref | +--ro import-filter? route-filter-state-ref | +--ro export-filter? route-filter-state-ref +--ro routing-tables | +--ro routing-table* [name] | +--ro name string | +--ro address-family ianaaf:address-family | +--ro safi ianaaf:subsequent-address-family | +--ro routes | | +--ro route* | | +--ro outgoing-interface? if:interface-state-ref | | +--ro source-protocol identityref | | +--ro last-updated? yang:date-and-time | | +--ro v4ur:dest-prefix? inet:ipv4-prefix | | +--ro v4ur:next-hop? inet:ipv4-address Lhotka Expires January 14, 2014 [Page 66] Internet-Draft YANG Routing Management July 2013 | | +--ro v6ur:dest-prefix? inet:ipv6-prefix | | +--ro v6ur:next-hop? inet:ipv6-address | +--ro recipient-routing-tables | +--ro recipient-routing-table* [name] | +--ro name routing-table-state-ref | +--ro filter? route-filter-state-ref +--ro route-filters +--ro route-filter* [name] +--ro name string +--ro type identityref Lhotka Expires January 14, 2014 [Page 67] Internet-Draft YANG Routing Management July 2013 Appendix B. Example: Adding a New Routing Protocol This appendix demonstrates how the core routing data model can be extended to support a new routing protocol. The YANG module "example-rip" shown below is intended only as an illustration rather than a real definition of a data model for the RIP routing protocol. For the sake of brevity, we do not follow all the guidelines specified in [RFC6087]. See also Section 4.4.2. module example-rip { namespace "http://example.com/rip"; prefix "rip"; import ietf-routing { prefix "rt"; } identity rip { base rt:routing-protocol; description "Identity for the RIP routing protocol."; } typedef rip-metric { type uint8 { range "0..16"; } } grouping route-content { description "This grouping defines RIP-specific route attributes."; leaf metric { type rip-metric; } leaf tag { type uint16; default "0"; description "This leaf may be used to carry additional info, e.g. AS number."; } } augment "/rt:routing-state/rt:routing-tables/rt:routing-table/" + "rt:routes/rt:route" { Lhotka Expires January 14, 2014 [Page 68] Internet-Draft YANG Routing Management July 2013 when "rt:source-protocol = 'rip:rip'" { description "This augment is only valid for a routes whose source protocol is RIP."; } description "RIP-specific route attributes."; uses route-content; } augment "/rt:active-route/rt:output/rt:route" { description "RIP-specific route attributes in the output of 'active-route' RPC."; uses route-content; } augment "/rt:routing/rt:router/rt:routing-protocols/" + "rt:routing-protocol" { when "rt:type = 'rip:rip'" { description "This augment is only valid for a routing protocol instance of type 'rip'."; } container rip { description "RIP instance configuration."; container interfaces { description "Per-interface RIP configuration."; list interface { key "name"; description "RIP is enabled on interfaces that have an entry in this list, unless 'enabled' is set to 'false' for that entry."; leaf name { type leafref { path "../../../../../../rt:interfaces/rt:interface/" + "rt:name"; } } leaf enabled { type boolean; default "true"; } leaf metric { type rip-metric; Lhotka Expires January 14, 2014 [Page 69] Internet-Draft YANG Routing Management July 2013 default "1"; } } } leaf update-interval { type uint8 { range "10..60"; } units "seconds"; default "30"; description "Time interval between periodic updates."; } } } } Lhotka Expires January 14, 2014 [Page 70] Internet-Draft YANG Routing Management July 2013 Appendix C. Example: NETCONF <get> Reply This section contains a sample reply to the NETCONF <get> message, which could be sent by a server supporting (i.e., advertising them in the NETCONF <hello> message) the following YANG modules: o ietf-interfaces [YANG-IF], o ietf-ip [YANG-IP], o ietf-routing (Section 6), o ietf-ipv4-unicast-routing (Section 7), o ietf-ipv6-unicast-routing (Section 8). We assume a simple network setup as shown in Figure 5: router "A" uses static default routes with the "ISP" router as the next hop. IPv6 router advertisements are configured only on the "eth1" interface and disabled on the upstream "eth0" interface. +-----------------+ | | | Router ISP | | | +--------+--------+ |2001:db8:0:1::2 |192.0.2.2 | | |2001:db8:0:1::1 eth0|192.0.2.1 +--------+--------+ | | | Router A | | | +--------+--------+ eth1|198.51.100.1 |2001:db8:0:2::1 | Figure 5: Example network configuration A reply to the NETCONF <get> message sent by router "A" would then be as follows: <?xml version="1.0"?> <rpc-reply Lhotka Expires January 14, 2014 [Page 71] Internet-Draft YANG Routing Management July 2013 message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:v4ur="urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing" xmlns:v6ur="urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing" xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:ip="urn:ietf:params:xml:ns:yang:ietf-ip" xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing"> <data> <if:interfaces> <if:interface> <if:name>eth0</if:name> <if:type>ethernetCsmacd</if:type> <if:description> Uplink to ISP. </if:description> <ip:ipv4> <ip:address> <ip:ip>192.0.2.1</ip:ip> <ip:prefix-length>24</ip:prefix-length> </ip:address> <ip:forwarding>true</ip:forwarding> </ip:ipv4> <ip:ipv6> <ip:address> <ip:ip>2001:0db8:0:1::1</ip:ip> <ip:prefix-length>64</ip:prefix-length> </ip:address> <ip:forwarding>true</ip:forwarding> <ip:autoconf> <ip:create-global-addresses>false</ip:create-global-addresses> </ip:autoconf> </ip:ipv6> </if:interface> <if:interface> <if:name>eth1</if:name> <if:type>ethernetCsmacd</if:type> <if:description> Interface to the internal network. </if:description> <ip:ipv4> <ip:address> <ip:ip>198.51.100.1</ip:ip> <ip:prefix-length>24</ip:prefix-length> </ip:address> <ip:forwarding>true</ip:forwarding> </ip:ipv4> <ip:ipv6> <ip:address> Lhotka Expires January 14, 2014 [Page 72] Internet-Draft YANG Routing Management July 2013 <ip:ip>2001:0db8:0:2::1</ip:ip> <ip:prefix-length>64</ip:prefix-length> </ip:address> <ip:forwarding>true</ip:forwarding> <ip:autoconf> <ip:create-global-addresses>false</ip:create-global-addresses> </ip:autoconf> </ip:ipv6> </if:interface> </if:interfaces> <if:interfaces-state> <if:interface> <if:name>eth0</if:name> <if:type>ethernetCsmacd</if:type> <if:phys-address>00:0C:42:E5:B1:E9</if:phys-address> <if:oper-status>up</if:oper-status> <if:statistics> <if:discontinuity-time> 2013-07-02T17:11:27+00:58 </if:discontinuity-time> </if:statistics> </if:interface> <if:interface> <if:name>eth1</if:name> <if:type>ethernetCsmacd</if:type> <if:oper-status>up</if:oper-status> <if:phys-address>00:0C:42:E5:B1:EA</if:phys-address> <if:statistics> <if:discontinuity-time> 2013-07-02T17:11:27+00:59 </if:discontinuity-time> </if:statistics> </if:interface> </if:interfaces-state> <rt:routing> <rt:router> <rt:name>rtr0</rt:name> <rt:description>Router A</rt:description> <rt:interfaces> <rt:interface> <rt:name>eth1</rt:name> <v6ur:ipv6-router-advertisements> <v6ur:send-advertisements>true</v6ur:send-advertisements> <v6ur:prefix-list> <v6ur:prefix> <v6ur:prefix-spec>2001:db8:0:2::/64</v6ur:prefix-spec> </v6ur:prefix> </v6ur:prefix-list> Lhotka Expires January 14, 2014 [Page 73] Internet-Draft YANG Routing Management July 2013 </v6ur:ipv6-router-advertisements> </rt:interface> </rt:interfaces> <rt:routing-protocols> <rt:routing-protocol> <rt:name>st0</rt:name> <rt:description> Static routing is used for the internal network. </rt:description> <rt:type>rt:static</rt:type> <rt:static-routes> <v4ur:ipv4> <v4ur:route> <v4ur:id>1</v4ur:id> <v4ur:dest-prefix>0.0.0.0/0</v4ur:dest-prefix> <v4ur:next-hop>192.0.2.2</v4ur:next-hop> </v4ur:route> </v4ur:ipv4> <v6ur:ipv6> <v6ur:route> <v6ur:id>1</v6ur:id> <v6ur:dest-prefix>::/0</v6ur:dest-prefix> <v6ur:next-hop>2001:db8:0:1::2</v6ur:next-hop> </v6ur:route> </v6ur:ipv6> </rt:static-routes> </rt:routing-protocol> </rt:routing-protocols> </rt:router> </rt:routing> <rt:routing-state> <rt:router> <rt:name>rtr0</rt:name> <rt:router-id>192.0.2.1</rt:router-id> <rt:default-routing-tables> <rt:default-routing-table> <rt:address-family>ipv4</rt:address-family> <rt:safi>nlri-unicast</rt:safi> <rt:name>ipv4-unicast</rt:name> </rt:default-routing-table> <rt:default-routing-table> <rt:address-family>ipv6</rt:address-family> <rt:safi>nlri-unicast</rt:safi> <rt:name>ipv6-unicast</rt:name> </rt:default-routing-table> </rt:default-routing-tables> <rt:interfaces> <rt:interface> Lhotka Expires January 14, 2014 [Page 74] Internet-Draft YANG Routing Management July 2013 <rt:name>eth0</rt:name> </rt:interface> <rt:interface> <rt:name>eth1</rt:name> <v6ur:ipv6-router-advertisements> <v6ur:send-advertisements>true</v6ur:send-advertisements> <v6ur:prefix-list> <v6ur:prefix> <v6ur:prefix-spec>2001:db8:0:2::/64</v6ur:prefix-spec> </v6ur:prefix> </v6ur:prefix-list> </v6ur:ipv6-router-advertisements> </rt:interface> </rt:interfaces> <rt:routing-protocols> <rt:routing-protocol> <rt:name>st0</rt:name> <rt:type>rt:static</rt:type> </rt:routing-protocol> </rt:routing-protocols> </rt:router> <rt:routing-tables> <rt:routing-table> <rt:name>ipv4-unicast</rt:name> <rt:address-family>ipv4</rt:address-family> <rt:safi>nlri-unicast</rt:safi> <rt:routes> <rt:route> <v4ur:dest-prefix>192.0.2.1/24</v4ur:dest-prefix> <rt:outgoing-interface>eth0</rt:outgoing-interface> <rt:source-protocol>rt:direct</rt:source-protocol> <rt:last-updated>2013-07-02T17:11:27+01:00</rt:last-updated> </rt:route> <rt:route> <v4ur:dest-prefix>198.51.100.0/24</v4ur:dest-prefix> <rt:outgoing-interface>eth1</rt:outgoing-interface> <rt:source-protocol>rt:direct</rt:source-protocol> <rt:last-updated>2013-07-02T17:11:27+01:00</rt:last-updated> </rt:route> <rt:route> <v4ur:dest-prefix>0.0.0.0/0</v4ur:dest-prefix> <rt:source-protocol>rt:static</rt:source-protocol> <v4ur:next-hop>192.0.2.2</v4ur:next-hop> <rt:last-updated>2013-07-02T18:02:45+01:00</rt:last-updated> </rt:route> </rt:routes> </rt:routing-table> <rt:routing-table> Lhotka Expires January 14, 2014 [Page 75] Internet-Draft YANG Routing Management July 2013 <rt:name>ipv6-unicast</rt:name> <rt:address-family>ipv6</rt:address-family> <rt:safi>nlri-unicast</rt:safi> <rt:routes> <rt:route> <v6ur:dest-prefix>2001:db8:0:1::/64</v6ur:dest-prefix> <rt:outgoing-interface>eth0</rt:outgoing-interface> <rt:source-protocol>rt:direct</rt:source-protocol> <rt:last-updated>2013-07-02T17:11:27+01:00</rt:last-updated> </rt:route> <rt:route> <v6ur:dest-prefix>2001:db8:0:2::/64</v6ur:dest-prefix> <rt:outgoing-interface>eth1</rt:outgoing-interface> <rt:source-protocol>rt:direct</rt:source-protocol> <rt:last-updated>2013-07-02T17:11:27+01:00</rt:last-updated> </rt:route> <rt:route> <v6ur:dest-prefix>::/0</v6ur:dest-prefix> <v6ur:next-hop>2001:db8:0:1::2</v6ur:next-hop> <rt:source-protocol>rt:static</rt:source-protocol> <rt:last-updated>2013-07-02T18:02:45+01:00</rt:last-updated> </rt:route> </rt:routes> </rt:routing-table> </rt:routing-tables> </rt:routing-state> </data> </rpc-reply> Lhotka Expires January 14, 2014 [Page 76] Internet-Draft YANG Routing Management July 2013 Appendix D. Change Log RFC Editor: remove this section upon publication as an RFC. D.1. Changes Between Versions -09 and -10 o Added subtree for operational state data ("/routing-state"). o Terms "system-controlled entry" and "user-controlled entry" defined and used. o New feature "user-defined-routing-tables". Nodes that are useful only with user-defined routing tables are now conditional. o Added grouping "router-id". o In routing tables, "source-protocol" attribute of routes now reports only protocol type, and its datatype is "identityref". o Renamed "main-routing-table" to "default-routing-table". D.2. Changes Between Versions -08 and -09 o Fixed "must" expresion for "connected-routing-table". o Simplified "must" expression for "main-routing-table". o Moved per-interface configuration of a new routing protocol under 'routing-protocol'. This also affects the 'example-rip' module. D.3. Changes Between Versions -07 and -08 o Changed reference from RFC6021 to RFC6021bis. D.4. Changes Between Versions -06 and -07 o The contents of <get-reply> in Appendix C was updated: "eth[01]" is used as the value of "location", and "forwarding" is on for both interfaces and both IPv4 and IPv6. o The "must" expression for "main-routing-table" was modified to avoid redundant error messages reporting address family mismatch when "name" points to a non-existent routing table. o The default behavior for IPv6 RA prefix advertisements was clarified. Lhotka Expires January 14, 2014 [Page 77] Internet-Draft YANG Routing Management July 2013 o Changed type of "rt:router-id" to "ip:dotted-quad". o Type of "rt:router-id" changed to "yang:dotted-quad". o Fixed missing prefixes in XPath expressions. D.5. Changes Between Versions -05 and -06 o Document title changed: "Configuration" was replaced by "Management". o New typedefs "routing-table-ref" and "route-filter-ref". o Double slashes "//" were removed from XPath expressions and replaced with the single "/". o Removed uniqueness requirement for "router-id". o Complete data tree is now in Appendix A. o Changed type of "source-protocol" from "leafref" to "string". o Clarified the relationship between routing protocol instances and connected routing tables. o Added a must constraint saying that a routing table connected to the direct pseudo-protocol must not be a main routing table. D.6. Changes Between Versions -04 and -05 o Routing tables are now global, i.e., "routing-tables" is a child of "routing" rather than "router". o "must" statement for "static-routes" changed to "when". o Added "main-routing-tables" containing references to main routing tables for each address family. o Removed the defaults for "address-family" and "safi" and made them mandatory. o Removed the default for route-filter/type and made this leaf mandatory. o If there is no active route for a given destination, the "active- route" RPC returns no output. Lhotka Expires January 14, 2014 [Page 78] Internet-Draft YANG Routing Management July 2013 o Added "enabled" switch under "routing-protocol". o Added "router-type" identity and "type" leaf under "router". o Route attribute "age" changed to "last-updated", its type is "yang:date-and-time". o The "direct" pseudo-protocol is always connected to main routing tables. o Entries in the list of connected routing tables renamed from "routing-table" to "connected-routing-table". o Added "must" constraint saying that a routing table must not be its own recipient. D.7. Changes Between Versions -03 and -04 o Changed "error-tag" for both RPC methods from "missing element" to "data-missing". o Removed the decrementing behavior for advertised IPv6 prefix parameters "valid-lifetime" and "preferred-lifetime". o Changed the key of the static route lists from "seqno" to "id" because the routes needn't be sorted. o Added 'must' constraint saying that "preferred-lifetime" must not be greater than "valid-lifetime". D.8. Changes Between Versions -02 and -03 o Module "iana-afn-safi" moved to I-D "iana-if-type". o Removed forwarding table. o RPC "get-route" changed to "active-route". Its output is a list of routes (for multi-path routing). o New RPC "route-count". o For both RPCs, specification of negative responses was added. o Relaxed separation of router instances. o Assignment of interfaces to router instances needn't be disjoint. Lhotka Expires January 14, 2014 [Page 79] Internet-Draft YANG Routing Management July 2013 o Route filters are now global. o Added "allow-all-route-filter" for symmetry. o Added Section 5 about interactions with "ietf-interfaces" and "ietf-ip". o Added "router-id" leaf. o Specified the names for IPv4/IPv6 unicast main routing tables. o Route parameter "last-modified" changed to "age". o Added container "recipient-routing-tables". D.9. Changes Between Versions -01 and -02 o Added module "ietf-ipv6-unicast-routing". o The example in Appendix C now uses IP addresses from blocks reserved for documentation. o Direct routes appear by default in the forwarding table. o Network layer interfaces must be assigned to a router instance. Additional interface configuration may be present. o The "when" statement is only used with "augment", "must" is used elsewhere. o Additional "must" statements were added. o The "route-content" grouping for IPv4 and IPv6 unicast now includes the material from the "ietf-routing" version via "uses rt:route-content". o Explanation of symbols in the tree representation of data model hierarchy. D.10. Changes Between Versions -00 and -01 o AFN/SAFI-independent stuff was moved to the "ietf-routing" module. o Typedefs for AFN and SAFI were placed in a separate "iana-afn- safi" module. o Names of some data nodes were changed, in particular "routing- process" is now "router". Lhotka Expires January 14, 2014 [Page 80] Internet-Draft YANG Routing Management July 2013 o The restriction of a single AFN/SAFI per router was lifted. o RPC operation "delete-route" was removed. o Illegal XPath references from "get-route" to the datastore were fixed. o Section "Security Considerations" was written. Lhotka Expires January 14, 2014 [Page 81] Internet-Draft YANG Routing Management July 2013 Author's Address Ladislav Lhotka CZ.NIC Email: lhotka@nic.cz Lhotka Expires January 14, 2014 [Page 82]