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