idnits 2.17.1 draft-acee-netmod-rfc8022bis-05.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 2715 has weird spacing: '...-prefix ine...' == Line 2736 has weird spacing: '...-prefix ine...' -- The document date (October 14, 2017) is 2385 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-04 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: April 17, 2018 Cisco Systems 6 Y. Qu 7 Futurewei Technologies, Inc. 8 October 14, 2017 10 A YANG Data Model for Routing Management (NDMA Version) 11 draft-acee-netmod-rfc8022bis-05 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 April 17, 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 . . . . . . . . . 27 83 9. IPv6 Unicast Routing Management YANG Module . . . . . . . . . 35 84 9.1. IPv6 Router Advertisements Submodule . . . . . . . . . . 43 85 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 54 86 11. Security Considerations . . . . . . . . . . . . . . . . . . . 54 87 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 55 88 12.1. Normative References . . . . . . . . . . . . . . . . . . 55 89 12.2. Informative References . . . . . . . . . . . . . . . . . 56 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 systemindependently 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 Figures 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-14.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-14 { 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 leaf default-rib { 1201 if-feature "multiple-ribs"; 1202 type boolean; 1203 default "true"; 1204 status obsolete; 1205 description 1206 "This flag has the value of 'true' if and only if the 1207 RIB is the default RIB for the given address family. 1209 By default, control-plane protocols place their routes 1210 in the default RIBs."; 1211 } 1212 container routes { 1213 status obsolete; 1214 description 1215 "Current content of the RIB."; 1216 list route { 1217 status obsolete; 1218 description 1219 "A RIB route entry. This data node MUST be augmented 1220 with information specific for routes of each address 1221 family."; 1222 leaf route-preference { 1223 type route-preference; 1224 status obsolete; 1225 description 1226 "This route attribute, also known as administrative 1227 distance, allows for selecting the preferred route 1228 among routes with the same destination prefix. A 1229 smaller value means a more preferred route."; 1230 } 1231 container next-hop { 1232 status obsolete; 1233 description 1234 "Route's next-hop attribute."; 1235 uses next-hop-state-content; 1236 } 1237 uses route-metadata; 1238 } 1240 } 1241 action active-route { 1242 status obsolete; 1243 description 1244 "Return the active RIB route that is used for the 1245 destination address. 1247 Address-family-specific modules MUST augment input 1248 parameters with a leaf named 'destination-address'."; 1249 output { 1250 container route { 1251 status obsolete; 1252 description 1253 "The active RIB route for the specified 1254 destination. 1256 If no route exists in the RIB for the destination 1257 address, no output is returned. 1259 Address-family-specific modules MUST augment this 1260 container with appropriate route contents."; 1261 container next-hop { 1262 status obsolete; 1263 description 1264 "Route's next-hop attribute."; 1265 uses next-hop-state-content; 1266 } 1267 uses route-metadata; 1268 } 1269 } 1270 } 1271 } 1272 } 1273 } 1274 } 1275 1277 8. IPv4 Unicast Routing Management YANG Module 1279 file "ietf-ipv4-unicast-routing@2017-10-14.yang" 1280 module ietf-ipv4-unicast-routing { 1281 yang-version "1.1"; 1282 namespace 1283 "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing"; 1284 prefix "v4ur"; 1286 import ietf-routing { 1287 prefix "rt"; 1289 } 1291 import ietf-inet-types { 1292 prefix "inet"; 1293 } 1294 organization 1295 "IETF NETMOD - Networking Modeling Working Group"; 1296 contact 1297 "WG Web: 1298 WG List: 1300 Editor: Ladislav Lhotka 1301 1302 Acee Lindem 1303 1304 Yingzhen Qu 1305 "; 1307 description 1308 "This YANG module augments the 'ietf-routing' module with basic 1309 configuration and state data for IPv4 unicast routing. 1311 Copyright (c) 2017 IETF Trust and the persons 1312 identified as authors of the code. All rights reserved. 1314 Redistribution and use in source and binary forms, with or 1315 without modification, is permitted pursuant to, and subject 1316 to the license terms contained in, the Simplified BSD License 1317 set forth in Section 4.c of the IETF Trust's Legal Provisions 1318 Relating to IETF Documents 1319 (http://trustee.ietf.org/license-info). 1321 This version of this YANG module is part of RFC XXXX; see 1322 the RFC itself for full legal notices."; 1323 reference "RFC XXXX"; 1325 revision 2017-10-14 { 1326 description 1327 "Network Managment Datastore Architecture (NDMA) Revision"; 1328 reference 1329 "RFC XXXX: A YANG Data Model for Routing Management 1330 (NDMA Version)"; 1331 } 1333 revision 2016-11-04 { 1334 description 1335 "Initial revision."; 1336 reference 1337 "RFC 8022: A YANG Data Model for Routing Management"; 1338 } 1340 /* Identities */ 1342 identity ipv4-unicast { 1343 base rt:ipv4; 1344 description 1345 "This identity represents the IPv4 unicast address family."; 1346 } 1348 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 1349 when "derived-from-or-self(../../rt:address-family, " 1350 + "'v4ur:ipv4-unicast')" { 1351 description 1352 "This augment is valid only for IPv4 unicast."; 1353 } 1354 description 1355 "This leaf augments an IPv4 unicast route."; 1356 leaf destination-prefix { 1357 type inet:ipv4-prefix; 1358 description 1359 "IPv4 destination prefix."; 1360 } 1361 } 1363 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1364 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1365 when "derived-from-or-self(../../../rt:address-family, " 1366 + "'v4ur:ipv4-unicast')" { 1367 description 1368 "This augment is valid only for IPv4 unicast."; 1369 } 1370 description 1371 "Augment 'simple-next-hop' case in IPv4 unicast routes."; 1372 leaf next-hop-address { 1373 type inet:ipv4-address; 1374 description 1375 "IPv4 address of the next hop."; 1376 } 1377 } 1379 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1380 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1381 + "rt:next-hop-list/rt:next-hop" { 1382 when "derived-from-or-self(../../../../../rt:address-family, " 1383 + "'v4ur:ipv4-unicast')" { 1384 description 1385 "This augment is valid only for IPv4 unicast."; 1386 } 1387 description 1388 "This leaf augments the 'next-hop-list' case of IPv4 unicast 1389 routes."; 1390 leaf address { 1391 type inet:ipv4-address; 1392 description 1393 "IPv4 address of the next-hop."; 1394 } 1395 } 1397 augment 1398 "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { 1399 when "derived-from-or-self(../rt:address-family, " 1400 + "'v4ur:ipv4-unicast')" { 1401 description 1402 "This augment is valid only for IPv4 unicast RIBs."; 1403 } 1404 description 1405 "This augment adds the input parameter of the 'active-route' 1406 action."; 1407 leaf destination-address { 1408 type inet:ipv4-address; 1409 description 1410 "IPv4 destination address."; 1411 } 1412 } 1414 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1415 + "rt:output/rt:route" { 1416 when "derived-from-or-self(../../rt:address-family, " 1417 + "'v4ur:ipv4-unicast')" { 1418 description 1419 "This augment is valid only for IPv4 unicast."; 1420 } 1421 description 1422 "This augment adds the destination prefix to the reply of the 1423 'active-route' action."; 1424 leaf destination-prefix { 1425 type inet:ipv4-prefix; 1426 description 1427 "IPv4 destination prefix."; 1428 } 1429 } 1431 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1432 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1433 + "rt:simple-next-hop" { 1434 when "derived-from-or-self(../../../rt:address-family, " 1435 + "'v4ur:ipv4-unicast')" { 1436 description 1437 "This augment is valid only for IPv4 unicast."; 1438 } 1439 description 1440 "Augment 'simple-next-hop' case in the reply to the 1441 'active-route' action."; 1442 leaf next-hop-address { 1443 type inet:ipv4-address; 1444 description 1445 "IPv4 address of the next hop."; 1446 } 1447 } 1449 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1450 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1451 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1452 when "derived-from-or-self(../../../../../rt:address-family, " 1453 + "'v4ur:ipv4-unicast')" { 1454 description 1455 "This augment is valid only for IPv4 unicast."; 1456 } 1457 description 1458 "Augment 'next-hop-list' case in the reply to the 1459 'active-route' action."; 1460 leaf next-hop-address { 1461 type inet:ipv4-address; 1462 description 1463 "IPv4 address of the next hop."; 1464 } 1465 } 1467 augment "/rt:routing/rt:control-plane-protocols/" 1468 + "rt:control-plane-protocol/rt:static-routes" { 1469 description 1470 "This augment defines the configuration of the 'static' 1471 pseudo-protocol with data specific to IPv4 unicast."; 1472 container ipv4 { 1473 description 1474 "Configuration of a 'static' pseudo-protocol instance 1475 consists of a list of routes."; 1476 list route { 1477 key "destination-prefix"; 1478 description 1479 "A list of static routes."; 1480 leaf destination-prefix { 1481 type inet:ipv4-prefix; 1482 mandatory "true"; 1483 description 1484 "IPv4 destination prefix."; 1485 } 1486 leaf description { 1487 type string; 1488 description 1489 "Textual description of the route."; 1490 } 1491 container next-hop { 1492 description 1493 "Configuration of next-hop."; 1494 uses rt:next-hop-content { 1495 augment "next-hop-options/simple-next-hop" { 1496 description 1497 "Augment 'simple-next-hop' case in IPv4 static 1498 routes."; 1499 leaf next-hop-address { 1500 type inet:ipv4-address; 1501 description 1502 "IPv4 address of the next hop."; 1503 } 1504 } 1505 augment "next-hop-options/next-hop-list/next-hop-list/" 1506 + "next-hop" { 1507 description 1508 "Augment 'next-hop-list' case in IPv4 static 1509 routes."; 1510 leaf next-hop-address { 1511 type inet:ipv4-address; 1512 description 1513 "IPv4 address of the next hop."; 1514 } 1515 } 1516 } 1517 } 1518 } 1519 } 1520 } 1522 /* Obsolete State Data */ 1524 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { 1525 when "derived-from-or-self(../../rt:address-family, " 1526 + "'v4ur:ipv4-unicast')" { 1527 description 1528 "This augment is valid only for IPv4 unicast."; 1530 } 1531 status obsolete; 1532 description 1533 "This leaf augments an IPv4 unicast route."; 1534 leaf destination-prefix { 1535 type inet:ipv4-prefix; 1536 status obsolete; 1537 description 1538 "IPv4 destination prefix."; 1539 } 1540 } 1541 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1542 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1543 when "derived-from-or-self( 1544 ../../../rt:address-family, 'v4ur:ipv4-unicast')" { 1545 description 1546 "This augment is valid only for IPv4 unicast."; 1547 } 1548 status obsolete; 1549 description 1550 "Augment 'simple-next-hop' case in IPv4 unicast routes."; 1551 leaf next-hop-address { 1552 type inet:ipv4-address; 1553 status obsolete; 1554 description 1555 "IPv4 address of the next hop."; 1556 } 1557 } 1558 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1559 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1560 + "rt:next-hop-list/rt:next-hop" { 1561 when "derived-from-or-self(../../../../../rt:address-family, 1562 'v4ur:ipv4-unicast')" { 1563 description 1564 "This augment is valid only for IPv4 unicast."; 1565 } 1566 status obsolete; 1567 description 1568 "This leaf augments the 'next-hop-list' case of IPv4 unicast 1569 routes."; 1570 leaf address { 1571 type inet:ipv4-address; 1572 status obsolete; 1573 description 1574 "IPv4 address of the next-hop."; 1575 } 1576 } 1577 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1578 + "rt:input" { 1579 when "derived-from-or-self(../rt:address-family, 1580 'v4ur:ipv4-unicast')" { 1581 description 1582 "This augment is valid only for IPv4 unicast RIBs."; 1583 } 1584 status obsolete; 1585 description 1586 "This augment adds the input parameter of the 'active-route' 1587 action."; 1588 leaf destination-address { 1589 type inet:ipv4-address; 1590 status obsolete; 1591 description 1592 "IPv4 destination address."; 1593 } 1594 } 1595 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1596 + "rt:output/rt:route" { 1597 when "derived-from-or-self(../../rt:address-family, 1598 'v4ur:ipv4-unicast')" { 1599 description 1600 "This augment is valid only for IPv4 unicast."; 1601 } 1602 status obsolete; 1603 description 1604 "This augment adds the destination prefix to the reply of the 1605 'active-route' action."; 1606 leaf destination-prefix { 1607 type inet:ipv4-prefix; 1608 status obsolete; 1609 description 1610 "IPv4 destination prefix."; 1611 } 1612 } 1613 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1614 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1615 + "rt:simple-next-hop" { 1616 when "derived-from-or-self(../../../rt:address-family, 1617 'v4ur:ipv4-unicast')" { 1618 description 1619 "This augment is valid only for IPv4 unicast."; 1620 } 1621 status obsolete; 1622 description 1623 "Augment 'simple-next-hop' case in the reply to the 1624 'active-route' action."; 1625 leaf next-hop-address { 1626 type inet:ipv4-address; 1627 status obsolete; 1628 description 1629 "IPv4 address of the next hop."; 1630 } 1631 } 1632 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1633 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1634 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1635 when "derived-from-or-self(../../../../../rt:address-family, 1636 'v4ur:ipv4-unicast')" { 1637 description 1638 "This augment is valid only for IPv4 unicast."; 1639 } 1640 status obsolete; 1641 description 1642 "Augment 'next-hop-list' case in the reply to the 1643 'active-route' action."; 1644 leaf next-hop-address { 1645 type inet:ipv4-address; 1646 status obsolete; 1647 description 1648 "IPv4 address of the next hop."; 1649 } 1650 } 1651 } 1652 1654 9. IPv6 Unicast Routing Management YANG Module 1656 file "ietf-ipv6-unicast-routing@2017-10-14.yang" 1657 module ietf-ipv6-unicast-routing { 1658 yang-version "1.1"; 1659 namespace 1660 "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing"; 1661 prefix "v6ur"; 1663 import ietf-routing { 1664 prefix "rt"; 1665 } 1667 import ietf-inet-types { 1668 prefix "inet"; 1669 } 1671 include ietf-ipv6-router-advertisements { 1672 revision-date 2017-10-14; 1673 } 1674 organization 1675 "IETF NETMOD - Networking Modeling Working Group"; 1676 contact 1677 "WG Web: 1678 WG List: 1680 Editor: Ladislav Lhotka 1681 1682 Acee Lindem 1683 1684 Yingzhen Qu 1685 "; 1687 description 1688 "This YANG module augments the 'ietf-routing' module with basic 1689 configuration and state data for IPv6 unicast routing. 1691 Copyright (c) 2017 IETF Trust and the persons 1692 identified as authors of the code. All rights reserved. 1694 Redistribution and use in source and binary forms, with or 1695 without modification, is permitted pursuant to, and subject 1696 to the license terms contained in, the Simplified BSD License 1697 set forth in Section 4.c of the IETF Trust's Legal Provisions 1698 Relating to IETF Documents 1699 (http://trustee.ietf.org/license-info). 1701 This version of this YANG module is part of RFC XXXX; see 1702 the RFC itself for full legal notices."; 1703 reference "RFC XXXX"; 1705 revision 2017-10-14 { 1706 description 1707 "Network Managment Datastore Architecture (NDMA) revision"; 1708 reference 1709 "RFC XXXX: A YANG Data Model for Routing Management 1710 (NDMA Version)"; 1711 } 1713 /* Identities */ 1715 revision 2016-11-04 { 1716 description 1717 "Initial revision."; 1718 reference 1719 "RFC 8022: A YANG Data Model for Routing Management"; 1720 } 1721 identity ipv6-unicast { 1722 base rt:ipv6; 1723 description 1724 "This identity represents the IPv6 unicast address family."; 1725 } 1727 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 1728 when "derived-from-or-self(../../rt:address-family, " 1729 + "'v6ur:ipv6-unicast')" { 1730 description 1731 "This augment is valid only for IPv6 unicast."; 1732 } 1733 description 1734 "This leaf augments an IPv6 unicast route."; 1735 leaf destination-prefix { 1736 type inet:ipv6-prefix; 1737 description 1738 "IPv6 destination prefix."; 1739 } 1740 } 1742 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1743 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1744 when "derived-from-or-self(../../../rt:address-family, " 1745 + "'v6ur:ipv6-unicast')" { 1746 description 1747 "This augment is valid only for IPv6 unicast."; 1748 } 1749 description 1750 "Augment 'simple-next-hop' case in IPv6 unicast routes."; 1751 leaf next-hop-address { 1752 type inet:ipv6-address; 1753 description 1754 "IPv6 address of the next hop."; 1755 } 1756 } 1758 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" 1759 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1760 + "rt:next-hop-list/rt:next-hop" { 1761 when "derived-from-or-self(../../../../../rt:address-family, " 1762 + "'v6ur:ipv6-unicast')" { 1763 description 1764 "This augment is valid only for IPv6 unicast."; 1765 } 1766 description 1767 "This leaf augments the 'next-hop-list' case of IPv6 unicast 1768 routes."; 1770 leaf address { 1771 type inet:ipv6-address; 1772 description 1773 "IPv6 address of the next hop."; 1774 } 1775 } 1777 augment 1778 "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { 1779 when "derived-from-or-self(../rt:address-family, " 1780 + "'v6ur:ipv6-unicast')" { 1781 description 1782 "This augment is valid only for IPv6 unicast RIBs."; 1783 } 1784 description 1785 "This augment adds the input parameter of the 'active-route' 1786 action."; 1787 leaf destination-address { 1788 type inet:ipv6-address; 1789 description 1790 "IPv6 destination address."; 1791 } 1792 } 1794 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1795 + "rt:output/rt:route" { 1796 when "derived-from-or-self(../../rt:address-family, " 1797 + "'v6ur:ipv6-unicast')" { 1798 description 1799 "This augment is valid only for IPv6 unicast."; 1800 } 1801 description 1802 "This augment adds the destination prefix to the reply of the 1803 'active-route' action."; 1804 leaf destination-prefix { 1805 type inet:ipv6-prefix; 1806 description 1807 "IPv6 destination prefix."; 1808 } 1809 } 1811 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1812 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1813 + "rt:simple-next-hop" { 1814 when "derived-from-or-self(../../../rt:address-family, " 1815 + "'v6ur:ipv6-unicast')" { 1816 description 1817 "This augment is valid only for IPv6 unicast."; 1819 } 1820 description 1821 "Augment 'simple-next-hop' case in the reply to the 1822 'active-route' action."; 1823 leaf next-hop-address { 1824 type inet:ipv6-address; 1825 description 1826 "IPv6 address of the next hop."; 1827 } 1828 } 1830 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 1831 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1832 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 1833 when "derived-from-or-self(../../../../../rt:address-family, " 1834 + "'v6ur:ipv6-unicast')" { 1835 description 1836 "This augment is valid only for IPv6 unicast."; 1837 } 1838 description 1839 "Augment 'next-hop-list' case in the reply to the 1840 'active-route' action."; 1841 leaf next-hop-address { 1842 type inet:ipv6-address; 1843 description 1844 "IPv6 address of the next hop."; 1845 } 1846 } 1848 /* Configuration data */ 1850 augment "/rt:routing/rt:control-plane-protocols/" 1851 + "rt:control-plane-protocol/rt:static-routes" { 1852 description 1853 "This augment defines the configuration of the 'static' 1854 pseudo-protocol with data specific to IPv6 unicast."; 1855 container ipv6 { 1856 description 1857 "Configuration of a 'static' pseudo-protocol instance 1858 consists of a list of routes."; 1859 list route { 1860 key "destination-prefix"; 1861 description 1862 "A list of static routes."; 1863 leaf destination-prefix { 1864 type inet:ipv6-prefix; 1865 mandatory "true"; 1866 description 1867 "IPv6 destination prefix."; 1868 } 1869 leaf description { 1870 type string; 1871 description 1872 "Textual description of the route."; 1873 } 1874 container next-hop { 1875 description 1876 "Configuration of next-hop."; 1877 uses rt:next-hop-content { 1878 augment "next-hop-options/simple-next-hop" { 1879 description 1880 "Augment 'simple-next-hop' case in IPv6 static 1881 routes."; 1882 leaf next-hop-address { 1883 type inet:ipv6-address; 1884 description 1885 "IPv6 address of the next hop."; 1886 } 1887 } 1888 augment "next-hop-options/next-hop-list/next-hop-list/" 1889 + "next-hop" { 1890 description 1891 "Augment 'next-hop-list' case in IPv6 static 1892 routes."; 1893 leaf next-hop-address { 1894 type inet:ipv6-address; 1895 description 1896 "IPv6 address of the next hop."; 1897 } 1898 } 1899 } 1900 } 1901 } 1902 } 1903 } 1905 /* Obsolete State Data */ 1907 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { 1908 when "derived-from-or-self(../../rt:address-family, 1909 'v6ur:ipv6-unicast')" { 1910 description 1911 "This augment is valid only for IPv6 unicast."; 1912 } 1913 status obsolete; 1914 description 1915 "This leaf augments an IPv6 unicast route."; 1916 leaf destination-prefix { 1917 type inet:ipv6-prefix; 1918 status obsolete; 1919 description 1920 "IPv6 destination prefix."; 1921 } 1922 } 1923 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1924 + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { 1925 when "derived-from-or-self(../../../rt:address-family, 1926 'v6ur:ipv6-unicast')" { 1927 description 1928 "This augment is valid only for IPv6 unicast."; 1929 } 1930 status obsolete; 1931 description 1932 "Augment 'simple-next-hop' case in IPv6 unicast routes."; 1933 leaf next-hop-address { 1934 type inet:ipv6-address; 1935 status obsolete; 1936 description 1937 "IPv6 address of the next hop."; 1938 } 1939 } 1940 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" 1941 + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" 1942 + "rt:next-hop-list/rt:next-hop" { 1943 when "derived-from-or-self(../../../../../rt:address-family, 1944 'v6ur:ipv6-unicast')" { 1945 description 1946 "This augment is valid only for IPv6 unicast."; 1947 } 1948 status obsolete; 1949 description 1950 "This leaf augments the 'next-hop-list' case of IPv6 unicast 1951 routes."; 1952 leaf address { 1953 type inet:ipv6-address; 1954 status obsolete; 1955 description 1956 "IPv6 address of the next hop."; 1957 } 1958 } 1959 augment "/rt:routing-state/rt:ribs/rt:rib/" 1960 + "rt:active-route/rt:input" { 1961 when "derived-from-or-self(../rt:address-family, 1962 'v6ur:ipv6-unicast')" { 1964 description 1965 "This augment is valid only for IPv6 unicast RIBs."; 1966 } 1967 status obsolete; 1968 description 1969 "This augment adds the input parameter of the 'active-route' 1970 action."; 1971 leaf destination-address { 1972 type inet:ipv6-address; 1973 status obsolete; 1974 description 1975 "IPv6 destination address."; 1976 } 1977 } 1978 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1979 + "rt:output/rt:route" { 1980 when "derived-from-or-self(../../rt:address-family, 1981 'v6ur:ipv6-unicast')" { 1982 description 1983 "This augment is valid only for IPv6 unicast."; 1984 } 1985 status obsolete; 1986 description 1987 "This augment adds the destination prefix to the reply of the 1988 'active-route' action."; 1989 leaf destination-prefix { 1990 type inet:ipv6-prefix; 1991 status obsolete; 1992 description 1993 "IPv6 destination prefix."; 1994 } 1995 } 1996 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 1997 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 1998 + "rt:simple-next-hop" { 1999 when "derived-from-or-self(../../../rt:address-family, 2000 'v6ur:ipv6-unicast')" { 2001 description 2002 "This augment is valid only for IPv6 unicast."; 2003 } 2004 status obsolete; 2005 description 2006 "Augment 'simple-next-hop' case in the reply to the 2007 'active-route' action."; 2008 leaf next-hop-address { 2009 type inet:ipv6-address; 2010 status obsolete; 2011 description 2012 "IPv6 address of the next hop."; 2013 } 2014 } 2015 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" 2016 + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" 2017 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { 2018 when "derived-from-or-self(../../../../../rt:address-family, 2019 'v6ur:ipv6-unicast')" { 2020 description 2021 "This augment is valid only for IPv6 unicast."; 2022 } 2023 status obsolete; 2024 description 2025 "Augment 'next-hop-list' case in the reply to the 2026 'active-route' action."; 2027 leaf next-hop-address { 2028 type inet:ipv6-address; 2029 status obsolete; 2030 description 2031 "IPv6 address of the next hop."; 2032 } 2033 } 2034 } 2035 2037 9.1. IPv6 Router Advertisements Submodule 2039 file "ietf-ipv6-router-advertisements@2017-10-14.yang" 2040 submodule ietf-ipv6-router-advertisements { 2041 yang-version "1.1"; 2043 belongs-to ietf-ipv6-unicast-routing { 2044 prefix "v6ur"; 2045 } 2047 import ietf-inet-types { 2048 prefix "inet"; 2049 } 2051 import ietf-interfaces { 2052 prefix "if"; 2053 } 2055 import ietf-ip { 2056 prefix "ip"; 2057 } 2059 organization 2060 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 2061 contact 2062 "WG Web: 2063 WG List: 2065 WG Chair: Lou Berger 2066 2068 WG Chair: Kent Watsen 2069 2071 Editor: Ladislav Lhotka 2072 2074 Editor: Acee Lindem 2075 2077 Editor: Yingzhen Qu 2078 "; 2080 description 2081 "This YANG module augments the 'ietf-ip' module with 2082 configuration and state data of IPv6 router advertisements. 2084 Copyright (c) 2017 IETF Trust and the persons identified as 2085 authors of the code. All rights reserved. 2087 Redistribution and use in source and binary forms, with or 2088 without modification, is permitted pursuant to, and subject 2089 to the license terms contained in, the Simplified BSD License 2090 set forth in Section 4.c of the IETF Trust's Legal Provisions 2091 Relating to IETF Documents 2092 (http://trustee.ietf.org/license-info). 2094 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2095 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 2096 'OPTIONAL' in the module text are to be interpreted as 2097 described in RFC 2119. 2099 This version of this YANG module is part of RFC 8022; 2100 see the RFC itself for full legal notices."; 2102 reference 2103 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)."; 2105 revision 2017-10-14 { 2106 description 2107 "Network Managment Datastore Architecture (NDMA) Revision"; 2109 reference 2110 "RFC XXXX: A YANG Data Model for Routing Management 2111 (NDMA Version)"; 2112 } 2114 revision 2016-11-04 { 2115 description 2116 "Initial revision."; 2117 reference 2118 "RFC 8022: A YANG Data Model for Routing Management"; 2119 } 2121 augment "/if:interfaces/if:interface/ip:ipv6" { 2122 description 2123 "Augment interface configuration with parameters of IPv6 2124 router advertisements."; 2125 container ipv6-router-advertisements { 2126 description 2127 "Configuration of IPv6 Router Advertisements."; 2128 leaf send-advertisements { 2129 type boolean; 2130 default "false"; 2131 description 2132 "A flag indicating whether or not the router sends 2133 periodic Router Advertisements and responds to 2134 Router Solicitations."; 2135 reference 2136 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2137 AdvSendAdvertisements."; 2138 } 2139 leaf max-rtr-adv-interval { 2140 type uint16 { 2141 range "4..1800"; 2142 } 2143 units "seconds"; 2144 default "600"; 2145 description 2146 "The maximum time allowed between sending unsolicited 2147 multicast Router Advertisements from the interface."; 2148 reference 2149 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2150 MaxRtrAdvInterval."; 2151 } 2152 leaf min-rtr-adv-interval { 2153 type uint16 { 2154 range "3..1350"; 2155 } 2156 units "seconds"; 2157 must ". <= 0.75 * ../max-rtr-adv-interval" { 2158 description 2159 "The value MUST NOT be greater than 75% of 2160 'max-rtr-adv-interval'."; 2161 } 2162 description 2163 "The minimum time allowed between sending unsolicited 2164 multicast Router Advertisements from the interface. 2166 The default value to be used operationally if this 2167 leaf is not configured is determined as follows: 2169 - if max-rtr-adv-interval >= 9 seconds, the default 2170 value is 0.33 * max-rtr-adv-interval; 2172 - otherwise, it is 0.75 * max-rtr-adv-interval."; 2173 reference 2174 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2175 MinRtrAdvInterval."; 2176 } 2177 leaf managed-flag { 2178 type boolean; 2179 default "false"; 2180 description 2181 "The value to be placed in the 'Managed address 2182 configuration' flag field in the Router 2183 Advertisement."; 2184 reference 2185 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2186 AdvManagedFlag."; 2187 } 2188 leaf other-config-flag { 2189 type boolean; 2190 default "false"; 2191 description 2192 "The value to be placed in the 'Other configuration' 2193 flag field in the Router Advertisement."; 2194 reference 2195 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2196 AdvOtherConfigFlag."; 2197 } 2198 leaf link-mtu { 2199 type uint32; 2200 default "0"; 2201 description 2202 "The value to be placed in MTU options sent by the 2203 router. A value of zero indicates that no MTU options 2204 are sent."; 2206 reference 2207 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2208 AdvLinkMTU."; 2209 } 2210 leaf reachable-time { 2211 type uint32 { 2212 range "0..3600000"; 2213 } 2214 units "milliseconds"; 2215 default "0"; 2216 description 2217 "The value to be placed in the Reachable Time field in 2218 the Router Advertisement messages sent by the router. 2219 A value of zero means unspecified (by this router)."; 2220 reference 2221 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2222 AdvReachableTime."; 2223 } 2224 leaf retrans-timer { 2225 type uint32; 2226 units "milliseconds"; 2227 default "0"; 2228 description 2229 "The value to be placed in the Retrans Timer field in 2230 the Router Advertisement messages sent by the router. 2231 A value of zero means unspecified (by this router)."; 2232 reference 2233 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2234 AdvRetransTimer."; 2235 } 2236 leaf cur-hop-limit { 2237 type uint8; 2238 description 2239 "The value to be placed in the Cur Hop Limit field in 2240 the Router Advertisement messages sent by the router. 2241 A value of zero means unspecified (by this router). 2243 If this parameter is not configured, the device SHOULD 2244 use the value specified in IANA Assigned Numbers that 2245 was in effect at the time of implementation."; 2246 reference 2247 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2248 AdvCurHopLimit. 2250 IANA: IP Parameters, 2251 http://www.iana.org/assignments/ip-parameters"; 2252 } 2253 leaf default-lifetime { 2254 type uint16 { 2255 range "0..9000"; 2256 } 2257 units "seconds"; 2258 description 2259 "The value to be placed in the Router Lifetime field of 2260 Router Advertisements sent from the interface, in 2261 seconds. It MUST be either zero or between 2262 max-rtr-adv-interval and 9000 seconds. A value of zero 2263 default indicates that the router is not to be used as 2264 a router. These limits may be overridden by specific 2265 documents that describe how IPv6 operates over 2266 different link layers. 2268 If this parameter is not configured, the device SHOULD 2269 use a value of 3 * max-rtr-adv-interval."; 2270 reference 2271 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2272 AdvDefaultLifeTime."; 2273 } 2274 container prefix-list { 2275 description 2276 "Configuration of prefixes to be placed in Prefix 2277 Information options in Router Advertisement messages 2278 sent from the interface. 2280 Prefixes that are advertised by default but do not 2281 have their entries in the child 'prefix' list are 2282 advertised with the default values of all parameters. 2284 The link-local prefix SHOULD NOT be included in the 2285 list of advertised prefixes."; 2286 reference 2287 "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) - 2288 AdvPrefixList."; 2289 list prefix { 2290 key "prefix-spec"; 2291 description 2292 "Configuration of an advertised prefix entry."; 2293 leaf prefix-spec { 2294 type inet:ipv6-prefix; 2295 description 2296 "IPv6 address prefix."; 2297 } 2298 choice control-adv-prefixes { 2299 default "advertise"; 2300 description 2301 "Either the prefix is explicitly removed from the 2302 set of advertised prefixes, or the parameters with 2303 which it is advertised are specified (default 2304 case)."; 2305 leaf no-advertise { 2306 type empty; 2307 description 2308 "The prefix will not be advertised. 2310 This can be used for removing the prefix from 2311 the default set of advertised prefixes."; 2312 } 2313 case advertise { 2314 leaf valid-lifetime { 2315 type uint32; 2316 units "seconds"; 2317 default "2592000"; 2318 description 2319 "The value to be placed in the Valid Lifetime 2320 in the Prefix Information option. The 2321 designated value of all 1's (0xffffffff) 2322 represents infinity."; 2323 reference 2324 "RFC 4861: Neighbor Discovery for IP version 6 2325 (IPv6) - AdvValidLifetime."; 2326 } 2327 leaf on-link-flag { 2328 type boolean; 2329 default "true"; 2330 description 2331 "The value to be placed in the on-link flag 2332 ('L-bit') field in the Prefix Information 2333 option."; 2334 reference 2335 "RFC 4861: Neighbor Discovery for IP version 6 2336 (IPv6) - AdvOnLinkFlag."; 2337 } 2338 leaf preferred-lifetime { 2339 type uint32; 2340 units "seconds"; 2341 must ". <= ../valid-lifetime" { 2342 description 2343 "This value MUST NOT be greater than 2344 valid-lifetime."; 2345 } 2346 default "604800"; 2347 description 2348 "The value to be placed in the Preferred 2349 Lifetime in the Prefix Information option. 2351 The designated value of all 1's (0xffffffff) 2352 represents infinity."; 2353 reference 2354 "RFC 4861: Neighbor Discovery for IP version 6 2355 (IPv6) - AdvPreferredLifetime."; 2356 } 2357 leaf autonomous-flag { 2358 type boolean; 2359 default "true"; 2360 description 2361 "The value to be placed in the Autonomous Flag 2362 field in the Prefix Information option."; 2363 reference 2364 "RFC 4861: Neighbor Discovery for IP version 6 2365 (IPv6) - AdvAutonomousFlag."; 2366 } 2367 } 2368 } 2369 } 2370 } 2371 } 2372 } 2374 /* Obsolete State Data */ 2376 augment "/if:interfaces-state/if:interface/ip:ipv6" { 2377 status obsolete; 2378 description 2379 "Augment interface state data with parameters of IPv6 router 2380 advertisements."; 2381 container ipv6-router-advertisements { 2382 status obsolete; 2383 description 2384 "Parameters of IPv6 Router Advertisements."; 2385 leaf send-advertisements { 2386 type boolean; 2387 status obsolete; 2388 description 2389 "A flag indicating whether or not the router sends periodic 2390 Router Advertisements and responds to Router 2391 Solicitations."; 2392 } 2393 leaf max-rtr-adv-interval { 2394 type uint16 { 2395 range "4..1800"; 2396 } 2397 units "seconds"; 2398 status obsolete; 2399 description 2400 "The maximum time allowed between sending unsolicited 2401 multicast Router Advertisements from the interface."; 2402 } 2403 leaf min-rtr-adv-interval { 2404 type uint16 { 2405 range "3..1350"; 2406 } 2407 units "seconds"; 2408 status obsolete; 2409 description 2410 "The minimum time allowed between sending unsolicited 2411 multicast Router Advertisements from the interface."; 2412 } 2413 leaf managed-flag { 2414 type boolean; 2415 status obsolete; 2416 description 2417 "The value that is placed in the 'Managed address 2418 configuration' flag field in the Router Advertisement."; 2419 } 2420 leaf other-config-flag { 2421 type boolean; 2422 status obsolete; 2423 description 2424 "The value that is placed in the 'Other configuration' flag 2425 field in the Router Advertisement."; 2426 } 2427 leaf link-mtu { 2428 type uint32; 2429 status obsolete; 2430 description 2431 "The value that is placed in MTU options sent by the 2432 router. A value of zero indicates that no MTU options are 2433 sent."; 2434 } 2435 leaf reachable-time { 2436 type uint32 { 2437 range "0..3600000"; 2438 } 2439 units "milliseconds"; 2440 status obsolete; 2441 description 2442 "The value that is placed in the Reachable Time field in 2443 the Router Advertisement messages sent by the router. A 2444 value of zero means unspecified (by this router)."; 2445 } 2446 leaf retrans-timer { 2447 type uint32; 2448 units "milliseconds"; 2449 status obsolete; 2450 description 2451 "The value that is placed in the Retrans Timer field in the 2452 Router Advertisement messages sent by the router. A value 2453 of zero means unspecified (by this router)."; 2454 } 2455 leaf cur-hop-limit { 2456 type uint8; 2457 status obsolete; 2458 description 2459 "The value that is placed in the Cur Hop Limit field in the 2460 Router Advertisement messages sent by the router. A value 2461 of zero means unspecified (by this router)."; 2462 } 2463 leaf default-lifetime { 2464 type uint16 { 2465 range "0..9000"; 2466 } 2467 units "seconds"; 2468 status obsolete; 2469 description 2470 "The value that is placed in the Router Lifetime field of 2471 Router Advertisements sent from the interface, in seconds. 2472 A value of zero indicates that the router is not to be 2473 used as a default router."; 2474 } 2475 container prefix-list { 2476 status obsolete; 2477 description 2478 "A list of prefixes that are placed in Prefix Information 2479 options in Router Advertisement messages sent from the 2480 interface. 2482 By default, these are all prefixes that the router 2483 advertises via routing protocols as being on-link for the 2484 interface from which the advertisement is sent."; 2485 list prefix { 2486 key "prefix-spec"; 2487 status obsolete; 2488 description 2489 "Advertised prefix entry and its parameters."; 2490 leaf prefix-spec { 2491 type inet:ipv6-prefix; 2492 status obsolete; 2493 description 2494 "IPv6 address prefix."; 2496 } 2497 leaf valid-lifetime { 2498 type uint32; 2499 units "seconds"; 2500 status obsolete; 2501 description 2502 "The value that is placed in the Valid Lifetime in the 2503 Prefix Information option. The designated value of 2504 all 1's (0xffffffff) represents infinity. 2506 An implementation SHOULD keep this value constant in 2507 consecutive advertisements except when it is 2508 explicitly changed in configuration."; 2509 } 2510 leaf on-link-flag { 2511 type boolean; 2512 status obsolete; 2513 description 2514 "The value that is placed in the on-link flag ('L-bit') 2515 field in the Prefix Information option."; 2516 } 2517 leaf preferred-lifetime { 2518 type uint32; 2519 units "seconds"; 2520 status obsolete; 2521 description 2522 "The value that is placed in the Preferred Lifetime in 2523 the Prefix Information option, in seconds. The 2524 designated value of all 1's (0xffffffff) represents 2525 infinity. 2527 An implementation SHOULD keep this value constant in 2528 consecutive advertisements except when it is 2529 explicitly changed in configuration."; 2530 } 2531 leaf autonomous-flag { 2532 type boolean; 2533 status obsolete; 2534 description 2535 "The value that is placed in the Autonomous Flag field 2536 in the Prefix Information option."; 2537 } 2538 } 2539 } 2540 } 2541 } 2542 } 2543 2545 10. IANA Considerations 2547 [RFC8022] registered the following namespace URIs in the "IETF XML 2548 Registry" [RFC3688]: 2550 URI: urn:ietf:params:xml:ns:yang:ietf-routing 2551 Registrant Contact: The IESG. 2552 XML: N/A; the requested URI is an XML namespace. 2554 URI: urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing 2555 Registrant Contact: The IESG. 2556 XML: N/A; the requested URI is an XML namespace. 2558 URI: urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing 2559 Registrant Contact: The IESG. 2560 XML: N/A; the requested URI is an XML namespace. 2562 [RFC8022] registered the following YANG modules in the "YANG Module 2563 Names" registry [RFC6020]: 2565 Name: ietf-routing 2566 Namespace: urn:ietf:params:xml:ns:yang:ietf-routing 2567 Prefix: rt 2568 Reference: RFC 8022 2570 Name: ietf-ipv4-unicast-routing 2571 Namespace: urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing 2572 Prefix: v4ur 2573 Reference: RFC 8022 2575 Name: ietf-ipv6-unicast-routing 2576 Namespace: urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing 2577 Prefix: v6ur 2578 Reference: RFC 8022 2580 This document registers the following YANG submodule in the "YANG 2581 Module Names" registry [RFC6020]: 2583 Name: ietf-ipv6-router-advertisements 2584 Module: ietf-ipv6-unicast-routing 2585 Reference: RFC 8022 2587 11. Security Considerations 2589 The YANG module defined in this memo is designed to be accessed via 2590 the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the 2591 secure transport layer and the mandatory-to-implement secure 2592 transport is SSH [RFC6242]. 2594 There are a number of data nodes defined in this YANG module which 2595 are writable/creatable/deletable (i.e., config true, which is the 2596 default). These data nodes may be considered sensitive or vulnerable 2597 in some network environments. Write operations (e.g., edit-config) 2598 to these data nodes without proper protection can have a negative 2599 effect on network operations. These are the subtrees and data nodes 2600 and their sensitivity/vulnerability: 2602 /routing/control-plane-protocols/control-plane-protocol: This list 2603 specifies the control-plane protocols configured on a device. 2605 /routing/ribs/rib: This list specifies the RIBs configured for the 2606 device. 2608 Some of the readable data nodes in this YANG module may be considered 2609 sensitive or vulnerable in some network environments. It is thus 2610 important to control read access (e.g., via get, get-config, or 2611 notification) to these data nodes. These are the subtrees and data 2612 nodes and their sensitivity/vulnerability: 2614 /routing/control-plane-protocols/control-plane-protocol: This list 2615 specifies the control-plane protocols configured on a device. 2616 Refer to the control plane models for a list of sensitive 2617 information. 2619 /routing/ribs/rib: This list specifies the RIB and their contents 2620 for the device. Access to this information may disclose the 2621 network topology and or other information. 2623 12. References 2625 12.1. Normative References 2627 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2628 Requirement Levels", BCP 14, RFC 2119, 2629 DOI 10.17487/RFC2119, March 1997, . 2632 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 2633 DOI 10.17487/RFC3688, January 2004, . 2636 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 2637 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 2638 DOI 10.17487/RFC4861, September 2007, . 2641 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2642 the Network Configuration Protocol (NETCONF)", RFC 6020, 2643 DOI 10.17487/RFC6020, October 2010, . 2646 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 2647 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 2648 . 2650 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 2651 and A. Bierman, Ed., "Network Configuration Protocol 2652 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 2653 . 2655 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2656 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2657 . 2659 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 2660 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 2661 . 2663 [RFC7277] Bjorklund, M., "A YANG Data Model for IP Management", 2664 RFC 7277, DOI 10.17487/RFC7277, June 2014, 2665 . 2667 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 2668 RFC 7950, DOI 10.17487/RFC7950, August 2016, 2669 . 2671 [RFC8022] Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 2672 Management", RFC 8022, DOI 10.17487/RFC8022, November 2673 2016, . 2675 12.2. Informative References 2677 [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG 2678 Data Model Documents", RFC 6087, DOI 10.17487/RFC6087, 2679 January 2011, . 2681 [RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module 2682 Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, 2683 . 2685 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 2686 RFC 7951, DOI 10.17487/RFC7951, August 2016, 2687 . 2689 [I-D.ietf-netmod-revised-datastores] 2690 Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 2691 and R. Wilton, "Network Management Datastore 2692 Architecture", draft-ietf-netmod-revised-datastores-04 2693 (work in progress), August 2017. 2695 Appendix A. The Complete Data Trees 2697 This appendix presents the complete tree of the core routing data 2698 model. See Section 2.2 for an explanation of the symbols used. The 2699 data type of every leaf node is shown near the right end of the 2700 corresponding line. 2702 module: ietf-routing 2703 +--rw routing 2704 +--rw router-id? yang:dotted-quad 2705 +--ro interfaces 2706 | +--ro interface* if:interface-ref 2707 +--rw control-plane-protocols 2708 | +--rw control-plane-protocol* [type name] 2709 | +--rw type identityref 2710 | +--rw name string 2711 | +--rw description? string 2712 | +--rw static-routes 2713 | +--rw v4ur:ipv4 2714 | | +--rw v4ur:route* [destination-prefix] 2715 | | +--rw v4ur:destination-prefix inet:ipv4-prefix 2716 | | +--rw v4ur:description? string 2717 | | +--rw v4ur:next-hop 2718 | | +--rw (v4ur:next-hop-options) 2719 | | +--:(v4ur:simple-next-hop) 2720 | | | +--rw v4ur:outgoing-interface? 2721 | | | if:interface-ref 2722 | | | +--rw v4ur:next-hop-address? 2723 | | | inet:ipv4-address 2724 | | +--:(v4ur:special-next-hop) 2725 | | | +--rw v4ur:special-next-hop? enumeration 2726 | | +--:(v4ur:next-hop-list) 2727 | | +--rw v4ur:next-hop-list 2728 | | +--rw v4ur:next-hop* [index] 2729 | | +--rw v4ur:index string 2730 | | +--rw v4ur:outgoing-interface? 2731 | | if:interface-ref 2732 | | +--rw v4ur:next-hop-address? 2733 | | inet:ipv4-address 2734 | +--rw v6ur:ipv6 2735 | +--rw v6ur:route* [destination-prefix] 2736 | +--rw v6ur:destination-prefix inet:ipv6-prefix 2737 | +--rw v6ur:description? string 2738 | +--rw v6ur:next-hop 2739 | +--rw (v6ur:next-hop-options) 2740 | +--:(v6ur:simple-next-hop) 2741 | | +--rw v6ur:outgoing-interface? 2742 | | if:interface-ref 2743 | | +--rw v6ur:next-hop-address? 2744 | | inet:ipv6-address 2745 | +--:(v6ur:special-next-hop) 2746 | | +--rw v6ur:special-next-hop? enumeration 2747 | +--:(v6ur:next-hop-list) 2748 | +--rw v6ur:next-hop-list 2749 | +--rw v6ur:next-hop* [index] 2750 | +--rw v6ur:index string 2751 | +--rw v6ur:outgoing-interface? 2752 | if:interface-ref 2753 | +--rw v6ur:next-hop-address? 2754 | inet:ipv6-address 2755 +--rw ribs 2756 +--rw rib* [name] 2757 +--rw name string 2758 +--rw address-family? identityref 2759 +--ro default-rib? boolean {multiple-ribs}? 2760 +--ro routes 2761 | +--ro route* 2762 | +--ro route-preference? route-preference 2763 | +--ro next-hop 2764 | | +--ro (next-hop-options) 2765 | | +--:(simple-next-hop) 2766 | | | +--ro outgoing-interface? 2767 | | | | if:interface-ref 2768 | | | +--ro v4ur:next-hop-address? 2769 | | | | inet:ipv4-address 2770 | | | +--ro v6ur:next-hop-address? 2771 | | | inet:ipv6-address 2772 | | +--:(special-next-hop) 2773 | | | +--ro special-next-hop? enumeration 2774 | | +--:(next-hop-list) 2775 | | +--ro next-hop-list 2776 | | +--ro next-hop* 2777 | | +--ro outgoing-interface? 2778 | | | if:interface-ref 2779 | | +--ro v4ur:address? 2780 | | | inet:ipv4-address 2781 | | +--ro v6ur:address? 2782 | | inet:ipv6-address 2783 | +--ro source-protocol identityref 2784 | +--ro active? empty 2785 | +--ro last-updated? yang:date-and-time 2786 | +--ro v4ur:destination-prefix? inet:ipv4-prefix 2787 | +--ro v6ur:destination-prefix? inet:ipv6-prefix 2788 +---x active-route 2789 | +---w input 2790 | | +---w v4ur:destination-address? inet:ipv4-address 2791 | | +---w v6ur:destination-address? inet:ipv6-address 2792 | +--ro output 2793 | +--ro route 2794 | +--ro next-hop 2795 | | +--ro (next-hop-options) 2796 | | +--:(simple-next-hop) 2797 | | | +--ro outgoing-interface? 2798 | | | | if:interface-ref 2799 | | | +--ro v4ur:next-hop-address? 2800 | | | | inet:ipv4-address 2801 | | | +--ro v6ur:next-hop-address? 2802 | | | inet:ipv6-address 2803 | | +--:(special-next-hop) 2804 | | | +--ro special-next-hop? enumeration 2805 | | +--:(next-hop-list) 2806 | | +--ro next-hop-list 2807 | | +--ro next-hop* 2808 | | +--ro outgoing-interface? 2809 | | | if:interface-ref 2810 | | +--ro v4ur:next-hop-address? 2811 | | | inet:ipv4-address 2812 | | +--ro v6ur:next-hop-address? 2813 | | inet:ipv6-address 2814 | +--ro source-protocol identityref 2815 | +--ro active? empty 2816 | +--ro last-updated? yang:date-and-time 2817 | +--ro v4ur:destination-prefix? inet:ipv4-prefix 2818 | +--ro v6ur:destination-prefix? inet:ipv6-prefix 2819 +--rw description? string 2820 module: ietf-ipv6-unicast-routing 2821 augment /if:interfaces/if:interface/ip:ipv6: 2822 +--rw ipv6-router-advertisements 2823 +--rw send-advertisements? boolean 2824 +--rw max-rtr-adv-interval? uint16 2825 +--rw min-rtr-adv-interval? uint16 2826 +--rw managed-flag? boolean 2827 +--rw other-config-flag? boolean 2828 +--rw link-mtu? uint32 2829 +--rw reachable-time? uint32 2830 +--rw retrans-timer? uint32 2831 +--rw cur-hop-limit? uint8 2832 +--rw default-lifetime? uint16 2833 +--rw prefix-list 2834 +--rw prefix* [prefix-spec] 2835 +--rw prefix-spec inet:ipv6-prefix 2836 +--rw (control-adv-prefixes)? 2837 +--:(no-advertise) 2838 | +--rw no-advertise? empty 2839 +--:(advertise) 2840 +--rw valid-lifetime? uint32 2841 +--rw on-link-flag? boolean 2842 +--rw preferred-lifetime? uint32 2843 +--rw autonomous-flag? boolean 2845 Appendix B. Minimum Implementation 2847 Some parts and options of the core routing model, such as user- 2848 defined RIBs, are intended only for advanced routers. This appendix 2849 gives basic non-normative guidelines for implementing a bare minimum 2850 of available functions. Such an implementation may be used for hosts 2851 or very simple routers. 2853 A minimum implementation does not support the feature 2854 "multiple-ribs". This means that a single system-controlled RIB is 2855 available for each supported address family -- IPv4, IPv6, or both. 2856 These RIBs are also the default RIBs. No user-controlled RIBs are 2857 allowed. 2859 In addition to the mandatory instance of the "direct" pseudo- 2860 protocol, a minimum implementation should support configuring 2861 instance(s) of the "static" pseudo-protocol. 2863 For hosts that are never intended to act as routers, the ability to 2864 turn on sending IPv6 router advertisements (Section 5.4) should be 2865 removed. 2867 Platforms with severely constrained resources may use deviations for 2868 restricting the data model, e.g., limiting the number of "static" 2869 control-plane protocol instances. 2871 Appendix C. Example: Adding a New Control-Plane Protocol 2873 This appendix demonstrates how the core routing data model can be 2874 extended to support a new control-plane protocol. The YANG module 2875 "example-rip" shown below is intended as an illustration rather than 2876 a real definition of a data model for the Routing Information 2877 Protocol (RIP). For the sake of brevity, this module does not obey 2878 all the guidelines specified in [RFC6087]. See also Section 5.3.2. 2880 module example-rip { 2882 yang-version "1.1"; 2884 namespace "http://example.com/rip"; 2886 prefix "rip"; 2887 import ietf-interfaces { 2888 prefix "if"; 2889 } 2891 import ietf-routing { 2892 prefix "rt"; 2893 } 2895 identity rip { 2896 base rt:routing-protocol; 2897 description 2898 "Identity for the Routing Information Protocol (RIP)."; 2899 } 2901 typedef rip-metric { 2902 type uint8 { 2903 range "0..16"; 2904 } 2905 } 2907 grouping route-content { 2908 description 2909 "This grouping defines RIP-specific route attributes."; 2910 leaf metric { 2911 type rip-metric; 2912 } 2913 leaf tag { 2914 type uint16; 2915 default "0"; 2916 description 2917 "This leaf may be used to carry additional info, e.g., 2918 autonomous system (AS) number."; 2919 } 2920 } 2922 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 2923 when "derived-from-or-self(rt:source-protocol, 'rip:rip')" { 2924 description 2925 "This augment is only valid for a route whose source 2926 protocol is RIP."; 2927 } 2928 description 2929 "RIP-specific route attributes."; 2930 uses route-content; 2931 } 2933 augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" 2934 + "rt:output/rt:route" { 2936 description 2937 "RIP-specific route attributes in the output of 'active-route' 2938 RPC."; 2939 uses route-content; 2940 } 2942 augment "/rt:routing/rt:control-plane-protocols/" 2943 + "rt:control-plane-protocol" { 2944 when "derived-from-or-self(rt:type,'rip:rip')" { 2945 description 2946 "This augment is only valid for a routing protocol instance 2947 of type 'rip'."; 2948 } 2949 container rip { 2950 presence "RIP configuration"; 2951 description 2952 "RIP instance configuration."; 2953 container interfaces { 2954 description 2955 "Per-interface RIP configuration."; 2956 list interface { 2957 key "name"; 2958 description 2959 "RIP is enabled on interfaces that have an entry in this 2960 list, unless 'enabled' is set to 'false' for that 2961 entry."; 2962 leaf name { 2963 type if:interface-ref; 2964 } 2965 leaf enabled { 2966 type boolean; 2967 default "true"; 2968 } 2969 leaf metric { 2970 type rip-metric; 2971 default "1"; 2972 } 2973 } 2974 } 2975 leaf update-interval { 2976 type uint8 { 2977 range "10..60"; 2978 } 2979 units "seconds"; 2980 default "30"; 2981 description 2982 "Time interval between periodic updates."; 2983 } 2985 } 2986 } 2987 } 2989 Appendix D. Data Tree Example 2991 This section contains an example of an instance data tree in the JSON 2992 encoding [RFC7951], containing both configuration and state data. 2993 The data conforms to a data model that is defined by the following 2994 YANG library specification [RFC7895]: 2996 { 2997 "ietf-yang-library:modules-state": { 2998 "module-set-id": "c2e1f54169aa7f36e1a6e8d0865d441d3600f9c4", 2999 "module": [ 3000 { 3001 "name": "ietf-routing", 3002 "revision": "2017-09-13", 3003 "feature": [ 3004 "multiple-ribs", 3005 "router-id" 3006 ], 3007 "namespace": "urn:ietf:params:xml:ns:yang:ietf-routing", 3008 "conformance-type": "implement" 3009 }, 3010 { 3011 "name": "ietf-ipv4-unicast-routing", 3012 "revision": "2017-09-13", 3013 "namespace": 3014 "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing", 3015 "conformance-type": "implement" 3016 }, 3017 { 3018 "name": "ietf-ipv6-unicast-routing", 3019 "revision": "2017-09-13", 3020 "namespace": 3021 "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing-3", 3022 "conformance-type": "implement" 3023 }, 3024 { 3025 "name": "ietf-interfaces", 3026 "revision": "2014-05-08", 3027 "namespace": "urn:ietf:params:xml:ns:yang:ietf-interfaces", 3028 "conformance-type": "implement" 3029 }, 3030 { 3031 "name": "ietf-inet-types", 3032 "namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", 3033 "revision": "2013-07-15", 3034 "conformance-type": "import" 3035 }, 3036 { 3037 "name": "ietf-yang-types", 3038 "namespace": "urn:ietf:params:xml:ns:yang:ietf-yang-types", 3039 "revision": "2013-07-15", 3040 "conformance-type": "import" 3041 }, 3042 { 3043 "name": "iana-if-type", 3044 "namespace": "urn:ietf:params:xml:ns:yang:iana-if-type", 3045 "revision": "", 3046 "conformance-type": "implement" 3047 }, 3048 { 3049 "name": "ietf-ip", 3050 "revision": "2014-06-16", 3051 "namespace": "urn:ietf:params:xml:ns:yang:ietf-ip", 3052 "conformance-type": "implement" 3053 } 3054 ] 3055 } 3056 } 3058 A simple network setup as shown in Figure 2 is assumed: router "A" 3059 uses static default routes with the "ISP" router as the next hop. 3060 IPv6 router advertisements are configured only on the "eth1" 3061 interface and disabled on the upstream "eth0" interface. 3063 +-----------------+ 3064 | | 3065 | Router ISP | 3066 | | 3067 +--------+--------+ 3068 |2001:db8:0:1::2 3069 |192.0.2.2 3070 | 3071 | 3072 |2001:db8:0:1::1 3073 eth0|192.0.2.1 3074 +--------+--------+ 3075 | | 3076 | Router A | 3077 | | 3078 +--------+--------+ 3079 eth1|198.51.100.1 3080 |2001:db8:0:2::1 3081 | 3083 Figure 2: Example of Network Configuration 3085 The instance data tree could then be as follows: 3087 { 3088 "ietf-interfaces:interfaces": { 3089 "interface": [ 3090 { 3091 "name": "eth0", 3092 "type": "iana-if-type:ethernetCsmacd", 3093 "description": "Uplink to ISP.", 3094 "ietf-ip:ipv4": { 3095 "address": [ 3096 { 3097 "ip": "192.0.2.1", 3098 "prefix-length": 24 3099 } 3100 ], 3101 "forwarding": true 3102 }, 3103 "ietf-ip:ipv6": { 3104 "address": [ 3105 { 3106 "ip": "2001:0db8:0:1::1", 3107 "prefix-length": 64 3108 } 3109 ], 3110 "forwarding": true, 3111 "autoconf": { 3112 "create-global-addresses": false 3113 } 3114 } 3115 }, 3116 { 3117 "name": "eth1", 3118 "type": "iana-if-type:ethernetCsmacd", 3119 "description": "Interface to the internal network.", 3120 "ietf-ip:ipv4": { 3121 "address": [ 3122 { 3123 "ip": "198.51.100.1", 3124 "prefix-length": 24 3125 } 3126 ], 3127 "forwarding": true 3128 }, 3129 "ietf-ip:ipv6": { 3130 "address": [ 3131 { 3132 "ip": "2001:0db8:0:2::1", 3133 "prefix-length": 64 3134 } 3135 ], 3136 "forwarding": true, 3137 "autoconf": { 3138 "create-global-addresses": false 3139 }, 3140 "ietf-ipv6-unicast-routing: 3141 ipv6-router-advertisements": { 3142 "send-advertisements": true 3143 } 3144 } 3145 } 3146 ] 3147 }, 3148 "ietf-interfaces:interfaces-state": { 3149 "interface": [ 3150 { 3151 "name": "eth0", 3152 "type": "iana-if-type:ethernetCsmacd", 3153 "phys-address": "00:0C:42:E5:B1:E9", 3154 "oper-status": "up", 3155 "statistics": { 3156 "discontinuity-time": "2015-10-24T17:11:27+02:00" 3157 }, 3158 "ietf-ip:ipv4": { 3159 "forwarding": true, 3160 "mtu": 1500, 3161 "address": [ 3162 { 3163 "ip": "192.0.2.1", 3164 "prefix-length": 24 3165 } 3166 ] 3167 }, 3168 "ietf-ip:ipv6": { 3169 "forwarding": true, 3170 "mtu": 1500, 3171 "address": [ 3172 { 3173 "ip": "2001:0db8:0:1::1", 3174 "prefix-length": 64 3175 } 3176 ], 3177 "ietf-ipv6-unicast-routing: 3178 ipv6-router-advertisements": { 3179 "send-advertisements": false 3180 } 3181 } 3182 }, 3183 { 3184 "name": "eth1", 3185 "type": "iana-if-type:ethernetCsmacd", 3186 "phys-address": "00:0C:42:E5:B1:EA", 3187 "oper-status": "up", 3188 "statistics": { 3189 "discontinuity-time": "2015-10-24T17:11:29+02:00" 3190 }, 3191 "ietf-ip:ipv4": { 3192 "forwarding": true, 3193 "mtu": 1500, 3194 "address": [ 3195 { 3196 "ip": "198.51.100.1", 3197 "prefix-length": 24 3198 } 3199 ] 3200 }, 3201 "ietf-ip:ipv6": { 3202 "forwarding": true, 3203 "mtu": 1500, 3204 "address": [ 3205 { 3206 "ip": "2001:0db8:0:2::1", 3207 "prefix-length": 64 3208 } 3209 ], 3210 "ietf-ipv6-unicast-routing: 3211 ipv6-router-advertisements": { 3212 "send-advertisements": true, 3213 "prefix-list": { 3214 "prefix": [ 3215 { 3216 "prefix-spec": "2001:db8:0:2::/64" 3217 } 3218 ] 3219 } 3220 } 3221 } 3222 } 3223 ] 3224 }, 3225 "ietf-routing:routing": { 3226 "router-id": "192.0.2.1", 3227 "control-plane-protocols": { 3228 "control-plane-protocol": [ 3229 { 3230 "type": "ietf-routing:static", 3231 "name": "st0", 3232 "description": 3233 "Static routing is used for the internal network.", 3234 "static-routes": { 3235 "ietf-ipv4-unicast-routing:ipv4": { 3236 "route": [ 3237 { 3238 "destination-prefix": "0.0.0.0/0", 3239 "next-hop": { 3240 "next-hop-address": "192.0.2.2" 3241 } 3242 } 3243 ] 3244 }, 3245 "ietf-ipv6-unicast-routing:ipv6": { 3246 "route": [ 3247 { 3248 "destination-prefix": "::/0", 3249 "next-hop": { 3250 "next-hop-address": "2001:db8:0:1::2" 3251 } 3252 } 3253 ] 3254 } 3256 } 3257 } 3258 ] 3259 } 3260 "ribs": { 3261 "rib": [ 3262 { 3263 "name": "ipv4-master", 3264 "address-family": 3265 "ietf-ipv4-unicast-routing:ipv4-unicast", 3266 "default-rib": true, 3267 "routes": { 3268 "route": [ 3269 { 3270 "ietf-ipv4-unicast-routing:destination-prefix": 3271 "192.0.2.1/24", 3272 "next-hop": { 3273 "outgoing-interface": "eth0" 3274 }, 3275 "route-preference": 0, 3276 "source-protocol": "ietf-routing:direct", 3277 "last-updated": "2015-10-24T17:11:27+02:00" 3278 }, 3279 { 3280 "ietf-ipv4-unicast-routing:destination-prefix": 3281 "198.51.100.0/24", 3282 "next-hop": { 3283 "outgoing-interface": "eth1" 3284 }, 3285 "source-protocol": "ietf-routing:direct", 3286 "route-preference": 0, 3287 "last-updated": "2015-10-24T17:11:27+02:00" 3288 }, 3289 { 3290 "ietf-ipv4-unicast-routing:destination-prefix": 3291 "0.0.0.0/0", 3292 "source-protocol": "ietf-routing:static", 3293 "route-preference": 5, 3294 "next-hop": { 3295 "ietf-ipv4-unicast-routing:next-hop-address": 3296 "192.0.2.2" 3297 }, 3298 "last-updated": "2015-10-24T18:02:45+02:00" 3299 } 3300 ] 3301 } 3302 }, 3303 { 3304 "name": "ipv6-master", 3305 "address-family": 3306 "ietf-ipv6-unicast-routing:ipv6-unicast", 3307 "default-rib": true, 3308 "routes": { 3309 "route": [ 3310 { 3311 "ietf-ipv6-unicast-routing:destination-prefix": 3312 "2001:db8:0:1::/64", 3313 "next-hop": { 3314 "outgoing-interface": "eth0" 3315 }, 3316 "source-protocol": "ietf-routing:direct", 3317 "route-preference": 0, 3318 "last-updated": "2015-10-24T17:11:27+02:00" 3319 }, 3320 { 3321 "ietf-ipv6-unicast-routing:destination-prefix": 3322 "2001:db8:0:2::/64", 3323 "next-hop": { 3324 "outgoing-interface": "eth1" 3325 }, 3326 "source-protocol": "ietf-routing:direct", 3327 "route-preference": 0, 3328 "last-updated": "2015-10-24T17:11:27+02:00" 3329 }, 3330 { 3331 "ietf-ipv6-unicast-routing:destination-prefix": 3332 "::/0", 3333 "next-hop": { 3334 "ietf-ipv6-unicast-routing:next-hop-address": 3335 "2001:db8:0:1::2" 3336 }, 3337 "source-protocol": "ietf-routing:static", 3338 "route-preference": 5, 3339 "last-updated": "2015-10-24T18:02:45+02:00" 3340 } 3341 ] 3342 } 3343 } 3344 ] 3345 } 3346 }, 3347 } 3349 Acknowledgments 3351 The authors wish to thank Nitin Bahadur, Martin Bjorklund, Dean 3352 Bogdanovic, Jeff Haas, Joel Halpern, Wes Hardaker, Sriganesh Kini, 3353 David Lamparter, Andrew McGregor, Jan Medved, Xiang Li, Stephane 3354 Litkowski, Thomas Morin, Tom Petch, Yingzhen Qu, Bruno Rijsman, 3355 Juergen Schoenwaelder, Phil Shafer, Dave Thaler, Yi Yang, 3356 Derek Man-Kit Yeung, and Jeffrey Zhang for their helpful comments and 3357 suggestions. 3359 Authors' Addresses 3361 Ladislav Lhotka 3362 CZ.NIC 3364 EMail: lhotka@nic.cz 3366 Acee Lindem 3367 Cisco Systems 3369 EMail: acee@cisco.com 3371 Yingzhen Qu 3372 Futurewei Technologies, Inc. 3373 2330 Central Expressway 3374 Santa Clara CA 95050 3375 USA 3377 EMail: yingzhen.qu@huawei.com