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