idnits 2.17.1 draft-ietf-rtgwg-yang-rip-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 134 has weird spacing: '...et-name pre...' == Line 215 has weird spacing: '...nterval uin...' == Line 221 has weird spacing: '...address ine...' == Line 246 has weird spacing: '...et-name pre...' -- The document date (February 2, 2016) is 3006 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) == Missing Reference: 'RFC2119' is mentioned on line 84, but not defined == Missing Reference: 'RFC3688' is mentioned on line 1506, but not defined == Unused Reference: 'RFC6991' is defined on line 1532, but no explicit reference was found in the text == Unused Reference: 'RFC1724' is defined on line 1544, but no explicit reference was found in the text == Unused Reference: 'RFC6087' is defined on line 1549, but no explicit reference was found in the text -- Obsolete informational reference (is this intentional?): RFC 6087 (Obsoleted by RFC 8407) Summary: 0 errors (**), 0 flaws (~~), 10 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group X. Liu 2 Internet-Draft P. Sarda 3 Intended status: Standards Track Ericsson 4 Expires: August 2, 2016 V. Choudhary 5 Huawei Technologies 6 February 2, 2016 8 A YANG Data Model for Routing Information Protocol (RIP) 9 draft-ietf-rtgwg-yang-rip-01.txt 11 Abstract 13 This document describes a data model for the Routing Information 14 Protocol (RIP). Both RIP version 2 and RIPng are covered. 16 Status of this Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF), its areas, and its working groups. Note that 23 other groups may also distribute working documents as Internet- 24 Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/ietf/1id-abstracts.txt 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html 37 This Internet-Draft will expire on January 1, 2015. 39 Copyright Notice 41 Copyright (c) 2016 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction...................................................2 57 1.1. Terminology...............................................2 58 1.2. Tree Diagrams.............................................3 59 2. RIP YANG model overview........................................3 60 3. RIP YANG module................................................8 61 4. IANA Considerations...........................................37 62 5. Security Considerations.......................................37 63 6. References....................................................37 64 6.1. Normative References.....................................37 65 6.2. Informative References...................................38 67 1. Introduction 69 This document introduces a YANG [RFC6020] data model for the Routing 70 Information Protocol (RIP)[RFC2453][RFC2080]. RIP was designed to 71 work as an Interior Gateway Protocol (IGP) in moderate-size 72 Autonomous Systems (AS). 74 This YANG model supports both RIP version 2 and RIPng. RIP version 2 75 (defined in [RFC2453]) supports IPv4. RIPng (defined in [RFC2080]) 76 supports IPv6. 78 1.1. Terminology 80 The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 81 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 82 "OPTIONAL" in this document are to be interpreted as described in BCP 83 14, [RFC2119]. 85 The following terms are defined in [RFC6020] and are not redefined 86 here: 88 o augment 90 o data model 91 o data node 93 1.2. Tree Diagrams 95 A simplified graphical representation of the data model is used in 96 this document. The meaning of the symbols in these diagrams is as 97 follows: 99 o Brackets "[" and "]" enclose list keys. 101 o Curly braces "{" and "}" contain names of optional features 102 that make the corresponding node conditional. 104 o Abbreviations before data node names: "rw" means configuration 105 (read-write), and "ro" means state data (read-only). 107 o Symbols after data node names: "?" means an optional node, "!" 108 means a presence container, and "*" denotes a list and leaf- 109 list. 111 o Parentheses enclose choice and case nodes, and case nodes are 112 also marked with a colon (":"). 114 o Ellipsis ("...") stands for contents of subtrees that are not 115 shown. 117 2. RIP YANG model overview 119 This document defines the YANG module "ietf-rip", which has the 120 following structure: 122 module: ietf-rip 123 augment /rt:routing/rt:routing-instance/rt:routing-protocols/ 124 rt:routing-protocol: 125 +--rw rip 126 +--rw originate-default-route! 127 | +--rw route-policy? route-policy-ref 128 +--rw default-metric? uint8 129 +--rw distance? uint8 130 +--rw triggered-update-threshold? uint8 131 +--rw maximum-paths? uint8 132 +--rw output-delay? uint8 133 +--rw distribute-list* [prefix-set-name direction] 134 | +--rw prefix-set-name prefix-set-ref 135 | +--rw direction enumeration 136 | +--rw if-name? if:interface-ref 137 +--rw redistribute 138 | +--rw bgp* [asn] 139 | | +--rw asn inet:as-number 140 | | +--rw metric? uint8 141 | | +--rw route-policy? route-policy-ref 142 | +--rw cg-nat! 143 | | +--rw metric? uint8 144 | | +--rw route-policy? route-policy-ref 145 | +--rw connected! 146 | | +--rw metric? uint8 147 | | +--rw route-policy? route-policy-ref 148 | +--rw ipsec! 149 | | +--rw metric? uint8 150 | | +--rw route-policy? route-policy-ref 151 | +--rw isis* [instance] 152 | | +--rw instance leafref 153 | | +--rw level? enumeration 154 | | +--rw metric? uint8 155 | | +--rw route-policy? route-policy-ref 156 | +--rw nat! 157 | | +--rw metric? uint8 158 | | +--rw route-policy? route-policy-ref 159 | +--rw ospfv2* [instance] 160 | | +--rw instance leafref 161 | | +--rw route-type? ospf:route-type 162 | | +--rw metric? uint8 163 | | +--rw route-policy? route-policy-ref 164 | +--rw ospfv3* [instance] 165 | | +--rw instance leafref 166 | | +--rw route-type? ospf:route-type 167 | | +--rw metric? uint8 168 | | +--rw route-policy? route-policy-ref 169 | +--rw ripv2* [instance] 170 | | +--rw instance leafref 171 | | +--rw metric? uint8 172 | | +--rw route-policy? route-policy-ref 173 | +--rw ripng* [instance] 174 | | +--rw instance leafref 175 | | +--rw metric? uint8 176 | | +--rw route-policy? route-policy-ref 177 | +--rw static! 178 | +--rw metric? uint8 179 | +--rw route-policy? route-policy-ref 180 +--rw timers 181 | +--rw update-interval? uint16 182 | +--rw invalid-interval? uint16 183 | +--rw holddown-interval? uint16 184 | +--rw flush-interval? uint16 185 +--rw interface* [interface] 186 +--rw interface if:interface-ref 187 +--rw authentication 188 | +--rw (auth-type-selection)? 189 | +--:(auth-key-chain) 190 | | +--rw key-chain? key-chain:key-chain-ref 191 | +--:(auth-key) 192 | +--rw key? string 193 | +--rw crypto-algorithm 194 | +--rw (algorithm)? 195 | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}? 196 | | +--rw hmac-sha1-12? empty 197 | +--:(md5) 198 | | +--rw md5? empty 199 | +--:(sha-1) 200 | | +--rw sha-1? empty 201 | +--:(hmac-sha-1) 202 | | +--rw hmac-sha-1? empty 203 | +--:(hmac-sha-256) 204 | | +--rw hmac-sha-256? empty 205 | +--:(hmac-sha-384) 206 | | +--rw hmac-sha-384? empty 207 | +--:(hmac-sha-512) 208 | +--rw hmac-sha-512? empty 209 +--rw bfd {bfd}? 210 | +--rw enabled? boolean 211 | +--rw local-multiplier? multiplier 212 | +--rw (interval-config-type)? 213 | +--:(tx-rx-intervals) 214 | | +--rw desired-min-tx-interval uint32 215 | | +--rw required-min-rx-interval uint32 216 | +--:(single-interval) 217 | +--rw min-interval uint32 218 +--rw cost? uint8 219 +--rw neighbors {neighbor-configuration}? 220 | +--rw neighbor* [address] 221 | +--rw address inet:ip-address 222 +--rw no-listen? empty 223 +--rw no-supply? empty 224 +--rw originate-default-route! 225 | +--rw route-policy? route-policy-ref 226 +--rw split-horizon? enumeration 227 +--rw summary-address 228 | +--rw address? inet:ip-prefix 229 | +--rw metric? uint8 230 +--rw timers 231 +--rw update-interval? uint16 232 +--rw invalid-interval? uint16 233 +--rw holddown-interval? uint16 234 +--rw flush-interval? uint16 235 augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/ 236 rt:routing-protocol: 237 +--ro rip 238 +--ro originate-default-route! 239 | +--ro route-policy? route-policy-ref 240 +--ro default-metric? uint8 241 +--ro distance? uint8 242 +--ro triggered-update-threshold? uint8 243 +--ro maximum-paths? uint8 244 +--ro output-delay? uint8 245 +--ro distribute-list* [prefix-set-name direction] 246 | +--ro prefix-set-name prefix-set-ref 247 | +--ro direction enumeration 248 | +--ro if-name? if:interface-ref 249 +--ro next-triggered-update? uint32 250 +--ro num-of-routes? uint32 251 +--ro timers 252 | +--ro update-interval? uint16 253 | +--ro invalid-interval? uint16 254 | +--ro holddown-interval? uint16 255 | +--ro flush-interval? uint16 256 +--ro interface* [interface] 257 | +--ro interface if:interface-ref 258 | +--ro oper-status? enumeration 259 | +--ro cost? uint8 260 | +--ro listen? boolean 261 | +--ro next-full-update? uint32 262 | +--ro originate-default-route? boolean 263 | +--ro poison-reverse? boolean 264 | +--ro split-horizon? boolean 265 | +--ro supply? boolean 266 | +--ro valid-address? boolean 267 | +--ro timers 268 | | +--ro update-interval? uint16 269 | | +--ro invalid-interval? uint16 270 | | +--ro holddown-interval? uint16 271 | | +--ro flush-interval? uint16 272 | +--ro statistics {interface-statistics}? 273 | +--ro discontinuity-time? yang:date-and-time 274 | +--ro bad-packets-rcvd? yang:counter32 275 | +--ro bad-routes-rcvd? yang:counter32 276 | +--ro updates-sent? yang:counter32 277 +--ro ipv4 278 | +--ro neighbors 279 | | +--ro neighbor* [ipv4-address] 280 | | +--ro ipv4-address inet:ipv4-address 281 | | +--ro last-update? yang:date-and-time 282 | | +--ro bad-packets-rcvd? yang:counter32 283 | | +--ro bad-routes-rcvd? yang:counter32 284 | +--ro routes 285 | +--ro route* [ipv4-prefix] 286 | +--ro ipv4-prefix inet:ipv4-prefix 287 | +--ro next-hop? inet:ipv4- 288 address 289 | +--ro interface? if:interface-ref 290 | +--ro redistributed? boolean 291 | +--ro route-type? enumeration 292 | +--ro metric? uint8 293 | +--ro expire-time? uint16 294 | +--ro deleted? boolean 295 | +--ro holddown? boolean 296 | +--ro need-triggered-update? boolean 297 | +--ro inactive? boolean 298 | +--ro flush-expire-before-holddown? boolean 299 +--ro ipv6 300 | +--ro neighbors 301 | | +--ro neighbor* [ipv6-address] 302 | | +--ro ipv6-address inet:ipv6-address 303 | | +--ro last-update? yang:date-and-time 304 | | +--ro bad-packets-rcvd? yang:counter32 305 | | +--ro bad-routes-rcvd? yang:counter32 306 | +--ro routes 307 | +--ro route* [ipv6-prefix] 308 | +--ro ipv6-prefix inet:ipv6-prefix 309 | +--ro next-hop? inet:ipv6- 310 address 311 | +--ro interface? if:interface-ref 312 | +--ro redistributed? boolean 313 | +--ro route-type? enumeration 314 | +--ro metric? uint8 315 | +--ro expire-time? uint16 316 | +--ro deleted? boolean 317 | +--ro holddown? boolean 318 | +--ro need-triggered-update? boolean 319 | +--ro inactive? boolean 320 | +--ro flush-expire-before-holddown? boolean 321 +--ro statistics {global-statistics}? 322 +--ro discontinuity-time? yang:date-and-time 323 +--ro requests-rcvd? yang:counter32 324 +--ro requests-sent? yang:counter32 325 +--ro responses-rcvd? yang:counter32 326 +--ro responses-sent? yang:counter32 327 rpcs: 328 +---x clear-rip-route 329 +---w input 330 +---w routing-instance? rt:routing-instance-ref 331 +---w rip-instance? Leafref 333 3. RIP YANG module 335 file "ietf-rip@2016-01-28.yang" 336 module ietf-rip { 337 namespace "urn:ietf:params:xml:ns:yang:ietf-rip"; 338 // replace with IANA namespace when assigned 339 prefix rip; 340 import ietf-inet-types { 341 prefix "inet"; 342 } 344 import ietf-yang-types { 345 prefix "yang"; 346 } 348 import ietf-interfaces { 349 prefix "if"; 350 } 352 import ietf-ip { 353 prefix "ip"; 354 } 356 import ietf-routing { 357 prefix "rt"; 358 } 360 import ietf-key-chain { 361 prefix "key-chain"; 362 } 364 import ietf-bfd { 365 prefix "bfd"; 366 } 368 import routing-policy { 369 prefix "policy"; 370 } 372 import ietf-ospf { 373 prefix "ospf"; 374 } 376 organization "TBD"; 377 contact "TBD"; 378 description 379 "This YANG module defines a model for managing Routing 380 Information Protocol (RIP), including RIP version 2 and RIPng."; 382 revision 2016-01-28 { 383 description 384 "Initial revision."; 385 reference 386 "RFC 2453: RIP Version 2. 387 RFC 2080: RIPng for IPv6. 388 RFC 1724: RIP Version 2 MIB Extension."; 389 } 391 /* 392 * Features 393 */ 394 feature bfd { 395 description 396 "This feature indicates that the system supports BFD."; 397 } 399 feature bfd-protocol-parms { 400 description 401 "BFD protocol specific parameters support."; 402 } 404 feature global-statistics { 405 description 406 "This feature indicates that the system supports collecting 407 global statistic data."; 408 } 410 feature interface-statistics { 411 description 412 "This feature indicates that the system supports collecting 413 per-interface statistic data."; 414 } 416 feature neighbor-configuration { 417 description 418 "This feature indicates that the system supports 419 neighbor configuration."; 420 } 421 /* 422 * Typedefs 423 */ 425 typedef prefix-set-ref { 426 type leafref { 427 path "/policy:routing-policy/policy:defined-sets/" 428 + "policy:prefix-sets/policy:prefix-set/" 429 + "policy:prefix-set-name"; 430 } 431 description 432 "A type for a reference to a prefix list."; 433 } 435 typedef route-policy-ref { 436 type leafref { 437 path "/policy:routing-policy/policy:policy-definitions/" 438 + "policy:policy-definition/policy:name"; 439 } 440 description 441 "A type for a reference to a route policy."; 442 } 444 /* 445 * Identities 446 */ 448 identity rip { 449 base "rt:routing-protocol"; 450 description "Identity for the RIP routing protocol."; 451 } 453 identity ripv2 { 454 base "rip:rip"; 455 description "RIPv2"; 456 } 458 identity ripng { 459 base "rip:rip"; 460 description "RIPng"; 461 } 462 /* 463 * Groupings 464 */ 466 grouping originate-default-route-container { 467 description 468 "Container for setting of originating default route."; 469 container originate-default-route { 470 presence "Present if originating default route is enabled."; 471 description 472 "Injects the default route into the RIP or RIPng 473 instance."; 474 leaf route-policy { 475 type route-policy-ref; 476 description 477 "The conditions of the route policy are applied to the 478 default 479 route."; 480 } 481 } 482 } 484 grouping redistribute-container { 485 description 486 "Container of redistribute attributes."; 488 container redistribute { 489 description 490 "Redistributes routes learned from other routing protocols 491 into the RIP routing instance."; 492 list bgp { 493 key "asn"; 494 description 495 "Redistributes routes from the specified BGP autonomous 496 system (AS) into the RIP routing instance."; 497 leaf asn { 498 type inet:as-number; 499 description 500 "BFP autonomous system (AS) number."; 501 } 502 uses redistribute-route-policy-attributes; 503 } 504 container cg-nat { 505 presence 506 "Present if Carrier Grade Network Address Translation 507 (CGNAT) routes are redistributed."; 508 description 509 "Carrier Grade Network Address Translation (CGNAT) 510 routes."; 511 uses redistribute-route-policy-attributes; 512 } 513 container connected { 514 presence 515 "Present if directly attached network routes are 516 redistributed."; 517 description 518 "Redistributes directly attached networks into the RIP 519 routing instance."; 520 uses redistribute-route-policy-attributes; 521 } 522 container ipsec { 523 presence 524 "Present if IP security routing instance routes 525 are redistributed."; 526 description 527 "Redistributes routes from the IP security routing 528 instance into the RIP routing instance."; 529 uses redistribute-route-policy-attributes; 530 } 531 list isis { 532 key "instance"; 533 description 534 "Redistributes ISIS routes."; 535 leaf instance { 536 type leafref { 537 path "../../../../../rt:routing-protocol/rt:name"; 538 } 539 must "../../../../../rt:routing-protocol" 540 + "[rt:name = current()]/type = 'isis'" { 541 description 542 "The type of the routing protocol must be 'isis'"; 544 } 545 description 546 "Redistributes routes from the specified IS-IS routing 547 instance into the RIP routing instance."; 548 } 549 leaf level { 550 type enumeration { 551 enum 1 { 552 description "ISIS level 1 routes."; 553 } 554 enum 2 { 555 description "ISIS level 1 routes."; 556 } 557 enum 1-2 { 558 description "ISIS level 1-2 routes."; 559 } 560 } 561 description 562 "ISIS level."; 563 } 564 uses redistribute-route-policy-attributes; 565 } 566 container nat { 567 presence 568 "Present if Network Address Translation (NAT) routes 569 are redistributed."; 570 description 571 "Redistributes Network Address Translation (NAT) 572 routes into the RIP routing instance."; 573 uses redistribute-route-policy-attributes; 574 } 575 list ospfv2 { 576 when "../../../rt:type = 'rip:ripv2'" { 577 description 578 "Applicable to RIPv2."; 579 } 580 key "instance"; 581 description 582 "Redistributes routes from the specified OSPF routing 583 instance into the RIP routing instance."; 584 leaf instance { 585 type leafref { 586 path "../../../../../rt:routing-protocol/rt:name"; 587 } 588 must "../../../../../rt:routing-protocol" 589 + "[rt:name = current()]/type = 'ospfv2'" { 590 description 591 "The type of the routing protocol must be 'ospfv2'"; 592 } 593 description 594 "OSPF instance ID. Redistributes routes from the 595 specified OSPF routing instance into the RIP routing 596 instance. "; 597 } 598 leaf route-type { 599 type ospf:route-type; 600 description 601 "Redistributes only those OSPF routes matching the 602 specified route type into the RIP routing instance."; 603 } 604 uses redistribute-route-policy-attributes; 605 } 606 list ospfv3 { 607 when "../../../rt:type = 'rip:ripng'" { 608 description 609 "Applicable to RIPng."; 610 } 611 key "instance"; 612 description 613 "Redistributes routes from the specified OSPF routing 614 instance into the RIP routing instance."; 615 leaf instance { 616 type leafref { 617 path "../../../../../rt:routing-protocol/rt:name"; 618 } 619 must "../../../../../rt:routing-protocol" 620 + "[rt:name = current()]/type = 'ospfv3'" { 621 description 622 "The type of the routing protocol must be 'ospfv3'"; 623 } 624 description 625 "OSPF instance ID. Redistributes routes from the 626 specified OSPF routing instance into the RIP routing 627 instance. "; 628 } 629 leaf route-type { 630 type ospf:route-type; 631 description 632 "Redistributes only those OSPF routes matching the 633 specified route type into the RIP routing instance."; 634 } 635 uses redistribute-route-policy-attributes; 636 } 637 list ripv2 { 638 when "../../../rt:type = 'rip:ripv2'" { 639 description 640 "Applicable to RIPv2."; 641 } 642 key "instance"; 643 description 644 "Redistributes routes from another RIP routing instance 645 into the current RIP routing instance."; 646 leaf instance { 647 type leafref { 648 path "../../../../../rt:routing-protocol/rt:name"; 649 } 650 must "../../../../../rt:routing-protocol" 651 + "[rt:name = current()]/type = 'ripv2'" { 652 description 653 "The type of the routing protocol must be 'ripv2'"; 654 } 655 description 656 "Redistributes routes from the specified RIP routing 657 instance into the RIP routing instance."; 658 } 659 uses redistribute-route-policy-attributes; 660 } 661 list ripng { 662 when "../../../rt:type = 'rip:ripng'" { 663 description 664 "Applicable to RIPng."; 665 } 666 key "instance"; 667 description 668 "Redistributes routes from another RIPng routing instance 669 into the current RIPng routing instance."; 670 leaf instance { 671 type leafref { 672 path "../../../../../rt:routing-protocol/rt:name"; 673 } 674 must "../../../../../rt:routing-protocol" 675 + "[rt:name = current()]/type = 'ripng'" { 676 description 677 "The type of the routing protocol must be 'ripng'"; 678 } 679 description 680 "Redistributes routes from the specified RIPng routing 681 instance into the RIPng routing instance."; 682 } 683 uses redistribute-route-policy-attributes; 684 } 685 container static { 686 presence "Present if redistributing static routes."; 687 description 688 "Redistributes static routes into the RIP routing 689 instance."; 690 uses redistribute-route-policy-attributes; 691 } 692 } // redistribute 693 } // redistribute-container 695 grouping redistribute-route-policy-attributes { 696 description 697 "Attributes for redistributing a route policy."; 698 leaf metric { 699 type uint8 { 700 range 0..16; 701 } 702 description 703 "Metric used for the redistributed route. If a metric is 704 not specified, the metric configured with the 705 default-metric attribute in RIP router configuration is 706 used. If the default-metric attribute has not been 707 configured, the default metric for redistributed routes 708 is 0."; 709 } 710 leaf route-policy { 711 type route-policy-ref; 712 description 713 "Applies the conditions of the specified route policy to 714 routes that are redistributed into the RIP routing 715 instance."; 716 } 717 } // redistribute-route-policy-attributes 719 grouping timers-container { 720 description 721 "Container for settings of basic timers"; 722 container timers { 723 must "invalid-interval >= (update-interval * 3)" { 724 description 725 "invalid-interval must be at least three times the value 726 for the update-interval argument."; 727 } 728 must "flush-interval > invalid-interval" { 729 description 730 "flush-interval must be larger than the value for the 731 invalid-interval argument"; 732 } 733 description 734 "Timers for the specified RIP or RIPng instance or 735 interface."; 736 leaf update-interval { 737 type uint16 { 738 range 1..32767; 739 } 740 units seconds; 741 default 30; 742 description 743 "Interval at which RIP or RIPng updates are sent."; 744 } 745 leaf invalid-interval { 746 type uint16 { 747 range 1..32767; 748 } 749 units seconds; 750 default 180; 751 description 752 "Interval before a route is declared invalid after no 753 updates are received. This value is at least three times 754 the value for the update-interval argument."; 755 } 756 leaf holddown-interval { 757 type uint16 { 758 range 1..32767; 759 } 760 units seconds; 761 default 180; 762 description 763 "Interval before better routes are released."; 764 } 765 leaf flush-interval { 766 type uint16 { 767 range 1..32767; 768 } 769 units seconds; 770 default 240; 771 description 772 "Interval before a route is flushed from the routing 773 table. This value must be larger than the value for the 774 invalid-interval argument."; 775 } 776 } // timers 777 } 779 grouping global-attributes { 780 description 781 "Global configuration and state attributes."; 782 uses originate-default-route-container; 784 leaf default-metric { 785 type uint8 { 786 range 0..16; 787 } 788 default 0; 789 description 790 "Set the default metric."; 791 } 793 leaf distance { 794 type uint8 { 795 range 1..255; 796 } 797 default 120; 798 description 799 "The administrative distance of the RIP or RIPng for the 800 current RIP or RIPng instance."; 801 } 803 leaf triggered-update-threshold { 804 type uint8 { 805 range 1..30; 806 } 807 units seconds; 808 default 5; 809 description 810 "This attribute is used to suppress triggered updates. 811 When the arrival of a regularly scheduled update matches the 812 number of seconds or is less than the number seconds 813 configured with this attribute, the triggered update is 814 suppressed."; 815 } 817 leaf maximum-paths { 818 type uint8 { 819 range 1..16; 820 } 821 default 8; 822 description 823 "The number of multiple equal-cost RIP or RIPng routes 824 that can be used as the best paths for balancing the load 825 of outgoing traffic packets."; 826 } 828 leaf output-delay { 829 type uint8 { 830 range 1..50; 832 } 833 units milliseconds; 834 description 835 "A delay time between packets sent in multipacket 836 RIP or RIPng updates."; 837 } 838 } // global-attributes 840 grouping distribute-lists { 841 description 842 "Grouping for distribute lists."; 843 list distribute-list { 844 key "prefix-set-name direction"; 845 description 846 "List of distribute-lists, which are used to filter in-coming 847 or out-going routing updates."; 849 leaf prefix-set-name { 850 type prefix-set-ref; 851 description 852 "Reference to a prefix list to be applied to RIP or 853 RIPng packets."; 854 } 856 leaf direction { 857 type enumeration { 858 enum "in" { 859 description 860 "Apply the distribute-list to in-coming routes."; 861 } 862 enum "out" { 863 description 864 "Apply the distribute-list to out-going routes."; 865 } 866 } 867 description 868 "Direction of the routing updates."; 869 } 871 leaf if-name { 872 type if:interface-ref; 873 description 874 "Reference to an interface to which the prefix list is 875 applied."; 876 } 877 } 878 } // distribute-lists 880 grouping route-attributes { 881 description 882 "Grouping for route attributes."; 883 leaf redistributed { 884 type boolean; 885 description 886 "Redistributed routes"; 887 } 889 leaf route-type { 890 type enumeration { 891 enum connected { 892 description "Connected route."; 893 } 894 enum external { 895 description "External route."; 896 } 897 enum external-backup { 898 description "External backup route."; 899 } 900 enum rip { 901 description "RIP route."; 902 } 903 } 904 description 905 "Route type."; 906 } 907 leaf metric { 908 type uint8 { 909 range 0..16; 910 } 911 description "Route metric."; 912 } 913 leaf expire-time { 914 type uint16; 915 description "Expiration time."; 916 } 917 leaf deleted { 918 type boolean; 919 description "Deleted route."; 920 } 921 leaf holddown { 922 type boolean; 923 description "Holddown route."; 924 } 925 leaf need-triggered-update { 926 type boolean; 927 description "The route needs triggered update."; 928 } 929 leaf inactive { 930 type boolean; 931 description "The route is inactive."; 932 } 933 leaf flush-expire-before-holddown { 934 type boolean; 935 description 936 "The flush timer expired before holddown time."; 937 } 938 } // route-attribute 940 /* 941 * Configuration data nodes 942 */ 944 augment "/rt:routing/rt:routing-instance/rt:routing-protocols/" 945 + "rt:routing-protocol" { 946 when "rt:type = 'rip:ripv2' or rt:type = 'rip:ripng'" { 947 description 948 "This augment is only valid for a routing protocol instance 949 of RIP (type 'ripv2' or 'ripng')."; 950 } 951 description "RIP augmentation."; 953 container rip { 954 description 955 "RIP configuration data."; 957 uses global-attributes; 958 uses distribute-lists; 959 uses redistribute-container; 960 uses timers-container; 962 list interface { 963 key "interface"; 964 description 965 "List of RIP interfaces."; 966 leaf interface { 967 type if:interface-ref; 968 must "(../../../rt:type = 'rip:ripv2' and " 969 + "/if:interfaces/if:interface[name=current()]/" 970 + "ip:ipv4) or " 971 + "(../../../rt:type = 'rip:ripng' and " 972 + "/if:interfaces/if:interface[name=current()]/" 973 + "ip:ipv6)" { 974 error-message "Invalid interface type."; 975 description 976 "RIPv2 can be enabled on IPv4 interfae, and 977 RIPng can be enabled on IPv6 interface."; 978 } 979 description 980 "Enable RIP on this interface."; 981 } 983 container authentication { 984 when "../../../rt:type = 'rip:ripv2'" { 985 description "Only applicable to RIPv2."; 986 } 987 description 988 "Enables authentication and specifies the authentication 989 scheme for the RIP interface"; 990 choice auth-type-selection { 991 description 992 "Specify the authentication scheme. 993 The use of the key-chain reference here is: 994 1) Designed to align with other proposed protocol 995 models. 997 2) Not finalized, pending resolution of alignment with 998 the RFC published KeyTables information model."; 999 case auth-key-chain { 1000 leaf key-chain { 1001 type key-chain:key-chain-ref; 1002 description 1003 "key-chain name"; 1004 } 1005 } 1006 case auth-key { 1007 leaf key { 1008 type string; 1009 description 1010 "Key string in ASCII format."; 1011 } 1012 container crypto-algorithm { 1013 uses key-chain:crypto-algorithm-types; 1014 description 1015 "Cryptographic algorithm associated with key."; 1017 } 1018 } 1019 } 1020 } 1022 container bfd { 1023 if-feature bfd; 1024 description "BFD operation."; 1025 leaf enabled { 1026 type boolean; 1027 description 1028 "True if BFD is enabled for the interface."; 1029 } 1030 uses bfd:bfd-grouping-base-cfg-parms { 1031 if-feature bfd-protocol-parms; 1032 } 1033 } 1035 leaf cost { 1036 type uint8 { 1037 range 1..16; 1039 } 1040 default 1; 1041 description 1042 "Interface cost."; 1043 } 1045 container neighbors { 1046 if-feature neighbor-configuration; 1047 description 1048 "Specifies the RIP neighbors. Useful for a non-broadcast 1049 multiple access (NBMA) network."; 1050 list neighbor { 1051 key "address"; 1052 description 1053 "Specify a RIP neighbor on a non-broadcast network."; 1054 leaf address { 1055 type inet:ip-address; 1056 description "Neighbor IP address."; 1057 } 1058 } 1059 } 1061 leaf no-listen { 1062 type empty; 1063 description 1064 "Disable the specified interface to receive (listen to) 1065 and process RIP or RIPng packets."; 1066 } 1068 leaf no-supply { 1069 type empty; 1070 description 1071 "Disables sending of RIP or RIPng packets on the 1072 specified interface."; 1073 } 1075 uses originate-default-route-container; 1077 leaf split-horizon { 1078 type enumeration { 1079 enum simple { 1080 description 1081 "Enables simple split-horizon processing."; 1082 } 1083 enum poison { 1084 description 1085 "Enables split-horizon processing with poison 1086 reverse."; 1087 } 1088 } 1089 default simple; 1090 description 1091 "Enables RIP or RIPng split-horizon processing on the 1092 specified interface."; 1093 } 1095 container summary-address { 1096 description 1097 "Summarizes information about RIP or RIPng routes sent 1098 over the specified interface in RIP or RIPng update 1099 packets."; 1100 leaf address { 1101 type inet:ip-prefix; 1102 description 1103 "IPv4 address, in the form A.B.C.D, and the prefix 1104 length, separated by the slash (/) character; 1105 or IPv6 address, in the form A:B:C:D:E:F:G:H, and the 1106 prefix length, separated by the slash (/) character."; 1107 } 1108 leaf metric { 1109 type uint8 { 1110 range 0..16; 1111 } 1112 description 1113 "Metric used for the route. If this attribute is not 1114 used, the value set through the default-metric 1115 attribute in RIP or RIPng router configuration is 1116 used for the route. "; 1117 } 1118 } 1120 uses timers-container; 1122 } // interface 1123 } // container rip 1124 } 1126 /* 1127 * Operational state data nodes 1128 */ 1130 augment "/rt:routing-state/rt:routing-instance/" 1131 + "rt:routing-protocols/rt:routing-protocol" { 1132 when "rt:type = 'rip:ripv2' or rt:type = 'rip:ripng'" { 1133 description 1134 "This augment is only valid for a routing protocol instance 1135 of type 'ripv2' or 'ripng'."; 1136 } 1137 description 1138 "RIP state."; 1139 container rip { 1140 description "RIP operational state."; 1142 uses global-attributes; 1143 uses distribute-lists; 1145 leaf next-triggered-update { 1146 type uint32; 1147 description 1148 "Next triggered update."; 1149 } 1150 leaf num-of-routes { 1151 type uint32; 1152 description 1153 "The number of routes."; 1154 } 1156 uses timers-container; 1158 list interface { 1159 key "interface"; 1160 description 1161 "List of RIP interfaces."; 1162 leaf interface { 1163 type if:interface-ref; 1164 description 1165 "Enable RIP on this interface."; 1166 } 1167 leaf oper-status { 1168 type enumeration { 1169 enum up { 1170 description 1171 "RIPv2 or RIPng is operational on this interface."; 1172 } 1173 enum down { 1174 description 1175 "RIPv2 or RIPng is not operational on this 1176 interface."; 1177 } 1178 } 1179 description 1180 "Operational state."; 1181 } 1182 leaf cost { 1183 type uint8 { 1184 range 1..16; 1185 } 1186 default 1; 1187 description 1188 "Interface cost."; 1189 } 1190 leaf listen { 1191 type boolean; 1192 description 1193 "The interface is enabled to receive (listen to) 1194 and process RIP or RIPng packets."; 1195 } 1196 leaf next-full-update { 1197 type uint32; 1198 description 1199 "Next full update time."; 1200 } 1201 leaf originate-default-route { 1202 type boolean; 1203 description 1204 "'true' if originating default route is enabled."; 1205 } 1206 leaf poison-reverse { 1207 type boolean; 1208 description 1209 "'true' if Split Horizon with Poisoned Reverse is 1210 enabled."; 1211 } 1212 leaf split-horizon { 1213 type boolean; 1214 description 1215 "'true' if Split Horizon processing is enabled."; 1216 } 1217 leaf supply { 1218 type boolean; 1219 description 1220 "The interface is enabled to supply (send) RIP or RIPng 1221 packets."; 1222 } 1223 leaf valid-address { 1224 type boolean; 1225 description 1226 "The interface has a valid address."; 1227 } 1228 uses timers-container; 1230 container statistics { 1231 if-feature interface-statistics; 1232 description 1233 "Interface statistic counters."; 1234 leaf discontinuity-time { 1235 type yang:date-and-time; 1236 description 1237 "The time on the most recent occasion at which any one 1238 or more of the statistic counters suffered a 1239 discontinuity. If no such discontinuities have occurred 1240 since the last re-initialization of the local 1241 management subsystem, then this node contains the time 1242 the local management subsystem re-initialized itself."; 1243 } 1244 leaf bad-packets-rcvd { 1245 type yang:counter32; 1246 description 1247 "The number of RIP invalid packets received by 1248 the RIP process which were subsequently discarded 1249 for any reason (e.g. a version 0 packet, or an 1250 unknown command type)."; 1251 } 1252 leaf bad-routes-rcvd { 1253 type yang:counter32; 1254 description 1255 "The number of routes, in valid RIP packets, 1256 which were ignored for any reason (e.g. unknown 1257 address family, or invalid metric)."; 1258 } 1259 leaf updates-sent { 1260 type yang:counter32; 1261 description 1262 "The number of triggered RIP updates actually 1263 sent on this interface. This explicitly does 1264 NOT include full updates sent containing new 1265 information."; 1266 } 1267 } 1268 } // interface 1270 container ipv4 { 1271 when "../../rt:type = 'rip:ripv2'" { 1272 description 1273 "IPv4 address family is supported by RIPv2."; 1274 } 1275 description 1276 "IPv4 address family information."; 1277 container neighbors { 1278 description 1279 "IPv4 neighbor information."; 1280 list neighbor { 1281 key "ipv4-address"; 1282 description 1283 "A RIPv2 RIP neighbor."; 1285 leaf ipv4-address { 1286 type inet:ipv4-address; 1287 description 1288 "IP address that a RIP neighbor is using as its 1289 source address."; 1290 } 1291 leaf last-update { 1292 type yang:date-and-time; 1293 description 1294 "The time when the most recent RIP update was 1295 received from this neighbor."; 1296 } 1297 leaf bad-packets-rcvd { 1298 type yang:counter32; 1299 description 1300 "The number of RIP invalid packets received from 1301 this neighbor which were subsequently discarded 1302 for any reason (e.g. a version 0 packet, or an 1303 unknown command type)."; 1304 } 1305 leaf bad-routes-rcvd { 1306 type yang:counter32; 1307 description 1308 "The number of routes received from this neighbor, 1309 in valid RIP packets, which were ignored for any 1310 reason (e.g. unknown address family, or invalid 1311 metric)."; 1312 } 1313 } // neighbor 1314 } // neighbors 1315 container routes { 1316 description 1317 "IPv4 route information."; 1318 list route { 1319 key "ipv4-prefix"; 1320 description 1321 "A RIPv2 IPv4 route."; 1323 leaf ipv4-prefix { 1324 type inet:ipv4-prefix; 1325 description 1326 "IP address (in the form A.B.C.D) and prefix length, 1327 separated by the slash (/) character. The range of 1328 values for the prefix-length is 0 to 32."; 1329 } 1330 leaf next-hop { 1331 type inet:ipv4-address; 1332 description 1333 "Next hop IPv4 address."; 1334 } 1335 leaf interface { 1336 type if:interface-ref; 1337 description 1338 "The interface that the route uses."; 1339 } 1340 uses route-attributes; 1341 } // route 1342 } // routes 1343 } // ipv4 1344 container ipv6 { 1345 when "../../rt:type = 'rip:ripng'" { 1346 description 1347 "IPv6 address family is supported by RIPng."; 1348 } 1349 description 1350 "IPv6 address family information."; 1351 container neighbors { 1352 description 1353 "IPv6 neighbor information."; 1354 list neighbor { 1355 key "ipv6-address"; 1356 description 1357 "A RIPv2 RIP neighbor."; 1359 leaf ipv6-address { 1360 type inet:ipv6-address; 1361 description 1362 "IP address that a RIP neighbor is using as its 1363 source address."; 1364 } 1365 leaf last-update { 1366 type yang:date-and-time; 1367 description 1368 "The time when the most recent RIP update was 1369 received from this neighbor."; 1370 } 1371 leaf bad-packets-rcvd { 1372 type yang:counter32; 1373 description 1374 "The number of RIP invalid packets received from 1375 this neighbor which were subsequently discarded 1376 for any reason (e.g. a version 0 packet, or an 1377 unknown command type)."; 1378 } 1379 leaf bad-routes-rcvd { 1380 type yang:counter32; 1381 description 1382 "The number of routes received from this neighbor, 1383 in valid RIP packets, which were ignored for any 1384 reason (e.g. unknown address family, or invalid 1385 metric)."; 1386 } 1387 } // neighbor 1388 } // neighbors 1389 container routes { 1390 description 1391 "IPv6 route information."; 1392 list route { 1393 key "ipv6-prefix"; 1394 description 1395 "A RIPng IPv6 route."; 1397 leaf ipv6-prefix { 1398 type inet:ipv6-prefix; 1399 description 1400 "IP address (in the canonical format defined in 1401 RFC5952)and prefix length, separated by the slash (/) 1402 character. The range of values for the prefix-length 1403 is 0 to 128."; 1404 } 1405 leaf next-hop { 1406 type inet:ipv6-address; 1407 description 1408 "Next hop IPv6 address."; 1410 } 1411 leaf interface { 1412 type if:interface-ref; 1413 description 1414 "The interface that the route uses."; 1415 } 1416 uses route-attributes; 1417 } // route 1418 } // routes 1419 } // ipv6 1421 container statistics { 1422 if-feature global-statistics; 1423 description 1424 "Global statistic counters."; 1425 leaf discontinuity-time { 1426 type yang:date-and-time; 1427 description 1428 "The time on the most recent occasion at which any one 1429 or more of the statistic counters suffered a 1430 discontinuity. If no such discontinuities have occurred 1431 since the last re-initialization of the local 1432 management subsystem, then this node contains the time 1433 the local management subsystem re-initialized itself."; 1434 } 1435 leaf requests-rcvd { 1436 type yang:counter32; 1437 description 1438 "The number of requests received by RIP."; 1439 } 1440 leaf requests-sent { 1441 type yang:counter32; 1442 description 1443 "The number of requests sent by RIP."; 1444 } 1445 leaf responses-rcvd { 1446 type yang:counter32; 1447 description 1448 "The number of responses received by RIP."; 1449 } 1450 leaf responses-sent { 1451 type yang:counter32; 1452 description 1453 "The number of responses sent by RIP."; 1454 } 1455 } 1456 } // rip 1457 } // augment 1459 /* 1460 * RPCs 1461 */ 1463 rpc clear-rip-route { 1464 description 1465 "Clears RIP routes from the IP routing table and routes 1466 redistributed into the RIP protocol for the specified RIP 1467 instance or for all RIP instances in the current context."; 1469 input { 1470 leaf routing-instance { 1471 type rt:routing-instance-ref; 1472 description 1473 "Routing instance name identifying a specific routing 1474 instance. 1475 This leaf is optional for the rpc. 1476 If it is specified, the rpc will clear routes in the 1477 specified routing instance; 1478 if it is not specified, the rpc will clear all routes in 1479 all routing instances."; 1480 } 1481 leaf rip-instance { 1482 type leafref { 1483 path "/rt:routing/rt:routing-instance" 1484 + "[rt:name=current()/../routing-instance]/" 1485 + "rt:routing-protocols/rt:routing-protocol/rt:name"; 1486 } 1487 description 1488 "Instance name identifying a specific RIP instance. 1489 This leaf is optional for the rpc. 1490 If it is specified, the rpc will clear all routes in the 1491 specified RIP instance; 1492 if it is not specified, the rpc will clear all routes in 1493 all RIP instances."; 1494 } 1495 } 1496 } // rcp clear-rip-route 1497 } 1498 1500 4. IANA Considerations 1502 RFC Ed.: In this section, replace all occurrences of 'XXXX' with the 1503 actual RFC number (and remove this note). 1505 This document registers the following namespace URIs in the IETF XML 1506 registry [RFC3688]: 1508 -------------------------------------------------------------------- 1509 name: ietf-rip 1510 namespace: urn:ietf:params:xml:ns:yang:ietf-rip 1511 prefix: rip 1512 reference: RFC XXXX 1513 -------------------------------------------------------------------- 1515 5. Security Considerations 1517 The configuration, state, and action data defined in this document 1518 are designed to be accessed via the NETCONF protocol [RFC6241]. The 1519 data-model by itself does not create any security implications. The 1520 security considerations for the NETCONF protocol are applicable. The 1521 NETCONF protocol used for sending the data supports authentication 1522 and encryption. 1524 6. References 1526 6.1. Normative References 1528 [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the 1529 Network Configuration Protocol (NETCONF)", RFC 6020, 1530 October 2010. 1532 [RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991, 1533 July 2013. 1535 [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Bierman, 1536 "Network Configuration Protocol (NETCONF)", RFC 6241, June 1537 2011. 1539 [RFC2453] G. Malkin, "RIP Version 2", RFC2453, November 1998. 1541 [RFC2080] G. Malkin and R. Minnear, "RIPng for IPv6", RFC2080, 1542 January 1997. 1544 [RFC1724] G. Malkin and F. Baker, "RIP Version 2 MIB Extension", 1545 RFC1724, November 1994. 1547 6.2. Informative References 1549 [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG 1550 Data Model Documents", RFC 6087, January 2011. 1552 Authors' Addresses 1554 Xufeng Liu 1555 Ericsson / Kuatro Technologies Inc. 1556 8281 Greensboro Drive, Suite 200 1557 McLean, VA 22102 1558 USA 1560 Email: xliu@kuatrotech.com 1562 Prateek Sarda 1563 Ericsson India Global Services Pvt. Ltd. 1564 Fern Icon, Survey No 28 and 36/5, Doddanakundi Village 1565 Bangalore, Karnataka 560037 1566 India 1568 Email: prateek.sarda@ericsson.com 1570 Vikram Choudhary 1571 Huawei Technologies 1572 Divyashree Techno Park, Whitefield 1573 Bangalore, Karnataka 560037 1574 India 1576 Email: vikram.choudhary@huawei.com