idnits 2.17.00 (12 Aug 2021) /tmp/idnits63357/draft-ietf-netmod-rfc8022bis-00.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 : ---------------------------------------------------------------------------- -- The abstract seems to indicate that this document obsoletes RFC8022, but the header doesn't have an 'Obsoletes:' line to match this. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 3828 has weird spacing: '...-prefix ine...' == Line 3849 has weird spacing: '...-prefix ine...' -- The document date (October 31, 2017) is 1663 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 7223 (Obsoleted by RFC 8343) ** Obsolete normative reference: RFC 7277 (Obsoleted by RFC 8344) ** Obsolete normative reference: RFC 8022 (Obsoleted by RFC 8349) -- Obsolete informational reference (is this intentional?): RFC 6087 (Obsoleted by RFC 8407) -- Obsolete informational reference (is this intentional?): RFC 7895 (Obsoleted by RFC 8525) == Outdated reference: draft-ietf-netmod-revised-datastores has been published as RFC 8342 Summary: 3 errors (**), 0 flaws (~~), 4 warnings (==), 4 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 Intended status: Standards Track A. Lindem 5 Expires: May 4, 2018 Cisco Systems 6 Y. Qu 7 Futurewei Technologies, Inc. 8 October 31, 2017 10 A YANG Data Model for Routing Management (NDMA Version) 11 draft-ietf-netmod-rfc8022bis-00 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 This version of these YANG modules uses new names for these YANG 25 models. The main difference from the first version is that this 26 version fully conforms to the Network Management Datastore 27 Architecture (NMDA). Consequently, this document obsoletes RFC 8022. 28 Deprecated versions of the prior YANG modules are provided as the 29 NDMA conpliant modules will replace the prior modules. 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at http://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on May 4, 2018 . 48 Copyright Notice 50 Copyright (c) 2017 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents 55 (http://trustee.ietf.org/license-info) in effect on the date of 56 publication of this document. Please review these documents 57 carefully, as they describe your rights and restrictions with respect 58 to this document. Code Components extracted from this document must 59 include Simplified BSD License text as described in Section 4.e of 60 the Trust Legal Provisions and are provided without warranty as 61 described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 66 2. Terminology and Notation . . . . . . . . . . . . . . . . . . 4 67 2.1. Glossary of New Terms . . . . . . . . . . . . . . . . . . 5 68 2.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 5 69 2.3. Prefixes in Data Node Names . . . . . . . . . . . . . . . 6 70 3. Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 6 71 4. The Design of the Core Routing Data Model . . . . . . . . . . 7 72 4.1. System-Controlled and User-Controlled List Entries . . . 8 73 5. Basic Building Blocks . . . . . . . . . . . . . . . . . . . . 9 74 5.1. Route . . . . . . . . . . . . . . . . . . . . . . . . . . 9 75 5.2. Routing Information Base (RIB) . . . . . . . . . . . . . 9 76 5.3. Control-Plane Protocol . . . . . . . . . . . . . . . . . 10 77 5.3.1. Routing Pseudo-Protocols . . . . . . . . . . . . . . 10 78 5.3.2. Defining New Control-Plane Protocols . . . . . . . . 11 79 5.4. Parameters of IPv6 Router Advertisements . . . . . . . . 11 80 6. Interactions with Other YANG Modules . . . . . . . . . . . . 13 81 6.1. Module "ietf-interfaces" . . . . . . . . . . . . . . . . 13 82 6.2. Module "ietf-ip" . . . . . . . . . . . . . . . . . . . . 13 83 7. Routing Management YANG Module . . . . . . . . . . . . . . . 14 84 8. IPv4 Unicast Routing Management YANG Module . . . . . . . . . 24 85 9. IPv6 Unicast Routing Management YANG Module . . . . . . . . . 29 86 9.1. IPv6 Router Advertisements Submodule . . . . . . . . . . 34 87 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 41 88 11. Security Considerations . . . . . . . . . . . . . . . . . . . 42 89 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 43 90 12.1. Normative References . . . . . . . . . . . . . . . . . . 43 91 12.2. Informative References . . . . . . . . . . . . . . . . . 44 92 Appendix A. Deprecated Models . . . . . . . . . . . . . . . . . 45 93 A.1. Deprecated ietf-routing Model . . . . . . . . . . . . . . 45 94 A.2. Deprecated ietf-ipv4-unicast Model . . . . . . . . . . . 58 95 A.3. Deprecated ietf-ipv6-unicast Model . . . . . . . . . . . 64 96 A.4. Deprecated ietf-ipv6-router-advertisements Model . . . . 69 97 Appendix B. The Complete Data Trees . . . . . . . . . . . . . . 80 98 Appendix C. Minimum Implementation . . . . . . . . . . . . . . . 83 99 Appendix D. Example: Adding a New Control-Plane Protocol . . . . 84 100 Appendix E. Data Tree Example . . . . . . . . . . . . . . . . . 86 101 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 94 102 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 94 104 1. Introduction 106 This document contains a specification of the following YANG modules: 108 o The "ietf-routing-2" module provides generic components of a 109 routing data model. 111 o The "ietf-ipv4-unicast-routing-2" module augments the "ietf- 112 routing-2" module with additional data specific to IPv4 unicast. 114 o The "ietf-ipv6-unicast-routing-2" module augments the "ietf- 115 routing-2" module with additional data specific to IPv6 unicast. 116 Its submodule "ietf-ipv6-router-advertisements" also augments the 117 "ietf-interfaces" [RFC7223] and "ietf-ip" [RFC7277] modules with 118 IPv6 router configuration variables required by [RFC4861]. 120 These modules together define the so-called core routing data model, 121 which is intended as a basis for future data model development 122 covering more-sophisticated routing systems. While these three 123 modules can be directly used for simple IP devices with static 124 routing (see Appendix C), their main purpose is to provide essential 125 building blocks for more-complicated data models involving multiple 126 control-plane protocols, multicast routing, additional address 127 families, and advanced functions such as route filtering or policy 128 routing. To this end, it is expected that the core routing data 129 model will be augmented by numerous modules developed by various IETF 130 working groups. 132 This version of these YANG modules uses new names for these YANG 133 models. The main difference from the first version is that this 134 version fully conforms to the Network Management Datastore 135 Architecture (NMDA) [I-D.ietf-netmod-revised-datastores]. 136 Consequently, this document obsoletes RFC 8022 [RFC8022]. Deprecated 137 versions of the prior YANG modules are provided as the Appendix A 138 NDMA conpliant modules will replace the prior modules. 140 2. Terminology and Notation 142 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 143 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 144 document are to be interpreted as described in [RFC2119]. 146 The following terms are defined in [RFC6241]: 148 o client 150 o message 152 o protocol operation 154 o server 156 The following terms are defined in [RFC7950]: 158 o action 160 o augment 162 o configuration data 164 o container 166 o container with presence 168 o data model 170 o data node 172 o feature 174 o leaf 176 o list 178 o mandatory node 180 o module 182 o schema tree 184 o state data 186 o RPC (Remote Procedure Call) operation 188 2.1. Glossary of New Terms 190 core routing data model: YANG data model comprising "ietf-routing- 191 2", "ietf-ipv4-unicast-routing-2", and "ietf-ipv6-unicast-routing- 192 2" modules. 194 direct route: a route to a directly connected network. 196 Routing Information Base (RIB): An object containing a list of 197 routes together with other information. See Section 5.2 for 198 details. 200 system-controlled entry: An entry of a list in operational state 201 ("config false") that is created by the systemindependently of 202 what has been explicitly configured. See Section 4.1 for details. 204 user-controlled entry: An entry of a list in operational state data 205 ("config false") that is created and deleted as a direct 206 consequence of certain configuration changes. See Section 4.1 for 207 details. 209 2.2. Tree Diagrams 211 A simplified graphical representation of the complete data tree is 212 presented in Appendix B, and similar diagrams of its various subtrees 213 appear in the main text. 215 o Brackets "[" and "]" enclose list keys. 217 o Curly braces "{" and "}" contain names of optional features that 218 make the corresponding node conditional. 220 o Abbreviations before data node names: "rw" means configuration 221 (read-write), "ro" state data (read-only), "-x" RPC operations or 222 actions, and "-n" notifications. 224 o Symbols after data node names: "?" means an optional node, "!" a 225 container with presence, and "*" denotes a "list" or "leaf-list". 227 o Parentheses enclose choice and case nodes, and case nodes are also 228 marked with a colon (":"). 230 o Ellipsis ("...") stands for contents of subtrees that are not 231 shown. 233 2.3. Prefixes in Data Node Names 235 In this document, names of data nodes, actions, and other data model 236 objects are often used without a prefix, as long as it is clear from 237 the context in which YANG module each name is defined. Otherwise, 238 names are prefixed using the standard prefix associated with the 239 corresponding YANG module, as shown in Table 1. 241 +--------+-----------------------------+-----------+ 242 | Prefix | YANG module | Reference | 243 +--------+-----------------------------+-----------+ 244 | if | ietf-interfaces | [RFC7223] | 245 | ip | ietf-ip | [RFC7277] | 246 | rt | ietf-routing-2 | Section 7 | 247 | v4ur | ietf-ipv4-unicast-routing-2 | Section 8 | 248 | v6ur | ietf-ipv6-unicast-routing-2 | Section 9 | 249 | yang | ietf-yang-types | [RFC6991] | 250 | inet | ietf-inet-types | [RFC6991] | 251 +--------+-----------------------------+-----------+ 253 Table 1: Prefixes and Corresponding YANG Modules 255 3. Objectives 257 The initial design of the core routing data model was driven by the 258 following objectives: 260 o The data model should be suitable for the common address families 261 -- in particular, IPv4 and IPv6 -- and for unicast and multicast 262 routing, as well as Multiprotocol Label Switching (MPLS). 264 o A simple IP routing system, such as one that uses only static 265 routing, should be configurable in a simple way, ideally without 266 any need to develop additional YANG modules. 268 o On the other hand, the core routing framework must allow for 269 complicated implementations involving multiple Routing Information 270 Bases (RIBs) and multiple control-plane protocols, as well as 271 controlled redistributions of routing information. 273 o Because device vendors will want to map the data models built on 274 this generic framework to their proprietary data models and 275 configuration interfaces, the framework should be flexible enough 276 to facilitate that and accommodate data models with different 277 logic. 279 4. The Design of the Core Routing Data Model 281 The core routing data model consists of three YANG modules and one 282 submodule. The first module, "ietf-routing-2", defines the generic 283 components of a routing system. The other two modules, "ietf-ipv4- 284 unicast-routing-2" and "ietf-ipv6-unicast-routing-2", augment the 285 "ietf-routing-2" module with additional data nodes that are needed 286 for IPv4 and IPv6 unicast routing, respectively. The "ietf-ipv6- 287 unicast-routing-2" module has a submodule, "ietf-ipv6-router- 288 advertisements", that augments the "ietf-interfaces" [RFC7223] and 289 "ietf-ip" [RFC7277] modules with configuration variables for IPv6 290 router advertisements as required by [RFC4861]. 292 Figures 1 shows abridged views of the hierarchies. See Appendix B 293 for the complete data trees. 295 +--rw routing 296 +--rw router-id? yang:dotted-quad 297 +--ro interfaces 298 | +--ro interface* if:interface-ref 299 +--rw control-plane-protocols 300 | +--rw control-plane-protocol* [type name] 301 | +--rw type identityref 302 | +--rw name string 303 | +--rw description? string 304 | +--rw static-routes 305 | +--rw v4ur:ipv4 306 | | ... 307 | +--rw v6ur:ipv6 308 | ... 309 +--rw ribs 310 +--rw rib* [name] 311 +--rw name string 312 +--rw address-family? identityref 313 +--ro default-rib? boolean {multiple-ribs}? 314 +--ro routes 315 | +--ro route* 316 | ... 317 +---x active-route 318 | +---w input 319 | | +---w v4ur:destination-address? inet:ipv4-address 320 | | +---w v6ur:destination-address? inet:ipv6-address 321 | +--ro output 322 | ... 323 +--rw description? string 325 Figure 1: Data Hierarchy 327 As can be seen from Figures 1, the core routing data model introduces 328 several generic components of a routing framework: routes, RIBs 329 containing lists of routes, and control-plane protocols. Section 5 330 describes these components in more detail. 332 4.1. System-Controlled and User-Controlled List Entries 334 The core routing data model defines several lists in the schema tree, 335 such as "rib", that have to be populated with at least one entry in 336 any properly functioning device, and additional entries may be 337 configured by a client. 339 In such a list, the server creates the required item as a so-called 340 system-controlled entry in state data in the operational datastore 341 [I-D.ietf-netmod-revised-datastores], i.e., inside read-only lists in 342 the "routing" container. 344 An example can be seen in Appendix E: the "/routing/ribs/rib" list 345 has two system-controlled entries named "ipv4-master" and 346 "ipv6-master". 348 Additional entries may be created in the configuration by a client, 349 e.g., via the NETCONF protocol. These are so-called user-controlled 350 entries. If the server accepts a configured user-controlled entry, 351 then this entry also appears in the state data version of the list. 353 Corresponding entries in both versions of the list (in operational 354 datastore and intended datastore [I-D.ietf-netmod-revised-datastores] 355 have the same value of the list key. 357 A client may also provide supplemental configuration of system- 358 controlled entries. To do so, the client creates a new entry in the 359 configuration with the desired contents. In order to bind this entry 360 to the corresponding entry in the state data list in the operational 361 datastore, the key of the configuration entry has to be set to the 362 same value as the key of the state entry. 364 Deleting a user-controlled entry from the configuration list results 365 in the removal of the corresponding entry in the state data list. In 366 contrast, if client delets a system-controlled entry from the 367 configuration list in the intended datastore, only the extra 368 configuration specified in that entry is removed but the 369 corresponding state data entry remains in the list in the operational 370 datastore. 372 5. Basic Building Blocks 374 This section describes the essential components of the core routing 375 data model. 377 5.1. Route 379 Routes are basic elements of information in a routing system. The 380 core routing data model defines only the following minimal set of 381 route attributes: 383 o "destination-prefix": address prefix specifying the set of 384 destination addresses for which the route may be used. This 385 attribute is mandatory. 387 o "route-preference": an integer value (also known as administrative 388 distance) that is used for selecting a preferred route among 389 routes with the same destination prefix. A lower value means a 390 more preferred route. 392 o "next-hop": determines the outgoing interface and/or next-hop 393 address(es), or a special operation to be performed with a packet. 395 Routes are primarily state data that appear as entries of RIBs 396 (Section 5.2) but they may also be found in configuration data, for 397 example, as manually configured static routes. In the latter case, 398 configurable route attributes are generally a subset of attributes 399 defined for RIB routes. 401 5.2. Routing Information Base (RIB) 403 Every implementation of the core routing data model manages one or 404 more Routing Information Bases (RIBs). A RIB is a list of routes 405 complemented with administrative data. Each RIB contains only routes 406 of one address family. An address family is represented by an 407 identity derived from the "rt:address-family" base identity. 409 In the core routing data model, RIBs are state data represented as 410 entries of the list "/routing/ribs/rib" in the operational datastore 411 [I-D.ietf-netmod-revised-datastores]. The contents of RIBs are 412 controlled and manipulated by control-plane protocol operations that 413 may result in route additions, removals, and modifications. This 414 also includes manipulations via the "static" and/or "direct" pseudo- 415 protocols; see Section 5.3.1. 417 For every supported address family, exactly one RIB MUST be marked as 418 the so-called default RIB to which control-plane protocols place 419 their routes by default. 421 Simple router implementations that do not advertise the feature 422 "multiple-ribs" will typically create one system-controlled RIB per 423 supported address family and mark it as the default RIB. 425 More-complex router implementations advertising the "multiple-ribs" 426 feature support multiple RIBs per address family that can be used for 427 policy routing and other purposes. 429 The following action (see Section 7.15 of [RFC7950]) is defined for 430 the "rib" list: 432 o active-route -- return the active RIB route for the destination 433 address that is specified as the action's input parameter. 435 5.3. Control-Plane Protocol 437 The core routing data model provides an open-ended framework for 438 defining multiple control-plane protocol instances, e.g., for Layer 3 439 routing protocols. Each control-plane protocol instance MUST be 440 assigned a type, which is an identity derived from the 441 "rt:control-plane-protocol" base identity. The core routing data 442 model defines two identities for the direct and static pseudo- 443 protocols (Section 5.3.1). 445 Multiple control-plane protocol instances of the same type MAY be 446 configured. 448 5.3.1. Routing Pseudo-Protocols 450 The core routing data model defines two special routing protocol 451 types -- "direct" and "static". Both are in fact pseudo-protocols, 452 which means that they are confined to the local device and do not 453 exchange any routing information with adjacent routers. 455 Every implementation of the core routing data model MUST provide 456 exactly one instance of the "direct" pseudo-protocol type. It is the 457 source of direct routes for all configured address families. Direct 458 routes are normally supplied by the operating system kernel, based on 459 the configuration of network interface addresses; see Section 6.2. 461 A pseudo-protocol of the type "static" allows for specifying routes 462 manually. It MAY be configured in zero or multiple instances, 463 although a typical configuration will have exactly one instance. 465 5.3.2. Defining New Control-Plane Protocols 467 It is expected that future YANG modules will create data models for 468 additional control-plane protocol types. Such a new module has to 469 define the protocol-specific configuration and state data, and it has 470 to integrate it into the core routing framework in the following way: 472 o A new identity MUST be defined for the control-plane protocol, and 473 its base identity MUST be set to "rt:control-plane-protocol" or to 474 an identity derived from "rt:control-plane-protocol". 476 o Additional route attributes MAY be defined, preferably in one 477 place by means of defining a YANG grouping. The new attributes 478 have to be inserted by augmenting the definitions of the node 480 /rt:routing/rt:ribs/rt:rib/rt:routes/rt:route 482 and possibly other places in the configuration, state data, 483 notifications, and input/output parameters of actions or RPC 484 operations. 486 o Configuration parameters and/or state data for the new protocol 487 can be defined by augmenting the "control-plane-protocol" data 488 node under "/routing". 490 By using a "when" statement, the augmented configuration parameters 491 and state data specific to the new protocol SHOULD be made 492 conditional and valid only if the value of "rt:type" or 493 "rt:source-protocol" is equal to (or derived from) the new protocol's 494 identity. 496 It is also RECOMMENDED that protocol-specific data nodes be 497 encapsulated in an appropriately named container with presence. Such 498 a container may contain mandatory data nodes that are otherwise 499 forbidden at the top level of an augment. 501 The above steps are implemented by the example YANG module for the 502 Routing Information Protocol (RIP) in Appendix D. 504 5.4. Parameters of IPv6 Router Advertisements 506 YANG module "ietf-ipv6-router-advertisements" (Section 9.1), which is 507 a submodule of the "ietf-ipv6-unicast-routing-2" module, augments the 508 configuration and state data of IPv6 interfaces with definitions of 509 the following variables as required by Section 6.2.1 of [RFC4861]: 511 o send-advertisements 512 o max-rtr-adv-interval 514 o min-rtr-adv-interval 516 o managed-flag 518 o other-config-flag 520 o link-mtu 522 o reachable-time 524 o retrans-timer 526 o cur-hop-limit 528 o default-lifetime 530 o prefix-list: a list of prefixes to be advertised. 532 The following parameters are associated with each prefix in the 533 list: 535 * valid-lifetime 537 * on-link-flag 539 * preferred-lifetime 541 * autonomous-flag 543 NOTES: 545 1. The "IsRouter" flag, which is also required by [RFC4861], is 546 implemented in the "ietf-ip" module [RFC7277] (leaf 547 "ip:forwarding"). 549 2. The original specification [RFC4861] allows the implementations 550 to decide whether the "valid-lifetime" and "preferred-lifetime" 551 parameters remain the same in consecutive advertisements or 552 decrement in real time. However, the latter behavior seems 553 problematic because the values might be reset again to the 554 (higher) configured values after a configuration is reloaded. 555 Moreover, no implementation is known to use the decrementing 556 behavior. The "ietf-ipv6-router-advertisements" submodule 557 therefore stipulates the former behavior with constant values. 559 6. Interactions with Other YANG Modules 561 The semantics of the core routing data model also depends on several 562 configuration parameters that are defined in other YANG modules. 564 6.1. Module "ietf-interfaces" 566 The following boolean switch is defined in the "ietf-interfaces" YANG 567 module [RFC7223]: 569 /if:interfaces/if:interface/if:enabled 571 If this switch is set to "false" for a network-layer interface, 572 then all routing and forwarding functions MUST be disabled on this 573 interface. 575 6.2. Module "ietf-ip" 577 The following boolean switches are defined in the "ietf-ip" YANG 578 module [RFC7277]: 580 /if:interfaces/if:interface/ip:ipv4/ip:enabled 582 If this switch is set to "false" for a network-layer interface, 583 then all IPv4 routing and forwarding functions MUST be disabled on 584 this interface. 586 /if:interfaces/if:interface/ip:ipv4/ip:forwarding 588 If this switch is set to "false" for a network-layer interface, 589 then the forwarding of IPv4 datagrams through this interface MUST 590 be disabled. However, the interface MAY participate in other IPv4 591 routing functions, such as routing protocols. 593 /if:interfaces/if:interface/ip:ipv6/ip:enabled 595 If this switch is set to "false" for a network-layer interface, 596 then all IPv6 routing and forwarding functions MUST be disabled on 597 this interface. 599 /if:interfaces/if:interface/ip:ipv6/ip:forwarding 601 If this switch is set to "false" for a network-layer interface, 602 then the forwarding of IPv6 datagrams through this interface MUST 603 be disabled. However, the interface MAY participate in other IPv6 604 routing functions, such as routing protocols. 606 In addition, the "ietf-ip" module allows for configuring IPv4 and 607 IPv6 addresses and network prefixes or masks on network-layer 608 interfaces. Configuration of these parameters on an enabled 609 interface MUST result in an immediate creation of the corresponding 610 direct route. The destination prefix of this route is set according 611 to the configured IP address and network prefix/mask, and the 612 interface is set as the outgoing interface for that route. 614 7. Routing Management YANG Module 616 file "ietf-routing-2@2017-10-06.yang" 617 module ietf-routing-2 { 618 yang-version "1.1"; 619 namespace "urn:ietf:params:xml:ns:yang:ietf-routing-2"; 620 prefix "rt"; 622 import ietf-yang-types { 623 prefix "yang"; 624 } 626 import ietf-interfaces { 627 prefix "if"; 628 } 630 organization 631 "IETF NETMOD - Networking Modeling Working Group"; 632 contact 633 "WG Web: 634 WG List: 636 Editor: Ladislav Lhotka 637 638 Acee Lindem 639 640 Yingzhen Qu 641 "; 643 description 644 "This YANG module defines essential components for the management 645 of a routing subsystem. 647 Copyright (c) 2017 IETF Trust and the persons 648 identified as authors of the code. All rights reserved. 650 Redistribution and use in source and binary forms, with or 651 without modification, is permitted pursuant to, and subject 652 to the license terms contained in, the Simplified BSD License 653 set forth in Section 4.c of the IETF Trust's Legal Provisions 654 Relating to IETF Documents 655 (http://trustee.ietf.org/license-info). 657 This version of this YANG module is part of RFC XXXX; see 658 the RFC itself for full legal notices."; 659 reference "RFC XXXX"; 661 revision 2017-10-06 { 662 description 663 "Network Managment Datastore Architecture (NDMA) 664 Initial Revision 665 Replaces ietf-routing.yang"; 666 reference 667 "RFC XXXX: A YANG Data Model for Routing Management 668 (NDMA Version)"; 669 } 671 /* Features */ 672 feature multiple-ribs { 673 description 674 "This feature indicates that the server supports user-defined 675 RIBs. 677 Servers that do not advertise this feature SHOULD provide 678 exactly one system-controlled RIB per supported address family 679 and make it also the default RIB. This RIB then appears as an 680 entry of the list /routing/ribs/rib."; 681 } 683 feature router-id { 684 description 685 "This feature indicates that the server supports configuration 686 of an explicit 32-bit router ID that is used by some routing 687 protocols. 689 Servers that do not advertise this feature set a router ID 690 algorithmically, usually to one of the configured IPv4 691 addresses. However, this algorithm is implementation 692 specific."; 693 } 695 /* Identities */ 697 identity address-family { 698 description 699 "Base identity from which identities describing address 700 families are derived."; 701 } 702 identity ipv4 { 703 base address-family; 704 description 705 "This identity represents IPv4 address family."; 706 } 708 identity ipv6 { 709 base address-family; 710 description 711 "This identity represents IPv6 address family."; 712 } 714 identity control-plane-protocol { 715 description 716 "Base identity from which control-plane protocol identities are 717 derived."; 718 } 720 identity routing-protocol { 721 base control-plane-protocol; 722 description 723 "Identity from which Layer 3 routing protocol identities are 724 derived."; 725 } 727 identity direct { 728 base routing-protocol; 729 description 730 "Routing pseudo-protocol that provides routes to directly 731 connected networks."; 732 } 734 identity static { 735 base routing-protocol; 736 description 737 "Static routing pseudo-protocol."; 738 } 740 /* Type Definitions */ 742 typedef route-preference { 743 type uint32; 744 description 745 "This type is used for route preferences."; 746 } 748 /* Groupings */ 749 grouping address-family { 750 description 751 "This grouping provides a leaf identifying an address 752 family."; 753 leaf address-family { 754 type identityref { 755 base address-family; 756 } 757 mandatory "true"; 758 description 759 "Address family."; 760 } 761 } 763 grouping router-id { 764 description 765 "This grouping provides router ID."; 766 leaf router-id { 767 type yang:dotted-quad; 768 description 769 "A 32-bit number in the form of a dotted quad that is used by 770 some routing protocols identifying a router."; 771 reference 772 "RFC 2328: OSPF Version 2."; 773 } 774 } 776 grouping special-next-hop { 777 description 778 "This grouping provides a leaf with an enumeration of special 779 next hops."; 780 leaf special-next-hop { 781 type enumeration { 782 enum blackhole { 783 description 784 "Silently discard the packet."; 785 } 786 enum unreachable { 787 description 788 "Discard the packet and notify the sender with an error 789 message indicating that the destination host is 790 unreachable."; 791 } 792 enum prohibit { 793 description 794 "Discard the packet and notify the sender with an error 795 message indicating that the communication is 796 administratively prohibited."; 798 } 799 enum receive { 800 description 801 "The packet will be received by the local system."; 802 } 803 } 804 description 805 "Options for special next hops."; 806 } 807 } 809 grouping next-hop-content { 810 description 811 "Generic parameters of next hops in static routes."; 812 choice next-hop-options { 813 mandatory "true"; 814 description 815 "Options for next hops in static routes. 817 It is expected that further cases will be added through 818 augments from other modules."; 819 case simple-next-hop { 820 description 821 "This case represents a simple next hop consisting of the 822 next-hop address and/or outgoing interface. 824 Modules for address families MUST augment this case with a 825 leaf containing a next-hop address of that address 826 family."; 827 leaf outgoing-interface { 828 type if:interface-ref; 829 description 830 "Name of the outgoing interface."; 831 } 832 } 833 case special-next-hop { 834 uses special-next-hop; 835 } 836 case next-hop-list { 837 container next-hop-list { 838 description 839 "Container for multiple next-hops."; 840 list next-hop { 841 key "index"; 842 description 843 "An entry of a next-hop list. 845 Modules for address families MUST augment this list 846 with a leaf containing a next-hop address of that 847 address family."; 848 leaf index { 849 type string; 850 description 851 "A user-specified identifier utilized to uniquely 852 reference the next-hop entry in the next-hop list. 853 The value of this index has no semantic meaning 854 other than for referencing the entry."; 855 } 856 leaf outgoing-interface { 857 type if:interface-ref; 858 description 859 "Name of the outgoing interface."; 860 } 861 } 862 } 863 } 864 } 865 } 867 grouping next-hop-state-content { 868 description 869 "Generic parameters of next hops in state data."; 870 choice next-hop-options { 871 mandatory "true"; 872 description 873 "Options for next hops in state data. 875 It is expected that further cases will be added through 876 augments from other modules, e.g., for recursive 877 next hops."; 878 case simple-next-hop { 879 description 880 "This case represents a simple next hop consisting of the 881 next-hop address and/or outgoing interface. 883 Modules for address families MUST augment this case with a 884 leaf containing a next-hop address of that address 885 family."; 886 leaf outgoing-interface { 887 type if:interface-ref; 888 description 889 "Name of the outgoing interface."; 890 } 891 } 892 case special-next-hop { 893 uses special-next-hop; 895 } 896 case next-hop-list { 897 container next-hop-list { 898 description 899 "Container for multiple next hops."; 900 list next-hop { 901 description 902 "An entry of a next-hop list. 904 Modules for address families MUST augment this list 905 with a leaf containing a next-hop address of that 906 address family."; 907 leaf outgoing-interface { 908 type if:interface-ref; 909 description 910 "Name of the outgoing interface."; 911 } 912 } 913 } 914 } 915 } 916 } 918 grouping route-metadata { 919 description 920 "Common route metadata."; 921 leaf source-protocol { 922 type identityref { 923 base routing-protocol; 924 } 925 mandatory "true"; 926 description 927 "Type of the routing protocol from which the route 928 originated."; 929 } 930 leaf active { 931 type empty; 932 description 933 "Presence of this leaf indicates that the route is preferred 934 among all routes in the same RIB that have the same 935 destination prefix."; 936 } 937 leaf last-updated { 938 type yang:date-and-time; 939 description 940 "Time stamp of the last modification of the route. If the 941 route was never modified, it is the time when the route was 942 inserted into the RIB."; 944 } 945 } 947 /* Configuration Data */ 949 container routing { 950 description 951 "Configuration parameters for the routing subsystem."; 952 uses router-id { 953 if-feature "router-id"; 954 description 955 "Configuration of the global router ID. Routing protocols 956 that use router ID can use this parameter or override it 957 with another value."; 958 } 959 container interfaces { 960 config "false"; 961 description 962 "Network-layer interfaces used for routing."; 963 leaf-list interface { 964 type if:interface-ref; 965 description 966 "Each entry is a reference to the name of a configured 967 network-layer interface."; 968 } 969 } 970 container control-plane-protocols { 971 description 972 "Configuration of control-plane protocol instances."; 973 list control-plane-protocol { 974 key "type name"; 975 description 976 "Each entry contains configuration of a control-plane 977 protocol instance."; 978 leaf type { 979 type identityref { 980 base control-plane-protocol; 981 } 982 description 983 "Type of the control-plane protocol - an identity derived 984 from the 'control-plane-protocol' base identity."; 985 } 986 leaf name { 987 type string; 988 description 989 "An arbitrary name of the control-plane protocol 990 instance."; 991 } 992 leaf description { 993 type string; 994 description 995 "Textual description of the control-plane protocol 996 instance."; 997 } 998 container static-routes { 999 when "derived-from-or-self(../type, 'rt:static')" { 1000 description 1001 "This container is only valid for the 'static' routing 1002 protocol."; 1003 } 1004 description 1005 "Configuration of the 'static' pseudo-protocol. 1007 Address-family-specific modules augment this node with 1008 their lists of routes."; 1009 } 1010 } 1011 } 1012 container ribs { 1013 description 1014 "Configuration of RIBs."; 1015 list rib { 1016 key "name"; 1017 description 1018 "Each entry contains configuration for a RIB identified by 1019 the 'name' key. 1021 Entries having the same key as a system-controlled entry 1022 of the list /routing/ribs/rib are used for 1023 configuring parameters of that entry. Other entries 1024 define additional user-controlled RIBs."; 1025 leaf name { 1026 type string; 1027 description 1028 "The name of the RIB. 1030 For system-controlled entries, the value of this leaf 1031 must be the same as the name of the corresponding entry 1032 in state data. 1034 For user-controlled entries, an arbitrary name can be 1035 used."; 1036 } 1037 uses address-family { 1038 description 1039 "Address family of the RIB. 1041 It is mandatory for user-controlled RIBs. For 1042 system-controlled RIBs it can be omitted; otherwise, it 1043 must match the address family of the corresponding state 1044 entry."; 1045 refine "address-family" { 1046 mandatory "false"; 1047 } 1048 } 1050 leaf default-rib { 1051 if-feature "multiple-ribs"; 1052 type boolean; 1053 default "true"; 1054 config "false"; 1055 description 1056 "This flag has the value of 'true' if and only if the RIB 1057 is the default RIB for the given address family. 1059 By default, control-plane protocols place their routes 1060 in the default RIBs."; 1061 } 1062 container routes { 1063 config "false"; 1064 description 1065 "Current content of the RIB."; 1066 list route { 1067 description 1068 "A RIB route entry. This data node MUST be augmented 1069 with information specific for routes of each address 1070 family."; 1071 leaf route-preference { 1072 type route-preference; 1073 description 1074 "This route attribute, also known as administrative 1075 distance, allows for selecting the preferred route 1076 among routes with the same destination prefix. A 1077 smaller value means a more preferred route."; 1078 } 1079 container next-hop { 1080 description 1081 "Route's next-hop attribute."; 1082 uses next-hop-state-content; 1083 } 1084 uses route-metadata; 1085 } 1086 } 1087 action active-route { 1088 description 1089 "Return the active RIB route that is used for the 1090 destination address. 1092 Address-family-specific modules MUST augment input 1093 parameters with a leaf named 'destination-address'."; 1094 output { 1095 container route { 1096 description 1097 "The active RIB route for the specified destination. 1099 If no route exists in the RIB for the destination 1100 address, no output is returned. 1102 Address-family-specific modules MUST augment this 1103 container with appropriate route contents."; 1104 container next-hop { 1105 description 1106 "Route's next-hop attribute."; 1107 uses next-hop-state-content; 1108 } 1109 uses route-metadata; 1110 } 1111 } 1112 } 1113 leaf description { 1114 type string; 1115 description 1116 "Textual description of the RIB."; 1117 } 1118 } 1119 } 1120 } 1121 } 1122 1124 8. IPv4 Unicast Routing Management YANG Module 1126 file "ietf-ipv4-unicast-routing-2@2017-10-06.yang" 1127 module ietf-ipv4-unicast-routing-2 { 1128 yang-version "1.1"; 1129 namespace 1130 "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing-2"; 1131 prefix "v4ur"; 1133 import ietf-routing-2 { 1134 prefix "rt"; 1135 } 1136 import ietf-inet-types { 1137 prefix "inet"; 1138 } 1139 organization 1140 "IETF NETMOD - Networking Modeling Working Group"; 1141 contact 1142 "WG Web: 1143 WG List: 1145 Editor: Ladislav Lhotka 1146 1147 Acee Lindem 1148 1149 Yingzhen Qu 1150 "; 1152 description 1153 "This YANG module augments the 'ietf-routing-2' module with basic 1154 configuration and state data for IPv4 unicast routing. 1156 Copyright (c) 2017 IETF Trust and the persons 1157 identified as authors of the code. All rights reserved. 1159 Redistribution and use in source and binary forms, with or 1160 without modification, is permitted pursuant to, and subject 1161 to the license terms contained in, the Simplified BSD License 1162 set forth in Section 4.c of the IETF Trust's Legal Provisions 1163 Relating to IETF Documents 1164 (http://trustee.ietf.org/license-info). 1166 This version of this YANG module is part of RFC XXXX; see 1167 the RFC itself for full legal notices."; 1168 reference "RFC XXXX"; 1170 revision 2017-10-06 { 1171 description 1172 "Network Managment Datastore Architecture (NDMA) 1173 Initial Revision 1174 Replaces ietf-ipv4-unicast-routing.yang"; 1175 reference 1176 "RFC XXXX: A YANG Data Model for Routing Management 1177 (NDMA Version)"; 1178 } 1180 /* Identities */ 1182 identity ipv4-unicast { 1183 base rt:ipv4; 1184 description 1185 "This identity represents the IPv4 unicast address family."; 1186 } 1188 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 1189 when "derived-from-or-self(../../rt:address-family, " 1190 + "'v4ur:ipv4-unicast')" { 1191 description 1192 "This augment is valid only for IPv4 unicast."; 1193 } 1194 description 1195 "This leaf augments an IPv4 unicast route."; 1196 leaf destination-prefix { 1197 type inet:ipv4-prefix; 1198 description 1199 "IPv4 destination prefix."; 1200 } 1201 } 1203 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1204 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1205 when "derived-from-or-self(../../../rt:address-family, " 1206 + "'v4ur:ipv4-unicast')" { 1207 description 1208 "This augment is valid only for IPv4 unicast."; 1209 } 1210 description 1211 "Augment 'simple-next-hop' case in IPv4 unicast routes."; 1212 leaf next-hop-address { 1213 type inet:ipv4-address; 1214 description 1215 "IPv4 address of the next hop."; 1216 } 1217 } 1219 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1220 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1221 + "rt:next-hop-list/rt:next-hop" { 1222 when "derived-from-or-self(../../../../../rt:address-family, " 1223 + "'v4ur:ipv4-unicast')" { 1224 description 1225 "This augment is valid only for IPv4 unicast."; 1226 } 1227 description 1228 "This leaf augments the 'next-hop-list' case of IPv4 unicast 1229 routes."; 1230 leaf address { 1231 type inet:ipv4-address; 1232 description 1233 "IPv4 address of the next-hop."; 1234 } 1235 } 1237 augment 1238 "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { 1239 when "derived-from-or-self(../rt:address-family, " 1240 + "'v4ur:ipv4-unicast')" { 1241 description 1242 "This augment is valid only for IPv4 unicast RIBs."; 1243 } 1244 description 1245 "This augment adds the input parameter of the 'active-route' 1246 action."; 1247 leaf destination-address { 1248 type inet:ipv4-address; 1249 description 1250 "IPv4 destination address."; 1251 } 1252 } 1254 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1255 + "rt:output/rt:route" { 1256 when "derived-from-or-self(../../rt:address-family, " 1257 + "'v4ur:ipv4-unicast')" { 1258 description 1259 "This augment is valid only for IPv4 unicast."; 1260 } 1261 description 1262 "This augment adds the destination prefix to the reply of the 1263 'active-route' action."; 1264 leaf destination-prefix { 1265 type inet:ipv4-prefix; 1266 description 1267 "IPv4 destination prefix."; 1268 } 1269 } 1271 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1272 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1273 + "rt:simple-next-hop" { 1274 when "derived-from-or-self(../../../rt:address-family, " 1275 + "'v4ur:ipv4-unicast')" { 1276 description 1277 "This augment is valid only for IPv4 unicast."; 1278 } 1279 description 1280 "Augment 'simple-next-hop' case in the reply to the 1281 'active-route' action."; 1282 leaf next-hop-address { 1283 type inet:ipv4-address; 1284 description 1285 "IPv4 address of the next hop."; 1286 } 1287 } 1289 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1290 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1291 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1292 when "derived-from-or-self(../../../../../rt:address-family, " 1293 + "'v4ur:ipv4-unicast')" { 1294 description 1295 "This augment is valid only for IPv4 unicast."; 1296 } 1297 description 1298 "Augment 'next-hop-list' case in the reply to the 1299 'active-route' action."; 1300 leaf next-hop-address { 1301 type inet:ipv4-address; 1302 description 1303 "IPv4 address of the next hop."; 1304 } 1305 } 1307 augment "/rt:routing/rt:control-plane-protocols/" 1308 + "rt:control-plane-protocol/rt:static-routes" { 1309 description 1310 "This augment defines the configuration of the 'static' 1311 pseudo-protocol with data specific to IPv4 unicast."; 1312 container ipv4 { 1313 description 1314 "Configuration of a 'static' pseudo-protocol instance 1315 consists of a list of routes."; 1316 list route { 1317 key "destination-prefix"; 1318 description 1319 "A list of static routes."; 1320 leaf destination-prefix { 1321 type inet:ipv4-prefix; 1322 mandatory "true"; 1323 description 1324 "IPv4 destination prefix."; 1325 } 1326 leaf description { 1327 type string; 1328 description 1329 "Textual description of the route."; 1330 } 1331 container next-hop { 1332 description 1333 "Configuration of next-hop."; 1334 uses rt:next-hop-content { 1335 augment "next-hop-options/simple-next-hop" { 1336 description 1337 "Augment 'simple-next-hop' case in IPv4 static 1338 routes."; 1339 leaf next-hop-address { 1340 type inet:ipv4-address; 1341 description 1342 "IPv4 address of the next hop."; 1343 } 1344 } 1345 augment "next-hop-options/next-hop-list/next-hop-list/" 1346 + "next-hop" { 1347 description 1348 "Augment 'next-hop-list' case in IPv4 static 1349 routes."; 1350 leaf next-hop-address { 1351 type inet:ipv4-address; 1352 description 1353 "IPv4 address of the next hop."; 1354 } 1355 } 1356 } 1357 } 1358 } 1359 } 1360 } 1361 } 1362 1364 9. IPv6 Unicast Routing Management YANG Module 1366 file "ietf-ipv6-unicast-routing-2@2017-10-06.yang" 1367 module ietf-ipv6-unicast-routing-2 { 1368 yang-version "1.1"; 1369 namespace 1370 "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing-2"; 1371 prefix "v6ur"; 1373 import ietf-routing-2 { 1374 prefix "rt"; 1375 } 1376 import ietf-inet-types { 1377 prefix "inet"; 1378 } 1380 include ietf-ipv6-router-advertisements-2 { 1381 revision-date 2017-10-06; 1382 } 1384 organization 1385 "IETF NETMOD - Networking Modeling Working Group"; 1386 contact 1387 "WG Web: 1388 WG List: 1390 Editor: Ladislav Lhotka 1391 1392 Acee Lindem 1393 1394 Yingzhen Qu 1395 "; 1397 description 1398 "This YANG module augments the 'ietf-routing' module with basic 1399 configuration and state data for IPv6 unicast routing. 1401 Copyright (c) 2017 IETF Trust and the persons 1402 identified as authors of the code. All rights reserved. 1404 Redistribution and use in source and binary forms, with or 1405 without modification, is permitted pursuant to, and subject 1406 to the license terms contained in, the Simplified BSD License 1407 set forth in Section 4.c of the IETF Trust's Legal Provisions 1408 Relating to IETF Documents 1409 (http://trustee.ietf.org/license-info). 1411 This version of this YANG module is part of RFC XXXX; see 1412 the RFC itself for full legal notices."; 1413 reference "RFC XXXX"; 1415 revision 2017-10-06 { 1416 description 1417 "Network Managment Datastore Architecture (NDMA) 1418 Initial revision 1419 Replaces ietf-ipv6-unicast-routing.yang"; 1420 reference 1421 "RFC XXXX: A YANG Data Model for Routing Management 1422 (NDMA Version)"; 1423 } 1424 /* Identities */ 1426 identity ipv6-unicast { 1427 base rt:ipv6; 1428 description 1429 "This identity represents the IPv6 unicast address family."; 1430 } 1432 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 1433 when "derived-from-or-self(../../rt:address-family, " 1434 + "'v6ur:ipv6-unicast')" { 1435 description 1436 "This augment is valid only for IPv6 unicast."; 1437 } 1438 description 1439 "This leaf augments an IPv6 unicast route."; 1440 leaf destination-prefix { 1441 type inet:ipv6-prefix; 1442 description 1443 "IPv6 destination prefix."; 1444 } 1445 } 1447 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1448 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1449 when "derived-from-or-self(../../../rt:address-family, " 1450 + "'v6ur:ipv6-unicast')" { 1451 description 1452 "This augment is valid only for IPv6 unicast."; 1453 } 1454 description 1455 "Augment 'simple-next-hop' case in IPv6 unicast routes."; 1456 leaf next-hop-address { 1457 type inet:ipv6-address; 1458 description 1459 "IPv6 address of the next hop."; 1460 } 1461 } 1463 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1464 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1465 + "rt:next-hop-list/rt:next-hop" { 1466 when "derived-from-or-self(../../../../../rt:address-family, " 1467 + "'v6ur:ipv6-unicast')" { 1468 description 1469 "This augment is valid only for IPv6 unicast."; 1470 } 1471 description 1472 "This leaf augments the 'next-hop-list' case of IPv6 unicast 1473 routes."; 1474 leaf address { 1475 type inet:ipv6-address; 1476 description 1477 "IPv6 address of the next hop."; 1478 } 1479 } 1481 augment 1482 "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { 1483 when "derived-from-or-self(../rt:address-family, " 1484 + "'v6ur:ipv6-unicast')" { 1485 description 1486 "This augment is valid only for IPv6 unicast RIBs."; 1487 } 1488 description 1489 "This augment adds the input parameter of the 'active-route' 1490 action."; 1491 leaf destination-address { 1492 type inet:ipv6-address; 1493 description 1494 "IPv6 destination address."; 1495 } 1496 } 1498 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1499 + "rt:output/rt:route" { 1500 when "derived-from-or-self(../../rt:address-family, " 1501 + "'v6ur:ipv6-unicast')" { 1502 description 1503 "This augment is valid only for IPv6 unicast."; 1504 } 1505 description 1506 "This augment adds the destination prefix to the reply of the 1507 'active-route' action."; 1508 leaf destination-prefix { 1509 type inet:ipv6-prefix; 1510 description 1511 "IPv6 destination prefix."; 1512 } 1513 } 1515 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1516 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1517 + "rt:simple-next-hop" { 1518 when "derived-from-or-self(../../../rt:address-family, " 1519 + "'v6ur:ipv6-unicast')" { 1521 description 1522 "This augment is valid only for IPv6 unicast."; 1523 } 1524 description 1525 "Augment 'simple-next-hop' case in the reply to the 1526 'active-route' action."; 1527 leaf next-hop-address { 1528 type inet:ipv6-address; 1529 description 1530 "IPv6 address of the next hop."; 1531 } 1532 } 1534 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1535 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1536 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1537 when "derived-from-or-self(../../../../../rt:address-family, " 1538 + "'v6ur:ipv6-unicast')" { 1539 description 1540 "This augment is valid only for IPv6 unicast."; 1541 } 1542 description 1543 "Augment 'next-hop-list' case in the reply to the 1544 'active-route' action."; 1545 leaf next-hop-address { 1546 type inet:ipv6-address; 1547 description 1548 "IPv6 address of the next hop."; 1549 } 1550 } 1552 /* Configuration data */ 1554 augment "/rt:routing/rt:control-plane-protocols/" 1555 + "rt:control-plane-protocol/rt:static-routes" { 1556 description 1557 "This augment defines the configuration of the 'static' 1558 pseudo-protocol with data specific to IPv6 unicast."; 1559 container ipv6 { 1560 description 1561 "Configuration of a 'static' pseudo-protocol instance 1562 consists of a list of routes."; 1563 list route { 1564 key "destination-prefix"; 1565 description 1566 "A list of static routes."; 1567 leaf destination-prefix { 1568 type inet:ipv6-prefix; 1569 mandatory "true"; 1570 description 1571 "IPv6 destination prefix."; 1572 } 1573 leaf description { 1574 type string; 1575 description 1576 "Textual description of the route."; 1577 } 1578 container next-hop { 1579 description 1580 "Configuration of next-hop."; 1581 uses rt:next-hop-content { 1582 augment "next-hop-options/simple-next-hop" { 1583 description 1584 "Augment 'simple-next-hop' case in IPv6 static 1585 routes."; 1586 leaf next-hop-address { 1587 type inet:ipv6-address; 1588 description 1589 "IPv6 address of the next hop."; 1590 } 1591 } 1592 augment "next-hop-options/next-hop-list/next-hop-list/" 1593 + "next-hop" { 1594 description 1595 "Augment 'next-hop-list' case in IPv6 static 1596 routes."; 1597 leaf next-hop-address { 1598 type inet:ipv6-address; 1599 description 1600 "IPv6 address of the next hop."; 1601 } 1602 } 1603 } 1604 } 1605 } 1606 } 1607 } 1608 } 1609 1611 9.1. IPv6 Router Advertisements Submodule 1613 1614 file "ietf-ipv6-router-advertisements-2@2017-10-06.yang" 1615 submodule ietf-ipv6-router-advertisements-2 { 1616 yang-version "1.1"; 1617 belongs-to ietf-ipv6-unicast-routing-2 { 1618 prefix "v6ur"; 1619 } 1621 import ietf-inet-types { 1622 prefix "inet"; 1623 } 1625 import ietf-interfaces { 1626 prefix "if"; 1627 } 1629 import ietf-ip { 1630 prefix "ip"; 1631 } 1633 organization 1634 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 1635 contact 1636 "WG Web: 1637 WG List: 1639 WG Chair: Lou Berger 1640 1642 WG Chair: Kent Watsen 1643 1645 Editor: Ladislav Lhotka 1646 1648 Editor: Acee Lindem 1649 1651 Editor: Yingzhen Qu 1652 "; 1654 description 1655 "This YANG module augments the 'ietf-ip' module with 1656 configuration and state data of IPv6 router advertisements. 1658 Copyright (c) 2017 IETF Trust and the persons identified as 1659 authors of the code. All rights reserved. 1661 Redistribution and use in source and binary forms, with or 1662 without modification, is permitted pursuant to, and subject 1663 to the license terms contained in, the Simplified BSD License 1664 set forth in Section 4.c of the IETF Trust's Legal Provisions 1665 Relating to IETF Documents 1666 (http://trustee.ietf.org/license-info). 1668 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 1669 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 1670 'OPTIONAL' in the module text are to be interpreted as 1671 described in RFC 2119. 1673 This version of this YANG module is part of RFC 8022; 1674 see the RFC itself for full legal notices."; 1676 reference 1677 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)."; 1679 revision 2017-10-05 { 1680 description 1681 "Network Managment Datastore Architecture (NDMA) 1682 Initial Revision 1683 Replaces ietf-ipv6-router-advertisements.yang"; 1684 reference 1685 "RFC XXXX: A YANG Data Model for Routing Management 1686 (NDMA Version)"; 1687 } 1689 augment "/if:interfaces/if:interface/ip:ipv6" { 1690 description 1691 "Augment interface configuration with parameters of IPv6 1692 router advertisements."; 1693 container ipv6-router-advertisements { 1694 description 1695 "Configuration of IPv6 Router Advertisements."; 1696 leaf send-advertisements { 1697 type boolean; 1698 default "false"; 1699 description 1700 "A flag indicating whether or not the router sends 1701 periodic Router Advertisements and responds to 1702 Router Solicitations."; 1703 reference 1704 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1705 AdvSendAdvertisements."; 1706 } 1707 leaf max-rtr-adv-interval { 1708 type uint16 { 1709 range "4..1800"; 1710 } 1711 units "seconds"; 1712 default "600"; 1713 description 1714 "The maximum time allowed between sending unsolicited 1715 multicast Router Advertisements from the interface."; 1716 reference 1717 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1718 MaxRtrAdvInterval."; 1719 } 1720 leaf min-rtr-adv-interval { 1721 type uint16 { 1722 range "3..1350"; 1723 } 1724 units "seconds"; 1725 must ". <= 0.75 * ../max-rtr-adv-interval" { 1726 description 1727 "The value MUST NOT be greater than 75% of 1728 'max-rtr-adv-interval'."; 1729 } 1730 description 1731 "The minimum time allowed between sending unsolicited 1732 multicast Router Advertisements from the interface. 1734 The default value to be used operationally if this 1735 leaf is not configured is determined as follows: 1737 - if max-rtr-adv-interval >= 9 seconds, the default 1738 value is 0.33 * max-rtr-adv-interval; 1740 - otherwise, it is 0.75 * max-rtr-adv-interval."; 1741 reference 1742 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1743 MinRtrAdvInterval."; 1744 } 1745 leaf managed-flag { 1746 type boolean; 1747 default "false"; 1748 description 1749 "The value to be placed in the 'Managed address 1750 configuration' flag field in the Router 1751 Advertisement."; 1752 reference 1753 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1754 AdvManagedFlag."; 1755 } 1756 leaf other-config-flag { 1757 type boolean; 1758 default "false"; 1759 description 1760 "The value to be placed in the 'Other configuration' 1761 flag field in the Router Advertisement."; 1762 reference 1763 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1764 AdvOtherConfigFlag."; 1765 } 1766 leaf link-mtu { 1767 type uint32; 1768 default "0"; 1769 description 1770 "The value to be placed in MTU options sent by the 1771 router. A value of zero indicates that no MTU options 1772 are sent."; 1773 reference 1774 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1775 AdvLinkMTU."; 1776 } 1777 leaf reachable-time { 1778 type uint32 { 1779 range "0..3600000"; 1780 } 1781 units "milliseconds"; 1782 default "0"; 1783 description 1784 "The value to be placed in the Reachable Time field in 1785 the Router Advertisement messages sent by the router. 1786 A value of zero means unspecified (by this router)."; 1787 reference 1788 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1789 AdvReachableTime."; 1790 } 1791 leaf retrans-timer { 1792 type uint32; 1793 units "milliseconds"; 1794 default "0"; 1795 description 1796 "The value to be placed in the Retrans Timer field in 1797 the Router Advertisement messages sent by the router. 1798 A value of zero means unspecified (by this router)."; 1799 reference 1800 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1801 AdvRetransTimer."; 1802 } 1803 leaf cur-hop-limit { 1804 type uint8; 1805 description 1806 "The value to be placed in the Cur Hop Limit field in 1807 the Router Advertisement messages sent by the router. 1808 A value of zero means unspecified (by this router). 1810 If this parameter is not configured, the device SHOULD 1811 use the value specified in IANA Assigned Numbers that 1812 was in effect at the time of implementation."; 1813 reference 1814 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1815 AdvCurHopLimit. 1817 IANA: IP Parameters, 1818 http://www.iana.org/assignments/ip-parameters"; 1819 } 1820 leaf default-lifetime { 1821 type uint16 { 1822 range "0..9000"; 1823 } 1824 units "seconds"; 1825 description 1826 "The value to be placed in the Router Lifetime field of 1827 Router Advertisements sent from the interface, in 1828 seconds. It MUST be either zero or between 1829 max-rtr-adv-interval and 9000 seconds. A value of zero 1830 default indicates that the router is not to be used as 1831 a router. These limits may be overridden by specific 1832 documents that describe how IPv6 operates over 1833 different link layers. 1835 If this parameter is not configured, the device SHOULD 1836 use a value of 3 * max-rtr-adv-interval."; 1837 reference 1838 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1839 AdvDefaultLifeTime."; 1840 } 1841 container prefix-list { 1842 description 1843 "Configuration of prefixes to be placed in Prefix 1844 Information options in Router Advertisement messages 1845 sent from the interface. 1847 Prefixes that are advertised by default but do not 1848 have their entries in the child 'prefix' list are 1849 advertised with the default values of all parameters. 1851 The link-local prefix SHOULD NOT be included in the 1852 list of advertised prefixes."; 1853 reference 1854 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 1855 AdvPrefixList."; 1856 list prefix { 1857 key "prefix-spec"; 1858 description 1859 "Configuration of an advertised prefix entry."; 1860 leaf prefix-spec { 1861 type inet:ipv6-prefix; 1862 description 1863 "IPv6 address prefix."; 1864 } 1865 choice control-adv-prefixes { 1866 default "advertise"; 1867 description 1868 "Either the prefix is explicitly removed from the 1869 set of advertised prefixes, or the parameters with 1870 which it is advertised are specified (default 1871 case)."; 1872 leaf no-advertise { 1873 type empty; 1874 description 1875 "The prefix will not be advertised. 1877 This can be used for removing the prefix from 1878 the default set of advertised prefixes."; 1879 } 1880 case advertise { 1881 leaf valid-lifetime { 1882 type uint32; 1883 units "seconds"; 1884 default "2592000"; 1885 description 1886 "The value to be placed in the Valid Lifetime 1887 in the Prefix Information option. The 1888 designated value of all 1's (0xffffffff) 1889 represents infinity."; 1890 reference 1891 "RFC 4861: Neighbor Discovery for IP version 6 1892 (IPv6) - AdvValidLifetime."; 1893 } 1894 leaf on-link-flag { 1895 type boolean; 1896 default "true"; 1897 description 1898 "The value to be placed in the on-link flag 1899 ('L-bit') field in the Prefix Information 1900 option."; 1901 reference 1902 "RFC 4861: Neighbor Discovery for IP version 6 1903 (IPv6) - AdvOnLinkFlag."; 1904 } 1905 leaf preferred-lifetime { 1906 type uint32; 1907 units "seconds"; 1908 must ". <= ../valid-lifetime" { 1909 description 1910 "This value MUST NOT be greater than 1911 valid-lifetime."; 1912 } 1913 default "604800"; 1914 description 1915 "The value to be placed in the Preferred 1916 Lifetime in the Prefix Information option. 1917 The designated value of all 1's (0xffffffff) 1918 represents infinity."; 1919 reference 1920 "RFC 4861: Neighbor Discovery for IP version 6 1921 (IPv6) - AdvPreferredLifetime."; 1922 } 1923 leaf autonomous-flag { 1924 type boolean; 1925 default "true"; 1926 description 1927 "The value to be placed in the Autonomous Flag 1928 field in the Prefix Information option."; 1929 reference 1930 "RFC 4861: Neighbor Discovery for IP version 6 1931 (IPv6) - AdvAutonomousFlag."; 1932 } 1933 } 1934 } 1935 } 1936 } 1937 } 1938 } 1939 } 1940 1942 10. IANA Considerations 1944 This document registers the following namespace URIs in the "IETF XML 1945 Registry" [RFC3688]: 1947 URI: urn:ietf:params:xml:ns:yang:ietf-routing-2 1948 Registrant Contact: The IESG. 1949 XML: N/A; the requested URI is an XML namespace. 1951 URI: urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing-2 1952 Registrant Contact: The IESG. 1953 XML: N/A; the requested URI is an XML namespace. 1955 URI: urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing-2 1956 Registrant Contact: The IESG. 1957 XML: N/A; the requested URI is an XML namespace. 1959 This document registers the following YANG modules in the "YANG 1960 Module Names" registry [RFC6020]: 1962 Name: ietf-routing-2 1963 Namespace: urn:ietf:params:xml:ns:yang:ietf-routing-2 1964 Prefix: rt 1965 Reference: RFC 8022 1967 Name: ietf-ipv4-unicast-routing-2 1968 Namespace: urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing-2 1969 Prefix: v4ur 1970 Reference: RFC 8022 1972 Name: ietf-ipv6-unicast-routing-2 1973 Namespace: urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing-2 1974 Prefix: v6ur 1975 Reference: RFC 8022 1977 This document registers the following YANG submodule in the "YANG 1978 Module Names" registry [RFC6020]: 1980 Name: ietf-ipv6-router-advertisements-2 1981 Module: ietf-ipv6-unicast-routing-2 1982 Reference: RFC 8022 1984 11. Security Considerations 1986 The YANG module defined in this memo is designed to be accessed via 1987 the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the 1988 secure transport layer and the mandatory-to-implement secure 1989 transport is SSH [RFC6242]. 1991 There are a number of data nodes defined in this YANG module which 1992 are writable/creatable/deletable (i.e., config true, which is the 1993 default). These data nodes may be considered sensitive or vulnerable 1994 in some network environments. Write operations (e.g., edit-config) 1995 to these data nodes without proper protection can have a negative 1996 effect on network operations. These are the subtrees and data nodes 1997 and their sensitivity/vulnerability: 1999 /routing/control-plane-protocols/control-plane-protocol: This list 2000 specifies the control-plane protocols configured on a device. 2002 /routing/ribs/rib: This list specifies the RIBs configured for the 2003 device. 2005 Some of the readable data nodes in this YANG module may be considered 2006 sensitive or vulnerable in some network environments. It is thus 2007 important to control read access (e.g., via get, get-config, or 2008 notification) to these data nodes. These are the subtrees and data 2009 nodes and their sensitivity/vulnerability: 2011 /routing/control-plane-protocols/control-plane-protocol: This list 2012 specifies the control-plane protocols configured on a device. 2013 Refer to the control plane models for a list of sensitive 2014 information. 2016 /routing/ribs/rib: This list specifies the RIB and their contents 2017 for the device. Access to this information may disclose the 2018 network topology and or other information. 2020 12. References 2022 12.1. Normative References 2024 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2025 Requirement Levels", BCP 14, RFC 2119, 2026 DOI 10.17487/RFC2119, March 1997, . 2029 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 2030 DOI 10.17487/RFC3688, January 2004, . 2033 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 2034 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 2035 DOI 10.17487/RFC4861, September 2007, . 2038 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2039 the Network Configuration Protocol (NETCONF)", RFC 6020, 2040 DOI 10.17487/RFC6020, October 2010, . 2043 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 2044 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 2045 . 2047 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 2048 and A. Bierman, Ed., "Network Configuration Protocol 2049 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 2050 . 2052 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2053 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2054 . 2056 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 2057 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 2058 . 2060 [RFC7277] Bjorklund, M., "A YANG Data Model for IP Management", 2061 RFC 7277, DOI 10.17487/RFC7277, June 2014, 2062 . 2064 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 2065 RFC 7950, DOI 10.17487/RFC7950, August 2016, 2066 . 2068 [RFC8022] Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 2069 Management", RFC 8022, DOI 10.17487/RFC8022, November 2070 2016, . 2072 12.2. Informative References 2074 [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG 2075 Data Model Documents", RFC 6087, DOI 10.17487/RFC6087, 2076 January 2011, . 2078 [RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module 2079 Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, 2080 . 2082 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 2083 RFC 7951, DOI 10.17487/RFC7951, August 2016, 2084 . 2086 [I-D.ietf-netmod-revised-datastores] 2087 Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 2088 and R. Wilton, "Network Management Datastore 2089 Architecture", draft-ietf-netmod-revised-datastores-04 2090 (work in progress), August 2017. 2092 Appendix A. Deprecated Models 2094 This appendix contains the deprecated versions of ietf-routing, ietf- 2095 ipv4-unicast-routing, ietf-ipv6-unicast-routing, and ietf-ipv6- 2096 router-advertisements. 2098 A.1. Deprecated ietf-routing Model 2100 file "ietf-routing@2017-10-06.yang" 2101 module ietf-routing { 2102 yang-version 1.1; 2103 namespace "urn:ietf:params:xml:ns:yang:ietf-routing"; 2104 prefix rt; 2106 import ietf-yang-types { 2107 prefix yang; 2108 } 2109 import ietf-interfaces { 2110 prefix if; 2111 } 2113 organization 2114 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 2115 contact 2116 "WG Web: 2117 WG List: 2119 WG Chair: Lou Berger 2120 2122 WG Chair: Kent Watsen 2123 2125 Editor: Ladislav Lhotka 2126 2128 Editor: Acee Lindem 2129 "; 2130 description 2131 "This YANG module defines essential components for the 2132 management of a routing subsystem. 2134 Copyright (c) 2016 IETF Trust and the persons identified as 2135 authors of the code. All rights reserved. 2137 Redistribution and use in source and binary forms, with or 2138 without modification, is permitted pursuant to, and subject to 2139 the license terms contained in, the Simplified BSD License set 2140 forth in Section 4.c of the IETF Trust's Legal Provisions 2141 Relating to IETF Documents 2142 (http://trustee.ietf.org/license-info). 2144 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2145 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 2146 'OPTIONAL' in the module text are to be interpreted as 2147 described in RFC 2119. 2149 This version of this YANG module is part of RFC TBD; 2150 see the RFC itself for full legal notices."; 2152 revision 2017-10-06 { 2153 description 2154 "Deprecated revision."; 2155 reference "RFC TBD: Revised YANG Data Model for Routing 2156 Management"; 2157 } 2159 revision 2016-11-04 { 2160 description 2161 "Initial revision."; 2162 reference 2163 "RFC 8022: A YANG Data Model for Routing Management"; 2164 } 2166 feature multiple-ribs { 2167 status deprecated; 2168 description 2169 "This feature indicates that the server supports user-defined 2170 RIBs. 2172 Servers that do not advertise this feature SHOULD provide 2173 exactly one system-controlled RIB per supported address 2174 family and make it also the default RIB. This RIB then 2175 appears as an entry of the list /routing-state/ribs/rib."; 2176 } 2178 feature router-id { 2179 status deprecated; 2180 description 2181 "This feature indicates that the server supports 2182 configuration of an explicit 32-bit router ID that is used 2183 by some routing protocols. 2185 Servers that do not advertise this feature set a router ID 2186 algorithmically, usually to one of the configured IPv4 2187 addresses. However, this algorithm is implementation 2188 specific."; 2189 } 2191 identity address-family { 2192 status deprecated; 2193 description 2194 "Base identity from which identities describing address 2195 families are derived."; 2196 } 2198 identity ipv4 { 2199 base address-family; 2200 status deprecated; 2201 description 2202 "This identity represents IPv4 address family."; 2203 } 2205 identity ipv6 { 2206 base address-family; 2207 status deprecated; 2208 description 2209 "This identity represents IPv6 address family."; 2210 } 2212 identity control-plane-protocol { 2213 status deprecated; 2214 description 2215 "Base identity from which control-plane protocol identities 2216 are derived."; 2217 } 2219 identity routing-protocol { 2220 base control-plane-protocol; 2221 status deprecated; 2222 description 2223 "Identity from which Layer 3 routing protocol identities are 2224 derived."; 2225 } 2227 identity direct { 2228 base routing-protocol; 2229 status deprecated; 2230 description 2231 "Routing pseudo-protocol that provides routes to directly 2232 connected networks."; 2233 } 2235 identity static { 2236 base routing-protocol; 2237 status deprecated; 2238 description 2239 "Static routing pseudo-protocol."; 2240 } 2242 typedef route-preference { 2243 type uint32; 2244 status deprecated; 2245 description 2246 "This type is used for route preferences."; 2247 } 2249 grouping address-family { 2250 status deprecated; 2251 description 2252 "This grouping provides a leaf identifying an address 2253 family."; 2254 leaf address-family { 2255 type identityref { 2256 base address-family; 2257 } 2258 mandatory true; 2259 status deprecated; 2260 description 2261 "Address family."; 2262 } 2263 } 2265 grouping router-id { 2266 status deprecated; 2267 description 2268 "This grouping provides router ID."; 2269 leaf router-id { 2270 type yang:dotted-quad; 2271 status deprecated; 2272 description 2273 "A 32-bit number in the form of a dotted quad that is used 2274 by some routing protocols identifying a router."; 2275 reference "RFC 2328: OSPF Version 2."; 2276 } 2277 } 2279 grouping special-next-hop { 2280 status deprecated; 2281 description 2282 "This grouping provides a leaf with an enumeration of special 2283 next hops."; 2285 leaf special-next-hop { 2286 type enumeration { 2287 enum "blackhole" { 2288 status deprecated; 2289 description 2290 "Silently discard the packet."; 2291 } 2292 enum "unreachable" { 2293 status deprecated; 2294 description 2295 "Discard the packet and notify the sender with an error 2296 message indicating that the destination host is 2297 unreachable."; 2298 } 2299 enum "prohibit" { 2300 status deprecated; 2301 description 2302 "Discard the packet and notify the sender with an error 2303 message indicating that the communication is 2304 administratively prohibited."; 2305 } 2306 enum "receive" { 2307 status deprecated; 2308 description 2309 "The packet will be received by the local system."; 2310 } 2311 } 2312 status deprecated; 2313 description 2314 "Options for special next hops."; 2315 } 2316 } 2318 grouping next-hop-content { 2319 status deprecated; 2320 description 2321 "Generic parameters of next hops in static routes."; 2322 choice next-hop-options { 2323 mandatory true; 2324 status deprecated; 2325 description 2326 "Options for next hops in static routes. 2328 It is expected that further cases will be added through 2329 augments from other modules."; 2330 case simple-next-hop { 2331 status deprecated; 2332 description 2333 "This case represents a simple next hop consisting of the 2334 next-hop address and/or outgoing interface. 2336 Modules for address families MUST augment this case with 2337 a leaf containing a next-hop address of that address 2338 family."; 2339 leaf outgoing-interface { 2340 type if:interface-ref; 2341 status deprecated; 2342 description 2343 "Name of the outgoing interface."; 2344 } 2345 } 2346 case special-next-hop { 2347 status deprecated; 2348 uses special-next-hop; 2349 } 2350 case next-hop-list { 2351 status deprecated; 2352 container next-hop-list { 2353 status deprecated; 2354 description 2355 "Container for multiple next-hops."; 2356 list next-hop { 2357 key "index"; 2358 status deprecated; 2359 description 2360 "An entry of a next-hop list. 2362 Modules for address families MUST augment this list 2363 with a leaf containing a next-hop address of that 2364 address family."; 2365 leaf index { 2366 type string; 2367 status deprecated; 2368 description 2369 "A user-specified identifier utilized to uniquely 2370 reference the next-hop entry in the next-hop list. 2371 The value of this index has no semantic meaning 2372 other than for referencing the entry."; 2373 } 2374 leaf outgoing-interface { 2375 type if:interface-ref; 2376 status deprecated; 2377 description 2378 "Name of the outgoing interface."; 2379 } 2380 } 2382 } 2383 } 2384 } 2385 } 2387 grouping next-hop-state-content { 2388 status deprecated; 2389 description 2390 "Generic parameters of next hops in state data."; 2391 choice next-hop-options { 2392 mandatory true; 2393 status deprecated; 2394 description 2395 "Options for next hops in state data. 2397 It is expected that further cases will be added through 2398 augments from other modules, e.g., for recursive 2399 next hops."; 2400 case simple-next-hop { 2401 status deprecated; 2402 description 2403 "This case represents a simple next hop consisting of the 2404 next-hop address and/or outgoing interface. 2406 Modules for address families MUST augment this case with 2407 a leaf containing a next-hop address of that address 2408 family."; 2409 leaf outgoing-interface { 2410 type if:interface-state-ref; 2411 status deprecated; 2412 description 2413 "Name of the outgoing interface."; 2414 } 2415 } 2416 case special-next-hop { 2417 status deprecated; 2418 uses special-next-hop; 2419 } 2420 case next-hop-list { 2421 status deprecated; 2422 container next-hop-list { 2423 status deprecated; 2424 description 2425 "Container for multiple next hops."; 2426 list next-hop { 2427 status deprecated; 2428 description 2429 "An entry of a next-hop list. 2431 Modules for address families MUST augment this list 2432 with a leaf containing a next-hop address of that 2433 address family."; 2434 leaf outgoing-interface { 2435 type if:interface-state-ref; 2436 status deprecated; 2437 description 2438 "Name of the outgoing interface."; 2439 } 2440 } 2441 } 2442 } 2443 } 2444 } 2446 grouping route-metadata { 2447 status deprecated; 2448 description 2449 "Common route metadata."; 2450 leaf source-protocol { 2451 type identityref { 2452 base routing-protocol; 2453 } 2454 mandatory true; 2455 status deprecated; 2456 description 2457 "Type of the routing protocol from which the route 2458 originated."; 2459 } 2460 leaf active { 2461 type empty; 2462 status deprecated; 2463 description 2464 "Presence of this leaf indicates that the route is 2465 preferred among all routes in the same RIB that have the 2466 same destination prefix."; 2467 } 2468 leaf last-updated { 2469 type yang:date-and-time; 2470 status deprecated; 2471 description 2472 "Time stamp of the last modification of the route. If the 2473 route was never modified, it is the time when the route 2474 was inserted into the RIB."; 2475 } 2476 } 2478 container routing-state { 2479 config false; 2480 status deprecated; 2481 description 2482 "State data of the routing subsystem."; 2483 uses router-id { 2484 status deprecated; 2485 description 2486 "Global router ID. 2488 It may be either configured or assigned algorithmically by 2489 the implementation."; 2490 } 2491 container interfaces { 2492 status deprecated; 2493 description 2494 "Network-layer interfaces used for routing."; 2495 leaf-list interface { 2496 type if:interface-state-ref; 2497 status deprecated; 2498 description 2499 "Each entry is a reference to the name of a configured 2500 network-layer interface."; 2501 } 2502 } 2503 container control-plane-protocols { 2504 status deprecated; 2505 description 2506 "Container for the list of routing protocol instances."; 2507 list control-plane-protocol { 2508 key "type name"; 2509 status deprecated; 2510 description 2511 "State data of a control-plane protocol instance. 2513 An implementation MUST provide exactly one 2514 system-controlled instance of the 'direct' 2515 pseudo-protocol. Instances of other control-plane 2516 protocols MAY be created by configuration."; 2517 leaf type { 2518 type identityref { 2519 base control-plane-protocol; 2520 } 2521 status deprecated; 2522 description 2523 "Type of the control-plane protocol."; 2524 } 2525 leaf name { 2526 type string; 2527 status deprecated; 2528 description 2529 "The name of the control-plane protocol instance. 2531 For system-controlled instances this name is 2532 persistent, i.e., it SHOULD NOT change across 2533 reboots."; 2534 } 2535 } 2536 } 2537 container ribs { 2538 status deprecated; 2539 description 2540 "Container for RIBs."; 2541 list rib { 2542 key "name"; 2543 min-elements 1; 2544 status deprecated; 2545 description 2546 "Each entry represents a RIB identified by the 'name' 2547 key. All routes in a RIB MUST belong to the same address 2548 family. 2550 An implementation SHOULD provide one system-controlled 2551 default RIB for each supported address family."; 2552 leaf name { 2553 type string; 2554 status deprecated; 2555 description 2556 "The name of the RIB."; 2557 } 2558 uses address-family; 2559 leaf default-rib { 2560 if-feature "multiple-ribs"; 2561 type boolean; 2562 default "true"; 2563 status deprecated; 2564 description 2565 "This flag has the value of 'true' if and only if the 2566 RIB is the default RIB for the given address family. 2568 By default, control-plane protocols place their routes 2569 in the default RIBs."; 2570 } 2571 container routes { 2572 status deprecated; 2573 description 2574 "Current content of the RIB."; 2576 list route { 2577 status deprecated; 2578 description 2579 "A RIB route entry. This data node MUST be augmented 2580 with information specific for routes of each address 2581 family."; 2582 leaf route-preference { 2583 type route-preference; 2584 status deprecated; 2585 description 2586 "This route attribute, also known as administrative 2587 distance, allows for selecting the preferred route 2588 among routes with the same destination prefix. A 2589 smaller value means a more preferred route."; 2590 } 2591 container next-hop { 2592 status deprecated; 2593 description 2594 "Route's next-hop attribute."; 2595 uses next-hop-state-content; 2596 } 2597 uses route-metadata; 2598 } 2599 } 2600 action active-route { 2601 status deprecated; 2602 description 2603 "Return the active RIB route that is used for the 2604 destination address. 2606 Address-family-specific modules MUST augment input 2607 parameters with a leaf named 'destination-address'."; 2608 output { 2609 container route { 2610 status deprecated; 2611 description 2612 "The active RIB route for the specified 2613 destination. 2615 If no route exists in the RIB for the destination 2616 address, no output is returned. 2618 Address-family-specific modules MUST augment this 2619 container with appropriate route contents."; 2620 container next-hop { 2621 status deprecated; 2622 description 2623 "Route's next-hop attribute."; 2625 uses next-hop-state-content; 2626 } 2627 uses route-metadata; 2628 } 2629 } 2630 } 2631 } 2632 } 2633 } 2634 container routing { 2635 status deprecated; 2636 description 2637 "Configuration parameters for the routing subsystem."; 2638 uses router-id { 2639 if-feature "router-id"; 2640 status deprecated; 2641 description 2642 "Configuration of the global router ID. Routing protocols 2643 that use router ID can use this parameter or override it 2644 with another value."; 2645 } 2646 container control-plane-protocols { 2647 status deprecated; 2648 description 2649 "Configuration of control-plane protocol instances."; 2650 list control-plane-protocol { 2651 key "type name"; 2652 status deprecated; 2653 description 2654 "Each entry contains configuration of a control-plane 2655 protocol instance."; 2656 leaf type { 2657 type identityref { 2658 base control-plane-protocol; 2659 } 2660 status deprecated; 2661 description 2662 "Type of the control-plane protocol - an identity 2663 derived from the 'control-plane-protocol' base 2664 identity."; 2665 } 2666 leaf name { 2667 type string; 2668 status deprecated; 2669 description 2670 "An arbitrary name of the control-plane protocol 2671 instance."; 2672 } 2673 leaf description { 2674 type string; 2675 status deprecated; 2676 description 2677 "Textual description of the control-plane protocol 2678 instance."; 2679 } 2680 container static-routes { 2681 when "derived-from-or-self(../type, 'rt:static')" { 2682 description 2683 "This container is only valid for the 'static' 2684 routing protocol."; 2685 } 2686 status deprecated; 2687 description 2688 "Configuration of the 'static' pseudo-protocol. 2690 Address-family-specific modules augment this node with 2691 their lists of routes."; 2692 } 2693 } 2694 } 2695 container ribs { 2696 status deprecated; 2697 description 2698 "Configuration of RIBs."; 2699 list rib { 2700 key "name"; 2701 status deprecated; 2702 description 2703 "Each entry contains configuration for a RIB identified 2704 by the 'name' key. 2706 Entries having the same key as a system-controlled entry 2707 of the list /routing-state/ribs/rib are used for 2708 configuring parameters of that entry. Other entries 2709 define additional user-controlled RIBs."; 2710 leaf name { 2711 type string; 2712 status deprecated; 2713 description 2714 "The name of the RIB. 2716 For system-controlled entries, the value of this leaf 2717 must be the same as the name of the corresponding 2718 entry in state data. 2720 For user-controlled entries, an arbitrary name can be 2721 used."; 2722 } 2723 uses address-family { 2724 status deprecated; 2725 description 2726 "Address family of the RIB. 2728 It is mandatory for user-controlled RIBs. For 2729 system-controlled RIBs it can be omitted; otherwise, 2730 it must match the address family of the corresponding 2731 state entry."; 2732 refine "address-family" { 2733 mandatory false; 2734 } 2735 } 2736 leaf description { 2737 type string; 2738 status deprecated; 2739 description 2740 "Textual description of the RIB."; 2741 } 2742 } 2743 } 2744 } 2745 } 2746 2748 A.2. Deprecated ietf-ipv4-unicast Model 2750 file "ietf-ipv4-unicast-routing@2017-10-06.yang" 2751 module ietf-ipv4-unicast-routing { 2752 yang-version 1.1; 2753 namespace 2754 "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing"; 2755 prefix v4ur; 2757 import ietf-routing { 2758 prefix rt; 2759 } 2760 import ietf-inet-types { 2761 prefix inet; 2762 } 2764 organization 2765 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 2766 contact 2767 "WG Web: 2768 WG List: 2769 WG Chair: Lou Berger 2770 2772 WG Chair: Kent Watsen 2773 2775 Editor: Ladislav Lhotka 2776 2778 Editor: Acee Lindem 2779 "; 2780 description 2781 "This YANG module augments the 'ietf-routing' module with basic 2782 configuration and state data for IPv4 unicast routing. 2784 Copyright (c) 2016 IETF Trust and the persons identified as 2785 authors of the code. All rights reserved. 2787 Redistribution and use in source and binary forms, with or 2788 without modification, is permitted pursuant to, and subject to 2789 the license terms contained in, the Simplified BSD License set 2790 forth in Section 4.c of the IETF Trust's Legal Provisions 2791 Relating to IETF Documents 2792 (http://trustee.ietf.org/license-info). 2794 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2795 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 2796 'OPTIONAL' in the module text are to be interpreted as 2797 described in RFC 2119. 2799 This version of this YANG module is part of RFC TBD; 2800 see the RFC itself for full legal notices."; 2802 revision 2017-10-06 { 2803 description 2804 "Deprecated revision."; 2805 reference "RFC TBD: Revised YANG Data Model for Routing 2806 Management"; 2807 } 2809 revision 2016-11-04 { 2810 description 2811 "Initial revision."; 2812 reference 2813 "RFC 8022: A YANG Data Model for Routing Management"; 2814 } 2816 identity ipv4-unicast { 2817 base rt:ipv4; 2818 status deprecated; 2819 description 2820 "This identity represents the IPv4 unicast address family."; 2821 } 2823 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { 2824 when "derived-from-or-self(../../rt:address-family, " 2825 + "'v4ur:ipv4-unicast')" { 2826 description 2827 "This augment is valid only for IPv4 unicast."; 2828 } 2829 status deprecated; 2830 description 2831 "This leaf augments an IPv4 unicast route."; 2832 leaf destination-prefix { 2833 type inet:ipv4-prefix; 2834 status deprecated; 2835 description 2836 "IPv4 destination prefix."; 2837 } 2838 } 2839 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 2840 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 2841 when "derived-from-or-self( 2842 ../../../rt:address-family, 'v4ur:ipv4-unicast')" { 2843 description 2844 "This augment is valid only for IPv4 unicast."; 2845 } 2846 status deprecated; 2847 description 2848 "Augment 'simple-next-hop' case in IPv4 unicast routes."; 2849 leaf next-hop-address { 2850 type inet:ipv4-address; 2851 status deprecated; 2852 description 2853 "IPv4 address of the next hop."; 2854 } 2855 } 2856 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 2857 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 2858 + "rt:next-hop-list/rt:next-hop" { 2859 when "derived-from-or-self(../../../../../rt:address-family, 2860 'v4ur:ipv4-unicast')" { 2861 description 2862 "This augment is valid only for IPv4 unicast."; 2863 } 2864 status deprecated; 2865 description 2866 "This leaf augments the 'next-hop-list' case of IPv4 unicast 2867 routes."; 2868 leaf address { 2869 type inet:ipv4-address; 2870 status deprecated; 2871 description 2872 "IPv4 address of the next-hop."; 2873 } 2874 } 2875 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 2876 + "rt:input" { 2877 when "derived-from-or-self(../rt:address-family, 2878 'v4ur:ipv4-unicast')" { 2879 description 2880 "This augment is valid only for IPv4 unicast RIBs."; 2881 } 2882 status deprecated; 2883 description 2884 "This augment adds the input parameter of the 'active-route' 2885 action."; 2886 leaf destination-address { 2887 type inet:ipv4-address; 2888 status deprecated; 2889 description 2890 "IPv4 destination address."; 2891 } 2892 } 2893 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 2894 + "rt:output/rt:route" { 2895 when "derived-from-or-self(../../rt:address-family, 2896 'v4ur:ipv4-unicast')" { 2897 description 2898 "This augment is valid only for IPv4 unicast."; 2899 } 2900 status deprecated; 2901 description 2902 "This augment adds the destination prefix to the reply of the 2903 'active-route' action."; 2904 leaf destination-prefix { 2905 type inet:ipv4-prefix; 2906 status deprecated; 2907 description 2908 "IPv4 destination prefix."; 2909 } 2910 } 2911 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 2912 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 2913 + "rt:simple-next-hop" { 2914 when "derived-from-or-self(../../../rt:address-family, 2915 'v4ur:ipv4-unicast')" { 2916 description 2917 "This augment is valid only for IPv4 unicast."; 2918 } 2919 status deprecated; 2920 description 2921 "Augment 'simple-next-hop' case in the reply to the 2922 'active-route' action."; 2923 leaf next-hop-address { 2924 type inet:ipv4-address; 2925 status deprecated; 2926 description 2927 "IPv4 address of the next hop."; 2928 } 2929 } 2930 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 2931 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 2932 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 2933 when "derived-from-or-self(../../../../../rt:address-family, 2934 'v4ur:ipv4-unicast')" { 2935 description 2936 "This augment is valid only for IPv4 unicast."; 2937 } 2938 status deprecated; 2939 description 2940 "Augment 'next-hop-list' case in the reply to the 2941 'active-route' action."; 2942 leaf next-hop-address { 2943 type inet:ipv4-address; 2944 status deprecated; 2945 description 2946 "IPv4 address of the next hop."; 2947 } 2948 } 2949 augment "/rt:routing/rt:control-plane-protocols/" 2950 + "rt:control-plane-protocol/rt:static-routes" { 2951 status deprecated; 2952 description 2953 "This augment defines the configuration of the 'static' 2954 pseudo-protocol with data specific to IPv4 unicast."; 2955 container ipv4 { 2956 status deprecated; 2957 description 2958 "Configuration of a 'static' pseudo-protocol instance 2959 consists of a list of routes."; 2960 list route { 2961 key "destination-prefix"; 2962 status deprecated; 2963 description 2964 "A list of static routes."; 2965 leaf destination-prefix { 2966 type inet:ipv4-prefix; 2967 mandatory true; 2968 status deprecated; 2969 description 2970 "IPv4 destination prefix."; 2971 } 2972 leaf description { 2973 type string; 2974 status deprecated; 2975 description 2976 "Textual description of the route."; 2977 } 2978 container next-hop { 2979 status deprecated; 2980 description 2981 "Configuration of next-hop."; 2982 uses rt:next-hop-content { 2983 status deprecated; 2984 augment "next-hop-options/simple-next-hop" { 2985 status deprecated; 2986 description 2987 "Augment 'simple-next-hop' case in IPv4 static 2988 routes."; 2989 leaf next-hop-address { 2990 type inet:ipv4-address; 2991 status deprecated; 2992 description 2993 "IPv4 address of the next hop."; 2994 } 2995 } 2996 augment "next-hop-options/next-hop-list/" + 2997 "next-hop-list/next-hop" { 2998 status deprecated; 2999 description 3000 "Augment 'next-hop-list' case in IPv4 static 3001 routes."; 3002 leaf next-hop-address { 3003 type inet:ipv4-address; 3004 status deprecated; 3005 description 3006 "IPv4 address of the next hop."; 3007 } 3008 } 3010 } 3011 } 3012 } 3013 } 3014 } 3015 } 3016 3018 A.3. Deprecated ietf-ipv6-unicast Model 3020 file "ietf-ipv6-unicast-routing@2017-10-06.yang" 3021 module ietf-ipv6-unicast-routing { 3022 yang-version 1.1; 3023 namespace 3024 "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing"; 3025 prefix v6ur; 3027 import ietf-routing { 3028 prefix rt; 3029 } 3030 import ietf-inet-types { 3031 prefix inet; 3032 } 3033 include ietf-ipv6-router-advertisements { 3034 revision-date 2017-10-06; 3035 } 3037 organization 3038 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 3039 contact 3040 "WG Web: 3041 WG List: 3043 WG Chair: Lou Berger 3044 3046 WG Chair: Kent Watsen 3047 3049 Editor: Ladislav Lhotka 3050 3052 Editor: Acee Lindem 3053 "; 3054 description 3055 "This YANG module augments the 'ietf-routing' module with basic 3056 configuration and state data for IPv6 unicast routing. 3058 Copyright (c) 2016 IETF Trust and the persons identified as 3059 authors of the code. All rights reserved. 3061 Redistribution and use in source and binary forms, with or 3062 without modification, is permitted pursuant to, and subject to 3063 the license terms contained in, the Simplified BSD License set 3064 forth in Section 4.c of the IETF Trust's Legal Provisions 3065 Relating to IETF Documents 3066 (http://trustee.ietf.org/license-info). 3068 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 3069 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 3070 'OPTIONAL' in the module text are to be interpreted as described 3071 in RFC 2119. 3073 This version of this YANG module is part of RFC TBD; 3074 see the RFC itself for full legal notices."; 3076 revision 2017-10-06 { 3077 description 3078 "Deprecated revision."; 3079 reference "RFC TBD: Revised YANG Data Model for Routing 3080 Management"; 3081 } 3083 revision 2016-11-04 { 3084 description 3085 "Initial revision."; 3086 reference 3087 "RFC 8022: A YANG Data Model for Routing Management"; 3088 } 3090 identity ipv6-unicast { 3091 base rt:ipv6; 3092 status deprecated; 3093 description 3094 "This identity represents the IPv6 unicast address family."; 3095 } 3097 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { 3098 when "derived-from-or-self(../../rt:address-family, 3099 'v6ur:ipv6-unicast')" { 3100 description 3101 "This augment is valid only for IPv6 unicast."; 3102 } 3103 status deprecated; 3104 description 3105 "This leaf augments an IPv6 unicast route."; 3107 leaf destination-prefix { 3108 type inet:ipv6-prefix; 3109 status deprecated; 3110 description 3111 "IPv6 destination prefix."; 3112 } 3113 } 3114 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 3115 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 3116 when "derived-from-or-self(../../../rt:address-family, 3117 'v6ur:ipv6-unicast')" { 3118 description 3119 "This augment is valid only for IPv6 unicast."; 3120 } 3121 status deprecated; 3122 description 3123 "Augment 'simple-next-hop' case in IPv6 unicast routes."; 3124 leaf next-hop-address { 3125 type inet:ipv6-address; 3126 status deprecated; 3127 description 3128 "IPv6 address of the next hop."; 3129 } 3130 } 3131 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 3132 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 3133 + "rt:next-hop-list/rt:next-hop" { 3134 when "derived-from-or-self(../../../../../rt:address-family, 3135 'v6ur:ipv6-unicast')" { 3136 description 3137 "This augment is valid only for IPv6 unicast."; 3138 } 3139 status deprecated; 3140 description 3141 "This leaf augments the 'next-hop-list' case of IPv6 unicast 3142 routes."; 3143 leaf address { 3144 type inet:ipv6-address; 3145 status deprecated; 3146 description 3147 "IPv6 address of the next hop."; 3148 } 3149 } 3150 augment "/rt:routing-state/rt:ribs/rt:rib/" 3151 + "rt:active-route/rt:input" { 3152 when "derived-from-or-self(../rt:address-family, 3153 'v6ur:ipv6-unicast')" { 3154 description 3155 "This augment is valid only for IPv6 unicast RIBs."; 3156 } 3157 status deprecated; 3158 description 3159 "This augment adds the input parameter of the 'active-route' 3160 action."; 3161 leaf destination-address { 3162 type inet:ipv6-address; 3163 status deprecated; 3164 description 3165 "IPv6 destination address."; 3166 } 3167 } 3168 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 3169 + "rt:output/rt:route" { 3170 when "derived-from-or-self(../../rt:address-family, 3171 'v6ur:ipv6-unicast')" { 3172 description 3173 "This augment is valid only for IPv6 unicast."; 3174 } 3175 status deprecated; 3176 description 3177 "This augment adds the destination prefix to the reply of the 3178 'active-route' action."; 3179 leaf destination-prefix { 3180 type inet:ipv6-prefix; 3181 status deprecated; 3182 description 3183 "IPv6 destination prefix."; 3184 } 3185 } 3186 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 3187 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 3188 + "rt:simple-next-hop" { 3189 when "derived-from-or-self(../../../rt:address-family, 3190 'v6ur:ipv6-unicast')" { 3191 description 3192 "This augment is valid only for IPv6 unicast."; 3193 } 3194 status deprecated; 3195 description 3196 "Augment 'simple-next-hop' case in the reply to the 3197 'active-route' action."; 3198 leaf next-hop-address { 3199 type inet:ipv6-address; 3200 status deprecated; 3201 description 3202 "IPv6 address of the next hop."; 3204 } 3205 } 3206 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 3207 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 3208 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 3209 when "derived-from-or-self(../../../../../rt:address-family, 3210 'v6ur:ipv6-unicast')" { 3211 description 3212 "This augment is valid only for IPv6 unicast."; 3213 } 3214 status deprecated; 3215 description 3216 "Augment 'next-hop-list' case in the reply to the 3217 'active-route' action."; 3218 leaf next-hop-address { 3219 type inet:ipv6-address; 3220 status deprecated; 3221 description 3222 "IPv6 address of the next hop."; 3223 } 3224 } 3225 augment "/rt:routing/rt:control-plane-protocols/" 3226 + "rt:control-plane-protocol/rt:static-routes" { 3227 status deprecated; 3228 description 3229 "This augment defines the configuration of the 'static' 3230 pseudo-protocol with data specific to IPv6 unicast."; 3231 container ipv6 { 3232 status deprecated; 3233 description 3234 "Configuration of a 'static' pseudo-protocol instance 3235 consists of a list of routes."; 3236 list route { 3237 key "destination-prefix"; 3238 status deprecated; 3239 description 3240 "A list of static routes."; 3241 leaf destination-prefix { 3242 type inet:ipv6-prefix; 3243 mandatory true; 3244 status deprecated; 3245 description 3246 "IPv6 destination prefix."; 3247 } 3248 leaf description { 3249 type string; 3250 status deprecated; 3251 description 3252 "Textual description of the route."; 3253 } 3254 container next-hop { 3255 status deprecated; 3256 description 3257 "Configuration of next-hop."; 3258 uses rt:next-hop-content { 3259 status deprecated; 3260 augment "next-hop-options/simple-next-hop" { 3261 status deprecated; 3262 description 3263 "Augment 'simple-next-hop' case in IPv6 static 3264 routes."; 3265 leaf next-hop-address { 3266 type inet:ipv6-address; 3267 status deprecated; 3268 description 3269 "IPv6 address of the next hop."; 3270 } 3271 } 3272 augment "next-hop-options/next-hop-list/" 3273 + "next-hop-list/next-hop" { 3274 status deprecated; 3275 description 3276 "Augment 'next-hop-list' case in IPv6 static 3277 routes."; 3278 leaf next-hop-address { 3279 type inet:ipv6-address; 3280 status deprecated; 3281 description 3282 "IPv6 address of the next hop."; 3283 } 3284 } 3285 } 3286 } 3287 } 3288 } 3289 } 3290 } 3291 3293 A.4. Deprecated ietf-ipv6-router-advertisements Model 3295 file "ietf-ipv6-router-advertisements@2017-10-06.yang" 3296 submodule ietf-ipv6-router-advertisements { 3297 yang-version 1.1; 3298 belongs-to ietf-ipv6-unicast-routing { 3299 prefix v6ur; 3301 } 3303 import ietf-inet-types { 3304 prefix inet; 3305 } 3306 import ietf-interfaces { 3307 prefix if; 3308 } 3309 import ietf-ip { 3310 prefix ip; 3311 } 3313 organization 3314 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 3315 contact 3316 "WG Web: 3317 WG List: 3319 WG Chair: Lou Berger 3320 3322 WG Chair: Kent Watsen 3323 3325 Editor: Ladislav Lhotka 3326 3328 Editor: Acee Lindem 3329 "; 3330 description 3331 "This YANG module augments the 'ietf-ip' module with 3332 configuration and state data of IPv6 router advertisements. 3334 Copyright (c) 2016 IETF Trust and the persons identified as 3335 authors of the code. All rights reserved. 3337 Redistribution and use in source and binary forms, with or 3338 without modification, is permitted pursuant to, and subject to 3339 the license terms contained in, the Simplified BSD License set 3340 forth in Section 4.c of the IETF Trust's Legal Provisions 3341 Relating to IETF Documents 3342 (http://trustee.ietf.org/license-info). 3344 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 3345 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 3346 'OPTIONAL' in the module text are to be interpreted as described 3347 in RFC 2119. 3349 This version of this YANG module is part of RFC TBD; 3350 see the RFC itself for full legal notices."; 3351 reference "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)."; 3353 revision 2017-10-06 { 3354 description 3355 "Deprecated revision."; 3356 reference "RFC TBD: Revised YANG Data Model for 3357 Routing Management"; 3358 } 3360 revision 2016-11-04 { 3361 description 3362 "Initial revision."; 3363 reference 3364 "RFC 8022: A YANG Data Model for Routing Management"; 3365 } 3367 augment "/if:interfaces-state/if:interface/ip:ipv6" { 3368 status deprecated; 3369 description 3370 "Augment interface state data with parameters of IPv6 router 3371 advertisements."; 3372 container ipv6-router-advertisements { 3373 status deprecated; 3374 description 3375 "Parameters of IPv6 Router Advertisements."; 3376 leaf send-advertisements { 3377 type boolean; 3378 status deprecated; 3379 description 3380 "A flag indicating whether or not the router sends periodic 3381 Router Advertisements and responds to Router 3382 Solicitations."; 3383 } 3384 leaf max-rtr-adv-interval { 3385 type uint16 { 3386 range "4..1800"; 3387 } 3388 units "seconds"; 3389 status deprecated; 3390 description 3391 "The maximum time allowed between sending unsolicited 3392 multicast Router Advertisements from the interface."; 3393 } 3394 leaf min-rtr-adv-interval { 3395 type uint16 { 3396 range "3..1350"; 3398 } 3399 units "seconds"; 3400 status deprecated; 3401 description 3402 "The minimum time allowed between sending unsolicited 3403 multicast Router Advertisements from the interface."; 3404 } 3405 leaf managed-flag { 3406 type boolean; 3407 status deprecated; 3408 description 3409 "The value that is placed in the 'Managed address 3410 configuration' flag field in the Router Advertisement."; 3411 } 3412 leaf other-config-flag { 3413 type boolean; 3414 status deprecated; 3415 description 3416 "The value that is placed in the 'Other configuration' flag 3417 field in the Router Advertisement."; 3418 } 3419 leaf link-mtu { 3420 type uint32; 3421 status deprecated; 3422 description 3423 "The value that is placed in MTU options sent by the 3424 router. A value of zero indicates that no MTU options are 3425 sent."; 3426 } 3427 leaf reachable-time { 3428 type uint32 { 3429 range "0..3600000"; 3430 } 3431 units "milliseconds"; 3432 status deprecated; 3433 description 3434 "The value that is placed in the Reachable Time field in 3435 the Router Advertisement messages sent by the router. A 3436 value of zero means unspecified (by this router)."; 3437 } 3438 leaf retrans-timer { 3439 type uint32; 3440 units "milliseconds"; 3441 status deprecated; 3442 description 3443 "The value that is placed in the Retrans Timer field in the 3444 Router Advertisement messages sent by the router. A value 3445 of zero means unspecified (by this router)."; 3447 } 3448 leaf cur-hop-limit { 3449 type uint8; 3450 status deprecated; 3451 description 3452 "The value that is placed in the Cur Hop Limit field in the 3453 Router Advertisement messages sent by the router. A value 3454 of zero means unspecified (by this router)."; 3455 } 3456 leaf default-lifetime { 3457 type uint16 { 3458 range "0..9000"; 3459 } 3460 units "seconds"; 3461 status deprecated; 3462 description 3463 "The value that is placed in the Router Lifetime field of 3464 Router Advertisements sent from the interface, in seconds. 3465 A value of zero indicates that the router is not to be 3466 used as a default router."; 3467 } 3468 container prefix-list { 3469 status deprecated; 3470 description 3471 "A list of prefixes that are placed in Prefix Information 3472 options in Router Advertisement messages sent from the 3473 interface. 3475 By default, these are all prefixes that the router 3476 advertises via routing protocols as being on-link for the 3477 interface from which the advertisement is sent."; 3478 list prefix { 3479 key "prefix-spec"; 3480 status deprecated; 3481 description 3482 "Advertised prefix entry and its parameters."; 3483 leaf prefix-spec { 3484 type inet:ipv6-prefix; 3485 status deprecated; 3486 description 3487 "IPv6 address prefix."; 3488 } 3489 leaf valid-lifetime { 3490 type uint32; 3491 units "seconds"; 3492 status deprecated; 3493 description 3494 "The value that is placed in the Valid Lifetime in the 3495 Prefix Information option. The designated value of 3496 all 1's (0xffffffff) represents infinity. 3498 An implementation SHOULD keep this value constant in 3499 consecutive advertisements except when it is 3500 explicitly changed in configuration."; 3501 } 3502 leaf on-link-flag { 3503 type boolean; 3504 status deprecated; 3505 description 3506 "The value that is placed in the on-link flag ('L-bit') 3507 field in the Prefix Information option."; 3508 } 3509 leaf preferred-lifetime { 3510 type uint32; 3511 units "seconds"; 3512 status deprecated; 3513 description 3514 "The value that is placed in the Preferred Lifetime in 3515 the Prefix Information option, in seconds. The 3516 designated value of all 1's (0xffffffff) represents 3517 infinity. 3519 An implementation SHOULD keep this value constant in 3520 consecutive advertisements except when it is 3521 explicitly changed in configuration."; 3522 } 3523 leaf autonomous-flag { 3524 type boolean; 3525 status deprecated; 3526 description 3527 "The value that is placed in the Autonomous Flag field 3528 in the Prefix Information option."; 3529 } 3530 } 3531 } 3532 } 3533 } 3534 augment "/if:interfaces/if:interface/ip:ipv6" { 3535 status deprecated; 3536 description 3537 "Augment interface configuration with parameters of IPv6 router 3538 advertisements."; 3539 container ipv6-router-advertisements { 3540 status deprecated; 3541 description 3542 "Configuration of IPv6 Router Advertisements."; 3544 leaf send-advertisements { 3545 type boolean; 3546 default "false"; 3547 status deprecated; 3548 description 3549 "A flag indicating whether or not the router sends periodic 3550 Router Advertisements and responds to Router 3551 Solicitations."; 3552 reference 3553 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3554 AdvSendAdvertisements."; 3555 } 3556 leaf max-rtr-adv-interval { 3557 type uint16 { 3558 range "4..1800"; 3559 } 3560 units "seconds"; 3561 default "600"; 3562 status deprecated; 3563 description 3564 "The maximum time allowed between sending unsolicited 3565 multicast Router Advertisements from the interface."; 3566 reference 3567 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3568 MaxRtrAdvInterval."; 3569 } 3570 leaf min-rtr-adv-interval { 3571 type uint16 { 3572 range "3..1350"; 3573 } 3574 units "seconds"; 3575 must ". <= 0.75 * ../max-rtr-adv-interval" { 3576 description 3577 "The value MUST NOT be greater than 75% of 3578 'max-rtr-adv-interval'."; 3579 } 3580 status deprecated; 3581 description 3582 "The minimum time allowed between sending unsolicited 3583 multicast Router Advertisements from the interface. 3585 The default value to be used operationally if this leaf is 3586 not configured is determined as follows: 3588 - if max-rtr-adv-interval >= 9 seconds, the default 3589 value is 0.33 * max-rtr-adv-interval; 3591 - otherwise, it is 0.75 * max-rtr-adv-interval."; 3593 reference 3594 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3595 MinRtrAdvInterval."; 3596 } 3597 leaf managed-flag { 3598 type boolean; 3599 default "false"; 3600 status deprecated; 3601 description 3602 "The value to be placed in the 'Managed address 3603 configuration' flag field in the Router Advertisement."; 3604 reference 3605 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3606 AdvManagedFlag."; 3607 } 3608 leaf other-config-flag { 3609 type boolean; 3610 default "false"; 3611 status deprecated; 3612 description 3613 "The value to be placed in the 'Other configuration' flag 3614 field in the Router Advertisement."; 3615 reference 3616 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3617 AdvOtherConfigFlag."; 3618 } 3619 leaf link-mtu { 3620 type uint32; 3621 default "0"; 3622 status deprecated; 3623 description 3624 "The value to be placed in MTU options sent by the router. 3625 A value of zero indicates that no MTU options are sent."; 3626 reference 3627 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3628 AdvLinkMTU."; 3629 } 3630 leaf reachable-time { 3631 type uint32 { 3632 range "0..3600000"; 3633 } 3634 units "milliseconds"; 3635 default "0"; 3636 status deprecated; 3637 description 3638 "The value to be placed in the Reachable Time field in the 3639 Router Advertisement messages sent by the router. A value 3640 of zero means unspecified (by this router)."; 3642 reference 3643 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3644 AdvReachableTime."; 3645 } 3646 leaf retrans-timer { 3647 type uint32; 3648 units "milliseconds"; 3649 default "0"; 3650 status deprecated; 3651 description 3652 "The value to be placed in the Retrans Timer field in the 3653 Router Advertisement messages sent by the router. A value 3654 of zero means unspecified (by this router)."; 3655 reference 3656 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3657 AdvRetransTimer."; 3658 } 3659 leaf cur-hop-limit { 3660 type uint8; 3661 status deprecated; 3662 description 3663 "The value to be placed in the Cur Hop Limit field in the 3664 Router Advertisement messages sent by the router. A value 3665 of zero means unspecified (by this router). 3667 If this parameter is not configured, the device SHOULD use 3668 the value specified in IANA Assigned Numbers that was in 3669 effect at the time of implementation."; 3670 reference 3671 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3672 AdvCurHopLimit. 3674 IANA: IP Parameters, 3675 http://www.iana.org/assignments/ip-parameters"; 3676 } 3677 leaf default-lifetime { 3678 type uint16 { 3679 range "0..9000"; 3680 } 3681 units "seconds"; 3682 status deprecated; 3683 description 3684 "The value to be placed in the Router Lifetime field of 3685 Router Advertisements sent from the interface, in seconds. 3686 It MUST be either zero or between max-rtr-adv-interval and 3687 9000 seconds. A value of zero indicates that the router 3688 is not to be used as a default router. These limits may 3689 be overridden by specific documents that describe how IPv6 3690 operates over different link layers. 3692 If this parameter is not configured, the device SHOULD use 3693 a value of 3 * max-rtr-adv-interval."; 3694 reference 3695 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3696 AdvDefaultLifeTime."; 3697 } 3698 container prefix-list { 3699 status deprecated; 3700 description 3701 "Configuration of prefixes to be placed in Prefix 3702 Information options in Router Advertisement messages sent 3703 from the interface. 3705 Prefixes that are advertised by default but do not have 3706 their entries in the child 'prefix' list are advertised 3707 with the default values of all parameters. 3709 The link-local prefix SHOULD NOT be included in the list 3710 of advertised prefixes."; 3711 reference 3712 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 3713 AdvPrefixList."; 3714 list prefix { 3715 key "prefix-spec"; 3716 status deprecated; 3717 description 3718 "Configuration of an advertised prefix entry."; 3719 leaf prefix-spec { 3720 type inet:ipv6-prefix; 3721 status deprecated; 3722 description 3723 "IPv6 address prefix."; 3724 } 3725 choice control-adv-prefixes { 3726 default "advertise"; 3727 status deprecated; 3728 description 3729 "Either the prefix is explicitly removed from the 3730 set of advertised prefixes, or the parameters with 3731 which it is advertised are specified (default case)."; 3732 leaf no-advertise { 3733 type empty; 3734 status deprecated; 3735 description 3736 "The prefix will not be advertised. 3738 This can be used for removing the prefix from the 3739 default set of advertised prefixes."; 3740 } 3741 case advertise { 3742 status deprecated; 3743 leaf valid-lifetime { 3744 type uint32; 3745 units "seconds"; 3746 default "2592000"; 3747 status deprecated; 3748 description 3749 "The value to be placed in the Valid Lifetime in 3750 the Prefix Information option. The designated 3751 value of all 1's (0xffffffff) represents 3752 infinity."; 3753 reference 3754 "RFC 4861: Neighbor Discovery for IP version 6 3755 (IPv6) - AdvValidLifetime."; 3756 } 3757 leaf on-link-flag { 3758 type boolean; 3759 default "true"; 3760 status deprecated; 3761 description 3762 "The value to be placed in the on-link flag 3763 ('L-bit') field in the Prefix Information 3764 option."; 3765 reference 3766 "RFC 4861: Neighbor Discovery for IP version 6 3767 (IPv6) - AdvOnLinkFlag."; 3768 } 3769 leaf preferred-lifetime { 3770 type uint32; 3771 units "seconds"; 3772 must ". <= ../valid-lifetime" { 3773 description 3774 "This value MUST NOT be greater than 3775 valid-lifetime."; 3776 } 3777 default "604800"; 3778 status deprecated; 3779 description 3780 "The value to be placed in the Preferred Lifetime 3781 in the Prefix Information option. The designated 3782 value of all 1's (0xffffffff) represents 3783 infinity."; 3784 reference 3785 "RFC 4861: Neighbor Discovery for IP version 6 3786 (IPv6) - AdvPreferredLifetime."; 3787 } 3788 leaf autonomous-flag { 3789 type boolean; 3790 default "true"; 3791 status deprecated; 3792 description 3793 "The value to be placed in the Autonomous Flag 3794 field in the Prefix Information option."; 3795 reference 3796 "RFC 4861: Neighbor Discovery for IP version 6 3797 (IPv6) - AdvAutonomousFlag."; 3798 } 3799 } 3800 } 3801 } 3802 } 3803 } 3804 } 3805 } 3806 3808 Appendix B. The Complete Data Trees 3810 This appendix presents the complete tree of the core routing data 3811 model. See Section 2.2 for an explanation of the symbols used. The 3812 data type of every leaf node is shown near the right end of the 3813 corresponding line. 3815 module: ietf-routing-2 3816 +--rw routing 3817 +--rw router-id? yang:dotted-quad 3818 +--ro interfaces 3819 | +--ro interface* if:interface-ref 3820 +--rw control-plane-protocols 3821 | +--rw control-plane-protocol* [type name] 3822 | +--rw type identityref 3823 | +--rw name string 3824 | +--rw description? string 3825 | +--rw static-routes 3826 | +--rw v4ur:ipv4 3827 | | +--rw v4ur:route* [destination-prefix] 3828 | | +--rw v4ur:destination-prefix inet:ipv4-prefix 3829 | | +--rw v4ur:description? string 3830 | | +--rw v4ur:next-hop 3831 | | +--rw (v4ur:next-hop-options) 3832 | | +--:(v4ur:simple-next-hop) 3833 | | | +--rw v4ur:outgoing-interface? 3834 | | | if:interface-ref 3835 | | | +--rw v4ur:next-hop-address? 3836 | | | inet:ipv4-address 3837 | | +--:(v4ur:special-next-hop) 3838 | | | +--rw v4ur:special-next-hop? enumeration 3839 | | +--:(v4ur:next-hop-list) 3840 | | +--rw v4ur:next-hop-list 3841 | | +--rw v4ur:next-hop* [index] 3842 | | +--rw v4ur:index string 3843 | | +--rw v4ur:outgoing-interface? 3844 | | if:interface-ref 3845 | | +--rw v4ur:next-hop-address? 3846 | | inet:ipv4-address 3847 | +--rw v6ur:ipv6 3848 | +--rw v6ur:route* [destination-prefix] 3849 | +--rw v6ur:destination-prefix inet:ipv6-prefix 3850 | +--rw v6ur:description? string 3851 | +--rw v6ur:next-hop 3852 | +--rw (v6ur:next-hop-options) 3853 | +--:(v6ur:simple-next-hop) 3854 | | +--rw v6ur:outgoing-interface? 3855 | | if:interface-ref 3856 | | +--rw v6ur:next-hop-address? 3857 | | inet:ipv6-address 3858 | +--:(v6ur:special-next-hop) 3859 | | +--rw v6ur:special-next-hop? enumeration 3860 | +--:(v6ur:next-hop-list) 3861 | +--rw v6ur:next-hop-list 3862 | +--rw v6ur:next-hop* [index] 3863 | +--rw v6ur:index string 3864 | +--rw v6ur:outgoing-interface? 3865 | if:interface-ref 3866 | +--rw v6ur:next-hop-address? 3867 | inet:ipv6-address 3868 +--rw ribs 3869 +--rw rib* [name] 3870 +--rw name string 3871 +--rw address-family? identityref 3872 +--ro default-rib? boolean {multiple-ribs}? 3873 +--ro routes 3874 | +--ro route* 3875 | +--ro route-preference? route-preference 3876 | +--ro next-hop 3877 | | +--ro (next-hop-options) 3878 | | +--:(simple-next-hop) 3879 | | | +--ro outgoing-interface? 3880 | | | | if:interface-ref 3881 | | | +--ro v4ur:next-hop-address? 3882 | | | | inet:ipv4-address 3883 | | | +--ro v6ur:next-hop-address? 3884 | | | inet:ipv6-address 3885 | | +--:(special-next-hop) 3886 | | | +--ro special-next-hop? enumeration 3887 | | +--:(next-hop-list) 3888 | | +--ro next-hop-list 3889 | | +--ro next-hop* 3890 | | +--ro outgoing-interface? 3891 | | | if:interface-ref 3892 | | +--ro v4ur:address? 3893 | | | inet:ipv4-address 3894 | | +--ro v6ur:address? 3895 | | inet:ipv6-address 3896 | +--ro source-protocol identityref 3897 | +--ro active? empty 3898 | +--ro last-updated? yang:date-and-time 3899 | +--ro v4ur:destination-prefix? inet:ipv4-prefix 3900 | +--ro v6ur:destination-prefix? inet:ipv6-prefix 3901 +---x active-route 3902 | +---w input 3903 | | +---w v4ur:destination-address? inet:ipv4-address 3904 | | +---w v6ur:destination-address? inet:ipv6-address 3905 | +--ro output 3906 | +--ro route 3907 | +--ro next-hop 3908 | | +--ro (next-hop-options) 3909 | | +--:(simple-next-hop) 3910 | | | +--ro outgoing-interface? 3911 | | | | if:interface-ref 3912 | | | +--ro v4ur:next-hop-address? 3913 | | | | inet:ipv4-address 3914 | | | +--ro v6ur:next-hop-address? 3915 | | | inet:ipv6-address 3916 | | +--:(special-next-hop) 3917 | | | +--ro special-next-hop? enumeration 3918 | | +--:(next-hop-list) 3919 | | +--ro next-hop-list 3920 | | +--ro next-hop* 3921 | | +--ro outgoing-interface? 3922 | | | if:interface-ref 3923 | | +--ro v4ur:next-hop-address? 3924 | | | inet:ipv4-address 3925 | | +--ro v6ur:next-hop-address? 3926 | | inet:ipv6-address 3927 | +--ro source-protocol identityref 3928 | +--ro active? empty 3929 | +--ro last-updated? yang:date-and-time 3930 | +--ro v4ur:destination-prefix? inet:ipv4-prefix 3931 | +--ro v6ur:destination-prefix? inet:ipv6-prefix 3932 +--rw description? string 3933 module: ietf-ipv6-unicast-routing-2 3934 augment /if:interfaces/if:interface/ip:ipv6: 3935 +--rw ipv6-router-advertisements 3936 +--rw send-advertisements? boolean 3937 +--rw max-rtr-adv-interval? uint16 3938 +--rw min-rtr-adv-interval? uint16 3939 +--rw managed-flag? boolean 3940 +--rw other-config-flag? boolean 3941 +--rw link-mtu? uint32 3942 +--rw reachable-time? uint32 3943 +--rw retrans-timer? uint32 3944 +--rw cur-hop-limit? uint8 3945 +--rw default-lifetime? uint16 3946 +--rw prefix-list 3947 +--rw prefix* [prefix-spec] 3948 +--rw prefix-spec inet:ipv6-prefix 3949 +--rw (control-adv-prefixes)? 3950 +--:(no-advertise) 3951 | +--rw no-advertise? empty 3952 +--:(advertise) 3953 +--rw valid-lifetime? uint32 3954 +--rw on-link-flag? boolean 3955 +--rw preferred-lifetime? uint32 3956 +--rw autonomous-flag? boolean 3958 Appendix C. Minimum Implementation 3960 Some parts and options of the core routing model, such as user- 3961 defined RIBs, are intended only for advanced routers. This appendix 3962 gives basic non-normative guidelines for implementing a bare minimum 3963 of available functions. Such an implementation may be used for hosts 3964 or very simple routers. 3966 A minimum implementation does not support the feature 3967 "multiple-ribs". This means that a single system-controlled RIB is 3968 available for each supported address family -- IPv4, IPv6, or both. 3969 These RIBs are also the default RIBs. No user-controlled RIBs are 3970 allowed. 3972 In addition to the mandatory instance of the "direct" pseudo- 3973 protocol, a minimum implementation should support configuring 3974 instance(s) of the "static" pseudo-protocol. 3976 For hosts that are never intended to act as routers, the ability to 3977 turn on sending IPv6 router advertisements (Section 5.4) should be 3978 removed. 3980 Platforms with severely constrained resources may use deviations for 3981 restricting the data model, e.g., limiting the number of "static" 3982 control-plane protocol instances. 3984 Appendix D. Example: Adding a New Control-Plane Protocol 3986 This appendix demonstrates how the core routing data model can be 3987 extended to support a new control-plane protocol. The YANG module 3988 "example-rip" shown below is intended as an illustration rather than 3989 a real definition of a data model for the Routing Information 3990 Protocol (RIP). For the sake of brevity, this module does not obey 3991 all the guidelines specified in [RFC6087]. See also Section 5.3.2. 3993 module example-rip { 3995 yang-version "1.1"; 3997 namespace "http://example.com/rip"; 3999 prefix "rip"; 4001 import ietf-interfaces { 4002 prefix "if"; 4003 } 4005 import ietf-routing-2 { 4006 prefix "rt"; 4007 } 4009 identity rip { 4010 base rt:routing-protocol; 4011 description 4012 "Identity for the Routing Information Protocol (RIP)."; 4013 } 4015 typedef rip-metric { 4016 type uint8 { 4017 range "0..16"; 4018 } 4019 } 4021 grouping route-content { 4022 description 4023 "This grouping defines RIP-specific route attributes."; 4025 leaf metric { 4026 type rip-metric; 4027 } 4028 leaf tag { 4029 type uint16; 4030 default "0"; 4031 description 4032 "This leaf may be used to carry additional info, e.g., 4033 autonomous system (AS) number."; 4034 } 4035 } 4037 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 4038 when "derived-from-or-self(rt:source-protocol, 'rip:rip')" { 4039 description 4040 "This augment is only valid for a route whose source 4041 protocol is RIP."; 4042 } 4043 description 4044 "RIP-specific route attributes."; 4045 uses route-content; 4046 } 4048 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 4049 + "rt:output/rt:route" { 4050 description 4051 "RIP-specific route attributes in the output of 'active-route' 4052 RPC."; 4053 uses route-content; 4054 } 4056 augment "/rt:routing/rt:control-plane-protocols/" 4057 + "rt:control-plane-protocol" { 4058 when "derived-from-or-self(rt:type,'rip:rip')" { 4059 description 4060 "This augment is only valid for a routing protocol instance 4061 of type 'rip'."; 4062 } 4063 container rip { 4064 presence "RIP configuration"; 4065 description 4066 "RIP instance configuration."; 4067 container interfaces { 4068 description 4069 "Per-interface RIP configuration."; 4070 list interface { 4071 key "name"; 4072 description 4073 "RIP is enabled on interfaces that have an entry in this 4074 list, unless 'enabled' is set to 'false' for that 4075 entry."; 4076 leaf name { 4077 type if:interface-ref; 4078 } 4079 leaf enabled { 4080 type boolean; 4081 default "true"; 4082 } 4083 leaf metric { 4084 type rip-metric; 4085 default "1"; 4086 } 4087 } 4088 } 4089 leaf update-interval { 4090 type uint8 { 4091 range "10..60"; 4092 } 4093 units "seconds"; 4094 default "30"; 4095 description 4096 "Time interval between periodic updates."; 4097 } 4098 } 4099 } 4100 } 4102 Appendix E. Data Tree Example 4104 This section contains an example of an instance data tree in the JSON 4105 encoding [RFC7951], containing both configuration and state data. 4106 The data conforms to a data model that is defined by the following 4107 YANG library specification [RFC7895]: 4109 { 4110 "ietf-yang-library:modules-state": { 4111 "module-set-id": "c2e1f54169aa7f36e1a6e8d0865d441d3600f9c4", 4112 "module": [ 4113 { 4114 "name": "ietf-routing-2", 4115 "revision": "2017-09-13", 4116 "feature": [ 4117 "multiple-ribs", 4118 "router-id" 4119 ], 4120 "namespace": "urn:ietf:params:xml:ns:yang:ietf-routing-2", 4121 "conformance-type": "implement" 4122 }, 4123 { 4124 "name": "ietf-ipv4-unicast-routing-2", 4125 "revision": "2017-09-13", 4126 "namespace": 4127 "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing-2", 4128 "conformance-type": "implement" 4129 }, 4130 { 4131 "name": "ietf-ipv6-unicast-routing-2", 4132 "revision": "2017-09-13", 4133 "namespace": 4134 "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing-3", 4135 "conformance-type": "implement" 4136 }, 4137 { 4138 "name": "ietf-interfaces", 4139 "revision": "2014-05-08", 4140 "namespace": "urn:ietf:params:xml:ns:yang:ietf-interfaces", 4141 "conformance-type": "implement" 4142 }, 4143 { 4144 "name": "ietf-inet-types", 4145 "namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", 4146 "revision": "2013-07-15", 4147 "conformance-type": "import" 4148 }, 4149 { 4150 "name": "ietf-yang-types", 4151 "namespace": "urn:ietf:params:xml:ns:yang:ietf-yang-types", 4152 "revision": "2013-07-15", 4153 "conformance-type": "import" 4154 }, 4155 { 4156 "name": "iana-if-type", 4157 "namespace": "urn:ietf:params:xml:ns:yang:iana-if-type", 4158 "revision": "", 4159 "conformance-type": "implement" 4160 }, 4161 { 4162 "name": "ietf-ip", 4163 "revision": "2014-06-16", 4164 "namespace": "urn:ietf:params:xml:ns:yang:ietf-ip", 4165 "conformance-type": "implement" 4166 } 4167 ] 4168 } 4170 } 4172 A simple network setup as shown in Figure 2 is assumed: router "A" 4173 uses static default routes with the "ISP" router as the next hop. 4174 IPv6 router advertisements are configured only on the "eth1" 4175 interface and disabled on the upstream "eth0" interface. 4177 +-----------------+ 4178 | | 4179 | Router ISP | 4180 | | 4181 +--------+--------+ 4182 |2001:db8:0:1::2 4183 |192.0.2.2 4184 | 4185 | 4186 |2001:db8:0:1::1 4187 eth0|192.0.2.1 4188 +--------+--------+ 4189 | | 4190 | Router A | 4191 | | 4192 +--------+--------+ 4193 eth1|198.51.100.1 4194 |2001:db8:0:2::1 4195 | 4197 Figure 2: Example of Network Configuration 4199 The instance data tree could then be as follows: 4201 { 4202 "ietf-interfaces:interfaces": { 4203 "interface": [ 4204 { 4205 "name": "eth0", 4206 "type": "iana-if-type:ethernetCsmacd", 4207 "description": "Uplink to ISP.", 4208 "ietf-ip:ipv4": { 4209 "address": [ 4210 { 4211 "ip": "192.0.2.1", 4212 "prefix-length": 24 4213 } 4214 ], 4215 "forwarding": true 4216 }, 4217 "ietf-ip:ipv6": { 4218 "address": [ 4219 { 4220 "ip": "2001:0db8:0:1::1", 4221 "prefix-length": 64 4222 } 4223 ], 4224 "forwarding": true, 4225 "autoconf": { 4226 "create-global-addresses": false 4227 } 4228 } 4229 }, 4230 { 4231 "name": "eth1", 4232 "type": "iana-if-type:ethernetCsmacd", 4233 "description": "Interface to the internal network.", 4234 "ietf-ip:ipv4": { 4235 "address": [ 4236 { 4237 "ip": "198.51.100.1", 4238 "prefix-length": 24 4239 } 4240 ], 4241 "forwarding": true 4242 }, 4243 "ietf-ip:ipv6": { 4244 "address": [ 4245 { 4246 "ip": "2001:0db8:0:2::1", 4247 "prefix-length": 64 4248 } 4249 ], 4250 "forwarding": true, 4251 "autoconf": { 4252 "create-global-addresses": false 4253 }, 4254 "ietf-ipv6-unicast-routing-2: 4255 ipv6-router-advertisements-2": { 4256 "send-advertisements": true 4257 } 4258 } 4259 } 4260 ] 4261 }, 4262 "ietf-interfaces:interfaces-state": { 4263 "interface": [ 4264 { 4265 "name": "eth0", 4266 "type": "iana-if-type:ethernetCsmacd", 4267 "phys-address": "00:0C:42:E5:B1:E9", 4268 "oper-status": "up", 4269 "statistics": { 4270 "discontinuity-time": "2015-10-24T17:11:27+02:00" 4271 }, 4272 "ietf-ip:ipv4": { 4273 "forwarding": true, 4274 "mtu": 1500, 4275 "address": [ 4276 { 4277 "ip": "192.0.2.1", 4278 "prefix-length": 24 4279 } 4280 ] 4281 }, 4282 "ietf-ip:ipv6": { 4283 "forwarding": true, 4284 "mtu": 1500, 4285 "address": [ 4286 { 4287 "ip": "2001:0db8:0:1::1", 4288 "prefix-length": 64 4289 } 4290 ], 4291 "ietf-ipv6-unicast-routing-2: 4292 ipv6-router-advertisements-2": { 4293 "send-advertisements": false 4294 } 4295 } 4296 }, 4297 { 4298 "name": "eth1", 4299 "type": "iana-if-type:ethernetCsmacd", 4300 "phys-address": "00:0C:42:E5:B1:EA", 4301 "oper-status": "up", 4302 "statistics": { 4303 "discontinuity-time": "2015-10-24T17:11:29+02:00" 4304 }, 4305 "ietf-ip:ipv4": { 4306 "forwarding": true, 4307 "mtu": 1500, 4308 "address": [ 4309 { 4310 "ip": "198.51.100.1", 4311 "prefix-length": 24 4312 } 4313 ] 4315 }, 4316 "ietf-ip:ipv6": { 4317 "forwarding": true, 4318 "mtu": 1500, 4319 "address": [ 4320 { 4321 "ip": "2001:0db8:0:2::1", 4322 "prefix-length": 64 4323 } 4324 ], 4325 "ietf-ipv6-unicast-routing-2: 4326 ipv6-router-advertisements-2": { 4327 "send-advertisements": true, 4328 "prefix-list": { 4329 "prefix": [ 4330 { 4331 "prefix-spec": "2001:db8:0:2::/64" 4332 } 4333 ] 4334 } 4335 } 4336 } 4337 } 4338 ] 4339 }, 4340 "ietf-routing-2:routing": { 4341 "router-id": "192.0.2.1", 4342 "control-plane-protocols": { 4343 "control-plane-protocol": [ 4344 { 4345 "type": "ietf-routing-2:static", 4346 "name": "st0", 4347 "description": 4348 "Static routing is used for the internal network.", 4349 "static-routes": { 4350 "ietf-ipv4-unicast-routing-2:ipv4": { 4351 "route": [ 4352 { 4353 "destination-prefix": "0.0.0.0/0", 4354 "next-hop": { 4355 "next-hop-address": "192.0.2.2" 4356 } 4357 } 4358 ] 4359 }, 4360 "ietf-ipv6-unicast-routing-2:ipv6": { 4361 "route": [ 4362 { 4363 "destination-prefix": "::/0", 4364 "next-hop": { 4365 "next-hop-address": "2001:db8:0:1::2" 4366 } 4367 } 4368 ] 4369 } 4370 } 4371 } 4372 ] 4373 } 4374 "ribs": { 4375 "rib": [ 4376 { 4377 "name": "ipv4-master", 4378 "address-family": 4379 "ietf-ipv4-unicast-routing-2:ipv4-unicast", 4380 "default-rib": true, 4381 "routes": { 4382 "route": [ 4383 { 4384 "ietf-ipv4-unicast-routing-2:destination-prefix": 4385 "192.0.2.1/24", 4386 "next-hop": { 4387 "outgoing-interface": "eth0" 4388 }, 4389 "route-preference": 0, 4390 "source-protocol": "ietf-routing-2:direct", 4391 "last-updated": "2015-10-24T17:11:27+02:00" 4392 }, 4393 { 4394 "ietf-ipv4-unicast-routing-2:destination-prefix": 4395 "198.51.100.0/24", 4396 "next-hop": { 4397 "outgoing-interface": "eth1" 4398 }, 4399 "source-protocol": "ietf-routing-2:direct", 4400 "route-preference": 0, 4401 "last-updated": "2015-10-24T17:11:27+02:00" 4402 }, 4403 { 4404 "ietf-ipv4-unicast-routing-2:destination-prefix": 4405 "0.0.0.0/0", 4406 "source-protocol": "ietf-routing-2:static", 4407 "route-preference": 5, 4408 "next-hop": { 4409 "ietf-ipv4-unicast-routing-2:next-hop-address": 4410 "192.0.2.2" 4412 }, 4413 "last-updated": "2015-10-24T18:02:45+02:00" 4414 } 4415 ] 4416 } 4417 }, 4418 { 4419 "name": "ipv6-master", 4420 "address-family": 4421 "ietf-ipv6-unicast-routing-2:ipv6-unicast", 4422 "default-rib": true, 4423 "routes": { 4424 "route": [ 4425 { 4426 "ietf-ipv6-unicast-routing-2:destination-prefix": 4427 "2001:db8:0:1::/64", 4428 "next-hop": { 4429 "outgoing-interface": "eth0" 4430 }, 4431 "source-protocol": "ietf-routing-2:direct", 4432 "route-preference": 0, 4433 "last-updated": "2015-10-24T17:11:27+02:00" 4434 }, 4435 { 4436 "ietf-ipv6-unicast-routing-2:destination-prefix": 4437 "2001:db8:0:2::/64", 4438 "next-hop": { 4439 "outgoing-interface": "eth1" 4440 }, 4441 "source-protocol": "ietf-routing-2:direct", 4442 "route-preference": 0, 4443 "last-updated": "2015-10-24T17:11:27+02:00" 4444 }, 4445 { 4446 "ietf-ipv6-unicast-routing-2:destination-prefix": 4447 "::/0", 4448 "next-hop": { 4449 "ietf-ipv6-unicast-routing-2:next-hop-address": 4450 "2001:db8:0:1::2" 4451 }, 4452 "source-protocol": "ietf-routing-2:static", 4453 "route-preference": 5, 4454 "last-updated": "2015-10-24T18:02:45+02:00" 4455 } 4456 ] 4457 } 4458 } 4459 ] 4461 } 4462 }, 4463 } 4465 Acknowledgments 4467 The authors wish to thank Nitin Bahadur, Martin Bjorklund, Dean 4468 Bogdanovic, Jeff Haas, Joel Halpern, Wes Hardaker, Sriganesh Kini, 4469 David Lamparter, Andrew McGregor, Jan Medved, Xiang Li, Stephane 4470 Litkowski, Thomas Morin, Tom Petch, Yingzhen Qu, Bruno Rijsman, 4471 Juergen Schoenwaelder, Phil Shafer, Dave Thaler, Yi Yang, 4472 Derek Man-Kit Yeung, and Jeffrey Zhang for their helpful comments and 4473 suggestions. 4475 Authors' Addresses 4477 Ladislav Lhotka 4478 CZ.NIC 4480 EMail: lhotka@nic.cz 4482 Acee Lindem 4483 Cisco Systems 4485 EMail: acee@cisco.com 4487 Yingzhen Qu 4488 Futurewei Technologies, Inc. 4489 2330 Central Expressway 4490 Santa Clara CA 95050 4491 USA 4493 EMail: yingzhen.qu@huawei.com