idnits 2.17.1 draft-ietf-netmod-rfc8022bis-11.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 2812 has weird spacing: '...-family ide...' == Line 2884 has weird spacing: '...ro type ide...' == Line 2885 has weird spacing: '...ro name str...' == Line 2889 has weird spacing: '...-family ide...' -- The document date (January 26, 2018) is 2281 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6536 (Obsoleted by RFC 8341) ** Obsolete normative reference: RFC 8022 (Obsoleted by RFC 8349) == Outdated reference: A later version (-20) exists of draft-ietf-netmod-rfc6087bis-16 -- Obsolete informational reference (is this intentional?): RFC 7895 (Obsoleted by RFC 8525) == Outdated reference: A later version (-06) exists of draft-ietf-netmod-yang-tree-diagrams-05 Summary: 3 errors (**), 0 flaws (~~), 7 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NETMOD Working Group L. Lhotka 3 Internet-Draft CZ.NIC 4 Obsoletes: 8022 (if approved) A. Lindem 5 Intended status: Standards Track Cisco Systems 6 Expires: July 30, 2018 Y. Qu 7 Huawei 8 January 26, 2018 10 A YANG Data Model for Routing Management (NMDA Version) 11 draft-ietf-netmod-rfc8022bis-11 13 Abstract 15 This document contains a specification of three YANG modules and one 16 submodule. Together they form the core routing data model that 17 serves as a framework for configuring and managing a routing 18 subsystem. It is expected that these modules will be augmented by 19 additional YANG modules defining data models for control-plane 20 protocols, route filters, and other functions. The core routing data 21 model provides common building blocks for such extensions -- routes, 22 Routing Information Bases (RIBs), and control-plane protocols. 24 The YANG modules in this document conform to the Network Management 25 Datastore Architecture (NMDA). This document obsoletes RFC 8022. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on July 30, 2018. 44 Copyright Notice 46 Copyright (c) 2018 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 62 2. Terminology and Notation . . . . . . . . . . . . . . . . . . 3 63 2.1. Glossary of New Terms . . . . . . . . . . . . . . . . . . 4 64 2.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 5 65 2.3. Prefixes in Data Node Names . . . . . . . . . . . . . . . 5 66 3. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 5 67 4. The Design of the Core Routing Data Model . . . . . . . . . . 6 68 4.1. System-Controlled and User-Controlled List Entries . . . 7 69 5. Basic Building Blocks . . . . . . . . . . . . . . . . . . . . 8 70 5.1. Route . . . . . . . . . . . . . . . . . . . . . . . . . . 8 71 5.2. Routing Information Base (RIB) . . . . . . . . . . . . . 9 72 5.3. Control-Plane Protocol . . . . . . . . . . . . . . . . . 9 73 5.3.1. Routing Pseudo-Protocols . . . . . . . . . . . . . . 10 74 5.3.2. Defining New Control-Plane Protocols . . . . . . . . 10 75 5.4. Parameters of IPv6 Router Advertisements . . . . . . . . 11 76 6. Interactions with Other YANG Modules . . . . . . . . . . . . 12 77 6.1. Module "ietf-interfaces" . . . . . . . . . . . . . . . . 12 78 6.2. Module "ietf-ip" . . . . . . . . . . . . . . . . . . . . 12 79 7. Routing Management YANG Module . . . . . . . . . . . . . . . 13 80 8. IPv4 Unicast Routing Management YANG Module . . . . . . . . . 27 81 9. IPv6 Unicast Routing Management YANG Module . . . . . . . . . 35 82 9.1. IPv6 Router Advertisements Submodule . . . . . . . . . . 44 83 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 54 84 11. Security Considerations . . . . . . . . . . . . . . . . . . . 55 85 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 56 86 12.1. Normative References . . . . . . . . . . . . . . . . . . 56 87 12.2. Informative References . . . . . . . . . . . . . . . . . 58 88 Appendix A. The Complete Schema Tree . . . . . . . . . . . . . . 59 89 Appendix B. Minimum Implementation . . . . . . . . . . . . . . . 64 90 Appendix C. Example: Adding a New Control-Plane Protocol . . . . 64 91 Appendix D. Data Tree Example . . . . . . . . . . . . . . . . . 67 92 Appendix E. NETCONF Get Data Reply Example . . . . . . . . . . . 73 93 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 76 94 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 76 96 1. Introduction 98 This document contains a specification of the following YANG modules: 100 o The "ietf-routing" module provides generic components of a routing 101 data model. 103 o The "ietf-ipv4-unicast-routing" module augments the "ietf-routing" 104 module with additional data specific to IPv4 unicast. 106 o The "ietf-ipv6-unicast-routing" module augments the "ietf-routing" 107 module with additional data specific to IPv6 unicast. Its 108 submodule "ietf-ipv6-router-advertisements" also augments the 109 "ietf-interfaces" [I-D.ietf-netmod-rfc7223bis] and "ietf- 110 ip" [I-D.ietf-netmod-rfc7277bis] modules with IPv6 router 111 configuration variables required by [RFC4861]. 113 These modules together define the so-called core routing data model, 114 which is intended as a basis for future data model development 115 covering more-sophisticated routing systems. While these three 116 modules can be directly used for simple IP devices with static 117 routing (see Appendix B), their main purpose is to provide essential 118 building blocks for more-complicated data models involving multiple 119 control-plane protocols, multicast routing, additional address 120 families, and advanced functions such as route filtering or policy 121 routing. To this end, it is expected that the core routing data 122 model will be augmented by numerous modules developed by various IETF 123 working groups. 125 The YANG modules in this document conform to the Network Management 126 Datastore Architecture (NMDA) [I-D.ietf-netmod-revised-datastores]. 127 This document obsoletes RFC 8022 [RFC8022]. 129 2. Terminology and Notation 131 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 132 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 133 "OPTIONAL" in this document are to be interpreted as described in BCP 134 14 [RFC2119] [RFC8174] when, and only when, they appear in all 135 capitals, as shown here. 137 The following terms are defined in 138 [I-D.ietf-netmod-revised-datastores]: 140 o client 142 o server 143 o configuration 145 o system state 147 o operational state 149 o intended configuration 151 The following terms are defined in [RFC7950]: 153 o action 155 o augment 157 o container 159 o container with presence 161 o data model 163 o data node 165 o feature 167 o leaf 169 o list 171 o mandatory node 173 o module 175 o schema tree 177 o RPC (Remote Procedure Call) operation 179 2.1. Glossary of New Terms 181 core routing data model: YANG data model comprising "ietf-routing", 182 "ietf-ipv4-unicast-routing", and "ietf-ipv6-unicast-routing" 183 modules. 185 direct route: a route to a directly connected network. 187 Routing Information Base (RIB): An object containing a list of 188 routes together with other information. See Section 5.2 for 189 details. 191 system-controlled entry: An entry of a list in operational state 192 ("config false") that is created by the system independently of 193 what has been explicitly configured. See Section 4.1 for details. 195 user-controlled entry: An entry of a list in operational state 196 ("config false") that is created and deleted as a direct 197 consequence of certain configuration changes. See Section 4.1 for 198 details. 200 2.2. Tree Diagrams 202 Tree diagrams used in this document follow the notation defined in 203 [I-D.ietf-netmod-yang-tree-diagrams]. 205 2.3. Prefixes in Data Node Names 207 In this document, names of data nodes, actions, and other data model 208 objects are often used without a prefix, as long as it is clear from 209 the context in which YANG module each name is defined. Otherwise, 210 names are prefixed using the standard prefix associated with the 211 corresponding YANG module, as shown in Table 1. 213 +--------+---------------------------+------------------------------+ 214 | Prefix | YANG module | Reference | 215 +--------+---------------------------+------------------------------+ 216 | if | ietf-interfaces | [I-D.ietf-netmod-rfc7223bis] | 217 | ip | ietf-ip | [I-D.ietf-netmod-rfc7277bis] | 218 | rt | ietf-routing | Section 7 | 219 | v4ur | ietf-ipv4-unicast-routing | Section 8 | 220 | v6ur | ietf-ipv6-unicast-routing | Section 9 | 221 | yang | ietf-yang-types | [RFC6991] | 222 | inet | ietf-inet-types | [RFC6991] | 223 +--------+---------------------------+------------------------------+ 225 Table 1: Prefixes and Corresponding YANG Modules 227 3. Objectives 229 The initial design of the core routing data model was driven by the 230 following objectives: 232 o The data model should be suitable for the common address families 233 -- in particular, IPv4 and IPv6 -- and for unicast and multicast 234 routing, as well as Multiprotocol Label Switching (MPLS). 236 o A simple IP routing system, such as one that uses only static 237 routing, should be configurable in a simple way, ideally without 238 any need to develop additional YANG modules. 240 o On the other hand, the core routing framework must allow for 241 complicated implementations involving multiple Routing Information 242 Bases (RIBs) and multiple control-plane protocols, as well as 243 controlled redistributions of routing information. 245 o Because device vendors will want to map the data models built on 246 this generic framework to their proprietary data models and 247 configuration interfaces, the framework should be flexible enough 248 to facilitate that and accommodate data models with different 249 logic. 251 4. The Design of the Core Routing Data Model 253 The core routing data model consists of three YANG modules and one 254 submodule. The first module, "ietf-routing", defines the generic 255 components of a routing system. The other two modules, "ietf-ipv4- 256 unicast-routing" and "ietf-ipv6-unicast-routing", augment the "ietf- 257 routing" module with additional data nodes that are needed for IPv4 258 and IPv6 unicast routing, respectively. The "ietf-ipv6-unicast- 259 routing" module has a submodule, "ietf-ipv6-router-advertisements", 260 that augments the "ietf-interfaces" [I-D.ietf-netmod-rfc7223bis] and 261 "ietf-ip" [I-D.ietf-netmod-rfc7277bis] modules with configuration 262 variables for IPv6 router advertisements as required by [RFC4861]. 264 Figure 1 shows abridged views of the hierarchies. See Appendix A 265 for the complete data trees. 267 +--rw routing 268 +--rw router-id? yang:dotted-quad 269 +--ro interfaces 270 | +--ro interface* if:interface-ref 271 +--rw control-plane-protocols 272 | +--rw control-plane-protocol* [type name] 273 | +--rw type identityref 274 | +--rw name string 275 | +--rw description? string 276 | +--rw static-routes 277 | +--rw v4ur:ipv4 278 | | ... 279 | +--rw v6ur:ipv6 280 | ... 281 +--rw ribs 282 +--rw rib* [name] 283 +--rw name string 284 +--rw address-family? identityref 285 +--ro default-rib? boolean {multiple-ribs}? 286 +--ro routes 287 | +--ro route* 288 | ... 289 +---x active-route 290 | +---w input 291 | | +---w v4ur:destination-address? inet:ipv4-address 292 | | +---w v6ur:destination-address? inet:ipv6-address 293 | +--ro output 294 | ... 295 +--rw description? string 297 Figure 1: Data Hierarchy 299 As can be seen from Figure 1, the core routing data model introduces 300 several generic components of a routing framework: routes, RIBs 301 containing lists of routes, and control-plane protocols. Section 5 302 describes these components in more detail. 304 4.1. System-Controlled and User-Controlled List Entries 306 The core routing data model defines several lists in the schema tree, 307 such as "rib", that have to be populated with at least one entry in 308 any properly functioning device, and additional entries may be 309 configured by a client. 311 In such a list, the server creates the required item as a so-called 312 system-controlled entry in the operational state, i.e., inside read- 313 only lists in the "routing" container. 315 An example can be seen in Appendix D: the "/routing/ribs/rib" list 316 has two system-controlled entries named "ipv4-master" and 317 "ipv6-master". 319 Additional entries may be created in the configuration by a client, 320 e.g., via the NETCONF protocol. These are so-called user-controlled 321 entries. If the server accepts a configured user-controlled entry, 322 then this entry also appears in the operational state version of the 323 list. 325 Corresponding entries in both versions of the list (in the intended 326 configuration and the operational state) 327 [I-D.ietf-netmod-revised-datastores] have the same value of the list 328 key. 330 A client may also provide supplemental configuration of system- 331 controlled entries. To do so, the client creates a new entry in the 332 configuration with the desired contents. In order to bind this entry 333 to the corresponding entry in the operational state, the key of the 334 configuration entry has to be set to the same value as the key of the 335 operational state entry. 337 Deleting a user-controlled entry from the intended configuration 338 results in the removal of the corresponding entry in the operational 339 state list. In contrast, if client deletes a system-controlled entry 340 from the intended configuration, only the extra configuration 341 specified in that entry is removed but the corresponding operational 342 state entry is not removed. 344 5. Basic Building Blocks 346 This section describes the essential components of the core routing 347 data model. 349 5.1. Route 351 Routes are basic elements of information in a routing system. The 352 core routing data model defines only the following minimal set of 353 route attributes: 355 o "destination-prefix": address prefix specifying the set of 356 destination addresses for which the route may be used. This 357 attribute is mandatory. 359 o "route-preference": an integer value (also known as administrative 360 distance) that is used for selecting a preferred route among 361 routes with the same destination prefix. A lower value means a 362 more preferred route. 364 o "next-hop": determines the outgoing interface and/or next-hop 365 address(es), or a special operation to be performed with a packet. 367 Routes are primarily system state that appear as entries of RIBs 368 (Section 5.2) but they may also be found in configuration data, for 369 example, as manually configured static routes. In the latter case, 370 configurable route attributes are generally a subset of attributes 371 defined for RIB routes. 373 5.2. Routing Information Base (RIB) 375 Every implementation of the core routing data model manages one or 376 more Routing Information Bases (RIBs). A RIB is a list of routes 377 complemented with administrative data. Each RIB contains only routes 378 of one address family. An address family is represented by an 379 identity derived from the "rt:address-family" base identity. 381 In the core routing data model, RIBs are represented as entries of 382 the list "/routing/ribs/rib" in the operational state. The contents 383 of RIBs are controlled and manipulated by control-plane protocol 384 operations that may result in route additions, removals, and 385 modifications. This also includes manipulations via the "static" 386 and/or "direct" pseudo-protocols; see Section 5.3.1. 388 For every supported address family, exactly one RIB MUST be marked as 389 the so-called default RIB to which control-plane protocols place 390 their routes by default. 392 Simple router implementations that do not advertise the feature 393 "multiple-ribs" will typically create one system-controlled RIB per 394 supported address family and mark it as the default RIB. 396 More-complex router implementations advertising the "multiple-ribs" 397 feature support multiple RIBs per address family that can be used for 398 policy routing and other purposes. 400 The following action (see Section 7.15 of [RFC7950]) is defined for 401 the "rib" list: 403 o active-route -- return the active RIB route for the destination 404 address that is specified as the action's input parameter. 406 5.3. Control-Plane Protocol 408 The core routing data model provides an open-ended framework for 409 defining multiple control-plane protocol instances, e.g., for Layer 3 410 routing protocols. Each control-plane protocol instance MUST be 411 assigned a type, which is an identity derived from the 412 "rt:control-plane-protocol" base identity. The core routing data 413 model defines two identities for the direct and static pseudo- 414 protocols (Section 5.3.1). 416 Multiple control-plane protocol instances of the same type MAY be 417 configured. 419 5.3.1. Routing Pseudo-Protocols 421 The core routing data model defines two special routing protocol 422 types -- "direct" and "static". Both are in fact pseudo-protocols, 423 which means that they are confined to the local device and do not 424 exchange any routing information with adjacent routers. 426 Every implementation of the core routing data model MUST provide 427 exactly one instance of the "direct" pseudo-protocol type. It is the 428 source of direct routes for all configured address families. Direct 429 routes are normally supplied by the operating system kernel, based on 430 the configuration of network interface addresses; see Section 6.2. 432 A pseudo-protocol of the type "static" allows for specifying routes 433 manually. It MAY be configured in zero or multiple instances, 434 although a typical configuration will have exactly one instance. 436 5.3.2. Defining New Control-Plane Protocols 438 It is expected that future YANG modules will create data models for 439 additional control-plane protocol types. Such a new module has to 440 define the protocol-specific data nodes, and it has to integrate into 441 the core routing framework in the following way: 443 o A new identity MUST be defined for the control-plane protocol, and 444 its base identity MUST be set to "rt:control-plane-protocol" or to 445 an identity derived from "rt:control-plane-protocol". 447 o Additional route attributes MAY be defined, preferably in one 448 place by means of defining a YANG grouping. The new attributes 449 have to be inserted by augmenting the definitions of the node 451 /rt:routing/rt:ribs/rt:rib/rt:routes/rt:route 453 and possibly other places in the schema tree. 455 o Data nodes for the new protocol can be defined by augmenting the 456 "control-plane-protocol" data node under "/routing". 458 By using a "when" statement, the augmented data nodes specific to the 459 new protocol SHOULD be made conditional and valid only if the value 460 of "rt:type" or "rt:source-protocol" is equal to (or derived from) 461 the new protocol's identity. 463 It is also RECOMMENDED that protocol-specific data nodes be 464 encapsulated in an appropriately named container with presence. Such 465 a container may contain mandatory data nodes that are otherwise 466 forbidden at the top level of an augment. 468 The above steps are implemented by the example YANG module for the 469 Routing Information Protocol (RIP) in Appendix C. 471 5.4. Parameters of IPv6 Router Advertisements 473 YANG module "ietf-ipv6-router-advertisements" (Section 9.1), which is 474 a submodule of the "ietf-ipv6-unicast-routing" module, augments the 475 schema tree of IPv6 interfaces with definitions of the following 476 variables as required by Section 6.2.1 of [RFC4861]: 478 o send-advertisements 480 o max-rtr-adv-interval 482 o min-rtr-adv-interval 484 o managed-flag 486 o other-config-flag 488 o link-mtu 490 o reachable-time 492 o retrans-timer 494 o cur-hop-limit 496 o default-lifetime 498 o prefix-list: a list of prefixes to be advertised. 500 The following parameters are associated with each prefix in the 501 list: 503 * valid-lifetime 505 * on-link-flag 507 * preferred-lifetime 508 * autonomous-flag 510 NOTES: 512 1. The "IsRouter" flag, which is also required by [RFC4861], is 513 implemented in the "ietf-ip" module [I-D.ietf-netmod-rfc7277bis] 514 (leaf "ip:forwarding"). 516 2. The original specification [RFC4861] allows the implementations 517 to decide whether the "valid-lifetime" and "preferred-lifetime" 518 parameters remain the same in consecutive advertisements or 519 decrement in real time. However, the latter behavior seems 520 problematic because the values might be reset again to the 521 (higher) configured values after a configuration is reloaded. 522 Moreover, no implementation is known to use the decrementing 523 behavior. The "ietf-ipv6-router-advertisements" submodule 524 therefore stipulates the former behavior with constant values. 526 6. Interactions with Other YANG Modules 528 The semantics of the core routing data model also depends on several 529 configuration parameters that are defined in other YANG modules. 531 6.1. Module "ietf-interfaces" 533 The following boolean switch is defined in the "ietf-interfaces" YANG 534 module [I-D.ietf-netmod-rfc7223bis]: 536 /if:interfaces/if:interface/if:enabled 538 If this switch is set to "false" for a network-layer interface, 539 then all routing and forwarding functions MUST be disabled on this 540 interface. 542 6.2. Module "ietf-ip" 544 The following boolean switches are defined in the "ietf-ip" YANG 545 module [I-D.ietf-netmod-rfc7277bis]: 547 /if:interfaces/if:interface/ip:ipv4/ip:enabled 549 If this switch is set to "false" for a network-layer interface, 550 then all IPv4 routing and forwarding functions MUST be disabled on 551 this interface. 553 /if:interfaces/if:interface/ip:ipv4/ip:forwarding 554 If this switch is set to "false" for a network-layer interface, 555 then the forwarding of IPv4 datagrams through this interface MUST 556 be disabled. However, the interface MAY participate in other IPv4 557 routing functions, such as routing protocols. 559 /if:interfaces/if:interface/ip:ipv6/ip:enabled 561 If this switch is set to "false" for a network-layer interface, 562 then all IPv6 routing and forwarding functions MUST be disabled on 563 this interface. 565 /if:interfaces/if:interface/ip:ipv6/ip:forwarding 567 If this switch is set to "false" for a network-layer interface, 568 then the forwarding of IPv6 datagrams through this interface MUST 569 be disabled. However, the interface MAY participate in other IPv6 570 routing functions, such as routing protocols. 572 In addition, the "ietf-ip" module allows for configuring IPv4 and 573 IPv6 addresses and network prefixes or masks on network-layer 574 interfaces. Configuration of these parameters on an enabled 575 interface MUST result in an immediate creation of the corresponding 576 direct route. The destination prefix of this route is set according 577 to the configured IP address and network prefix/mask, and the 578 interface is set as the outgoing interface for that route. 580 7. Routing Management YANG Module 582 file "ietf-routing@2018-01-25.yang" 583 module ietf-routing { 584 yang-version "1.1"; 585 namespace "urn:ietf:params:xml:ns:yang:ietf-routing"; 586 prefix "rt"; 588 import ietf-yang-types { 589 prefix "yang"; 590 } 592 import ietf-interfaces { 593 prefix "if"; 594 description 595 "A Network Management Datastore Architecture (NMDA) 596 compatible version of the ietf-interfaces module 597 is required."; 598 } 600 organization 601 "IETF NETMOD - Networking Modeling Working Group"; 603 contact 604 "WG Web: 605 WG List: 607 Editor: Ladislav Lhotka 608 609 Acee Lindem 610 611 Yingzhen Qu 612 "; 614 description 615 "This YANG module defines essential components for the management 616 of a routing subsystem. The model fully conforms to the Network 617 Management Datastore Architecture (NMDA). 619 Copyright (c) 2017 IETF Trust and the persons 620 identified as authors of the code. All rights reserved. 622 Redistribution and use in source and binary forms, with or 623 without modification, is permitted pursuant to, and subject 624 to the license terms contained in, the Simplified BSD License 625 set forth in Section 4.c of the IETF Trust's Legal Provisions 626 Relating to IETF Documents 627 (http://trustee.ietf.org/license-info). 629 This version of this YANG module is part of RFC XXXX; see 630 the RFC itself for full legal notices."; 631 reference "RFC XXXX"; 633 revision 2018-01-25 { 634 description 635 "Network Management Datastore Architecture (NMDA) Revision"; 636 reference 637 "RFC XXXX: A YANG Data Model for Routing Management 638 (NMDA Version)"; 639 } 641 revision 2016-11-04 { 642 description 643 "Initial revision."; 644 reference 645 "RFC 8022: A YANG Data Model for Routing Management"; 646 } 648 /* Features */ 649 feature multiple-ribs { 650 description 651 "This feature indicates that the server supports user-defined 652 RIBs. 654 Servers that do not advertise this feature SHOULD provide 655 exactly one system-controlled RIB per supported address family 656 and make it also the default RIB. This RIB then appears as an 657 entry of the list /routing/ribs/rib."; 658 } 660 feature router-id { 661 description 662 "This feature indicates that the server supports of an explicit 663 32-bit router ID that is used by some routing protocols. 665 Servers that do not advertise this feature set a router ID 666 algorithmically, usually to one of the configured IPv4 667 addresses. However, this algorithm is implementation 668 specific."; 669 } 671 /* Identities */ 673 identity address-family { 674 description 675 "Base identity from which identities describing address 676 families are derived."; 677 } 679 identity ipv4 { 680 base address-family; 681 description 682 "This identity represents IPv4 address family."; 683 } 685 identity ipv6 { 686 base address-family; 687 description 688 "This identity represents IPv6 address family."; 689 } 691 identity control-plane-protocol { 692 description 693 "Base identity from which control-plane protocol identities are 694 derived."; 695 } 697 identity routing-protocol { 698 base control-plane-protocol; 699 description 700 "Identity from which Layer 3 routing protocol identities are 701 derived."; 702 } 704 identity direct { 705 base routing-protocol; 706 description 707 "Routing pseudo-protocol that provides routes to directly 708 connected networks."; 709 } 711 identity static { 712 base routing-protocol; 713 description 714 "Static routing pseudo-protocol."; 715 } 717 /* Type Definitions */ 719 typedef route-preference { 720 type uint32; 721 description 722 "This type is used for route preferences."; 723 } 725 /* Groupings */ 727 grouping address-family { 728 description 729 "This grouping provides a leaf identifying an address 730 family."; 731 leaf address-family { 732 type identityref { 733 base address-family; 734 } 735 mandatory "true"; 736 description 737 "Address family."; 738 } 739 } 741 grouping router-id { 742 description 743 "This grouping provides router ID."; 744 leaf router-id { 745 type yang:dotted-quad; 746 description 747 "A 32-bit number in the form of a dotted quad that is used by 748 some routing protocols identifying a router."; 749 reference 750 "RFC 2328: OSPF Version 2."; 751 } 752 } 754 grouping special-next-hop { 755 description 756 "This grouping provides a leaf with an enumeration of special 757 next hops."; 758 leaf special-next-hop { 759 type enumeration { 760 enum blackhole { 761 description 762 "Silently discard the packet."; 763 } 764 enum unreachable { 765 description 766 "Discard the packet and notify the sender with an error 767 message indicating that the destination host is 768 unreachable."; 769 } 770 enum prohibit { 771 description 772 "Discard the packet and notify the sender with an error 773 message indicating that the communication is 774 administratively prohibited."; 775 } 776 enum receive { 777 description 778 "The packet will be received by the local system."; 779 } 780 } 781 description 782 "Options for special next hops."; 783 } 784 } 786 grouping next-hop-content { 787 description 788 "Generic parameters of next hops in static routes."; 789 choice next-hop-options { 790 mandatory "true"; 791 description 792 "Options for next hops in static routes. 794 It is expected that further cases will be added through 795 augments from other modules."; 796 case simple-next-hop { 797 description 798 "This case represents a simple next hop consisting of the 799 next-hop address and/or outgoing interface. 801 Modules for address families MUST augment this case with a 802 leaf containing a next-hop address of that address 803 family."; 804 leaf outgoing-interface { 805 type if:interface-ref; 806 description 807 "Name of the outgoing interface."; 808 } 809 } 810 case special-next-hop { 811 uses special-next-hop; 812 } 813 case next-hop-list { 814 container next-hop-list { 815 description 816 "Container for multiple next-hops."; 817 list next-hop { 818 key "index"; 819 description 820 "An entry of a next-hop list. 822 Modules for address families MUST augment this list 823 with a leaf containing a next-hop address of that 824 address family."; 825 leaf index { 826 type string; 827 description 828 "A user-specified identifier utilized to uniquely 829 reference the next-hop entry in the next-hop list. 830 The value of this index has no semantic meaning 831 other than for referencing the entry."; 832 } 833 leaf outgoing-interface { 834 type if:interface-ref; 835 description 836 "Name of the outgoing interface."; 837 } 838 } 839 } 840 } 841 } 842 } 843 grouping next-hop-state-content { 844 description 845 "Generic state parameters of next hops."; 846 choice next-hop-options { 847 mandatory "true"; 848 description 849 "Options for next hops. 851 It is expected that further cases will be added through 852 augments from other modules, e.g., for recursive 853 next hops."; 854 case simple-next-hop { 855 description 856 "This case represents a simple next hop consisting of the 857 next-hop address and/or outgoing interface. 859 Modules for address families MUST augment this case with a 860 leaf containing a next-hop address of that address 861 family."; 862 leaf outgoing-interface { 863 type if:interface-ref; 864 description 865 "Name of the outgoing interface."; 866 } 867 } 868 case special-next-hop { 869 uses special-next-hop; 870 } 871 case next-hop-list { 872 container next-hop-list { 873 description 874 "Container for multiple next hops."; 875 list next-hop { 876 description 877 "An entry of a next-hop list. 879 Modules for address families MUST augment this list 880 with a leaf containing a next-hop address of that 881 address family."; 882 leaf outgoing-interface { 883 type if:interface-ref; 884 description 885 "Name of the outgoing interface."; 886 } 887 } 888 } 889 } 890 } 892 } 894 grouping route-metadata { 895 description 896 "Common route metadata."; 897 leaf source-protocol { 898 type identityref { 899 base routing-protocol; 900 } 901 mandatory "true"; 902 description 903 "Type of the routing protocol from which the route 904 originated."; 905 } 906 leaf active { 907 type empty; 908 description 909 "Presence of this leaf indicates that the route is preferred 910 among all routes in the same RIB that have the same 911 destination prefix."; 912 } 913 leaf last-updated { 914 type yang:date-and-time; 915 description 916 "Time stamp of the last modification of the route. If the 917 route was never modified, it is the time when the route was 918 inserted into the RIB."; 919 } 920 } 922 /* Data nodes */ 924 container routing { 925 description 926 "Configuration parameters for the routing subsystem."; 927 uses router-id { 928 if-feature "router-id"; 929 description 930 "Support for the global router ID. Routing protocols 931 that use router ID can use this parameter or override it 932 with another value."; 933 } 934 container interfaces { 935 config "false"; 936 description 937 "Network-layer interfaces used for routing."; 938 leaf-list interface { 939 type if:interface-ref; 940 description 941 "Each entry is a reference to the name of a configured 942 network-layer interface."; 943 } 944 } 945 container control-plane-protocols { 946 description 947 "Support for control-plane protocol instances."; 948 list control-plane-protocol { 949 key "type name"; 950 description 951 "Each entry contains a control-plane protocol instance."; 952 leaf type { 953 type identityref { 954 base control-plane-protocol; 955 } 956 description 957 "Type of the control-plane protocol - an identity derived 958 from the 'control-plane-protocol' base identity."; 959 } 960 leaf name { 961 type string; 962 description 963 "An arbitrary name of the control-plane protocol 964 instance."; 965 } 966 leaf description { 967 type string; 968 description 969 "Textual description of the control-plane protocol 970 instance."; 971 } 972 container static-routes { 973 when "derived-from-or-self(../type, 'rt:static')" { 974 description 975 "This container is only valid for the 'static' routing 976 protocol."; 977 } 978 description 979 "Support for the 'static' pseudo-protocol. 981 Address-family-specific modules augment this node with 982 their lists of routes."; 983 } 984 } 985 } 986 container ribs { 987 description 988 "Support for RIBs."; 989 list rib { 990 key "name"; 991 description 992 "Each entry contains configuration for a RIB identified by 993 the 'name' key. 995 Entries having the same key as a system-controlled entry 996 of the list /routing/ribs/rib are used for 997 configuring parameters of that entry. Other entries 998 define additional user-controlled RIBs."; 999 leaf name { 1000 type string; 1001 description 1002 "The name of the RIB. 1004 For system-controlled entries, the value of this leaf 1005 must be the same as the name of the corresponding entry 1006 in operational state. 1008 For user-controlled entries, an arbitrary name can be 1009 used."; 1010 } 1011 uses address-family { 1012 description 1013 "The address family of the system-controlled RIB."; 1014 } 1016 leaf default-rib { 1017 if-feature "multiple-ribs"; 1018 type boolean; 1019 default "true"; 1020 config "false"; 1021 description 1022 "This flag has the value of 'true' if and only if the RIB 1023 is the default RIB for the given address family. 1025 By default, control-plane protocols place their routes 1026 in the default RIBs."; 1027 } 1028 container routes { 1029 config "false"; 1030 description 1031 "Current content of the RIB."; 1032 list route { 1033 description 1034 "A RIB route entry. This data node MUST be augmented 1035 with information specific for routes of each address 1036 family."; 1037 leaf route-preference { 1038 type route-preference; 1039 description 1040 "This route attribute, also known as administrative 1041 distance, allows for selecting the preferred route 1042 among routes with the same destination prefix. A 1043 smaller value means a more preferred route."; 1044 } 1045 container next-hop { 1046 description 1047 "Route's next-hop attribute."; 1048 uses next-hop-state-content; 1049 } 1050 uses route-metadata; 1051 } 1052 } 1053 action active-route { 1054 description 1055 "Return the active RIB route that is used for the 1056 destination address. 1058 Address-family-specific modules MUST augment input 1059 parameters with a leaf named 'destination-address'."; 1060 output { 1061 container route { 1062 description 1063 "The active RIB route for the specified destination. 1065 If no route exists in the RIB for the destination 1066 address, no output is returned. 1068 Address-family-specific modules MUST augment this 1069 container with appropriate route contents."; 1070 container next-hop { 1071 description 1072 "Route's next-hop attribute."; 1073 uses next-hop-state-content; 1074 } 1075 uses route-metadata; 1076 } 1077 } 1078 } 1079 leaf description { 1080 type string; 1081 description 1082 "Textual description of the RIB."; 1083 } 1085 } 1086 } 1087 } 1089 /* 1090 * The subsequent data nodes are obviated and obsoleted by the 1091 * "Network Management Architecture" as described in 1092 * draft-ietf-netmod-revised-datastores. 1093 */ 1094 container routing-state { 1095 config false; 1096 status obsolete; 1097 description 1098 "State data of the routing subsystem."; 1099 uses router-id { 1100 status obsolete; 1101 description 1102 "Global router ID. 1104 It may be either configured or assigned algorithmically by 1105 the implementation."; 1106 } 1107 container interfaces { 1108 status obsolete; 1109 description 1110 "Network-layer interfaces used for routing."; 1111 leaf-list interface { 1112 type if:interface-state-ref; 1113 status obsolete; 1114 description 1115 "Each entry is a reference to the name of a configured 1116 network-layer interface."; 1117 } 1118 } 1119 container control-plane-protocols { 1120 status obsolete; 1121 description 1122 "Container for the list of routing protocol instances."; 1123 list control-plane-protocol { 1124 key "type name"; 1125 status obsolete; 1126 description 1127 "State data of a control-plane protocol instance. 1129 An implementation MUST provide exactly one 1130 system-controlled instance of the 'direct' 1131 pseudo-protocol. Instances of other control-plane 1132 protocols MAY be created by configuration."; 1134 leaf type { 1135 type identityref { 1136 base control-plane-protocol; 1137 } 1138 status obsolete; 1139 description 1140 "Type of the control-plane protocol."; 1141 } 1142 leaf name { 1143 type string; 1144 status obsolete; 1145 description 1146 "The name of the control-plane protocol instance. 1148 For system-controlled instances this name is 1149 persistent, i.e., it SHOULD NOT change across 1150 reboots."; 1151 } 1152 } 1153 } 1154 container ribs { 1155 status obsolete; 1156 description 1157 "Container for RIBs."; 1158 list rib { 1159 key "name"; 1160 min-elements 1; 1161 status obsolete; 1162 description 1163 "Each entry represents a RIB identified by the 'name' 1164 key. All routes in a RIB MUST belong to the same address 1165 family. 1167 An implementation SHOULD provide one system-controlled 1168 default RIB for each supported address family."; 1169 leaf name { 1170 type string; 1171 status obsolete; 1172 description 1173 "The name of the RIB."; 1174 } 1175 uses address-family { 1176 status obsolete; 1177 description 1178 "The address family of the RIB."; 1179 } 1180 leaf default-rib { 1181 if-feature "multiple-ribs"; 1182 type boolean; 1183 default "true"; 1184 status obsolete; 1185 description 1186 "This flag has the value of 'true' if and only if the 1187 RIB is the default RIB for the given address family. 1189 By default, control-plane protocols place their routes 1190 in the default RIBs."; 1191 } 1192 container routes { 1193 status obsolete; 1194 description 1195 "Current content of the RIB."; 1196 list route { 1197 status obsolete; 1198 description 1199 "A RIB route entry. This data node MUST be augmented 1200 with information specific for routes of each address 1201 family."; 1202 leaf route-preference { 1203 type route-preference; 1204 status obsolete; 1205 description 1206 "This route attribute, also known as administrative 1207 distance, allows for selecting the preferred route 1208 among routes with the same destination prefix. A 1209 smaller value means a more preferred route."; 1210 } 1211 container next-hop { 1212 status obsolete; 1213 description 1214 "Route's next-hop attribute."; 1215 uses next-hop-state-content { 1216 status obsolete; 1217 description 1218 "Route's next-hop attribute operational state."; 1219 } 1220 } 1221 uses route-metadata { 1222 status obsolete; 1223 description 1224 "Route metadata."; 1225 } 1226 } 1227 } 1228 action active-route { 1229 status obsolete; 1230 description 1231 "Return the active RIB route that is used for the 1232 destination address. 1234 Address-family-specific modules MUST augment input 1235 parameters with a leaf named 'destination-address'."; 1236 output { 1237 container route { 1238 status obsolete; 1239 description 1240 "The active RIB route for the specified 1241 destination. 1243 If no route exists in the RIB for the destination 1244 address, no output is returned. 1246 Address-family-specific modules MUST augment this 1247 container with appropriate route contents."; 1248 container next-hop { 1249 status obsolete; 1250 description 1251 "Route's next-hop attribute."; 1252 uses next-hop-state-content { 1253 status obsolete; 1254 description 1255 "Active route state data."; 1256 } 1257 } 1258 uses route-metadata { 1259 status obsolete; 1260 description 1261 "Active route metadata."; 1262 } 1263 } 1264 } 1265 } 1266 } 1267 } 1268 } 1269 } 1270 1272 8. IPv4 Unicast Routing Management YANG Module 1274 file "ietf-ipv4-unicast-routing@2018-01-25.yang" 1275 module ietf-ipv4-unicast-routing { 1276 yang-version "1.1"; 1277 namespace 1278 "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing"; 1279 prefix "v4ur"; 1281 import ietf-routing { 1282 prefix "rt"; 1283 description 1284 "A Network Management Datastore Architecture (NMDA) 1285 compatible version of the ietf-routing module 1286 is required."; 1287 } 1289 import ietf-inet-types { 1290 prefix "inet"; 1291 } 1292 organization 1293 "IETF NETMOD - Networking Modeling Working Group"; 1294 contact 1295 "WG Web: 1296 WG List: 1298 Editor: Ladislav Lhotka 1299 1300 Acee Lindem 1301 1302 Yingzhen Qu 1303 "; 1305 description 1306 "This YANG module augments the 'ietf-routing' module with basic 1307 parameters for IPv4 unicast routing. The model fully conforms 1308 to the Network Management Datastore Architecture (NMDA). 1310 Copyright (c) 2017 IETF Trust and the persons 1311 identified as authors of the code. All rights reserved. 1313 Redistribution and use in source and binary forms, with or 1314 without modification, is permitted pursuant to, and subject 1315 to the license terms contained in, the Simplified BSD License 1316 set forth in Section 4.c of the IETF Trust's Legal Provisions 1317 Relating to IETF Documents 1318 (http://trustee.ietf.org/license-info). 1320 This version of this YANG module is part of RFC XXXX; see 1321 the RFC itself for full legal notices."; 1322 reference "RFC XXXX"; 1324 revision 2018-01-25 { 1325 description 1326 "Network Management Datastore Architecture (NMDA) Revision"; 1327 reference 1328 "RFC XXXX: A YANG Data Model for Routing Management 1329 (NMDA Version)"; 1330 } 1332 revision 2016-11-04 { 1333 description 1334 "Initial revision."; 1335 reference 1336 "RFC 8022: A YANG Data Model for Routing Management"; 1337 } 1339 /* Identities */ 1341 identity ipv4-unicast { 1342 base rt:ipv4; 1343 description 1344 "This identity represents the IPv4 unicast address family."; 1345 } 1347 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 1348 when "derived-from-or-self(../../rt:address-family, " 1349 + "'v4ur:ipv4-unicast')" { 1350 description 1351 "This augment is valid only for IPv4 unicast."; 1352 } 1353 description 1354 "This leaf augments an IPv4 unicast route."; 1355 leaf destination-prefix { 1356 type inet:ipv4-prefix; 1357 description 1358 "IPv4 destination prefix."; 1359 } 1360 } 1362 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1363 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1364 when "derived-from-or-self(../../../rt:address-family, " 1365 + "'v4ur:ipv4-unicast')" { 1366 description 1367 "This augment is valid only for IPv4 unicast."; 1368 } 1369 description 1370 "Augment 'simple-next-hop' case in IPv4 unicast routes."; 1371 leaf next-hop-address { 1372 type inet:ipv4-address; 1373 description 1374 "IPv4 address of the next hop."; 1375 } 1376 } 1378 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1379 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1380 + "rt:next-hop-list/rt:next-hop" { 1381 when "derived-from-or-self(../../../../../rt:address-family, " 1382 + "'v4ur:ipv4-unicast')" { 1383 description 1384 "This augment is valid only for IPv4 unicast."; 1385 } 1386 description 1387 "This leaf augments the 'next-hop-list' case of IPv4 unicast 1388 routes."; 1389 leaf address { 1390 type inet:ipv4-address; 1391 description 1392 "IPv4 address of the next-hop."; 1393 } 1394 } 1396 augment 1397 "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { 1398 when "derived-from-or-self(../rt:address-family, " 1399 + "'v4ur:ipv4-unicast')" { 1400 description 1401 "This augment is valid only for IPv4 unicast RIBs."; 1402 } 1403 description 1404 "This augment adds the input parameter of the 'active-route' 1405 action."; 1406 leaf destination-address { 1407 type inet:ipv4-address; 1408 description 1409 "IPv4 destination address."; 1410 } 1411 } 1413 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1414 + "rt:output/rt:route" { 1415 when "derived-from-or-self(../../rt:address-family, " 1416 + "'v4ur:ipv4-unicast')" { 1417 description 1418 "This augment is valid only for IPv4 unicast."; 1419 } 1420 description 1421 "This augment adds the destination prefix to the reply of the 1422 'active-route' action."; 1423 leaf destination-prefix { 1424 type inet:ipv4-prefix; 1425 description 1426 "IPv4 destination prefix."; 1427 } 1428 } 1430 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1431 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1432 + "rt:simple-next-hop" { 1433 when "derived-from-or-self(../../../rt:address-family, " 1434 + "'v4ur:ipv4-unicast')" { 1435 description 1436 "This augment is valid only for IPv4 unicast."; 1437 } 1438 description 1439 "Augment 'simple-next-hop' case in the reply to the 1440 'active-route' action."; 1441 leaf next-hop-address { 1442 type inet:ipv4-address; 1443 description 1444 "IPv4 address of the next hop."; 1445 } 1446 } 1448 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1449 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1450 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1451 when "derived-from-or-self(../../../../../rt:address-family, " 1452 + "'v4ur:ipv4-unicast')" { 1453 description 1454 "This augment is valid only for IPv4 unicast."; 1455 } 1456 description 1457 "Augment 'next-hop-list' case in the reply to the 1458 'active-route' action."; 1459 leaf next-hop-address { 1460 type inet:ipv4-address; 1461 description 1462 "IPv4 address of the next hop."; 1463 } 1464 } 1466 augment "/rt:routing/rt:control-plane-protocols/" 1467 + "rt:control-plane-protocol/rt:static-routes" { 1468 description 1469 "This augment defines the 'static' pseudo-protocol 1470 with data specific to IPv4 unicast."; 1471 container ipv4 { 1472 description 1473 "Support for a 'static' pseudo-protocol instance 1474 consists of a list of routes."; 1475 list route { 1476 key "destination-prefix"; 1477 description 1478 "A list of static routes."; 1479 leaf destination-prefix { 1480 type inet:ipv4-prefix; 1481 mandatory "true"; 1482 description 1483 "IPv4 destination prefix."; 1484 } 1485 leaf description { 1486 type string; 1487 description 1488 "Textual description of the route."; 1489 } 1490 container next-hop { 1491 description 1492 "Support for next-hop."; 1493 uses rt:next-hop-content { 1494 augment "next-hop-options/simple-next-hop" { 1495 description 1496 "Augment 'simple-next-hop' case in IPv4 static 1497 routes."; 1498 leaf next-hop-address { 1499 type inet:ipv4-address; 1500 description 1501 "IPv4 address of the next hop."; 1502 } 1503 } 1504 augment "next-hop-options/next-hop-list/next-hop-list/" 1505 + "next-hop" { 1506 description 1507 "Augment 'next-hop-list' case in IPv4 static 1508 routes."; 1509 leaf next-hop-address { 1510 type inet:ipv4-address; 1511 description 1512 "IPv4 address of the next hop."; 1513 } 1514 } 1515 } 1516 } 1517 } 1519 } 1520 } 1522 /* 1523 * The subsequent data nodes are obviated and obsoleted by the 1524 * "Network Management Architecture" as described in 1525 * draft-ietf-netmod-revised-datastores. 1526 */ 1527 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { 1528 when "derived-from-or-self(../../rt:address-family, " 1529 + "'v4ur:ipv4-unicast')" { 1530 description 1531 "This augment is valid only for IPv4 unicast."; 1532 } 1533 status obsolete; 1534 description 1535 "This leaf augments an IPv4 unicast route."; 1536 leaf destination-prefix { 1537 type inet:ipv4-prefix; 1538 status obsolete; 1539 description 1540 "IPv4 destination prefix."; 1541 } 1542 } 1543 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1544 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1545 when "derived-from-or-self( 1546 ../../../rt:address-family, 'v4ur:ipv4-unicast')" { 1547 description 1548 "This augment is valid only for IPv4 unicast."; 1549 } 1550 status obsolete; 1551 description 1552 "Augment 'simple-next-hop' case in IPv4 unicast routes."; 1553 leaf next-hop-address { 1554 type inet:ipv4-address; 1555 status obsolete; 1556 description 1557 "IPv4 address of the next hop."; 1558 } 1559 } 1560 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1561 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1562 + "rt:next-hop-list/rt:next-hop" { 1563 when "derived-from-or-self(../../../../../rt:address-family, 1564 'v4ur:ipv4-unicast')" { 1565 description 1566 "This augment is valid only for IPv4 unicast."; 1568 } 1569 status obsolete; 1570 description 1571 "This leaf augments the 'next-hop-list' case of IPv4 unicast 1572 routes."; 1573 leaf address { 1574 type inet:ipv4-address; 1575 status obsolete; 1576 description 1577 "IPv4 address of the next-hop."; 1578 } 1579 } 1580 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1581 + "rt:input" { 1582 when "derived-from-or-self(../rt:address-family, 1583 'v4ur:ipv4-unicast')" { 1584 description 1585 "This augment is valid only for IPv4 unicast RIBs."; 1586 } 1587 status obsolete; 1588 description 1589 "This augment adds the input parameter of the 'active-route' 1590 action."; 1591 leaf destination-address { 1592 type inet:ipv4-address; 1593 status obsolete; 1594 description 1595 "IPv4 destination address."; 1596 } 1597 } 1598 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1599 + "rt:output/rt:route" { 1600 when "derived-from-or-self(../../rt:address-family, 1601 'v4ur:ipv4-unicast')" { 1602 description 1603 "This augment is valid only for IPv4 unicast."; 1604 } 1605 status obsolete; 1606 description 1607 "This augment adds the destination prefix to the reply of the 1608 'active-route' action."; 1609 leaf destination-prefix { 1610 type inet:ipv4-prefix; 1611 status obsolete; 1612 description 1613 "IPv4 destination prefix."; 1614 } 1615 } 1616 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1617 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1618 + "rt:simple-next-hop" { 1619 when "derived-from-or-self(../../../rt:address-family, 1620 'v4ur:ipv4-unicast')" { 1621 description 1622 "This augment is valid only for IPv4 unicast."; 1623 } 1624 status obsolete; 1625 description 1626 "Augment 'simple-next-hop' case in the reply to the 1627 'active-route' action."; 1628 leaf next-hop-address { 1629 type inet:ipv4-address; 1630 status obsolete; 1631 description 1632 "IPv4 address of the next hop."; 1633 } 1634 } 1635 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1636 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1637 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1638 when "derived-from-or-self(../../../../../rt:address-family, 1639 'v4ur:ipv4-unicast')" { 1640 description 1641 "This augment is valid only for IPv4 unicast."; 1642 } 1643 status obsolete; 1644 description 1645 "Augment 'next-hop-list' case in the reply to the 1646 'active-route' action."; 1647 leaf next-hop-address { 1648 type inet:ipv4-address; 1649 status obsolete; 1650 description 1651 "IPv4 address of the next hop."; 1652 } 1653 } 1654 } 1655 1657 9. IPv6 Unicast Routing Management YANG Module 1659 file "ietf-ipv6-unicast-routing@2018-01-25.yang" 1660 module ietf-ipv6-unicast-routing { 1661 yang-version "1.1"; 1662 namespace 1663 "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing"; 1665 prefix "v6ur"; 1667 import ietf-routing { 1668 prefix "rt"; 1669 description 1670 "A Network Management Datastore Architecture (NMDA) 1671 compatible version of the ietf-routing module 1672 is required."; 1673 } 1675 import ietf-inet-types { 1676 prefix "inet"; 1677 description 1678 "A Network Management Datastore Architecture (NMDA) 1679 compatible version of the ietf-interfaces module 1680 is required."; 1681 } 1683 include ietf-ipv6-router-advertisements { 1684 revision-date 2018-01-25; 1685 } 1687 organization 1688 "IETF NETMOD - Networking Modeling Working Group"; 1689 contact 1690 "WG Web: 1691 WG List: 1693 Editor: Ladislav Lhotka 1694 1695 Acee Lindem 1696 1697 Yingzhen Qu 1698 "; 1700 description 1701 "This YANG module augments the 'ietf-routing' module with basic 1702 parameters for IPv6 unicast routing. The model fully conforms 1703 to the Network Management Datastore Architecture (NMDA). 1705 Copyright (c) 2017 IETF Trust and the persons 1706 identified as authors of the code. All rights reserved. 1708 Redistribution and use in source and binary forms, with or 1709 without modification, is permitted pursuant to, and subject 1710 to the license terms contained in, the Simplified BSD License 1711 set forth in Section 4.c of the IETF Trust's Legal Provisions 1712 Relating to IETF Documents 1713 (http://trustee.ietf.org/license-info). 1715 This version of this YANG module is part of RFC XXXX; see 1716 the RFC itself for full legal notices."; 1717 reference "RFC XXXX"; 1719 revision 2018-01-25 { 1720 description 1721 "Network Management Datastore Architecture (NMDA) revision"; 1722 reference 1723 "RFC XXXX: A YANG Data Model for Routing Management 1724 (NMDA Version)"; 1725 } 1727 /* Identities */ 1729 revision 2016-11-04 { 1730 description 1731 "Initial revision."; 1732 reference 1733 "RFC 8022: A YANG Data Model for Routing Management"; 1734 } 1736 identity ipv6-unicast { 1737 base rt:ipv6; 1738 description 1739 "This identity represents the IPv6 unicast address family."; 1740 } 1742 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 1743 when "derived-from-or-self(../../rt:address-family, " 1744 + "'v6ur:ipv6-unicast')" { 1745 description 1746 "This augment is valid only for IPv6 unicast."; 1747 } 1748 description 1749 "This leaf augments an IPv6 unicast route."; 1750 leaf destination-prefix { 1751 type inet:ipv6-prefix; 1752 description 1753 "IPv6 destination prefix."; 1754 } 1755 } 1757 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1758 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1759 when "derived-from-or-self(../../../rt:address-family, " 1760 + "'v6ur:ipv6-unicast')" { 1762 description 1763 "This augment is valid only for IPv6 unicast."; 1764 } 1765 description 1766 "Augment 'simple-next-hop' case in IPv6 unicast routes."; 1767 leaf next-hop-address { 1768 type inet:ipv6-address; 1769 description 1770 "IPv6 address of the next hop."; 1771 } 1772 } 1774 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1775 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1776 + "rt:next-hop-list/rt:next-hop" { 1777 when "derived-from-or-self(../../../../../rt:address-family, " 1778 + "'v6ur:ipv6-unicast')" { 1779 description 1780 "This augment is valid only for IPv6 unicast."; 1781 } 1782 description 1783 "This leaf augments the 'next-hop-list' case of IPv6 unicast 1784 routes."; 1785 leaf address { 1786 type inet:ipv6-address; 1787 description 1788 "IPv6 address of the next hop."; 1789 } 1790 } 1792 augment 1793 "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { 1794 when "derived-from-or-self(../rt:address-family, " 1795 + "'v6ur:ipv6-unicast')" { 1796 description 1797 "This augment is valid only for IPv6 unicast RIBs."; 1798 } 1799 description 1800 "This augment adds the input parameter of the 'active-route' 1801 action."; 1802 leaf destination-address { 1803 type inet:ipv6-address; 1804 description 1805 "IPv6 destination address."; 1806 } 1807 } 1809 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1810 + "rt:output/rt:route" { 1811 when "derived-from-or-self(../../rt:address-family, " 1812 + "'v6ur:ipv6-unicast')" { 1813 description 1814 "This augment is valid only for IPv6 unicast."; 1815 } 1816 description 1817 "This augment adds the destination prefix to the reply of the 1818 'active-route' action."; 1819 leaf destination-prefix { 1820 type inet:ipv6-prefix; 1821 description 1822 "IPv6 destination prefix."; 1823 } 1824 } 1826 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1827 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1828 + "rt:simple-next-hop" { 1829 when "derived-from-or-self(../../../rt:address-family, " 1830 + "'v6ur:ipv6-unicast')" { 1831 description 1832 "This augment is valid only for IPv6 unicast."; 1833 } 1834 description 1835 "Augment 'simple-next-hop' case in the reply to the 1836 'active-route' action."; 1837 leaf next-hop-address { 1838 type inet:ipv6-address; 1839 description 1840 "IPv6 address of the next hop."; 1841 } 1842 } 1844 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1845 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1846 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1847 when "derived-from-or-self(../../../../../rt:address-family, " 1848 + "'v6ur:ipv6-unicast')" { 1849 description 1850 "This augment is valid only for IPv6 unicast."; 1851 } 1852 description 1853 "Augment 'next-hop-list' case in the reply to the 1854 'active-route' action."; 1855 leaf next-hop-address { 1856 type inet:ipv6-address; 1857 description 1858 "IPv6 address of the next hop."; 1859 } 1860 } 1862 /* Data node augmentations */ 1864 augment "/rt:routing/rt:control-plane-protocols/" 1865 + "rt:control-plane-protocol/rt:static-routes" { 1866 description 1867 "This augment defines the Support for the 'static' 1868 pseudo-protocol with data specific to IPv6 unicast."; 1869 container ipv6 { 1870 description 1871 "Support for a 'static' pseudo-protocol instance 1872 consists of a list of routes."; 1873 list route { 1874 key "destination-prefix"; 1875 description 1876 "A list of static routes."; 1877 leaf destination-prefix { 1878 type inet:ipv6-prefix; 1879 mandatory "true"; 1880 description 1881 "IPv6 destination prefix."; 1882 } 1883 leaf description { 1884 type string; 1885 description 1886 "Textual description of the route."; 1887 } 1888 container next-hop { 1889 description 1890 "Support for next-hop."; 1891 uses rt:next-hop-content { 1892 augment "next-hop-options/simple-next-hop" { 1893 description 1894 "Augment 'simple-next-hop' case in IPv6 static 1895 routes."; 1896 leaf next-hop-address { 1897 type inet:ipv6-address; 1898 description 1899 "IPv6 address of the next hop."; 1900 } 1901 } 1902 augment "next-hop-options/next-hop-list/next-hop-list/" 1903 + "next-hop" { 1904 description 1905 "Augment 'next-hop-list' case in IPv6 static 1906 routes."; 1907 leaf next-hop-address { 1908 type inet:ipv6-address; 1909 description 1910 "IPv6 address of the next hop."; 1911 } 1912 } 1913 } 1914 } 1915 } 1916 } 1917 } 1919 /* 1920 * The subsequent data nodes are obviated and obsoleted by the 1921 * "Network Management Architecture" as described in 1922 * draft-ietf-netmod-revised-datastores. 1923 */ 1924 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { 1925 when "derived-from-or-self(../../rt:address-family, 1926 'v6ur:ipv6-unicast')" { 1927 description 1928 "This augment is valid only for IPv6 unicast."; 1929 } 1930 status obsolete; 1931 description 1932 "This leaf augments an IPv6 unicast route."; 1933 leaf destination-prefix { 1934 type inet:ipv6-prefix; 1935 status obsolete; 1936 description 1937 "IPv6 destination prefix."; 1938 } 1939 } 1940 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1941 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1942 when "derived-from-or-self(../../../rt:address-family, 1943 'v6ur:ipv6-unicast')" { 1944 description 1945 "This augment is valid only for IPv6 unicast."; 1946 } 1947 status obsolete; 1948 description 1949 "Augment 'simple-next-hop' case in IPv6 unicast routes."; 1950 leaf next-hop-address { 1951 type inet:ipv6-address; 1952 status obsolete; 1953 description 1954 "IPv6 address of the next hop."; 1955 } 1956 } 1957 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1958 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1959 + "rt:next-hop-list/rt:next-hop" { 1960 when "derived-from-or-self(../../../../../rt:address-family, 1961 'v6ur:ipv6-unicast')" { 1962 description 1963 "This augment is valid only for IPv6 unicast."; 1964 } 1965 status obsolete; 1966 description 1967 "This leaf augments the 'next-hop-list' case of IPv6 unicast 1968 routes."; 1969 leaf address { 1970 type inet:ipv6-address; 1971 status obsolete; 1972 description 1973 "IPv6 address of the next hop."; 1974 } 1975 } 1976 augment "/rt:routing-state/rt:ribs/rt:rib/" 1977 + "rt:active-route/rt:input" { 1978 when "derived-from-or-self(../rt:address-family, 1979 'v6ur:ipv6-unicast')" { 1980 description 1981 "This augment is valid only for IPv6 unicast RIBs."; 1982 } 1983 status obsolete; 1984 description 1985 "This augment adds the input parameter of the 'active-route' 1986 action."; 1987 leaf destination-address { 1988 type inet:ipv6-address; 1989 status obsolete; 1990 description 1991 "IPv6 destination address."; 1992 } 1993 } 1994 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1995 + "rt:output/rt:route" { 1996 when "derived-from-or-self(../../rt:address-family, 1997 'v6ur:ipv6-unicast')" { 1998 description 1999 "This augment is valid only for IPv6 unicast."; 2000 } 2001 status obsolete; 2002 description 2003 "This augment adds the destination prefix to the reply of the 2004 'active-route' action."; 2005 leaf destination-prefix { 2006 type inet:ipv6-prefix; 2007 status obsolete; 2008 description 2009 "IPv6 destination prefix."; 2010 } 2011 } 2012 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 2013 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 2014 + "rt:simple-next-hop" { 2015 when "derived-from-or-self(../../../rt:address-family, 2016 'v6ur:ipv6-unicast')" { 2017 description 2018 "This augment is valid only for IPv6 unicast."; 2019 } 2020 status obsolete; 2021 description 2022 "Augment 'simple-next-hop' case in the reply to the 2023 'active-route' action."; 2024 leaf next-hop-address { 2025 type inet:ipv6-address; 2026 status obsolete; 2027 description 2028 "IPv6 address of the next hop."; 2029 } 2030 } 2031 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 2032 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 2033 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 2034 when "derived-from-or-self(../../../../../rt:address-family, 2035 'v6ur:ipv6-unicast')" { 2036 description 2037 "This augment is valid only for IPv6 unicast."; 2038 } 2039 status obsolete; 2040 description 2041 "Augment 'next-hop-list' case in the reply to the 2042 'active-route' action."; 2043 leaf next-hop-address { 2044 type inet:ipv6-address; 2045 status obsolete; 2046 description 2047 "IPv6 address of the next hop."; 2048 } 2049 } 2051 } 2052 2054 9.1. IPv6 Router Advertisements Submodule 2056 file "ietf-ipv6-router-advertisements@2018-01-25.yang" 2057 submodule ietf-ipv6-router-advertisements { 2058 yang-version "1.1"; 2060 belongs-to ietf-ipv6-unicast-routing { 2061 prefix "v6ur"; 2062 } 2064 import ietf-inet-types { 2065 prefix "inet"; 2066 } 2068 import ietf-interfaces { 2069 prefix "if"; 2070 description 2071 "A Network Management Datastore Architecture (NMDA) 2072 compatible version of the ietf-interfaces module 2073 is required."; 2074 } 2076 import ietf-ip { 2077 prefix "ip"; 2078 description 2079 "A Network Management Datastore Architecture (NMDA) 2080 compatible version of the ietf-ip module is 2081 required."; 2082 } 2084 organization 2085 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 2086 contact 2087 "WG Web: 2088 WG List: 2090 Editor: Ladislav Lhotka 2091 2092 Acee Lindem 2093 2094 Yingzhen Qu 2095 "; 2097 description 2098 "This YANG module augments the 'ietf-ip' module with 2099 parameters for IPv6 router advertisements. The model fully 2100 conforms to the Network Management Datastore 2101 Architecture (NMDA). 2103 Copyright (c) 2017 IETF Trust and the persons 2104 identified as authors of the code. All rights reserved. 2106 Redistribution and use in source and binary forms, with or 2107 without modification, is permitted pursuant to, and subject 2108 to the license terms contained in, the Simplified BSD License 2109 set forth in Section 4.c of the IETF Trust's Legal Provisions 2110 Relating to IETF Documents 2111 (http://trustee.ietf.org/license-info). 2113 This version of this YANG module is part of RFC XXXX; see 2114 the RFC itself for full legal notices."; 2115 reference 2116 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)."; 2118 revision 2018-01-25 { 2119 description 2120 "Network Management Datastore Architecture (NMDA) Revision"; 2121 reference 2122 "RFC XXXX: A YANG Data Model for Routing Management 2123 (NMDA Version)"; 2124 } 2126 revision 2016-11-04 { 2127 description 2128 "Initial revision."; 2129 reference 2130 "RFC 8022: A YANG Data Model for Routing Management"; 2131 } 2133 augment "/if:interfaces/if:interface/ip:ipv6" { 2134 description 2135 "Augment interface configuration with parameters of IPv6 2136 router advertisements."; 2137 container ipv6-router-advertisements { 2138 description 2139 "Support for IPv6 Router Advertisements."; 2140 leaf send-advertisements { 2141 type boolean; 2142 default "false"; 2143 description 2144 "A flag indicating whether or not the router sends 2145 periodic Router Advertisements and responds to 2146 Router Solicitations."; 2148 reference 2149 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2150 AdvSendAdvertisements."; 2151 } 2152 leaf max-rtr-adv-interval { 2153 type uint16 { 2154 range "4..65535"; 2155 } 2156 units "seconds"; 2157 default "600"; 2158 description 2159 "The maximum time allowed between sending unsolicited 2160 multicast Router Advertisements from the interface."; 2161 reference 2162 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2163 MaxRtrAdvInterval."; 2164 } 2165 leaf min-rtr-adv-interval { 2166 type uint16 { 2167 range "3..1350"; 2168 } 2169 units "seconds"; 2170 must ". <= 0.75 * ../max-rtr-adv-interval" { 2171 description 2172 "The value MUST NOT be greater than 75% of 2173 'max-rtr-adv-interval'."; 2174 } 2175 description 2176 "The minimum time allowed between sending unsolicited 2177 multicast Router Advertisements from the interface. 2179 The default value to be used operationally if this 2180 leaf is not configured is determined as follows: 2182 - if max-rtr-adv-interval >= 9 seconds, the default 2183 value is 0.33 * max-rtr-adv-interval; 2185 - otherwise, it is 0.75 * max-rtr-adv-interval."; 2186 reference 2187 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2188 MinRtrAdvInterval."; 2189 } 2190 leaf managed-flag { 2191 type boolean; 2192 default "false"; 2193 description 2194 "The value to be placed in the 'Managed address 2195 configuration' flag field in the Router 2196 Advertisement."; 2197 reference 2198 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2199 AdvManagedFlag."; 2200 } 2201 leaf other-config-flag { 2202 type boolean; 2203 default "false"; 2204 description 2205 "The value to be placed in the 'Other configuration' 2206 flag field in the Router Advertisement."; 2207 reference 2208 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2209 AdvOtherConfigFlag."; 2210 } 2211 leaf link-mtu { 2212 type uint32; 2213 default "0"; 2214 description 2215 "The value to be placed in MTU options sent by the 2216 router. A value of zero indicates that no MTU options 2217 are sent."; 2218 reference 2219 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2220 AdvLinkMTU."; 2221 } 2222 leaf reachable-time { 2223 type uint32 { 2224 range "0..3600000"; 2225 } 2226 units "milliseconds"; 2227 default "0"; 2228 description 2229 "The value to be placed in the Reachable Time field in 2230 the Router Advertisement messages sent by the router. 2231 A value of zero means unspecified (by this router)."; 2232 reference 2233 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2234 AdvReachableTime."; 2235 } 2236 leaf retrans-timer { 2237 type uint32; 2238 units "milliseconds"; 2239 default "0"; 2240 description 2241 "The value to be placed in the Retrans Timer field in 2242 the Router Advertisement messages sent by the router. 2243 A value of zero means unspecified (by this router)."; 2245 reference 2246 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2247 AdvRetransTimer."; 2248 } 2249 leaf cur-hop-limit { 2250 type uint8; 2251 description 2252 "The value to be placed in the Cur Hop Limit field in 2253 the Router Advertisement messages sent by the router. 2254 A value of zero means unspecified (by this router). 2256 If this parameter is not configured, the device SHOULD 2257 use the value specified in IANA Assigned Numbers that 2258 was in effect at the time of implementation."; 2259 reference 2260 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2261 AdvCurHopLimit. 2263 IANA: IP Parameters, 2264 http://www.iana.org/assignments/ip-parameters"; 2265 } 2266 leaf default-lifetime { 2267 type uint16 { 2268 range "0..65535"; 2269 } 2270 units "seconds"; 2271 description 2272 "The value to be placed in the Router Lifetime field of 2273 Router Advertisements sent from the interface, in 2274 seconds. It MUST be either zero or between 2275 max-rtr-adv-interval and 9000 seconds. A value of zero 2276 default indicates that the router is not to be used as 2277 a router. These limits may be overridden by specific 2278 documents that describe how IPv6 operates over 2279 different link layers. 2281 If this parameter is not configured, the device SHOULD 2282 use a value of 3 * max-rtr-adv-interval."; 2283 reference 2284 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2285 AdvDefaultLifeTime."; 2286 } 2287 container prefix-list { 2288 description 2289 "Support for prefixes to be placed in Prefix 2290 Information options in Router Advertisement messages 2291 sent from the interface. 2293 Prefixes that are advertised by default but do not 2294 have their entries in the child 'prefix' list are 2295 advertised with the default values of all parameters. 2297 The link-local prefix SHOULD NOT be included in the 2298 list of advertised prefixes."; 2299 reference 2300 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2301 AdvPrefixList."; 2302 list prefix { 2303 key "prefix-spec"; 2304 description 2305 "Support for an advertised prefix entry."; 2306 leaf prefix-spec { 2307 type inet:ipv6-prefix; 2308 description 2309 "IPv6 address prefix."; 2310 } 2311 choice control-adv-prefixes { 2312 default "advertise"; 2313 description 2314 "Either the prefix is explicitly removed from the 2315 set of advertised prefixes, or the parameters with 2316 which it is advertised are specified (default 2317 case)."; 2318 leaf no-advertise { 2319 type empty; 2320 description 2321 "The prefix will not be advertised. 2323 This can be used for removing the prefix from 2324 the default set of advertised prefixes."; 2325 } 2326 case advertise { 2327 leaf valid-lifetime { 2328 type uint32; 2329 units "seconds"; 2330 default "2592000"; 2331 description 2332 "The value to be placed in the Valid Lifetime 2333 in the Prefix Information option. The 2334 designated value of all 1's (0xffffffff) 2335 represents infinity."; 2336 reference 2337 "RFC 4861: Neighbor Discovery for IP version 6 2338 (IPv6) - AdvValidLifetime."; 2339 } 2340 leaf on-link-flag { 2341 type boolean; 2342 default "true"; 2343 description 2344 "The value to be placed in the on-link flag 2345 ('L-bit') field in the Prefix Information 2346 option."; 2347 reference 2348 "RFC 4861: Neighbor Discovery for IP version 6 2349 (IPv6) - AdvOnLinkFlag."; 2350 } 2351 leaf preferred-lifetime { 2352 type uint32; 2353 units "seconds"; 2354 must ". <= ../valid-lifetime" { 2355 description 2356 "This value MUST NOT be greater than 2357 valid-lifetime."; 2358 } 2359 default "604800"; 2360 description 2361 "The value to be placed in the Preferred 2362 Lifetime in the Prefix Information option. 2363 The designated value of all 1's (0xffffffff) 2364 represents infinity."; 2365 reference 2366 "RFC 4861: Neighbor Discovery for IP version 6 2367 (IPv6) - AdvPreferredLifetime."; 2368 } 2369 leaf autonomous-flag { 2370 type boolean; 2371 default "true"; 2372 description 2373 "The value to be placed in the Autonomous Flag 2374 field in the Prefix Information option."; 2375 reference 2376 "RFC 4861: Neighbor Discovery for IP version 6 2377 (IPv6) - AdvAutonomousFlag."; 2378 } 2379 } 2380 } 2381 } 2382 } 2383 } 2384 } 2386 /* 2387 * The subsequent data nodes are obviated and obsoleted by the 2388 * "Network Management Architecture" as described in 2389 * draft-ietf-netmod-revised-datastores. 2390 */ 2391 augment "/if:interfaces-state/if:interface/ip:ipv6" { 2392 status obsolete; 2393 description 2394 "Augment interface state data with parameters of IPv6 router 2395 advertisements."; 2396 container ipv6-router-advertisements { 2397 status obsolete; 2398 description 2399 "Parameters of IPv6 Router Advertisements."; 2400 leaf send-advertisements { 2401 type boolean; 2402 status obsolete; 2403 description 2404 "A flag indicating whether or not the router sends periodic 2405 Router Advertisements and responds to Router 2406 Solicitations."; 2407 } 2408 leaf max-rtr-adv-interval { 2409 type uint16 { 2410 range "4..1800"; 2411 } 2412 units "seconds"; 2413 status obsolete; 2414 description 2415 "The maximum time allowed between sending unsolicited 2416 multicast Router Advertisements from the interface."; 2417 } 2418 leaf min-rtr-adv-interval { 2419 type uint16 { 2420 range "3..1350"; 2421 } 2422 units "seconds"; 2423 status obsolete; 2424 description 2425 "The minimum time allowed between sending unsolicited 2426 multicast Router Advertisements from the interface."; 2427 } 2428 leaf managed-flag { 2429 type boolean; 2430 status obsolete; 2431 description 2432 "The value that is placed in the 'Managed address 2433 configuration' flag field in the Router Advertisement."; 2434 } 2435 leaf other-config-flag { 2436 type boolean; 2437 status obsolete; 2438 description 2439 "The value that is placed in the 'Other configuration' flag 2440 field in the Router Advertisement."; 2441 } 2442 leaf link-mtu { 2443 type uint32; 2444 status obsolete; 2445 description 2446 "The value that is placed in MTU options sent by the 2447 router. A value of zero indicates that no MTU options are 2448 sent."; 2449 } 2450 leaf reachable-time { 2451 type uint32 { 2452 range "0..3600000"; 2453 } 2454 units "milliseconds"; 2455 status obsolete; 2456 description 2457 "The value that is placed in the Reachable Time field in 2458 the Router Advertisement messages sent by the router. A 2459 value of zero means unspecified (by this router)."; 2460 } 2461 leaf retrans-timer { 2462 type uint32; 2463 units "milliseconds"; 2464 status obsolete; 2465 description 2466 "The value that is placed in the Retrans Timer field in the 2467 Router Advertisement messages sent by the router. A value 2468 of zero means unspecified (by this router)."; 2469 } 2470 leaf cur-hop-limit { 2471 type uint8; 2472 status obsolete; 2473 description 2474 "The value that is placed in the Cur Hop Limit field in the 2475 Router Advertisement messages sent by the router. A value 2476 of zero means unspecified (by this router)."; 2477 } 2478 leaf default-lifetime { 2479 type uint16 { 2480 range "0..9000"; 2481 } 2482 units "seconds"; 2483 status obsolete; 2484 description 2485 "The value that is placed in the Router Lifetime field of 2486 Router Advertisements sent from the interface, in seconds. 2487 A value of zero indicates that the router is not to be 2488 used as a default router."; 2489 } 2490 container prefix-list { 2491 status obsolete; 2492 description 2493 "A list of prefixes that are placed in Prefix Information 2494 options in Router Advertisement messages sent from the 2495 interface. 2497 By default, these are all prefixes that the router 2498 advertises via routing protocols as being on-link for the 2499 interface from which the advertisement is sent."; 2500 list prefix { 2501 key "prefix-spec"; 2502 status obsolete; 2503 description 2504 "Advertised prefix entry and its parameters."; 2505 leaf prefix-spec { 2506 type inet:ipv6-prefix; 2507 status obsolete; 2508 description 2509 "IPv6 address prefix."; 2510 } 2511 leaf valid-lifetime { 2512 type uint32; 2513 units "seconds"; 2514 status obsolete; 2515 description 2516 "The value that is placed in the Valid Lifetime in the 2517 Prefix Information option. The designated value of 2518 all 1's (0xffffffff) represents infinity. 2520 An implementation SHOULD keep this value constant in 2521 consecutive advertisements except when it is 2522 explicitly changed in configuration."; 2523 } 2524 leaf on-link-flag { 2525 type boolean; 2526 status obsolete; 2527 description 2528 "The value that is placed in the on-link flag ('L-bit') 2529 field in the Prefix Information option."; 2530 } 2531 leaf preferred-lifetime { 2532 type uint32; 2533 units "seconds"; 2534 status obsolete; 2535 description 2536 "The value that is placed in the Preferred Lifetime in 2537 the Prefix Information option, in seconds. The 2538 designated value of all 1's (0xffffffff) represents 2539 infinity. 2541 An implementation SHOULD keep this value constant in 2542 consecutive advertisements except when it is 2543 explicitly changed in configuration."; 2544 } 2545 leaf autonomous-flag { 2546 type boolean; 2547 status obsolete; 2548 description 2549 "The value that is placed in the Autonomous Flag field 2550 in the Prefix Information option."; 2551 } 2552 } 2553 } 2554 } 2555 } 2556 } 2557 2559 10. IANA Considerations 2561 [RFC8022] registered the following namespace URIs in the "IETF XML 2562 Registry" [RFC3688]: 2564 URI: urn:ietf:params:xml:ns:yang:ietf-routing 2565 Registrant Contact: The IESG. 2566 XML: N/A; the requested URI is an XML namespace. 2568 URI: urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing 2569 Registrant Contact: The IESG. 2570 XML: N/A; the requested URI is an XML namespace. 2572 URI: urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing 2573 Registrant Contact: The IESG. 2574 XML: N/A; the requested URI is an XML namespace. 2576 [RFC8022] registered the following YANG modules in the "YANG Module 2577 Names" registry [RFC6020]: 2579 Name: ietf-routing 2580 Namespace: urn:ietf:params:xml:ns:yang:ietf-routing 2581 Prefix: rt 2582 Reference: RFC 8022 2584 Name: ietf-ipv4-unicast-routing 2585 Namespace: urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing 2586 Prefix: v4ur 2587 Reference: RFC 8022 2589 Name: ietf-ipv6-unicast-routing 2590 Namespace: urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing 2591 Prefix: v6ur 2592 Reference: RFC 8022 2594 This document registers the following YANG submodule in the "YANG 2595 Module Names" registry [RFC6020]: 2597 Name: ietf-ipv6-router-advertisements 2598 Module: ietf-ipv6-unicast-routing 2599 Reference: RFC 8022 2601 11. Security Considerations 2603 The YANG modules specified in this document define a schema for data 2604 that is designed to be accessed via network management protocols such 2605 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 2606 is the secure transport layer, and the mandatory-to-implement secure 2607 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 2608 is HTTPS, and the mandatory-to-implement secure transport is TLS 2609 [RFC5246]. 2611 The NETCONF access control model [RFC6536] provides the means to 2612 restrict access for particular NETCONF or RESTCONF users to a 2613 preconfigured subset of all available NETCONF or RESTCONF protocol 2614 operations and content. 2616 There are a number of data nodes defined in this YANG module that are 2617 writable/creatable/deletable (i.e., config true, which is the 2618 default). These data nodes may be considered sensitive or vulnerable 2619 in some network environments. Write operations (e.g., edit-config) 2620 to these data nodes without proper protection can have a negative 2621 effect on network operations. These are the subtrees and data nodes 2622 and their sensitivity/vulnerability: 2624 /routing/control-plane-protocols/control-plane-protocol: This list 2625 specifies the control-plane protocols configured on a device. 2627 /routing/ribs/rib: This list specifies the RIBs configured for the 2628 device. 2630 Some of the readable data nodes in this YANG module may be considered 2631 sensitive or vulnerable in some network environments. It is thus 2632 important to control read access (e.g., via get, get-config, or 2633 notification) to these data nodes. These are the subtrees and data 2634 nodes and their sensitivity/vulnerability: 2636 /routing/control-plane-protocols/control-plane-protocol: This list 2637 specifies the control-plane protocols configured on a device. 2638 Refer to the control plane models for a list of sensitive 2639 information. 2641 /routing/ribs/rib: This list specifies the RIB and their contents 2642 for the device. Access to this information may disclose the 2643 network topology and or other information. 2645 12. References 2647 12.1. Normative References 2649 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2650 Requirement Levels", BCP 14, RFC 2119, 2651 DOI 10.17487/RFC2119, March 1997, . 2654 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 2655 DOI 10.17487/RFC3688, January 2004, . 2658 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 2659 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 2660 DOI 10.17487/RFC4861, September 2007, . 2663 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2664 (TLS) Protocol Version 1.2", RFC 5246, 2665 DOI 10.17487/RFC5246, August 2008, . 2668 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2669 the Network Configuration Protocol (NETCONF)", RFC 6020, 2670 DOI 10.17487/RFC6020, October 2010, . 2673 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 2674 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 2675 . 2677 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 2678 and A. Bierman, Ed., "Network Configuration Protocol 2679 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 2680 . 2682 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 2683 Protocol (NETCONF) Access Control Model", RFC 6536, 2684 DOI 10.17487/RFC6536, March 2012, . 2687 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2688 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2689 . 2691 [I-D.ietf-netmod-rfc7223bis] 2692 Bjorklund, M., "A YANG Data Model for Interface 2693 Management", draft-ietf-netmod-rfc7223bis-03 (work in 2694 progress), January 2018. 2696 [I-D.ietf-netmod-rfc7277bis] 2697 Bjorklund, M., "A YANG Data Model for IP Management", 2698 draft-ietf-netmod-rfc7277bis-03 (work in progress), 2699 January 2018. 2701 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 2702 RFC 7950, DOI 10.17487/RFC7950, August 2016, 2703 . 2705 [RFC8022] Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 2706 Management", RFC 8022, DOI 10.17487/RFC8022, November 2707 2016, . 2709 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 2710 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 2711 . 2713 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2714 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2715 May 2017, . 2717 [I-D.ietf-netmod-revised-datastores] 2718 Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 2719 and R. Wilton, "Network Management Datastore 2720 Architecture", draft-ietf-netmod-revised-datastores-10 2721 (work in progress), January 2018. 2723 12.2. Informative References 2725 [I-D.ietf-netmod-rfc6087bis] 2726 Bierman, A., "Guidelines for Authors and Reviewers of YANG 2727 Data Model Documents", draft-ietf-netmod-rfc6087bis-16 2728 (work in progress), January 2018. 2730 [RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module 2731 Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, 2732 . 2734 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 2735 RFC 7951, DOI 10.17487/RFC7951, August 2016, 2736 . 2738 [I-D.ietf-netmod-yang-tree-diagrams] 2739 Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft- 2740 ietf-netmod-yang-tree-diagrams-05 (work in progress), 2741 January 2018. 2743 Appendix A. The Complete Schema Tree 2745 This appendix presents the complete tree of the core routing data 2746 model. See Section 2.2 for an explanation of the symbols used. The 2747 data type of every leaf node is shown near the right end of the 2748 corresponding line. 2750 module: ietf-routing 2751 +--rw routing 2752 | +--rw router-id? yang:dotted-quad 2753 | +--ro interfaces 2754 | | +--ro interface* if:interface-ref 2755 | +--rw control-plane-protocols 2756 | | +--rw control-plane-protocol* [type name] 2757 | | +--rw type identityref 2758 | | +--rw name string 2759 | | +--rw description? string 2760 | | +--rw static-routes 2761 | | +--rw v4ur:ipv4 2762 | | | +--rw v4ur:route* [destination-prefix] 2763 | | | +--rw v4ur:destination-prefix 2764 | | | | inet:ipv4-prefix 2765 | | | +--rw v4ur:description? string 2766 | | | +--rw v4ur:next-hop 2767 | | | +--rw (v4ur:next-hop-options) 2768 | | | +--:(v4ur:simple-next-hop) 2769 | | | | +--rw v4ur:outgoing-interface? 2770 | | | | | if:interface-ref 2771 | | | | +--rw v4ur:next-hop-address? 2772 | | | | inet:ipv4-address 2773 | | | +--:(v4ur:special-next-hop) 2774 | | | | +--rw v4ur:special-next-hop? 2775 | | | | enumeration 2776 | | | +--:(v4ur:next-hop-list) 2777 | | | +--rw v4ur:next-hop-list 2778 | | | +--rw v4ur:next-hop* [index] 2779 | | | +--rw v4ur:index 2780 | | | | string 2781 | | | +--rw v4ur:outgoing-interface? 2782 | | | | if:interface-ref 2783 | | | +--rw v4ur:next-hop-address? 2784 | | | inet:ipv4-address 2785 | | +--rw v6ur:ipv6 2786 | | +--rw v6ur:route* [destination-prefix] 2787 | | +--rw v6ur:destination-prefix 2788 | | | inet:ipv6-prefix 2789 | | +--rw v6ur:description? string 2790 | | +--rw v6ur:next-hop 2791 | | +--rw (v6ur:next-hop-options) 2792 | | +--:(v6ur:simple-next-hop) 2793 | | | +--rw v6ur:outgoing-interface? 2794 | | | | if:interface-ref 2795 | | | +--rw v6ur:next-hop-address? 2796 | | | inet:ipv6-address 2797 | | +--:(v6ur:special-next-hop) 2798 | | | +--rw v6ur:special-next-hop? 2799 | | | enumeration 2800 | | +--:(v6ur:next-hop-list) 2801 | | +--rw v6ur:next-hop-list 2802 | | +--rw v6ur:next-hop* [index] 2803 | | +--rw v6ur:index 2804 | | | string 2805 | | +--rw v6ur:outgoing-interface? 2806 | | | if:interface-ref 2807 | | +--rw v6ur:next-hop-address? 2808 | | inet:ipv6-address 2809 | +--rw ribs 2810 | +--rw rib* [name] 2811 | +--rw name string 2812 | +--rw address-family identityref 2813 | +--ro default-rib? boolean {multiple-ribs}? 2814 | +--ro routes 2815 | | +--ro route* 2816 | | +--ro route-preference? route-preference 2817 | | +--ro next-hop 2818 | | | +--ro (next-hop-options) 2819 | | | +--:(simple-next-hop) 2820 | | | | +--ro outgoing-interface? 2821 | | | | | if:interface-ref 2822 | | | | +--ro v4ur:next-hop-address? 2823 | | | | | inet:ipv4-address 2824 | | | | +--ro v6ur:next-hop-address? 2825 | | | | inet:ipv6-address 2826 | | | +--:(special-next-hop) 2827 | | | | +--ro special-next-hop? enumeration 2828 | | | +--:(next-hop-list) 2829 | | | +--ro next-hop-list 2830 | | | +--ro next-hop* 2831 | | | +--ro outgoing-interface? 2832 | | | | if:interface-ref 2833 | | | +--ro v4ur:address? 2834 | | | | inet:ipv4-address 2835 | | | +--ro v6ur:address? 2836 | | | inet:ipv6-address 2837 | | +--ro source-protocol identityref 2838 | | +--ro active? empty 2839 | | +--ro last-updated? yang:date-and-time 2840 | | +--ro v4ur:destination-prefix? inet:ipv4-prefix 2841 | | +--ro v6ur:destination-prefix? inet:ipv6-prefix 2842 | +---x active-route 2843 | | +---w input 2844 | | | +---w v4ur:destination-address? inet:ipv4-address 2845 | | | +---w v6ur:destination-address? inet:ipv6-address 2846 | | +--ro output 2847 | | +--ro route 2848 | | +--ro next-hop 2849 | | | +--ro (next-hop-options) 2850 | | | +--:(simple-next-hop) 2851 | | | | +--ro outgoing-interface? 2852 | | | | | if:interface-ref 2853 | | | | +--ro v4ur:next-hop-address? 2854 | | | | | inet:ipv4-address 2855 | | | | +--ro v6ur:next-hop-address? 2856 | | | | inet:ipv6-address 2857 | | | +--:(special-next-hop) 2858 | | | | +--ro special-next-hop? 2859 | | | | enumeration 2860 | | | +--:(next-hop-list) 2861 | | | +--ro next-hop-list 2862 | | | +--ro next-hop* 2863 | | | +--ro outgoing-interface? 2864 | | | | if:interface-ref 2865 | | | +--ro v4ur:next-hop-address? 2866 | | | | inet:ipv4-address 2867 | | | +--ro v6ur:next-hop-address? 2868 | | | inet:ipv6-address 2869 | | +--ro source-protocol identityref 2870 | | +--ro active? empty 2871 | | +--ro last-updated? 2872 | | | yang:date-and-time 2873 | | +--ro v4ur:destination-prefix? 2874 | | | inet:ipv4-prefix 2875 | | +--ro v6ur:destination-prefix? 2876 | | inet:ipv6-prefix 2877 | +--rw description? string 2878 o--ro routing-state 2879 o--ro router-id? yang:dotted-quad 2880 o--ro interfaces 2881 | o--ro interface* if:interface-state-ref 2882 o--ro control-plane-protocols 2883 | o--ro control-plane-protocol* [type name] 2884 | o--ro type identityref 2885 | o--ro name string 2886 o--ro ribs 2887 o--ro rib* [name] 2888 o--ro name string 2889 o--ro address-family identityref 2890 o--ro default-rib? boolean {multiple-ribs}? 2891 o--ro routes 2892 | o--ro route* 2893 | o--ro route-preference? route-preference 2894 | o--ro next-hop 2895 | | o--ro (next-hop-options) 2896 | | o--:(simple-next-hop) 2897 | | | o--ro outgoing-interface? 2898 | | | | if:interface-ref 2899 | | | o--ro v4ur:next-hop-address? 2900 | | | | inet:ipv4-address 2901 | | | o--ro v6ur:next-hop-address? 2902 | | | inet:ipv6-address 2903 | | o--:(special-next-hop) 2904 | | | o--ro special-next-hop? enumeration 2905 | | o--:(next-hop-list) 2906 | | o--ro next-hop-list 2907 | | o--ro next-hop* 2908 | | o--ro outgoing-interface? 2909 | | | if:interface-ref 2910 | | o--ro v4ur:address? 2911 | | | inet:ipv4-address 2912 | | o--ro v6ur:address? 2913 | | inet:ipv6-address 2914 | o--ro source-protocol identityref 2915 | o--ro active? empty 2916 | o--ro last-updated? yang:date-and-time 2917 | o--ro v4ur:destination-prefix? inet:ipv4-prefix 2918 | o--ro v6ur:destination-prefix? inet:ipv6-prefix 2919 o---x active-route 2920 o---w input 2921 | o---w v4ur:destination-address? inet:ipv4-address 2922 | o---w v6ur:destination-address? inet:ipv6-address 2923 o--ro output 2924 o--ro route 2925 o--ro next-hop 2926 | o--ro (next-hop-options) 2927 | o--:(simple-next-hop) 2928 | | o--ro outgoing-interface? 2929 | | | if:interface-ref 2930 | | o--ro v4ur:next-hop-address? 2931 | | | inet:ipv4-address 2932 | | o--ro v6ur:next-hop-address? 2933 | | inet:ipv6-address 2934 | o--:(special-next-hop) 2935 | | o--ro special-next-hop? 2936 | | enumeration 2937 | o--:(next-hop-list) 2938 | o--ro next-hop-list 2939 | o--ro next-hop* 2940 | o--ro outgoing-interface? 2941 | | if:interface-ref 2942 | o--ro v4ur:next-hop-address? 2943 | | inet:ipv4-address 2944 | o--ro v6ur:next-hop-address? 2945 | inet:ipv6-address 2946 o--ro source-protocol identityref 2947 o--ro active? empty 2948 o--ro last-updated? 2949 | yang:date-and-time 2950 o--ro v4ur:destination-prefix? 2951 | inet:ipv4-prefix 2952 o--ro v6ur:destination-prefix? 2953 inet:ipv6-prefix 2954 module: ietf-ipv6-unicast-routing 2955 augment /if:interfaces/if:interface/ip:ipv6: 2956 +--rw ipv6-router-advertisements 2957 +--rw send-advertisements? boolean 2958 +--rw max-rtr-adv-interval? uint16 2959 +--rw min-rtr-adv-interval? uint16 2960 +--rw managed-flag? boolean 2961 +--rw other-config-flag? boolean 2962 +--rw link-mtu? uint32 2963 +--rw reachable-time? uint32 2964 +--rw retrans-timer? uint32 2965 +--rw cur-hop-limit? uint8 2966 +--rw default-lifetime? uint16 2967 +--rw prefix-list 2968 +--rw prefix* [prefix-spec] 2969 +--rw prefix-spec inet:ipv6-prefix 2970 +--rw (control-adv-prefixes)? 2971 +--:(no-advertise) 2972 | +--rw no-advertise? empty 2973 +--:(advertise) 2974 +--rw valid-lifetime? uint32 2975 +--rw on-link-flag? boolean 2976 +--rw preferred-lifetime? uint32 2977 +--rw autonomous-flag? boolean 2978 augment /if:interfaces-state/if:interface/ip:ipv6: 2979 o--ro ipv6-router-advertisements 2980 o--ro send-advertisements? boolean 2981 o--ro max-rtr-adv-interval? uint16 2982 o--ro min-rtr-adv-interval? uint16 2983 o--ro managed-flag? boolean 2984 o--ro other-config-flag? boolean 2985 o--ro link-mtu? uint32 2986 o--ro reachable-time? uint32 2987 o--ro retrans-timer? uint32 2988 o--ro cur-hop-limit? uint8 2989 o--ro default-lifetime? uint16 2990 o--ro prefix-list 2991 o--ro prefix* [prefix-spec] 2992 o--ro prefix-spec inet:ipv6-prefix 2993 o--ro valid-lifetime? uint32 2994 o--ro on-link-flag? boolean 2995 o--ro preferred-lifetime? uint32 2996 o--ro autonomous-flag? boolean 2998 Appendix B. Minimum Implementation 3000 Some parts and options of the core routing model, such as user- 3001 defined RIBs, are intended only for advanced routers. This appendix 3002 gives basic non-normative guidelines for implementing a bare minimum 3003 of available functions. Such an implementation may be used for hosts 3004 or very simple routers. 3006 A minimum implementation does not support the feature 3007 "multiple-ribs". This means that a single system-controlled RIB is 3008 available for each supported address family -- IPv4, IPv6, or both. 3009 These RIBs are also the default RIBs. No user-controlled RIBs are 3010 allowed. 3012 In addition to the mandatory instance of the "direct" pseudo- 3013 protocol, a minimum implementation should support configuring 3014 instance(s) of the "static" pseudo-protocol. 3016 For hosts that are never intended to act as routers, the ability to 3017 turn on sending IPv6 router advertisements (Section 5.4) should be 3018 removed. 3020 Platforms with severely constrained resources may use deviations for 3021 restricting the data model, e.g., limiting the number of "static" 3022 control-plane protocol instances. 3024 Appendix C. Example: Adding a New Control-Plane Protocol 3026 This appendix demonstrates how the core routing data model can be 3027 extended to support a new control-plane protocol. The YANG module 3028 "example-rip" shown below is intended as an illustration rather than 3029 a real definition of a data model for the Routing Information 3030 Protocol (RIP). For the sake of brevity, this module does not obey 3031 all the guidelines specified in [I-D.ietf-netmod-rfc6087bis]. See 3032 also Section 5.3.2. 3034 module example-rip { 3036 yang-version "1.1"; 3038 namespace "http://example.com/rip"; 3040 prefix "rip"; 3042 import ietf-interfaces { 3043 prefix "if"; 3044 } 3046 import ietf-routing { 3047 prefix "rt"; 3048 } 3050 identity rip { 3051 base rt:routing-protocol; 3052 description 3053 "Identity for the Routing Information Protocol (RIP)."; 3054 } 3056 typedef rip-metric { 3057 type uint8 { 3058 range "0..16"; 3059 } 3060 } 3062 grouping route-content { 3063 description 3064 "This grouping defines RIP-specific route attributes."; 3065 leaf metric { 3066 type rip-metric; 3067 } 3068 leaf tag { 3069 type uint16; 3070 default "0"; 3071 description 3072 "This leaf may be used to carry additional info, e.g., 3073 autonomous system (AS) number."; 3074 } 3075 } 3077 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 3078 when "derived-from-or-self(rt:source-protocol, 'rip:rip')" { 3079 description 3080 "This augment is only valid for a route whose source 3081 protocol is RIP."; 3082 } 3083 description 3084 "RIP-specific route attributes."; 3085 uses route-content; 3086 } 3088 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 3089 + "rt:output/rt:route" { 3090 description 3091 "RIP-specific route attributes in the output of 'active-route' 3092 RPC."; 3093 uses route-content; 3094 } 3096 augment "/rt:routing/rt:control-plane-protocols/" 3097 + "rt:control-plane-protocol" { 3098 when "derived-from-or-self(rt:type,'rip:rip')" { 3099 description 3100 "This augment is only valid for a routing protocol instance 3101 of type 'rip'."; 3102 } 3103 container rip { 3104 presence "RIP configuration"; 3105 description 3106 "RIP instance configuration."; 3107 container interfaces { 3108 description 3109 "Per-interface RIP configuration."; 3110 list interface { 3111 key "name"; 3112 description 3113 "RIP is enabled on interfaces that have an entry in this 3114 list, unless 'enabled' is set to 'false' for that 3115 entry."; 3116 leaf name { 3117 type if:interface-ref; 3118 } 3119 leaf enabled { 3120 type boolean; 3121 default "true"; 3122 } 3123 leaf metric { 3124 type rip-metric; 3125 default "1"; 3126 } 3128 } 3129 } 3130 leaf update-interval { 3131 type uint8 { 3132 range "10..60"; 3133 } 3134 units "seconds"; 3135 default "30"; 3136 description 3137 "Time interval between periodic updates."; 3138 } 3139 } 3140 } 3141 } 3143 Appendix D. Data Tree Example 3145 This section contains an example of an instance data tree from the 3146 operational state, in the JSON encoding [RFC7951]. The data conforms 3147 to a data model that is defined by the following YANG library 3148 specification [RFC7895]: 3150 { 3151 "ietf-yang-library:modules-state": { 3152 "module-set-id": "c2e1f54169aa7f36e1a6e8d0865d441d3600f9c4", 3153 "module": [ 3154 { 3155 "name": "ietf-routing", 3156 "revision": "2018-01-25", 3157 "feature": [ 3158 "multiple-ribs", 3159 "router-id" 3160 ], 3161 "namespace": "urn:ietf:params:xml:ns:yang:ietf-routing", 3162 "conformance-type": "implement" 3163 }, 3164 { 3165 "name": "ietf-ipv4-unicast-routing", 3166 "revision": "2018-01-25", 3167 "namespace": 3168 "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing", 3169 "conformance-type": "implement" 3170 }, 3171 { 3172 "name": "ietf-ipv6-unicast-routing", 3173 "revision": "2018-01-25", 3174 "namespace": 3175 "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing", 3177 "conformance-type": "implement", 3178 "submodule": [ 3179 { 3180 "name": "ietf-ipv6-router-advertisements", 3181 "revision": "2018-01-25" 3182 } 3183 ] 3184 }, 3185 { 3186 "name": "ietf-interfaces", 3187 "revision": "2017-12-16", 3188 "namespace": "urn:ietf:params:xml:ns:yang:ietf-interfaces", 3189 "conformance-type": "implement" 3190 }, 3191 { 3192 "name": "ietf-inet-types", 3193 "namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", 3194 "revision": "2013-07-15", 3195 "conformance-type": "import" 3196 }, 3197 { 3198 "name": "ietf-yang-types", 3199 "namespace": "urn:ietf:params:xml:ns:yang:ietf-yang-types", 3200 "revision": "2013-07-15", 3201 "conformance-type": "import" 3202 }, 3203 { 3204 "name": "iana-if-type", 3205 "namespace": "urn:ietf:params:xml:ns:yang:iana-if-type", 3206 "revision": "2014-05-08", 3207 "conformance-type": "implement" 3208 }, 3209 { 3210 "name": "ietf-ip", 3211 "revision": "2017-12-16", 3212 "namespace": "urn:ietf:params:xml:ns:yang:ietf-ip", 3213 "conformance-type": "implement" 3214 } 3215 ] 3216 } 3217 } 3219 A simple network setup as shown in Figure 2 is assumed: router "A" 3220 uses static default routes with the "ISP" router as the next hop. 3221 IPv6 router advertisements are configured only on the "eth1" 3222 interface and disabled on the upstream "eth0" interface. 3224 +-----------------+ 3225 | | 3226 | Router ISP | 3227 | | 3228 +--------+--------+ 3229 |2001:db8:0:1::2 3230 |192.0.2.2 3231 | 3232 | 3233 |2001:db8:0:1::1 3234 eth0|192.0.2.1 3235 +--------+--------+ 3236 | | 3237 | Router A | 3238 | | 3239 +--------+--------+ 3240 eth1|198.51.100.1 3241 |2001:db8:0:2::1 3242 | 3244 Figure 2: Example of Network Configuration 3246 The instance data tree could then be as follows: 3248 { 3249 "ietf-interfaces:interfaces": { 3250 "interface": [ 3251 { 3252 "name": "eth0", 3253 "type": "iana-if-type:ethernetCsmacd", 3254 "description": "Uplink to ISP.", 3255 "phys-address": "00:0C:42:E5:B1:E9", 3256 "oper-status": "up", 3257 "statistics": { 3258 "discontinuity-time": "2015-10-24T17:11:27+02:00" 3259 }, 3260 "ietf-ip:ipv4": { 3261 "forwarding": true, 3262 "mtu": 1500, 3263 "address": [ 3264 { 3265 "ip": "192.0.2.1", 3266 "prefix-length": 24 3267 } 3268 ] 3269 }, 3270 "ietf-ip:ipv6": { 3271 "forwarding": true, 3272 "mtu": 1500, 3273 "address": [ 3274 { 3275 "ip": "2001:0db8:0:1::1", 3276 "prefix-length": 64 3277 } 3278 ], 3279 "autoconf": { 3280 "create-global-addresses": false 3281 }, 3282 "ietf-ipv6-unicast-routing:ipv6-router-advertisements": { 3283 "send-advertisements": false 3284 } 3285 } 3286 }, 3287 { 3288 "name": "eth1", 3289 "type": "iana-if-type:ethernetCsmacd", 3290 "description": "Interface to the internal network.", 3291 "phys-address": "00:0C:42:E5:B1:EA", 3292 "oper-status": "up", 3293 "statistics": { 3294 "discontinuity-time": "2015-10-24T17:11:29+02:00" 3295 }, 3296 "ietf-ip:ipv4": { 3297 "forwarding": true, 3298 "mtu": 1500, 3299 "address": [ 3300 { 3301 "ip": "198.51.100.1", 3302 "prefix-length": 24 3303 } 3304 ] 3305 }, 3306 "ietf-ip:ipv6": { 3307 "forwarding": true, 3308 "mtu": 1500, 3309 "address": [ 3310 { 3311 "ip": "2001:0db8:0:2::1", 3312 "prefix-length": 64 3313 } 3314 ], 3315 "autoconf": { 3316 "create-global-addresses": false 3317 }, 3318 "ietf-ipv6-unicast-routing:ipv6-router-advertisements": { 3319 "send-advertisements": true, 3320 "prefix-list": { 3321 "prefix": [ 3322 { 3323 "prefix-spec": "2001:db8:0:2::/64" 3324 } 3325 ] 3326 } 3327 } 3328 } 3329 } 3330 ] 3331 }, 3333 "ietf-routing:routing": { 3334 "router-id": "192.0.2.1", 3335 "control-plane-protocols": { 3336 "control-plane-protocol": [ 3337 { 3338 "type": "ietf-routing:static", 3339 "name": "st0", 3340 "description": 3341 "Static routing is used for the internal network.", 3342 "static-routes": { 3343 "ietf-ipv4-unicast-routing:ipv4": { 3344 "route": [ 3345 { 3346 "destination-prefix": "0.0.0.0/0", 3347 "next-hop": { 3348 "next-hop-address": "192.0.2.2" 3349 } 3350 } 3351 ] 3352 }, 3353 "ietf-ipv6-unicast-routing:ipv6": { 3354 "route": [ 3355 { 3356 "destination-prefix": "::/0", 3357 "next-hop": { 3358 "next-hop-address": "2001:db8:0:1::2" 3359 } 3360 } 3361 ] 3362 } 3363 } 3364 } 3365 ] 3366 }, 3367 "ribs": { 3368 "rib": [ 3369 { 3370 "name": "ipv4-master", 3371 "address-family": 3372 "ietf-ipv4-unicast-routing:ipv4-unicast", 3373 "default-rib": true, 3374 "routes": { 3375 "route": [ 3376 { 3377 "ietf-ipv4-unicast-routing:destination-prefix": 3378 "192.0.2.1/24", 3379 "next-hop": { 3380 "outgoing-interface": "eth0" 3381 }, 3382 "route-preference": 0, 3383 "source-protocol": "ietf-routing:direct", 3384 "last-updated": "2015-10-24T17:11:27+02:00" 3385 }, 3386 { 3387 "ietf-ipv4-unicast-routing:destination-prefix": 3388 "198.51.100.0/24", 3389 "next-hop": { 3390 "outgoing-interface": "eth1" 3391 }, 3392 "source-protocol": "ietf-routing:direct", 3393 "route-preference": 0, 3394 "last-updated": "2015-10-24T17:11:27+02:00" 3395 }, 3396 { 3397 "ietf-ipv4-unicast-routing:destination-prefix": 3398 "0.0.0.0/0", 3399 "source-protocol": "ietf-routing:static", 3400 "route-preference": 5, 3401 "next-hop": { 3402 "ietf-ipv4-unicast-routing:next-hop-address": 3403 "192.0.2.2" 3404 }, 3405 "last-updated": "2015-10-24T18:02:45+02:00" 3406 } 3407 ] 3408 } 3409 }, 3410 { 3411 "name": "ipv6-master", 3412 "address-family": 3413 "ietf-ipv6-unicast-routing:ipv6-unicast", 3414 "default-rib": true, 3415 "routes": { 3416 "route": [ 3417 { 3418 "ietf-ipv6-unicast-routing:destination-prefix": 3419 "2001:db8:0:1::/64", 3420 "next-hop": { 3421 "outgoing-interface": "eth0" 3422 }, 3423 "source-protocol": "ietf-routing:direct", 3424 "route-preference": 0, 3425 "last-updated": "2015-10-24T17:11:27+02:00" 3426 }, 3427 { 3428 "ietf-ipv6-unicast-routing:destination-prefix": 3429 "2001:db8:0:2::/64", 3430 "next-hop": { 3431 "outgoing-interface": "eth1" 3432 }, 3433 "source-protocol": "ietf-routing:direct", 3434 "route-preference": 0, 3435 "last-updated": "2015-10-24T17:11:27+02:00" 3436 }, 3437 { 3438 "ietf-ipv6-unicast-routing:destination-prefix": 3439 "::/0", 3440 "next-hop": { 3441 "ietf-ipv6-unicast-routing:next-hop-address": 3442 "2001:db8:0:1::2" 3443 }, 3444 "source-protocol": "ietf-routing:static", 3445 "route-preference": 5, 3446 "last-updated": "2015-10-24T18:02:45+02:00" 3447 } 3448 ] 3449 } 3450 } 3451 ] 3452 } 3453 } 3454 } 3456 Appendix E. NETCONF Get Data Reply Example 3458 This section gives an example of an XML reply to the NETCONF request for for a device that implements the 3460 example data models above. 3462 3465 3466 3470 192.0.2.1 3471 3472 3473 ietf-routing:static 3474 3475 3476 3477 3478 0.0.0.0/0 3479 3480 192.0.2.2 3481 3482 3483 3484 3485 3486 ::/0 3487 3488 2001:db8:0:1::2 3489 3490 3491 3492 3493 3494 3496 3497 3498 ipv4-master 3499 3500 ietf-ipv4-unicast-routing:ipv4-unicast 3501 3502 true 3503 3504 3505 3506 192.0.2.1/24 3507 3508 3509 eth0 3510 3511 0 3512 ietf-routing:direct 3513 2015-10-24T17:11:27+02:00 3514 3515 3516 3517 198.51.100.0/24 3518 3519 3520 eth1 3521 3522 0 3523 ietf-routing:direct 3524 2015-10-24T17:11:27+02:00 3525 3526 3527 0.0.0.0/0 3528 3529 3530 192.0.2.2 3531 3532 3533 5 3534 ietf-routing:static 3535 2015-10-24T18:02:45+02:00 3536 3537 3538 3539 3540 ipv6-master 3541 3542 ietf-ipv6-unicast-routing:ipv6-unicast 3543 3544 true 3545 3546 3547 3548 2001:db8:0:1::/64 3549 3550 3551 eth0 3552 3553 0 3554 ietf-routing:direct 3555 2015-10-24T17:11:27+02:00 3556 3557 3558 3559 2001:db8:0:2::/64 3560 3561 3562 eth1 3563 3564 0 3565 ietf-routing:direct 3566 2015-10-24T17:11:27+02:00 3567 3568 3569 ::/0 3570 3571 3572 3573 2001:db8:0:1::2 3574 3575 3576 5 3577 ietf-routing:static 3578 2015-10-24T18:02:45+02:00 3579 3580 3581 3582 3583 3584 3585 3587 Acknowledgments 3589 The authors wish to thank Nitin Bahadur, Martin Bjorklund, Dean 3590 Bogdanovic, Jeff Haas, Joel Halpern, Wes Hardaker, Sriganesh Kini, 3591 David Lamparter, Andrew McGregor, Jan Medved, Xiang Li, Stephane 3592 Litkowski, Thomas Morin, Tom Petch, Bruno Rijsman, 3593 Juergen Schoenwaelder, Phil Shafer, Dave Thaler, Yi Yang, 3594 Derek Man-Kit Yeung, Jeffrey Zhang, Vladimir Vassilev, Rob Wilton, 3595 Joe Clark, Jia He, Suresh Krishnan, and Francis Dupont for their 3596 helpful comments and suggestions. 3598 Authors' Addresses 3600 Ladislav Lhotka 3601 CZ.NIC 3603 EMail: lhotka@nic.cz 3604 Acee Lindem 3605 Cisco Systems 3607 EMail: acee@cisco.com 3609 Yingzhen Qu 3610 Huawei 3611 2330 Central Expressway 3612 Santa Clara CA 95050 3613 USA 3615 EMail: yingzhen.qu@huawei.com