idnits 2.17.1 draft-ietf-netmod-rfc8022bis-07.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 2790 has weird spacing: '...-family ide...' == Line 2862 has weird spacing: '...ro type ide...' == Line 2863 has weird spacing: '...ro name str...' == Line 2867 has weird spacing: '...-family ide...' -- The document date (January 4, 2018) is 2296 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 8, 2018 Y. Qu 7 Huawei 8 January 4, 2018 10 A YANG Data Model for Routing Management (NDMA Version) 11 draft-ietf-netmod-rfc8022bis-07 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 8, 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 . . . . . . . . . . 43 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 . . . . . . . . . . . . . . . . . 57 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@2017-12-21.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 2017-12-21 { 632 description 633 "Network Managment 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 /* Obsolete State Data */ 1089 container routing-state { 1090 config false; 1091 status obsolete; 1092 description 1093 "State data of the routing subsystem."; 1094 uses router-id { 1095 status obsolete; 1096 description 1097 "Global router ID. 1099 It may be either configured or assigned algorithmically by 1100 the implementation."; 1101 } 1102 container interfaces { 1103 status obsolete; 1104 description 1105 "Network-layer interfaces used for routing."; 1106 leaf-list interface { 1107 type if:interface-state-ref; 1108 status obsolete; 1109 description 1110 "Each entry is a reference to the name of a configured 1111 network-layer interface."; 1112 } 1113 } 1114 container control-plane-protocols { 1115 status obsolete; 1116 description 1117 "Container for the list of routing protocol instances."; 1118 list control-plane-protocol { 1119 key "type name"; 1120 status obsolete; 1121 description 1122 "State data of a control-plane protocol instance. 1124 An implementation MUST provide exactly one 1125 system-controlled instance of the 'direct' 1126 pseudo-protocol. Instances of other control-plane 1127 protocols MAY be created by configuration."; 1128 leaf type { 1129 type identityref { 1130 base control-plane-protocol; 1132 } 1133 status obsolete; 1134 description 1135 "Type of the control-plane protocol."; 1136 } 1137 leaf name { 1138 type string; 1139 status obsolete; 1140 description 1141 "The name of the control-plane protocol instance. 1143 For system-controlled instances this name is 1144 persistent, i.e., it SHOULD NOT change across 1145 reboots."; 1146 } 1147 } 1148 } 1149 container ribs { 1150 status obsolete; 1151 description 1152 "Container for RIBs."; 1153 list rib { 1154 key "name"; 1155 min-elements 1; 1156 status obsolete; 1157 description 1158 "Each entry represents a RIB identified by the 'name' 1159 key. All routes in a RIB MUST belong to the same address 1160 family. 1162 An implementation SHOULD provide one system-controlled 1163 default RIB for each supported address family."; 1164 leaf name { 1165 type string; 1166 status obsolete; 1167 description 1168 "The name of the RIB."; 1169 } 1170 uses address-family { 1171 status obsolete; 1172 description 1173 "The address family of the RIB."; 1174 } 1175 leaf default-rib { 1176 if-feature "multiple-ribs"; 1177 type boolean; 1178 default "true"; 1179 status obsolete; 1180 description 1181 "This flag has the value of 'true' if and only if the 1182 RIB is the default RIB for the given address family. 1184 By default, control-plane protocols place their routes 1185 in the default RIBs."; 1186 } 1187 container routes { 1188 status obsolete; 1189 description 1190 "Current content of the RIB."; 1191 list route { 1192 status obsolete; 1193 description 1194 "A RIB route entry. This data node MUST be augmented 1195 with information specific for routes of each address 1196 family."; 1197 leaf route-preference { 1198 type route-preference; 1199 status obsolete; 1200 description 1201 "This route attribute, also known as administrative 1202 distance, allows for selecting the preferred route 1203 among routes with the same destination prefix. A 1204 smaller value means a more preferred route."; 1205 } 1206 container next-hop { 1207 status obsolete; 1208 description 1209 "Route's next-hop attribute."; 1210 uses next-hop-state-content { 1211 status obsolete; 1212 description 1213 "Route's next-hop attribute operational state."; 1214 } 1215 } 1216 uses route-metadata { 1217 status obsolete; 1218 description 1219 "Route metadata."; 1220 } 1221 } 1222 } 1223 action active-route { 1224 status obsolete; 1225 description 1226 "Return the active RIB route that is used for the 1227 destination address. 1229 Address-family-specific modules MUST augment input 1230 parameters with a leaf named 'destination-address'."; 1231 output { 1232 container route { 1233 status obsolete; 1234 description 1235 "The active RIB route for the specified 1236 destination. 1238 If no route exists in the RIB for the destination 1239 address, no output is returned. 1241 Address-family-specific modules MUST augment this 1242 container with appropriate route contents."; 1243 container next-hop { 1244 status obsolete; 1245 description 1246 "Route's next-hop attribute."; 1247 uses next-hop-state-content { 1248 status obsolete; 1249 description 1250 "Active route state data."; 1251 } 1252 } 1253 uses route-metadata { 1254 status obsolete; 1255 description 1256 "Active route metadata."; 1257 } 1258 } 1259 } 1260 } 1261 } 1262 } 1263 } 1264 } 1265 1267 8. IPv4 Unicast Routing Management YANG Module 1269 file "ietf-ipv4-unicast-routing@2017-12-21.yang" 1270 module ietf-ipv4-unicast-routing { 1271 yang-version "1.1"; 1272 namespace 1273 "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing"; 1274 prefix "v4ur"; 1276 import ietf-routing { 1277 prefix "rt"; 1278 description 1279 "A Network Management Datastore Architecture (NDMA) 1280 compatible version of the ietf-routing module 1281 is required."; 1282 } 1284 import ietf-inet-types { 1285 prefix "inet"; 1286 } 1287 organization 1288 "IETF NETMOD - Networking Modeling Working Group"; 1289 contact 1290 "WG Web: 1291 WG List: 1293 Editor: Ladislav Lhotka 1294 1295 Acee Lindem 1296 1297 Yingzhen Qu 1298 "; 1300 description 1301 "This YANG module augments the 'ietf-routing' module with basic 1302 parameters for IPv4 unicast routing. The model fully conforms 1303 to the Network Management Datastore Architecture (NMDA). 1305 Copyright (c) 2017 IETF Trust and the persons 1306 identified as authors of the code. All rights reserved. 1308 Redistribution and use in source and binary forms, with or 1309 without modification, is permitted pursuant to, and subject 1310 to the license terms contained in, the Simplified BSD License 1311 set forth in Section 4.c of the IETF Trust's Legal Provisions 1312 Relating to IETF Documents 1313 (http://trustee.ietf.org/license-info). 1315 This version of this YANG module is part of RFC XXXX; see 1316 the RFC itself for full legal notices."; 1317 reference "RFC XXXX"; 1319 revision 2017-12-21 { 1320 description 1321 "Network Managment Datastore Architecture (NDMA) Revision"; 1322 reference 1323 "RFC XXXX: A YANG Data Model for Routing Management 1324 (NDMA Version)"; 1326 } 1328 revision 2016-11-04 { 1329 description 1330 "Initial revision."; 1331 reference 1332 "RFC 8022: A YANG Data Model for Routing Management"; 1333 } 1335 /* Identities */ 1337 identity ipv4-unicast { 1338 base rt:ipv4; 1339 description 1340 "This identity represents the IPv4 unicast address family."; 1341 } 1343 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 1344 when "derived-from-or-self(../../rt:address-family, " 1345 + "'v4ur:ipv4-unicast')" { 1346 description 1347 "This augment is valid only for IPv4 unicast."; 1348 } 1349 description 1350 "This leaf augments an IPv4 unicast route."; 1351 leaf destination-prefix { 1352 type inet:ipv4-prefix; 1353 description 1354 "IPv4 destination prefix."; 1355 } 1356 } 1358 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1359 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1360 when "derived-from-or-self(../../../rt:address-family, " 1361 + "'v4ur:ipv4-unicast')" { 1362 description 1363 "This augment is valid only for IPv4 unicast."; 1364 } 1365 description 1366 "Augment 'simple-next-hop' case in IPv4 unicast routes."; 1367 leaf next-hop-address { 1368 type inet:ipv4-address; 1369 description 1370 "IPv4 address of the next hop."; 1371 } 1372 } 1373 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1374 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1375 + "rt:next-hop-list/rt:next-hop" { 1376 when "derived-from-or-self(../../../../../rt:address-family, " 1377 + "'v4ur:ipv4-unicast')" { 1378 description 1379 "This augment is valid only for IPv4 unicast."; 1380 } 1381 description 1382 "This leaf augments the 'next-hop-list' case of IPv4 unicast 1383 routes."; 1384 leaf address { 1385 type inet:ipv4-address; 1386 description 1387 "IPv4 address of the next-hop."; 1388 } 1389 } 1391 augment 1392 "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { 1393 when "derived-from-or-self(../rt:address-family, " 1394 + "'v4ur:ipv4-unicast')" { 1395 description 1396 "This augment is valid only for IPv4 unicast RIBs."; 1397 } 1398 description 1399 "This augment adds the input parameter of the 'active-route' 1400 action."; 1401 leaf destination-address { 1402 type inet:ipv4-address; 1403 description 1404 "IPv4 destination address."; 1405 } 1406 } 1408 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1409 + "rt:output/rt:route" { 1410 when "derived-from-or-self(../../rt:address-family, " 1411 + "'v4ur:ipv4-unicast')" { 1412 description 1413 "This augment is valid only for IPv4 unicast."; 1414 } 1415 description 1416 "This augment adds the destination prefix to the reply of the 1417 'active-route' action."; 1418 leaf destination-prefix { 1419 type inet:ipv4-prefix; 1420 description 1421 "IPv4 destination prefix."; 1422 } 1423 } 1425 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1426 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1427 + "rt:simple-next-hop" { 1428 when "derived-from-or-self(../../../rt:address-family, " 1429 + "'v4ur:ipv4-unicast')" { 1430 description 1431 "This augment is valid only for IPv4 unicast."; 1432 } 1433 description 1434 "Augment 'simple-next-hop' case in the reply to the 1435 'active-route' action."; 1436 leaf next-hop-address { 1437 type inet:ipv4-address; 1438 description 1439 "IPv4 address of the next hop."; 1440 } 1441 } 1443 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1444 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1445 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1446 when "derived-from-or-self(../../../../../rt:address-family, " 1447 + "'v4ur:ipv4-unicast')" { 1448 description 1449 "This augment is valid only for IPv4 unicast."; 1450 } 1451 description 1452 "Augment 'next-hop-list' case in the reply to the 1453 'active-route' action."; 1454 leaf next-hop-address { 1455 type inet:ipv4-address; 1456 description 1457 "IPv4 address of the next hop."; 1458 } 1459 } 1461 augment "/rt:routing/rt:control-plane-protocols/" 1462 + "rt:control-plane-protocol/rt:static-routes" { 1463 description 1464 "This augment defines the 'static' pseudo-protocol 1465 with data specific to IPv4 unicast."; 1466 container ipv4 { 1467 description 1468 "Support for a 'static' pseudo-protocol instance 1469 consists of a list of routes."; 1470 list route { 1471 key "destination-prefix"; 1472 description 1473 "A list of static routes."; 1474 leaf destination-prefix { 1475 type inet:ipv4-prefix; 1476 mandatory "true"; 1477 description 1478 "IPv4 destination prefix."; 1479 } 1480 leaf description { 1481 type string; 1482 description 1483 "Textual description of the route."; 1484 } 1485 container next-hop { 1486 description 1487 "Support for next-hop."; 1488 uses rt:next-hop-content { 1489 augment "next-hop-options/simple-next-hop" { 1490 description 1491 "Augment 'simple-next-hop' case in IPv4 static 1492 routes."; 1493 leaf next-hop-address { 1494 type inet:ipv4-address; 1495 description 1496 "IPv4 address of the next hop."; 1497 } 1498 } 1499 augment "next-hop-options/next-hop-list/next-hop-list/" 1500 + "next-hop" { 1501 description 1502 "Augment 'next-hop-list' case in IPv4 static 1503 routes."; 1504 leaf next-hop-address { 1505 type inet:ipv4-address; 1506 description 1507 "IPv4 address of the next hop."; 1508 } 1509 } 1510 } 1511 } 1512 } 1513 } 1514 } 1516 /* Obsolete State Data */ 1517 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { 1518 when "derived-from-or-self(../../rt:address-family, " 1519 + "'v4ur:ipv4-unicast')" { 1520 description 1521 "This augment is valid only for IPv4 unicast."; 1522 } 1523 status obsolete; 1524 description 1525 "This leaf augments an IPv4 unicast route."; 1526 leaf destination-prefix { 1527 type inet:ipv4-prefix; 1528 status obsolete; 1529 description 1530 "IPv4 destination prefix."; 1531 } 1532 } 1533 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1534 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1535 when "derived-from-or-self( 1536 ../../../rt:address-family, 'v4ur:ipv4-unicast')" { 1537 description 1538 "This augment is valid only for IPv4 unicast."; 1539 } 1540 status obsolete; 1541 description 1542 "Augment 'simple-next-hop' case in IPv4 unicast routes."; 1543 leaf next-hop-address { 1544 type inet:ipv4-address; 1545 status obsolete; 1546 description 1547 "IPv4 address of the next hop."; 1548 } 1549 } 1550 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1551 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1552 + "rt:next-hop-list/rt:next-hop" { 1553 when "derived-from-or-self(../../../../../rt:address-family, 1554 'v4ur:ipv4-unicast')" { 1555 description 1556 "This augment is valid only for IPv4 unicast."; 1557 } 1558 status obsolete; 1559 description 1560 "This leaf augments the 'next-hop-list' case of IPv4 unicast 1561 routes."; 1562 leaf address { 1563 type inet:ipv4-address; 1564 status obsolete; 1565 description 1566 "IPv4 address of the next-hop."; 1567 } 1568 } 1569 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1570 + "rt:input" { 1571 when "derived-from-or-self(../rt:address-family, 1572 'v4ur:ipv4-unicast')" { 1573 description 1574 "This augment is valid only for IPv4 unicast RIBs."; 1575 } 1576 status obsolete; 1577 description 1578 "This augment adds the input parameter of the 'active-route' 1579 action."; 1580 leaf destination-address { 1581 type inet:ipv4-address; 1582 status obsolete; 1583 description 1584 "IPv4 destination address."; 1585 } 1586 } 1587 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1588 + "rt:output/rt:route" { 1589 when "derived-from-or-self(../../rt:address-family, 1590 'v4ur:ipv4-unicast')" { 1591 description 1592 "This augment is valid only for IPv4 unicast."; 1593 } 1594 status obsolete; 1595 description 1596 "This augment adds the destination prefix to the reply of the 1597 'active-route' action."; 1598 leaf destination-prefix { 1599 type inet:ipv4-prefix; 1600 status obsolete; 1601 description 1602 "IPv4 destination prefix."; 1603 } 1604 } 1605 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1606 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1607 + "rt:simple-next-hop" { 1608 when "derived-from-or-self(../../../rt:address-family, 1609 'v4ur:ipv4-unicast')" { 1610 description 1611 "This augment is valid only for IPv4 unicast."; 1612 } 1613 status obsolete; 1614 description 1615 "Augment 'simple-next-hop' case in the reply to the 1616 'active-route' action."; 1617 leaf next-hop-address { 1618 type inet:ipv4-address; 1619 status obsolete; 1620 description 1621 "IPv4 address of the next hop."; 1622 } 1623 } 1624 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1625 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1626 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1627 when "derived-from-or-self(../../../../../rt:address-family, 1628 'v4ur:ipv4-unicast')" { 1629 description 1630 "This augment is valid only for IPv4 unicast."; 1631 } 1632 status obsolete; 1633 description 1634 "Augment 'next-hop-list' case in the reply to the 1635 'active-route' action."; 1636 leaf next-hop-address { 1637 type inet:ipv4-address; 1638 status obsolete; 1639 description 1640 "IPv4 address of the next hop."; 1641 } 1642 } 1643 } 1644 1646 9. IPv6 Unicast Routing Management YANG Module 1648 file "ietf-ipv6-unicast-routing@2017-12-21.yang" 1649 module ietf-ipv6-unicast-routing { 1650 yang-version "1.1"; 1651 namespace 1652 "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing"; 1653 prefix "v6ur"; 1655 import ietf-routing { 1656 prefix "rt"; 1657 description 1658 "A Network Management Datastore Architecture (NDMA) 1659 compatible version of the ietf-routing module 1660 is required."; 1662 } 1664 import ietf-inet-types { 1665 prefix "inet"; 1666 description 1667 "A Network Management Datastore Architecture (NDMA) 1668 compatible version of the ietf-interfaces module 1669 is required."; 1670 } 1672 include ietf-ipv6-router-advertisements { 1673 revision-date 2017-12-21; 1674 } 1676 organization 1677 "IETF NETMOD - Networking Modeling Working Group"; 1678 contact 1679 "WG Web: 1680 WG List: 1682 Editor: Ladislav Lhotka 1683 1684 Acee Lindem 1685 1686 Yingzhen Qu 1687 "; 1689 description 1690 "This YANG module augments the 'ietf-routing' module with basic 1691 parameters for IPv6 unicast routing. The model fully conforms 1692 to the Network Management Datastore Architecture (NMDA). 1694 Copyright (c) 2017 IETF Trust and the persons 1695 identified as authors of the code. All rights reserved. 1697 Redistribution and use in source and binary forms, with or 1698 without modification, is permitted pursuant to, and subject 1699 to the license terms contained in, the Simplified BSD License 1700 set forth in Section 4.c of the IETF Trust's Legal Provisions 1701 Relating to IETF Documents 1702 (http://trustee.ietf.org/license-info). 1704 This version of this YANG module is part of RFC XXXX; see 1705 the RFC itself for full legal notices."; 1706 reference "RFC XXXX"; 1708 revision 2017-12-21 { 1709 description 1710 "Network Managment Datastore Architecture (NDMA) revision"; 1711 reference 1712 "RFC XXXX: A YANG Data Model for Routing Management 1713 (NDMA Version)"; 1714 } 1716 /* Identities */ 1718 revision 2016-11-04 { 1719 description 1720 "Initial revision."; 1721 reference 1722 "RFC 8022: A YANG Data Model for Routing Management"; 1723 } 1725 identity ipv6-unicast { 1726 base rt:ipv6; 1727 description 1728 "This identity represents the IPv6 unicast address family."; 1729 } 1731 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 1732 when "derived-from-or-self(../../rt:address-family, " 1733 + "'v6ur:ipv6-unicast')" { 1734 description 1735 "This augment is valid only for IPv6 unicast."; 1736 } 1737 description 1738 "This leaf augments an IPv6 unicast route."; 1739 leaf destination-prefix { 1740 type inet:ipv6-prefix; 1741 description 1742 "IPv6 destination prefix."; 1743 } 1744 } 1746 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1747 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1748 when "derived-from-or-self(../../../rt:address-family, " 1749 + "'v6ur:ipv6-unicast')" { 1750 description 1751 "This augment is valid only for IPv6 unicast."; 1752 } 1753 description 1754 "Augment 'simple-next-hop' case in IPv6 unicast routes."; 1755 leaf next-hop-address { 1756 type inet:ipv6-address; 1757 description 1758 "IPv6 address of the next hop."; 1759 } 1760 } 1762 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1763 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1764 + "rt:next-hop-list/rt:next-hop" { 1765 when "derived-from-or-self(../../../../../rt:address-family, " 1766 + "'v6ur:ipv6-unicast')" { 1767 description 1768 "This augment is valid only for IPv6 unicast."; 1769 } 1770 description 1771 "This leaf augments the 'next-hop-list' case of IPv6 unicast 1772 routes."; 1773 leaf address { 1774 type inet:ipv6-address; 1775 description 1776 "IPv6 address of the next hop."; 1777 } 1778 } 1780 augment 1781 "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { 1782 when "derived-from-or-self(../rt:address-family, " 1783 + "'v6ur:ipv6-unicast')" { 1784 description 1785 "This augment is valid only for IPv6 unicast RIBs."; 1786 } 1787 description 1788 "This augment adds the input parameter of the 'active-route' 1789 action."; 1790 leaf destination-address { 1791 type inet:ipv6-address; 1792 description 1793 "IPv6 destination address."; 1794 } 1795 } 1797 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1798 + "rt:output/rt:route" { 1799 when "derived-from-or-self(../../rt:address-family, " 1800 + "'v6ur:ipv6-unicast')" { 1801 description 1802 "This augment is valid only for IPv6 unicast."; 1803 } 1804 description 1805 "This augment adds the destination prefix to the reply of the 1806 'active-route' action."; 1807 leaf destination-prefix { 1808 type inet:ipv6-prefix; 1809 description 1810 "IPv6 destination prefix."; 1811 } 1812 } 1814 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1815 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1816 + "rt:simple-next-hop" { 1817 when "derived-from-or-self(../../../rt:address-family, " 1818 + "'v6ur:ipv6-unicast')" { 1819 description 1820 "This augment is valid only for IPv6 unicast."; 1821 } 1822 description 1823 "Augment 'simple-next-hop' case in the reply to the 1824 'active-route' action."; 1825 leaf next-hop-address { 1826 type inet:ipv6-address; 1827 description 1828 "IPv6 address of the next hop."; 1829 } 1830 } 1832 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1833 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1834 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1835 when "derived-from-or-self(../../../../../rt:address-family, " 1836 + "'v6ur:ipv6-unicast')" { 1837 description 1838 "This augment is valid only for IPv6 unicast."; 1839 } 1840 description 1841 "Augment 'next-hop-list' case in the reply to the 1842 'active-route' action."; 1843 leaf next-hop-address { 1844 type inet:ipv6-address; 1845 description 1846 "IPv6 address of the next hop."; 1847 } 1848 } 1850 /* Data node augmentations */ 1852 augment "/rt:routing/rt:control-plane-protocols/" 1853 + "rt:control-plane-protocol/rt:static-routes" { 1855 description 1856 "This augment defines the Support for the 'static' 1857 pseudo-protocol with data specific to IPv6 unicast."; 1858 container ipv6 { 1859 description 1860 "Support for a 'static' pseudo-protocol instance 1861 consists of a list of routes."; 1862 list route { 1863 key "destination-prefix"; 1864 description 1865 "A list of static routes."; 1866 leaf destination-prefix { 1867 type inet:ipv6-prefix; 1868 mandatory "true"; 1869 description 1870 "IPv6 destination prefix."; 1871 } 1872 leaf description { 1873 type string; 1874 description 1875 "Textual description of the route."; 1876 } 1877 container next-hop { 1878 description 1879 "Support for next-hop."; 1880 uses rt:next-hop-content { 1881 augment "next-hop-options/simple-next-hop" { 1882 description 1883 "Augment 'simple-next-hop' case in IPv6 static 1884 routes."; 1885 leaf next-hop-address { 1886 type inet:ipv6-address; 1887 description 1888 "IPv6 address of the next hop."; 1889 } 1890 } 1891 augment "next-hop-options/next-hop-list/next-hop-list/" 1892 + "next-hop" { 1893 description 1894 "Augment 'next-hop-list' case in IPv6 static 1895 routes."; 1896 leaf next-hop-address { 1897 type inet:ipv6-address; 1898 description 1899 "IPv6 address of the next hop."; 1900 } 1901 } 1902 } 1904 } 1905 } 1906 } 1907 } 1909 /* Obsolete State Data */ 1911 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { 1912 when "derived-from-or-self(../../rt:address-family, 1913 'v6ur:ipv6-unicast')" { 1914 description 1915 "This augment is valid only for IPv6 unicast."; 1916 } 1917 status obsolete; 1918 description 1919 "This leaf augments an IPv6 unicast route."; 1920 leaf destination-prefix { 1921 type inet:ipv6-prefix; 1922 status obsolete; 1923 description 1924 "IPv6 destination prefix."; 1925 } 1926 } 1927 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1928 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1929 when "derived-from-or-self(../../../rt:address-family, 1930 'v6ur:ipv6-unicast')" { 1931 description 1932 "This augment is valid only for IPv6 unicast."; 1933 } 1934 status obsolete; 1935 description 1936 "Augment 'simple-next-hop' case in IPv6 unicast routes."; 1937 leaf next-hop-address { 1938 type inet:ipv6-address; 1939 status obsolete; 1940 description 1941 "IPv6 address of the next hop."; 1942 } 1943 } 1944 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1945 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1946 + "rt:next-hop-list/rt:next-hop" { 1947 when "derived-from-or-self(../../../../../rt:address-family, 1948 'v6ur:ipv6-unicast')" { 1949 description 1950 "This augment is valid only for IPv6 unicast."; 1951 } 1952 status obsolete; 1953 description 1954 "This leaf augments the 'next-hop-list' case of IPv6 unicast 1955 routes."; 1956 leaf address { 1957 type inet:ipv6-address; 1958 status obsolete; 1959 description 1960 "IPv6 address of the next hop."; 1961 } 1962 } 1963 augment "/rt:routing-state/rt:ribs/rt:rib/" 1964 + "rt:active-route/rt:input" { 1965 when "derived-from-or-self(../rt:address-family, 1966 'v6ur:ipv6-unicast')" { 1967 description 1968 "This augment is valid only for IPv6 unicast RIBs."; 1969 } 1970 status obsolete; 1971 description 1972 "This augment adds the input parameter of the 'active-route' 1973 action."; 1974 leaf destination-address { 1975 type inet:ipv6-address; 1976 status obsolete; 1977 description 1978 "IPv6 destination address."; 1979 } 1980 } 1981 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1982 + "rt:output/rt:route" { 1983 when "derived-from-or-self(../../rt:address-family, 1984 'v6ur:ipv6-unicast')" { 1985 description 1986 "This augment is valid only for IPv6 unicast."; 1987 } 1988 status obsolete; 1989 description 1990 "This augment adds the destination prefix to the reply of the 1991 'active-route' action."; 1992 leaf destination-prefix { 1993 type inet:ipv6-prefix; 1994 status obsolete; 1995 description 1996 "IPv6 destination prefix."; 1997 } 1998 } 1999 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 2000 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 2001 + "rt:simple-next-hop" { 2002 when "derived-from-or-self(../../../rt:address-family, 2003 'v6ur:ipv6-unicast')" { 2004 description 2005 "This augment is valid only for IPv6 unicast."; 2006 } 2007 status obsolete; 2008 description 2009 "Augment 'simple-next-hop' case in the reply to the 2010 'active-route' action."; 2011 leaf next-hop-address { 2012 type inet:ipv6-address; 2013 status obsolete; 2014 description 2015 "IPv6 address of the next hop."; 2016 } 2017 } 2018 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 2019 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 2020 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 2021 when "derived-from-or-self(../../../../../rt:address-family, 2022 'v6ur:ipv6-unicast')" { 2023 description 2024 "This augment is valid only for IPv6 unicast."; 2025 } 2026 status obsolete; 2027 description 2028 "Augment 'next-hop-list' case in the reply to the 2029 'active-route' action."; 2030 leaf next-hop-address { 2031 type inet:ipv6-address; 2032 status obsolete; 2033 description 2034 "IPv6 address of the next hop."; 2035 } 2036 } 2037 } 2038 2040 9.1. IPv6 Router Advertisements Submodule 2042 file "ietf-ipv6-router-advertisements@2017-12-21.yang" 2043 submodule ietf-ipv6-router-advertisements { 2044 yang-version "1.1"; 2046 belongs-to ietf-ipv6-unicast-routing { 2047 prefix "v6ur"; 2049 } 2051 import ietf-inet-types { 2052 prefix "inet"; 2053 } 2055 import ietf-interfaces { 2056 prefix "if"; 2057 description 2058 "A Network Management Datastore Architecture (NDMA) 2059 compatible version of the ietf-interfaces module 2060 is required."; 2061 } 2063 import ietf-ip { 2064 prefix "ip"; 2065 description 2066 "A Network Management Datastore Architecture (NDMA) 2067 compatible version of the ietf-ip module is 2068 required."; 2069 } 2071 organization 2072 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 2073 contact 2074 "WG Web: 2075 WG List: 2077 Editor: Ladislav Lhotka 2078 2079 Acee Lindem 2080 2081 Yingzhen Qu 2082 "; 2084 description 2085 "This YANG module augments the 'ietf-ip' module with 2086 parameters for IPv6 router advertisements. The model fully 2087 conforms to the Network Management Datastore 2088 Architecture (NMDA). 2090 Copyright (c) 2017 IETF Trust and the persons 2091 identified as authors of the code. All rights reserved. 2093 Redistribution and use in source and binary forms, with or 2094 without modification, is permitted pursuant to, and subject 2095 to the license terms contained in, the Simplified BSD License 2096 set forth in Section 4.c of the IETF Trust's Legal Provisions 2097 Relating to IETF Documents 2098 (http://trustee.ietf.org/license-info). 2100 This version of this YANG module is part of RFC XXXX; see 2101 the RFC itself for full legal notices."; 2102 reference 2103 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)."; 2105 revision 2017-12-21 { 2106 description 2107 "Network Managment Datastore Architecture (NDMA) Revision"; 2108 reference 2109 "RFC XXXX: A YANG Data Model for Routing Management 2110 (NDMA Version)"; 2111 } 2113 revision 2016-11-04 { 2114 description 2115 "Initial revision."; 2116 reference 2117 "RFC 8022: A YANG Data Model for Routing Management"; 2118 } 2120 augment "/if:interfaces/if:interface/ip:ipv6" { 2121 description 2122 "Augment interface configuration with parameters of IPv6 2123 router advertisements."; 2124 container ipv6-router-advertisements { 2125 description 2126 "Support for IPv6 Router Advertisements."; 2127 leaf send-advertisements { 2128 type boolean; 2129 default "false"; 2130 description 2131 "A flag indicating whether or not the router sends 2132 periodic Router Advertisements and responds to 2133 Router Solicitations."; 2134 reference 2135 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2136 AdvSendAdvertisements."; 2137 } 2138 leaf max-rtr-adv-interval { 2139 type uint16 { 2140 range "4..1800"; 2141 } 2142 units "seconds"; 2143 default "600"; 2144 description 2145 "The maximum time allowed between sending unsolicited 2146 multicast Router Advertisements from the interface."; 2147 reference 2148 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2149 MaxRtrAdvInterval."; 2150 } 2151 leaf min-rtr-adv-interval { 2152 type uint16 { 2153 range "3..1350"; 2154 } 2155 units "seconds"; 2156 must ". <= 0.75 * ../max-rtr-adv-interval" { 2157 description 2158 "The value MUST NOT be greater than 75% of 2159 'max-rtr-adv-interval'."; 2160 } 2161 description 2162 "The minimum time allowed between sending unsolicited 2163 multicast Router Advertisements from the interface. 2165 The default value to be used operationally if this 2166 leaf is not configured is determined as follows: 2168 - if max-rtr-adv-interval >= 9 seconds, the default 2169 value is 0.33 * max-rtr-adv-interval; 2171 - otherwise, it is 0.75 * max-rtr-adv-interval."; 2172 reference 2173 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2174 MinRtrAdvInterval."; 2175 } 2176 leaf managed-flag { 2177 type boolean; 2178 default "false"; 2179 description 2180 "The value to be placed in the 'Managed address 2181 configuration' flag field in the Router 2182 Advertisement."; 2183 reference 2184 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2185 AdvManagedFlag."; 2186 } 2187 leaf other-config-flag { 2188 type boolean; 2189 default "false"; 2190 description 2191 "The value to be placed in the 'Other configuration' 2192 flag field in the Router Advertisement."; 2194 reference 2195 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2196 AdvOtherConfigFlag."; 2197 } 2198 leaf link-mtu { 2199 type uint32; 2200 default "0"; 2201 description 2202 "The value to be placed in MTU options sent by the 2203 router. A value of zero indicates that no MTU options 2204 are sent."; 2205 reference 2206 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2207 AdvLinkMTU."; 2208 } 2209 leaf reachable-time { 2210 type uint32 { 2211 range "0..3600000"; 2212 } 2213 units "milliseconds"; 2214 default "0"; 2215 description 2216 "The value to be placed in the Reachable Time field in 2217 the Router Advertisement messages sent by the router. 2218 A value of zero means unspecified (by this router)."; 2219 reference 2220 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2221 AdvReachableTime."; 2222 } 2223 leaf retrans-timer { 2224 type uint32; 2225 units "milliseconds"; 2226 default "0"; 2227 description 2228 "The value to be placed in the Retrans Timer field in 2229 the Router Advertisement messages sent by the router. 2230 A value of zero means unspecified (by this router)."; 2231 reference 2232 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2233 AdvRetransTimer."; 2234 } 2235 leaf cur-hop-limit { 2236 type uint8; 2237 description 2238 "The value to be placed in the Cur Hop Limit field in 2239 the Router Advertisement messages sent by the router. 2240 A value of zero means unspecified (by this router). 2242 If this parameter is not configured, the device SHOULD 2243 use the value specified in IANA Assigned Numbers that 2244 was in effect at the time of implementation."; 2245 reference 2246 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2247 AdvCurHopLimit. 2249 IANA: IP Parameters, 2250 http://www.iana.org/assignments/ip-parameters"; 2251 } 2252 leaf default-lifetime { 2253 type uint16 { 2254 range "0..9000"; 2255 } 2256 units "seconds"; 2257 description 2258 "The value to be placed in the Router Lifetime field of 2259 Router Advertisements sent from the interface, in 2260 seconds. It MUST be either zero or between 2261 max-rtr-adv-interval and 9000 seconds. A value of zero 2262 default indicates that the router is not to be used as 2263 a router. These limits may be overridden by specific 2264 documents that describe how IPv6 operates over 2265 different link layers. 2267 If this parameter is not configured, the device SHOULD 2268 use a value of 3 * max-rtr-adv-interval."; 2269 reference 2270 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2271 AdvDefaultLifeTime."; 2272 } 2273 container prefix-list { 2274 description 2275 "Support for prefixes to be placed in Prefix 2276 Information options in Router Advertisement messages 2277 sent from the interface. 2279 Prefixes that are advertised by default but do not 2280 have their entries in the child 'prefix' list are 2281 advertised with the default values of all parameters. 2283 The link-local prefix SHOULD NOT be included in the 2284 list of advertised prefixes."; 2285 reference 2286 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2287 AdvPrefixList."; 2288 list prefix { 2289 key "prefix-spec"; 2290 description 2291 "Support for an advertised prefix entry."; 2292 leaf prefix-spec { 2293 type inet:ipv6-prefix; 2294 description 2295 "IPv6 address prefix."; 2296 } 2297 choice control-adv-prefixes { 2298 default "advertise"; 2299 description 2300 "Either the prefix is explicitly removed from the 2301 set of advertised prefixes, or the parameters with 2302 which it is advertised are specified (default 2303 case)."; 2304 leaf no-advertise { 2305 type empty; 2306 description 2307 "The prefix will not be advertised. 2309 This can be used for removing the prefix from 2310 the default set of advertised prefixes."; 2311 } 2312 case advertise { 2313 leaf valid-lifetime { 2314 type uint32; 2315 units "seconds"; 2316 default "2592000"; 2317 description 2318 "The value to be placed in the Valid Lifetime 2319 in the Prefix Information option. The 2320 designated value of all 1's (0xffffffff) 2321 represents infinity."; 2322 reference 2323 "RFC 4861: Neighbor Discovery for IP version 6 2324 (IPv6) - AdvValidLifetime."; 2325 } 2326 leaf on-link-flag { 2327 type boolean; 2328 default "true"; 2329 description 2330 "The value to be placed in the on-link flag 2331 ('L-bit') field in the Prefix Information 2332 option."; 2333 reference 2334 "RFC 4861: Neighbor Discovery for IP version 6 2335 (IPv6) - AdvOnLinkFlag."; 2336 } 2337 leaf preferred-lifetime { 2338 type uint32; 2339 units "seconds"; 2340 must ". <= ../valid-lifetime" { 2341 description 2342 "This value MUST NOT be greater than 2343 valid-lifetime."; 2344 } 2345 default "604800"; 2346 description 2347 "The value to be placed in the Preferred 2348 Lifetime in the Prefix Information option. 2349 The designated value of all 1's (0xffffffff) 2350 represents infinity."; 2351 reference 2352 "RFC 4861: Neighbor Discovery for IP version 6 2353 (IPv6) - AdvPreferredLifetime."; 2354 } 2355 leaf autonomous-flag { 2356 type boolean; 2357 default "true"; 2358 description 2359 "The value to be placed in the Autonomous Flag 2360 field in the Prefix Information option."; 2361 reference 2362 "RFC 4861: Neighbor Discovery for IP version 6 2363 (IPv6) - AdvAutonomousFlag."; 2364 } 2365 } 2366 } 2367 } 2368 } 2369 } 2370 } 2372 /* Obsolete State Data */ 2374 augment "/if:interfaces-state/if:interface/ip:ipv6" { 2375 status obsolete; 2376 description 2377 "Augment interface state data with parameters of IPv6 router 2378 advertisements."; 2379 container ipv6-router-advertisements { 2380 status obsolete; 2381 description 2382 "Parameters of IPv6 Router Advertisements."; 2383 leaf send-advertisements { 2384 type boolean; 2385 status obsolete; 2386 description 2387 "A flag indicating whether or not the router sends periodic 2388 Router Advertisements and responds to Router 2389 Solicitations."; 2390 } 2391 leaf max-rtr-adv-interval { 2392 type uint16 { 2393 range "4..1800"; 2394 } 2395 units "seconds"; 2396 status obsolete; 2397 description 2398 "The maximum time allowed between sending unsolicited 2399 multicast Router Advertisements from the interface."; 2400 } 2401 leaf min-rtr-adv-interval { 2402 type uint16 { 2403 range "3..1350"; 2404 } 2405 units "seconds"; 2406 status obsolete; 2407 description 2408 "The minimum time allowed between sending unsolicited 2409 multicast Router Advertisements from the interface."; 2410 } 2411 leaf managed-flag { 2412 type boolean; 2413 status obsolete; 2414 description 2415 "The value that is placed in the 'Managed address 2416 configuration' flag field in the Router Advertisement."; 2417 } 2418 leaf other-config-flag { 2419 type boolean; 2420 status obsolete; 2421 description 2422 "The value that is placed in the 'Other configuration' flag 2423 field in the Router Advertisement."; 2424 } 2425 leaf link-mtu { 2426 type uint32; 2427 status obsolete; 2428 description 2429 "The value that is placed in MTU options sent by the 2430 router. A value of zero indicates that no MTU options are 2431 sent."; 2432 } 2433 leaf reachable-time { 2434 type uint32 { 2435 range "0..3600000"; 2436 } 2437 units "milliseconds"; 2438 status obsolete; 2439 description 2440 "The value that is placed in the Reachable Time field in 2441 the Router Advertisement messages sent by the router. A 2442 value of zero means unspecified (by this router)."; 2443 } 2444 leaf retrans-timer { 2445 type uint32; 2446 units "milliseconds"; 2447 status obsolete; 2448 description 2449 "The value that is placed in the Retrans Timer field in the 2450 Router Advertisement messages sent by the router. A value 2451 of zero means unspecified (by this router)."; 2452 } 2453 leaf cur-hop-limit { 2454 type uint8; 2455 status obsolete; 2456 description 2457 "The value that is placed in the Cur Hop Limit field in the 2458 Router Advertisement messages sent by the router. A value 2459 of zero means unspecified (by this router)."; 2460 } 2461 leaf default-lifetime { 2462 type uint16 { 2463 range "0..9000"; 2464 } 2465 units "seconds"; 2466 status obsolete; 2467 description 2468 "The value that is placed in the Router Lifetime field of 2469 Router Advertisements sent from the interface, in seconds. 2470 A value of zero indicates that the router is not to be 2471 used as a default router."; 2472 } 2473 container prefix-list { 2474 status obsolete; 2475 description 2476 "A list of prefixes that are placed in Prefix Information 2477 options in Router Advertisement messages sent from the 2478 interface. 2480 By default, these are all prefixes that the router 2481 advertises via routing protocols as being on-link for the 2482 interface from which the advertisement is sent."; 2483 list prefix { 2484 key "prefix-spec"; 2485 status obsolete; 2486 description 2487 "Advertised prefix entry and its parameters."; 2488 leaf prefix-spec { 2489 type inet:ipv6-prefix; 2490 status obsolete; 2491 description 2492 "IPv6 address prefix."; 2493 } 2494 leaf valid-lifetime { 2495 type uint32; 2496 units "seconds"; 2497 status obsolete; 2498 description 2499 "The value that is placed in the Valid Lifetime in the 2500 Prefix Information option. The designated value of 2501 all 1's (0xffffffff) represents infinity. 2503 An implementation SHOULD keep this value constant in 2504 consecutive advertisements except when it is 2505 explicitly changed in configuration."; 2506 } 2507 leaf on-link-flag { 2508 type boolean; 2509 status obsolete; 2510 description 2511 "The value that is placed in the on-link flag ('L-bit') 2512 field in the Prefix Information option."; 2513 } 2514 leaf preferred-lifetime { 2515 type uint32; 2516 units "seconds"; 2517 status obsolete; 2518 description 2519 "The value that is placed in the Preferred Lifetime in 2520 the Prefix Information option, in seconds. The 2521 designated value of all 1's (0xffffffff) represents 2522 infinity. 2524 An implementation SHOULD keep this value constant in 2525 consecutive advertisements except when it is 2526 explicitly changed in configuration."; 2527 } 2528 leaf autonomous-flag { 2529 type boolean; 2530 status obsolete; 2531 description 2532 "The value that is placed in the Autonomous Flag field 2533 in the Prefix Information option."; 2534 } 2535 } 2536 } 2537 } 2538 } 2539 } 2540 2542 10. IANA Considerations 2544 [RFC8022] registered the following namespace URIs in the "IETF XML 2545 Registry" [RFC3688]: 2547 URI: urn:ietf:params:xml:ns:yang:ietf-routing 2548 Registrant Contact: The IESG. 2549 XML: N/A; the requested URI is an XML namespace. 2551 URI: urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing 2552 Registrant Contact: The IESG. 2553 XML: N/A; the requested URI is an XML namespace. 2555 URI: urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing 2556 Registrant Contact: The IESG. 2557 XML: N/A; the requested URI is an XML namespace. 2559 [RFC8022] registered the following YANG modules in the "YANG Module 2560 Names" registry [RFC6020]: 2562 Name: ietf-routing 2563 Namespace: urn:ietf:params:xml:ns:yang:ietf-routing 2564 Prefix: rt 2565 Reference: RFC 8022 2567 Name: ietf-ipv4-unicast-routing 2568 Namespace: urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing 2569 Prefix: v4ur 2570 Reference: RFC 8022 2572 Name: ietf-ipv6-unicast-routing 2573 Namespace: urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing 2574 Prefix: v6ur 2575 Reference: RFC 8022 2576 This document registers the following YANG submodule in the "YANG 2577 Module Names" registry [RFC6020]: 2579 Name: ietf-ipv6-router-advertisements 2580 Module: ietf-ipv6-unicast-routing 2581 Reference: RFC 8022 2583 11. Security Considerations 2585 The YANG modules specified in this document define a schema for data 2586 that is designed to be accessed via network management protocols such 2587 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 2588 is the secure transport layer, and the mandatory-to-implement secure 2589 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 2590 is HTTPS, and the mandatory-to-implement secure transport is TLS 2591 [RFC5246]. 2593 The NETCONF access control model [RFC6536] provides the means to 2594 restrict access for particular NETCONF or RESTCONF users to a 2595 preconfigured subset of all available NETCONF or RESTCONF protocol 2596 operations and content. 2598 There are a number of data nodes defined in this YANG module that are 2599 writable/creatable/deletable (i.e., config true, which is the 2600 default). These data nodes may be considered sensitive or vulnerable 2601 in some network environments. Write operations (e.g., edit-config) 2602 to these data nodes without proper protection can have a negative 2603 effect on network operations. These are the subtrees and data nodes 2604 and their sensitivity/vulnerability: 2606 /routing/control-plane-protocols/control-plane-protocol: This list 2607 specifies the control-plane protocols configured on a device. 2609 /routing/ribs/rib: This list specifies the RIBs configured for the 2610 device. 2612 Some of the readable data nodes in this YANG module may be considered 2613 sensitive or vulnerable in some network environments. It is thus 2614 important to control read access (e.g., via get, get-config, or 2615 notification) to these data nodes. These are the subtrees and data 2616 nodes and their sensitivity/vulnerability: 2618 /routing/control-plane-protocols/control-plane-protocol: This list 2619 specifies the control-plane protocols configured on a device. 2620 Refer to the control plane models for a list of sensitive 2621 information. 2623 /routing/ribs/rib: This list specifies the RIB and their contents 2624 for the device. Access to this information may disclose the 2625 network topology and or other information. 2627 12. References 2629 12.1. Normative References 2631 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2632 Requirement Levels", BCP 14, RFC 2119, 2633 DOI 10.17487/RFC2119, March 1997, . 2636 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 2637 DOI 10.17487/RFC3688, January 2004, . 2640 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 2641 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 2642 DOI 10.17487/RFC4861, September 2007, . 2645 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2646 (TLS) Protocol Version 1.2", RFC 5246, 2647 DOI 10.17487/RFC5246, August 2008, . 2650 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2651 the Network Configuration Protocol (NETCONF)", RFC 6020, 2652 DOI 10.17487/RFC6020, October 2010, . 2655 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 2656 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 2657 . 2659 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 2660 and A. Bierman, Ed., "Network Configuration Protocol 2661 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 2662 . 2664 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 2665 Protocol (NETCONF) Access Control Model", RFC 6536, 2666 DOI 10.17487/RFC6536, March 2012, . 2669 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2670 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2671 . 2673 [I-D.ietf-netmod-rfc7223bis] 2674 Bjorklund, M., "A YANG Data Model for Interface 2675 Management", draft-ietf-netmod-rfc7223bis-01 (work in 2676 progress), December 2017. 2678 [I-D.ietf-netmod-rfc7277bis] 2679 Bjorklund, M., "A YANG Data Model for IP Management", 2680 draft-ietf-netmod-rfc7277bis-01 (work in progress), 2681 December 2017. 2683 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 2684 RFC 7950, DOI 10.17487/RFC7950, August 2016, 2685 . 2687 [RFC8022] Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 2688 Management", RFC 8022, DOI 10.17487/RFC8022, November 2689 2016, . 2691 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 2692 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 2693 . 2695 [I-D.ietf-netmod-revised-datastores] 2696 Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 2697 and R. Wilton, "Network Management Datastore 2698 Architecture", draft-ietf-netmod-revised-datastores-09 2699 (work in progress), December 2017. 2701 12.2. Informative References 2703 [I-D.ietf-netmod-rfc6087bis] 2704 Bierman, A., "Guidelines for Authors and Reviewers of YANG 2705 Data Model Documents", draft-ietf-netmod-rfc6087bis-15 2706 (work in progress), December 2017. 2708 [RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module 2709 Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, 2710 . 2712 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 2713 RFC 7951, DOI 10.17487/RFC7951, August 2016, 2714 . 2716 [I-D.ietf-netmod-yang-tree-diagrams] 2717 Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft- 2718 ietf-netmod-yang-tree-diagrams-04 (work in progress), 2719 December 2017. 2721 Appendix A. The Complete Schema Tree 2723 This appendix presents the complete tree of the core routing data 2724 model. See Section 2.2 for an explanation of the symbols used. The 2725 data type of every leaf node is shown near the right end of the 2726 corresponding line. 2728 module: ietf-routing 2729 +--rw routing 2730 | +--rw router-id? yang:dotted-quad 2731 | +--ro interfaces 2732 | | +--ro interface* if:interface-ref 2733 | +--rw control-plane-protocols 2734 | | +--rw control-plane-protocol* [type name] 2735 | | +--rw type identityref 2736 | | +--rw name string 2737 | | +--rw description? string 2738 | | +--rw static-routes 2739 | | +--rw v4ur:ipv4 2740 | | | +--rw v4ur:route* [destination-prefix] 2741 | | | +--rw v4ur:destination-prefix 2742 | | | | inet:ipv4-prefix 2743 | | | +--rw v4ur:description? string 2744 | | | +--rw v4ur:next-hop 2745 | | | +--rw (v4ur:next-hop-options) 2746 | | | +--:(v4ur:simple-next-hop) 2747 | | | | +--rw v4ur:outgoing-interface? 2748 | | | | | if:interface-ref 2749 | | | | +--rw v4ur:next-hop-address? 2750 | | | | inet:ipv4-address 2751 | | | +--:(v4ur:special-next-hop) 2752 | | | | +--rw v4ur:special-next-hop? 2753 | | | | enumeration 2754 | | | +--:(v4ur:next-hop-list) 2755 | | | +--rw v4ur:next-hop-list 2756 | | | +--rw v4ur:next-hop* [index] 2757 | | | +--rw v4ur:index 2758 | | | | string 2759 | | | +--rw v4ur:outgoing-interface? 2760 | | | | if:interface-ref 2761 | | | +--rw v4ur:next-hop-address? 2762 | | | inet:ipv4-address 2763 | | +--rw v6ur:ipv6 2764 | | +--rw v6ur:route* [destination-prefix] 2765 | | +--rw v6ur:destination-prefix 2766 | | | inet:ipv6-prefix 2767 | | +--rw v6ur:description? string 2768 | | +--rw v6ur:next-hop 2769 | | +--rw (v6ur:next-hop-options) 2770 | | +--:(v6ur:simple-next-hop) 2771 | | | +--rw v6ur:outgoing-interface? 2772 | | | | if:interface-ref 2773 | | | +--rw v6ur:next-hop-address? 2774 | | | inet:ipv6-address 2775 | | +--:(v6ur:special-next-hop) 2776 | | | +--rw v6ur:special-next-hop? 2777 | | | enumeration 2778 | | +--:(v6ur:next-hop-list) 2779 | | +--rw v6ur:next-hop-list 2780 | | +--rw v6ur:next-hop* [index] 2781 | | +--rw v6ur:index 2782 | | | string 2783 | | +--rw v6ur:outgoing-interface? 2784 | | | if:interface-ref 2785 | | +--rw v6ur:next-hop-address? 2786 | | inet:ipv6-address 2787 | +--rw ribs 2788 | +--rw rib* [name] 2789 | +--rw name string 2790 | +--rw address-family identityref 2791 | +--ro default-rib? boolean {multiple-ribs}? 2792 | +--ro routes 2793 | | +--ro route* 2794 | | +--ro route-preference? route-preference 2795 | | +--ro next-hop 2796 | | | +--ro (next-hop-options) 2797 | | | +--:(simple-next-hop) 2798 | | | | +--ro outgoing-interface? 2799 | | | | | if:interface-ref 2800 | | | | +--ro v4ur:next-hop-address? 2801 | | | | | inet:ipv4-address 2802 | | | | +--ro v6ur:next-hop-address? 2803 | | | | inet:ipv6-address 2804 | | | +--:(special-next-hop) 2805 | | | | +--ro special-next-hop? enumeration 2806 | | | +--:(next-hop-list) 2807 | | | +--ro next-hop-list 2808 | | | +--ro next-hop* 2809 | | | +--ro outgoing-interface? 2810 | | | | if:interface-ref 2811 | | | +--ro v4ur:address? 2812 | | | | inet:ipv4-address 2813 | | | +--ro v6ur:address? 2814 | | | inet:ipv6-address 2815 | | +--ro source-protocol identityref 2816 | | +--ro active? empty 2817 | | +--ro last-updated? yang:date-and-time 2818 | | +--ro v4ur:destination-prefix? inet:ipv4-prefix 2819 | | +--ro v6ur:destination-prefix? inet:ipv6-prefix 2820 | +---x active-route 2821 | | +---w input 2822 | | | +---w v4ur:destination-address? inet:ipv4-address 2823 | | | +---w v6ur:destination-address? inet:ipv6-address 2824 | | +--ro output 2825 | | +--ro route 2826 | | +--ro next-hop 2827 | | | +--ro (next-hop-options) 2828 | | | +--:(simple-next-hop) 2829 | | | | +--ro outgoing-interface? 2830 | | | | | if:interface-ref 2831 | | | | +--ro v4ur:next-hop-address? 2832 | | | | | inet:ipv4-address 2833 | | | | +--ro v6ur:next-hop-address? 2834 | | | | inet:ipv6-address 2835 | | | +--:(special-next-hop) 2836 | | | | +--ro special-next-hop? 2837 | | | | enumeration 2838 | | | +--:(next-hop-list) 2839 | | | +--ro next-hop-list 2840 | | | +--ro next-hop* 2841 | | | +--ro outgoing-interface? 2842 | | | | if:interface-ref 2843 | | | +--ro v4ur:next-hop-address? 2844 | | | | inet:ipv4-address 2845 | | | +--ro v6ur:next-hop-address? 2846 | | | inet:ipv6-address 2847 | | +--ro source-protocol identityref 2848 | | +--ro active? empty 2849 | | +--ro last-updated? 2850 | | | yang:date-and-time 2851 | | +--ro v4ur:destination-prefix? 2852 | | | inet:ipv4-prefix 2853 | | +--ro v6ur:destination-prefix? 2854 | | inet:ipv6-prefix 2855 | +--rw description? string 2856 o--ro routing-state 2857 +--ro router-id? yang:dotted-quad 2858 o--ro interfaces 2859 | o--ro interface* if:interface-state-ref 2860 o--ro control-plane-protocols 2861 | o--ro control-plane-protocol* [type name] 2862 | o--ro type identityref 2863 | o--ro name string 2864 o--ro ribs 2865 o--ro rib* [name] 2866 o--ro name string 2867 +--ro address-family identityref 2868 o--ro default-rib? boolean {multiple-ribs}? 2869 o--ro routes 2870 | o--ro route* 2871 | o--ro route-preference? route-preference 2872 | o--ro next-hop 2873 | | +--ro (next-hop-options) 2874 | | +--:(simple-next-hop) 2875 | | | +--ro outgoing-interface? 2876 | | | | if:interface-ref 2877 | | | o--ro v4ur:next-hop-address? 2878 | | | | inet:ipv4-address 2879 | | | o--ro v6ur:next-hop-address? 2880 | | | inet:ipv6-address 2881 | | +--:(special-next-hop) 2882 | | | +--ro special-next-hop? enumeration 2883 | | +--:(next-hop-list) 2884 | | +--ro next-hop-list 2885 | | +--ro next-hop* 2886 | | +--ro outgoing-interface? 2887 | | | if:interface-ref 2888 | | o--ro v4ur:address? 2889 | | | inet:ipv4-address 2890 | | o--ro v6ur:address? 2891 | | inet:ipv6-address 2892 | +--ro source-protocol identityref 2893 | +--ro active? empty 2894 | +--ro last-updated? yang:date-and-time 2895 | o--ro v4ur:destination-prefix? inet:ipv4-prefix 2896 | o--ro v6ur:destination-prefix? inet:ipv6-prefix 2897 o---x active-route 2898 +---w input 2899 | o---w v4ur:destination-address? inet:ipv4-address 2900 | o---w v6ur:destination-address? inet:ipv6-address 2901 +--ro output 2902 o--ro route 2903 o--ro next-hop 2904 | +--ro (next-hop-options) 2905 | +--:(simple-next-hop) 2906 | | +--ro outgoing-interface? 2907 | | | if:interface-ref 2908 | | o--ro v4ur:next-hop-address? 2909 | | | inet:ipv4-address 2910 | | o--ro v6ur:next-hop-address? 2911 | | inet:ipv6-address 2912 | +--:(special-next-hop) 2913 | | +--ro special-next-hop? 2914 | | enumeration 2915 | +--:(next-hop-list) 2916 | +--ro next-hop-list 2917 | +--ro next-hop* 2918 | +--ro outgoing-interface? 2919 | | if:interface-ref 2920 | o--ro v4ur:next-hop-address? 2921 | | inet:ipv4-address 2922 | o--ro v6ur:next-hop-address? 2923 | inet:ipv6-address 2924 +--ro source-protocol identityref 2925 +--ro active? empty 2926 +--ro last-updated? 2927 | yang:date-and-time 2928 o--ro v4ur:destination-prefix? 2929 | inet:ipv4-prefix 2930 o--ro v6ur:destination-prefix? 2931 inet:ipv6-prefix 2932 module: ietf-ipv6-unicast-routing 2933 augment /if:interfaces/if:interface/ip:ipv6: 2934 +--rw ipv6-router-advertisements 2935 +--rw send-advertisements? boolean 2936 +--rw max-rtr-adv-interval? uint16 2937 +--rw min-rtr-adv-interval? uint16 2938 +--rw managed-flag? boolean 2939 +--rw other-config-flag? boolean 2940 +--rw link-mtu? uint32 2941 +--rw reachable-time? uint32 2942 +--rw retrans-timer? uint32 2943 +--rw cur-hop-limit? uint8 2944 +--rw default-lifetime? uint16 2945 +--rw prefix-list 2946 +--rw prefix* [prefix-spec] 2947 +--rw prefix-spec inet:ipv6-prefix 2948 +--rw (control-adv-prefixes)? 2949 +--:(no-advertise) 2950 | +--rw no-advertise? empty 2951 +--:(advertise) 2952 +--rw valid-lifetime? uint32 2953 +--rw on-link-flag? boolean 2954 +--rw preferred-lifetime? uint32 2955 +--rw autonomous-flag? boolean 2956 augment /if:interfaces-state/if:interface/ip:ipv6: 2957 o--ro ipv6-router-advertisements 2958 o--ro send-advertisements? boolean 2959 o--ro max-rtr-adv-interval? uint16 2960 o--ro min-rtr-adv-interval? uint16 2961 o--ro managed-flag? boolean 2962 o--ro other-config-flag? boolean 2963 o--ro link-mtu? uint32 2964 o--ro reachable-time? uint32 2965 o--ro retrans-timer? uint32 2966 o--ro cur-hop-limit? uint8 2967 o--ro default-lifetime? uint16 2968 o--ro prefix-list 2969 o--ro prefix* [prefix-spec] 2970 o--ro prefix-spec inet:ipv6-prefix 2971 o--ro valid-lifetime? uint32 2972 o--ro on-link-flag? boolean 2973 o--ro preferred-lifetime? uint32 2974 o--ro autonomous-flag? boolean 2976 Appendix B. Minimum Implementation 2978 Some parts and options of the core routing model, such as user- 2979 defined RIBs, are intended only for advanced routers. This appendix 2980 gives basic non-normative guidelines for implementing a bare minimum 2981 of available functions. Such an implementation may be used for hosts 2982 or very simple routers. 2984 A minimum implementation does not support the feature 2985 "multiple-ribs". This means that a single system-controlled RIB is 2986 available for each supported address family -- IPv4, IPv6, or both. 2987 These RIBs are also the default RIBs. No user-controlled RIBs are 2988 allowed. 2990 In addition to the mandatory instance of the "direct" pseudo- 2991 protocol, a minimum implementation should support configuring 2992 instance(s) of the "static" pseudo-protocol. 2994 For hosts that are never intended to act as routers, the ability to 2995 turn on sending IPv6 router advertisements (Section 5.4) should be 2996 removed. 2998 Platforms with severely constrained resources may use deviations for 2999 restricting the data model, e.g., limiting the number of "static" 3000 control-plane protocol instances. 3002 Appendix C. Example: Adding a New Control-Plane Protocol 3004 This appendix demonstrates how the core routing data model can be 3005 extended to support a new control-plane protocol. The YANG module 3006 "example-rip" shown below is intended as an illustration rather than 3007 a real definition of a data model for the Routing Information 3008 Protocol (RIP). For the sake of brevity, this module does not obey 3009 all the guidelines specified in [I-D.ietf-netmod-rfc6087bis]. See 3010 also Section 5.3.2. 3012 module example-rip { 3014 yang-version "1.1"; 3016 namespace "http://example.com/rip"; 3018 prefix "rip"; 3020 import ietf-interfaces { 3021 prefix "if"; 3022 } 3024 import ietf-routing { 3025 prefix "rt"; 3026 } 3028 identity rip { 3029 base rt:routing-protocol; 3030 description 3031 "Identity for the Routing Information Protocol (RIP)."; 3032 } 3034 typedef rip-metric { 3035 type uint8 { 3036 range "0..16"; 3037 } 3038 } 3040 grouping route-content { 3041 description 3042 "This grouping defines RIP-specific route attributes."; 3043 leaf metric { 3044 type rip-metric; 3045 } 3046 leaf tag { 3047 type uint16; 3048 default "0"; 3049 description 3050 "This leaf may be used to carry additional info, e.g., 3051 autonomous system (AS) number."; 3052 } 3053 } 3055 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 3056 when "derived-from-or-self(rt:source-protocol, 'rip:rip')" { 3057 description 3058 "This augment is only valid for a route whose source 3059 protocol is RIP."; 3060 } 3061 description 3062 "RIP-specific route attributes."; 3063 uses route-content; 3064 } 3066 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 3067 + "rt:output/rt:route" { 3068 description 3069 "RIP-specific route attributes in the output of 'active-route' 3070 RPC."; 3071 uses route-content; 3072 } 3074 augment "/rt:routing/rt:control-plane-protocols/" 3075 + "rt:control-plane-protocol" { 3076 when "derived-from-or-self(rt:type,'rip:rip')" { 3077 description 3078 "This augment is only valid for a routing protocol instance 3079 of type 'rip'."; 3080 } 3081 container rip { 3082 presence "RIP configuration"; 3083 description 3084 "RIP instance configuration."; 3085 container interfaces { 3086 description 3087 "Per-interface RIP configuration."; 3088 list interface { 3089 key "name"; 3090 description 3091 "RIP is enabled on interfaces that have an entry in this 3092 list, unless 'enabled' is set to 'false' for that 3093 entry."; 3094 leaf name { 3095 type if:interface-ref; 3096 } 3097 leaf enabled { 3098 type boolean; 3099 default "true"; 3100 } 3101 leaf metric { 3102 type rip-metric; 3103 default "1"; 3104 } 3106 } 3107 } 3108 leaf update-interval { 3109 type uint8 { 3110 range "10..60"; 3111 } 3112 units "seconds"; 3113 default "30"; 3114 description 3115 "Time interval between periodic updates."; 3116 } 3117 } 3118 } 3119 } 3121 Appendix D. Data Tree Example 3123 This section contains an example of an instance data tree from the 3124 operational state, in the JSON encoding [RFC7951]. The data conforms 3125 to a data model that is defined by the following YANG library 3126 specification [RFC7895]: 3128 { 3129 "ietf-yang-library:modules-state": { 3130 "module-set-id": "c2e1f54169aa7f36e1a6e8d0865d441d3600f9c4", 3131 "module": [ 3132 { 3133 "name": "ietf-routing", 3134 "revision": "2017-12-21", 3135 "feature": [ 3136 "multiple-ribs", 3137 "router-id" 3138 ], 3139 "namespace": "urn:ietf:params:xml:ns:yang:ietf-routing", 3140 "conformance-type": "implement" 3141 }, 3142 { 3143 "name": "ietf-ipv4-unicast-routing", 3144 "revision": "2017-12-21", 3145 "namespace": 3146 "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing", 3147 "conformance-type": "implement" 3148 }, 3149 { 3150 "name": "ietf-ipv6-unicast-routing", 3151 "revision": "2017-12-21", 3152 "namespace": 3153 "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing-3", 3155 "conformance-type": "implement", 3156 "submodule": [ 3157 { 3158 "name": "ietf-ipv6-router-advertisements", 3159 "revision": "2017-12-21" 3160 } 3161 ] 3162 }, 3163 { 3164 "name": "ietf-interfaces", 3165 "revision": "2017-12-16", 3166 "namespace": "urn:ietf:params:xml:ns:yang:ietf-interfaces", 3167 "conformance-type": "implement" 3168 }, 3169 { 3170 "name": "ietf-inet-types", 3171 "namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", 3172 "revision": "2013-07-15", 3173 "conformance-type": "import" 3174 }, 3175 { 3176 "name": "ietf-yang-types", 3177 "namespace": "urn:ietf:params:xml:ns:yang:ietf-yang-types", 3178 "revision": "2013-07-15", 3179 "conformance-type": "import" 3180 }, 3181 { 3182 "name": "iana-if-type", 3183 "namespace": "urn:ietf:params:xml:ns:yang:iana-if-type", 3184 "revision": "2014-05-08", 3185 "conformance-type": "implement" 3186 }, 3187 { 3188 "name": "ietf-ip", 3189 "revision": "2017-12-16", 3190 "namespace": "urn:ietf:params:xml:ns:yang:ietf-ip", 3191 "conformance-type": "implement" 3192 } 3193 ] 3194 } 3195 } 3197 A simple network setup as shown in Figure 2 is assumed: router "A" 3198 uses static default routes with the "ISP" router as the next hop. 3199 IPv6 router advertisements are configured only on the "eth1" 3200 interface and disabled on the upstream "eth0" interface. 3202 +-----------------+ 3203 | | 3204 | Router ISP | 3205 | | 3206 +--------+--------+ 3207 |2001:db8:0:1::2 3208 |192.0.2.2 3209 | 3210 | 3211 |2001:db8:0:1::1 3212 eth0|192.0.2.1 3213 +--------+--------+ 3214 | | 3215 | Router A | 3216 | | 3217 +--------+--------+ 3218 eth1|198.51.100.1 3219 |2001:db8:0:2::1 3220 | 3222 Figure 2: Example of Network Configuration 3224 The instance data tree could then be as follows: 3226 { 3227 "ietf-interfaces:interfaces": { 3228 "interface": [ 3229 { 3230 "name": "eth0", 3231 "type": "iana-if-type:ethernetCsmacd", 3232 "description": "Uplink to ISP.", 3233 "phys-address": "00:0C:42:E5:B1:E9", 3234 "oper-status": "up", 3235 "statistics": { 3236 "discontinuity-time": "2015-10-24T17:11:27+02:00" 3237 }, 3238 "ietf-ip:ipv4": { 3239 "forwarding": true, 3240 "mtu": 1500, 3241 "address": [ 3242 { 3243 "ip": "192.0.2.1", 3244 "prefix-length": 24 3245 } 3246 ] 3247 }, 3248 "ietf-ip:ipv6": { 3249 "forwarding": true, 3250 "mtu": 1500, 3251 "address": [ 3252 { 3253 "ip": "2001:0db8:0:1::1", 3254 "prefix-length": 64 3255 } 3256 ], 3257 "autoconf": { 3258 "create-global-addresses": false 3259 }, 3260 "ietf-ipv6-unicast-routing:ipv6-router-advertisements": { 3261 "send-advertisements": false 3262 } 3263 } 3264 }, 3265 { 3266 "name": "eth1", 3267 "type": "iana-if-type:ethernetCsmacd", 3268 "description": "Interface to the internal network.", 3269 "phys-address": "00:0C:42:E5:B1:EA", 3270 "oper-status": "up", 3271 "statistics": { 3272 "discontinuity-time": "2015-10-24T17:11:29+02:00" 3273 }, 3274 "ietf-ip:ipv4": { 3275 "forwarding": true, 3276 "mtu": 1500, 3277 "address": [ 3278 { 3279 "ip": "198.51.100.1", 3280 "prefix-length": 24 3281 } 3282 ] 3283 }, 3284 "ietf-ip:ipv6": { 3285 "forwarding": true, 3286 "mtu": 1500, 3287 "address": [ 3288 { 3289 "ip": "2001:0db8:0:2::1", 3290 "prefix-length": 64 3291 } 3292 ], 3293 "autoconf": { 3294 "create-global-addresses": false 3295 }, 3296 "ietf-ipv6-unicast-routing:ipv6-router-advertisements": { 3297 "send-advertisements": true, 3298 "prefix-list": { 3299 "prefix": [ 3300 { 3301 "prefix-spec": "2001:db8:0:2::/64" 3302 } 3303 ] 3304 } 3305 } 3306 } 3307 } 3308 ] 3309 }, 3311 "ietf-routing:routing": { 3312 "router-id": "192.0.2.1", 3313 "control-plane-protocols": { 3314 "control-plane-protocol": [ 3315 { 3316 "type": "ietf-routing:static", 3317 "name": "st0", 3318 "description": 3319 "Static routing is used for the internal network.", 3320 "static-routes": { 3321 "ietf-ipv4-unicast-routing:ipv4": { 3322 "route": [ 3323 { 3324 "destination-prefix": "0.0.0.0/0", 3325 "next-hop": { 3326 "next-hop-address": "192.0.2.2" 3327 } 3328 } 3329 ] 3330 }, 3331 "ietf-ipv6-unicast-routing:ipv6": { 3332 "route": [ 3333 { 3334 "destination-prefix": "::/0", 3335 "next-hop": { 3336 "next-hop-address": "2001:db8:0:1::2" 3337 } 3338 } 3339 ] 3340 } 3341 } 3342 } 3343 ] 3344 }, 3345 "ribs": { 3346 "rib": [ 3347 { 3348 "name": "ipv4-master", 3349 "address-family": 3350 "ietf-ipv4-unicast-routing:ipv4-unicast", 3351 "default-rib": true, 3352 "routes": { 3353 "route": [ 3354 { 3355 "ietf-ipv4-unicast-routing:destination-prefix": 3356 "192.0.2.1/24", 3357 "next-hop": { 3358 "outgoing-interface": "eth0" 3359 }, 3360 "route-preference": 0, 3361 "source-protocol": "ietf-routing:direct", 3362 "last-updated": "2015-10-24T17:11:27+02:00" 3363 }, 3364 { 3365 "ietf-ipv4-unicast-routing:destination-prefix": 3366 "198.51.100.0/24", 3367 "next-hop": { 3368 "outgoing-interface": "eth1" 3369 }, 3370 "source-protocol": "ietf-routing:direct", 3371 "route-preference": 0, 3372 "last-updated": "2015-10-24T17:11:27+02:00" 3373 }, 3374 { 3375 "ietf-ipv4-unicast-routing:destination-prefix": 3376 "0.0.0.0/0", 3377 "source-protocol": "ietf-routing:static", 3378 "route-preference": 5, 3379 "next-hop": { 3380 "ietf-ipv4-unicast-routing:next-hop-address": 3381 "192.0.2.2" 3382 }, 3383 "last-updated": "2015-10-24T18:02:45+02:00" 3384 } 3385 ] 3386 } 3387 }, 3388 { 3389 "name": "ipv6-master", 3390 "address-family": 3391 "ietf-ipv6-unicast-routing:ipv6-unicast", 3392 "default-rib": true, 3393 "routes": { 3394 "route": [ 3395 { 3396 "ietf-ipv6-unicast-routing:destination-prefix": 3397 "2001:db8:0:1::/64", 3398 "next-hop": { 3399 "outgoing-interface": "eth0" 3400 }, 3401 "source-protocol": "ietf-routing:direct", 3402 "route-preference": 0, 3403 "last-updated": "2015-10-24T17:11:27+02:00" 3404 }, 3405 { 3406 "ietf-ipv6-unicast-routing:destination-prefix": 3407 "2001:db8:0:2::/64", 3408 "next-hop": { 3409 "outgoing-interface": "eth1" 3410 }, 3411 "source-protocol": "ietf-routing:direct", 3412 "route-preference": 0, 3413 "last-updated": "2015-10-24T17:11:27+02:00" 3414 }, 3415 { 3416 "ietf-ipv6-unicast-routing:destination-prefix": 3417 "::/0", 3418 "next-hop": { 3419 "ietf-ipv6-unicast-routing:next-hop-address": 3420 "2001:db8:0:1::2" 3421 }, 3422 "source-protocol": "ietf-routing:static", 3423 "route-preference": 5, 3424 "last-updated": "2015-10-24T18:02:45+02:00" 3425 } 3426 ] 3427 } 3428 } 3429 ] 3430 } 3431 } 3432 } 3434 Appendix E. NETCONF Get Data Reply Example 3436 This section gives an example of an XML reply to the NETCONF request for for a device that implements the 3438 example data models above. 3440 3443 3444 3448 192.0.2.1 3449 3450 3451 ietf-routing:static 3452 3453 3454 3455 3456 0.0.0.0/0 3457 3458 192.0.2.2 3459 3460 3461 3462 3463 3464 ::/0 3465 3466 2001:db8:0:1::2 3467 3468 3469 3470 3471 3472 3474 3475 3476 ipv4-master 3477 3478 ietf-ipv4-unicast-routing:ipv4-unicast 3479 3480 true 3481 3482 3483 3484 192.0.2.1/24 3485 3486 3487 eth0 3488 3489 0 3490 ietf-routing:direct 3491 2015-10-24T17:11:27+02:00 3492 3493 3494 3495 198.51.100.0/24 3496 3497 3498 eth1 3499 3500 0 3501 ietf-routing:direct 3502 2015-10-24T17:11:27+02:00 3503 3504 3505 0.0.0.0/0 3506 3507 3508 192.0.2.2 3509 3510 3511 5 3512 ietf-routing:static 3513 2015-10-24T18:02:45+02:00 3514 3515 3516 3517 3518 ipv6-master 3519 3520 ietf-ipv6-unicast-routing:ipv6-unicast 3521 3522 true 3523 3524 3525 3526 2001:db8:0:1::/64 3527 3528 3529 eth0 3530 3531 0 3532 ietf-routing:direct 3533 2015-10-24T17:11:27+02:00 3534 3535 3536 3537 2001:db8:0:2::/64 3538 3539 3540 eth1 3541 3542 0 3543 ietf-routing:direct 3544 2015-10-24T17:11:27+02:00 3545 3546 3547 ::/0 3548 3549 3550 3551 2001:db8:0:1::2 3552 3553 3554 5 3555 ietf-routing:static 3556 2015-10-24T18:02:45+02:00 3557 3558 3559 3560 3561 3562 3563 3565 Acknowledgments 3567 The authors wish to thank Nitin Bahadur, Martin Bjorklund, Dean 3568 Bogdanovic, Jeff Haas, Joel Halpern, Wes Hardaker, Sriganesh Kini, 3569 David Lamparter, Andrew McGregor, Jan Medved, Xiang Li, Stephane 3570 Litkowski, Thomas Morin, Tom Petch, Bruno Rijsman, 3571 Juergen Schoenwaelder, Phil Shafer, Dave Thaler, Yi Yang, 3572 Derek Man-Kit Yeung, Jeffrey Zhang, Vladimir Vassilev, and Rob Wilton 3573 for their helpful comments and suggestions. 3575 Authors' Addresses 3577 Ladislav Lhotka 3578 CZ.NIC 3580 EMail: lhotka@nic.cz 3581 Acee Lindem 3582 Cisco Systems 3584 EMail: acee@cisco.com 3586 Yingzhen Qu 3587 Huawei 3588 2330 Central Expressway 3589 Santa Clara CA 95050 3590 USA 3592 EMail: yingzhen.qu@huawei.com