idnits 2.17.1 draft-ietf-rtgwg-routing-types-02.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 : ---------------------------------------------------------------------------- == There are 2 instances of lines with multicast IPv4 addresses in the document. If these are generic example addresses, they should be changed to use the 233.252.0.x range defined in RFC 5771 Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document doesn't use any RFC 2119 keywords, yet has text resembling RFC 2119 boilerplate text. -- The document date (March 3, 2017) is 2604 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) -- Looks like a reference, but probably isn't: '1' on line 1092 == Missing Reference: 'RFC3688' is mentioned on line 955, but not defined == Outdated reference: A later version (-17) exists of draft-ietf-bfd-yang-04 == Outdated reference: A later version (-17) exists of draft-ietf-idr-bgp-model-02 == Outdated reference: A later version (-29) exists of draft-ietf-ospf-yang-06 == Outdated reference: A later version (-17) exists of draft-ietf-pim-yang-05 == Outdated reference: A later version (-19) exists of draft-ietf-teas-yang-rsvp-06 == Outdated reference: A later version (-36) exists of draft-ietf-teas-yang-te-05 == Outdated reference: A later version (-10) exists of draft-ietf-bess-l2vpn-yang-02 == Outdated reference: A later version (-17) exists of draft-ietf-mpls-base-yang-01 Summary: 0 errors (**), 0 flaws (~~), 12 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group X. Liu 3 Internet-Draft Jabil 4 Intended status: Standards Track Y. Qu 5 Expires: September 4, 2017 Futurewei Technologies, Inc. 6 A. Lindem 7 Cisco Systems 8 C. Hopps 9 Deutsche Telekom 10 L. Berger 11 LabN Consulting, L.L.C. 12 March 3, 2017 14 Routing Area Common YANG Data Types 15 draft-ietf-rtgwg-routing-types-02 17 Abstract 19 This document defines a collection of common data types using the 20 YANG data modeling language. These derived common types are designed 21 to be imported by other modules defined in the routing area. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on September 4, 2017. 40 Copyright Notice 42 Copyright (c) 2017 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 58 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 2 59 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 60 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 5 62 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 63 5. Security Considerations . . . . . . . . . . . . . . . . . . . 21 64 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 21 65 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 21 66 7.1. Normative References . . . . . . . . . . . . . . . . . . 21 67 7.2. Informative References . . . . . . . . . . . . . . . . . 22 68 7.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 23 69 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24 71 1. Introduction 73 The YANG [RFC6020] [RFC7950] is a data modeling language used to 74 model configuration data, state data, Remote Procedure Calls, and 75 notifications for network management protocols. The YANG language 76 supports a small set of built-in data types and provides mechanisms 77 to derive other types from the built-in types. 79 This document introduces a collection of common data types derived 80 from the built-in YANG data types. The derived types are designed to 81 be the common types applicable for modeling in the routing area. 83 1.1. Requirements Language 85 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 86 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY" and "OPTIONAL" in this 87 document are to be interpreted as described in BCP 14, RFC 2119 88 [RFC2119]. 90 1.2. Terminology 92 The terminology for describing YANG data models is found in 93 [RFC7950]. 95 2. Overview 97 This document defines the following data types: 99 router-id 100 Router Identifiers are commonly used to identify a nodes in 101 routing and other control plane protocols. An example usage of 102 router-id can be found in [I-D.ietf-ospf-yang]. 104 address-family 105 This type defines values for use in address family identifiers. 106 The values are based on the IANA Address Family Numbers Registry 107 [1]. An example usage can be found in [I-D.ietf-idr-bgp-model]. 109 route-target 110 Route Targets (RTs) are commonly used to control the distribution 111 of virtual routing and forwarding (VRF) information, see 112 [RFC4364], in support of virtual private networks (VPNs). An 113 example usage can be found in [I-D.ietf-bess-l2vpn-yang]. 115 route-target-type 116 This type defines the import and export rules of Route Targets, as 117 descibed in Section 4.3.1 of [RFC4364]. An example usage can be 118 found in [I-D.ietf-idr-bgp-model]. 120 route-distinguisher 121 Route Distinguishers (RDs) are commonly used to identify separate 122 routes in support of virtual private networks (VPNs). For 123 example, in [RFC4364], RDs are commonly used to identify 124 independent VPNs and VRFs, and more generally, to identify 125 multiple routes to the same prefix. An example usage can be found 126 in [I-D.ietf-idr-bgp-model]. 128 ipv4-multicast-group-address 129 This type defines the representation of an IPv4 multicast group 130 address, which is in the range from 224.0.0.0 to 239.255.255.255. 131 An example usage can be found in [I-D.ietf-pim-yang]. 133 ipv6-multicast-group-address 134 This type defines the representation of an IPv6 multicast group 135 address, which is in the range of FF00::/8. An example usage can 136 be found in [I-D.ietf-pim-yang]. 138 ip-multicast-group-address 139 This type represents an IP multicast group address and is IP 140 version neutral. The format of the textual representation implies 141 the IP version. An example usage can be found in 142 [I-D.ietf-pim-yang]. 144 ipv4-multicast-source-address 145 IPv4 source address type for use in multicast control protocols. 146 This type also allows the indication of wildcard sources, i.e., 147 "*". An example of where this type may/will be used is 148 [I-D.ietf-pim-yang]. 150 ipv6-multicast-source-address 151 IPv6 source address type for use in multicast control protocols. 152 This type also allows the indication of wildcard sources, i.e., 153 "*". An example of where this type may/will be used is 154 [I-D.ietf-pim-yang]. 156 bandwidth-ieee-float32 157 Bandwidth in IEEE 754 floating point 32-bit binary format 158 [IEEE754]. Commonly used in Traffic Engineering control plane 159 protocols. An example of where this type may/will be used is 160 [I-D.ietf-ospf-yang]. 162 link-access-type 163 This type identifies the IGP link type. An example of where this 164 type may/will be used is [I-D.ietf-ospf-yang]. 166 timer-multiplier 167 This type is used in conjunction with a timer-value type. It is 168 generally used to indicate define the number of timer-value 169 intervals that may expire before a specific event must occur. 170 Examples of this include the arrival of any BFD packets, see 171 [RFC5880] Section 6.8.4, or hello_interval in [RFC3209]. Example 172 of where this type may/will be used is [I-D.ietf-idr-bgp-model] 173 and [I-D.ietf-teas-yang-rsvp]. 175 timer-value-seconds16 176 This type covers timers which can be set in seconds, not set, or 177 set to infinity. This type supports a range of values that can be 178 represented in a uint16 (2 octets). An example of where this type 179 may/will be used is [I-D.ietf-ospf-yang]. 181 timer-value-seconds32 182 This type covers timers which can be set in seconds, not set, or 183 set to infinity. This type supports a range of values that can be 184 represented in a uint32 (4 octets). An example of where this type 185 may/will be used is [I-D.ietf-teas-yang-rsvp]. 187 timer-value-milliseconds 188 This type covers timers which can be set in milliseconds, not set, 189 or set to infinity. This type supports a range of values that can 190 be represented in a uint32 (4 octets). Examples of where this 191 type may/will be used include [I-D.ietf-teas-yang-rsvp] and 192 [I-D.ietf-bfd-yang]. 194 generalized-label 195 This type represents a generalized label for Generalized Multi- 196 Protocol Label Switching (GMPLS) [RFC3471]. The Generalized Label 197 does not identify its type, which is known from the context. An 198 example usage can be found in [I-D.ietf-teas-yang-te]. 200 mpls-label-special-purpose 201 This type represents the special-purpose Multiprotocol Label 202 Switching (MPLS) label values [RFC7274]. An example usage can be 203 found in [I-D.ietf-mpls-base-yang]. 205 mpls-label-general-use 206 The 20 bits label values in an MPLS label stack entry, specified 207 in [RFC3032]. This label value does not include the encodings of 208 Traffic Class and TTL (time to live). The label range specified 209 by this type is for general use, with special-purpose MPLS label 210 values excluded. An example usage can be found in 211 [I-D.ietf-mpls-base-yang]. 213 mpls-label 214 The 20 bits label values in an MPLS label stack entry, specified 215 in [RFC3032]. This label value does not include the encodings of 216 Traffic Class and TTL (time to live). The label range specified 217 by this type covers the general use values and the special-purpose 218 label values. An example usage can be found in 219 [I-D.ietf-mpls-base-yang]. 221 This document defines the following YANG groupings: 223 mpls-label-stack 224 This grouping defines a reusable collection of schema nodes 225 representing an MPLS label stack [RFC3032]. An example usage can 226 be found in [I-D.ietf-mpls-base-yang]. 228 vpn-route-targets 229 This grouping defines a reusable collection of schema nodes 230 representing Route Target import-export rules used in the BGP 231 enabled Virtual Private Networks (VPNs). [RFC4364][RFC4664]. An 232 example usage can be found in [I-D.ietf-bess-l2vpn-yang]. 234 3. YANG Module 236 file "ietf-routing-types@2017-02-27.yang" 237 module ietf-routing-types { 238 namespace "urn:ietf:params:xml:ns:yang:ietf-routing-types"; 239 prefix "rt-types"; 241 import ietf-yang-types { 242 prefix "yang"; 243 } 245 import ietf-inet-types { 246 prefix "inet"; 247 } 249 organization "IETF Routing Area Working Group (rtgwg)"; 251 contact 252 "Routing Area Working Group - "; 254 description 255 "This module contains a collection of YANG data types 256 considered generally useful for routing protocols."; 258 revision 2017-02-27 { 259 description 260 "Initial revision."; 261 reference 262 "RFC TBD: Routing YANG Data Types"; 263 } 265 /*** collection of types related to routing ***/ 266 typedef router-id { 267 type yang:dotted-quad; 268 description 269 "A 32-bit number in the dotted quad format assigned to each 270 router. This number uniquely identifies the router within an 271 Autonomous System."; 272 } 274 // address-family 275 identity address-family { 276 description 277 "Base identity from which identities describing address 278 families are derived."; 279 } 281 identity ipv4 { 282 base address-family; 283 description 284 "This identity represents IPv4 address family."; 285 } 286 identity ipv6 { 287 base address-family; 288 description 289 "This identity represents IPv6 address family."; 290 } 292 //The rest of the values deinfed in the IANA registry 294 identity nsap { 295 base address-family; 296 description 297 "Address family from IANA registry."; 298 } 299 identity hdlc { 300 base address-family; 301 description 302 "(8-bit multidrop) 303 Address family from IANA registry."; 304 } 305 identity bbn1822 { 306 base address-family; 307 description 308 "AHIP (BBN report #1822) 309 Address family from IANA registry."; 310 } 311 identity ieee802 { 312 base address-family; 313 description 314 "(includes all 802 media plus Ethernet canonical format) 315 Address family from IANA registry."; 316 } 317 identity e163 { 318 base address-family; 319 description 320 "Address family from IANA registry."; 321 } 322 identity e164 { 323 base address-family; 324 description 325 "SMDS, Frame Relay, ATM 326 Address family from IANA registry."; 327 } 328 identity f69 { 329 base address-family; 330 description 331 "(Telex) 332 Address family from IANA registry."; 333 } 334 identity x121 { 335 base address-family; 336 description 337 "(X.25, Frame Relay) 338 Address family from IANA registry."; 339 } 340 identity ipx { 341 base address-family; 342 description 343 "Address family from IANA registry."; 344 } 345 identity appletalk { 346 base address-family; 347 description 348 "Address family from IANA registry."; 349 } 350 identity decnet-iv { 351 base address-family; 352 description 353 "Decnet IV 354 Address family from IANA registry."; 355 } 356 identity vines { 357 base address-family; 358 description 359 "Banyan Vines 360 Address family from IANA registry."; 361 } 362 identity e164-nsap { 363 base address-family; 364 description 365 "E.164 with NSAP format subaddress 366 Address family from IANA registry."; 367 } 368 identity dns { 369 base address-family; 370 description 371 "Domain Name System 372 Address family from IANA registry."; 373 } 374 identity dn { 375 base address-family; 376 description 377 "Distinguished Name 378 Address family from IANA registry."; 379 } 380 identity as-num { 381 base address-family; 382 description 383 "AS Number 384 Address family from IANA registry."; 385 } 386 identity xtp-v4 { 387 base address-family; 388 description 389 "XTP over IPv4 390 Address family from IANA registry."; 391 } 392 identity xtp-v6 { 393 base address-family; 394 description 395 "XTP over IPv6 396 Address family from IANA registry."; 397 } 398 identity xtp { 399 base address-family; 400 description 401 "XTP native mode XTP 402 Address family from IANA registry."; 403 } 404 identity fc-port { 405 base address-family; 406 description 407 "Fibre Channel World-Wide Port Name 408 Address family from IANA registry."; 409 } 410 identity fc-node { 411 base address-family; 412 description 413 "Fibre Channel World-Wide Node Name 414 Address family from IANA registry."; 415 } 416 identity gwid { 417 base address-family; 418 description 419 "Address family from IANA registry."; 420 } 421 identity l2vpn { 422 base address-family; 423 description 424 "Address family from IANA registry."; 425 } 426 identity mpls-tp-section-eid { 427 base address-family; 428 description 429 "MPLS-TP Section Endpoint Identifier 430 Address family from IANA registry."; 431 } 432 identity mpls-tp-lsp-eid { 433 base address-family; 434 description 435 "MPLS-TP LSP Endpoint Identifier 436 Address family from IANA registry."; 437 } 438 identity mpls-tp-pwe-eid { 439 base address-family; 440 description 441 "MPLS-TP Pseudowire Endpoint Identifier 442 Address family from IANA registry."; 443 } 444 identity mt-v4 { 445 base address-family; 446 description 447 "Multi-Topology IPv4. 448 Address family from IANA registry."; 449 } 450 identity mt-v6 { 451 base address-family; 452 description 453 "Multi-Topology IPv6. 454 Address family from IANA registry."; 455 } 457 /*** collection of types related to VPN ***/ 458 typedef route-target { 459 type string { 460 pattern 461 '(0:(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|' 462 + '[0-5]?\d{0,3}\d):(429496729[0-5]|42949672[0-8]\d|' 463 + '4294967[01]\d{2}|429496[0-6]\d{3}|42949[0-5]\d{4}|' 464 + '4294[0-8]\d{5}|429[0-3]\d{6}|42[0-8]\d{7}|4[01]\d{8}|' 465 + '[0-3]?\d{0,8}\d))|' 466 + '(1:(((\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|' 467 + '1\d{2}|2[0-4]\d|25[0-5])):(6553[0-5]|655[0-2]\d|' 468 + '65[0-4]\d{2}|6[0-4]\d{3}|[0-5]?\d{0,3}\d))|' 469 + '(2:(429496729[0-5]|42949672[0-8]\d|4294967[01]\d{2}|' 470 + '429496[0-6]\d{3}|42949[0-5]\d{4}|4294[0-8]\d{5}|' 471 + '429[0-3]\d{6}|42[0-8]\d{7}|4[01]\d{8}|[0-3]?\d{0,8}\d):' 472 + '(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|' 473 + '[0-5]?\d{0,3}\d))'; 474 } 475 description 476 "A route target is an 8-octet BGP extended community 477 initially identifying a set of sites in a BGP 478 VPN (RFC 4364). However, it has since taken on a more 479 general role in BGP route filtering. 480 A route target consists of three fields: 481 a 2-octet type field, an administrator field, 482 and an assigned number field. 483 According to the data formats for type 0, 1, and 2 defined in 484 RFC4360 and RFC5668, the encoding pattern is defined as: 486 0:2-octet-asn:4-octet-number 487 1:4-octet-ipv4addr:2-octet-number 488 2:4-octet-asn:2-octet-number. 490 Some valid examples are: 0:100:100, 1:1.1.1.1:100, and 491 2:1234567890:203."; 492 reference 493 "RFC4360: BGP Extended Communities Attribute. 494 RFC5668: 4-Octet AS Specific BGP Extended Community."; 495 } 497 typedef route-target-type { 498 type enumeration { 499 enum "import" { 500 value "0"; 501 description 502 "The route target applies to route import."; 503 } 504 enum "export" { 505 value "1"; 506 description 507 "The route target applies to route export."; 508 } 509 enum "both" { 510 value "2"; 511 description 512 "The route target applies to both route import and 513 route export."; 514 } 515 } 516 description 517 "Indicates the role a route target takes 518 in route filtering."; 519 reference 520 "RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; 521 } 523 typedef route-distinguisher { 524 type string { 525 pattern 526 '(0:(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|' 527 + '[0-5]?\d{0,3}\d):(429496729[0-5]|42949672[0-8]\d|' 528 + '4294967[01]\d{2}|429496[0-6]\d{3}|42949[0-5]\d{4}|' 529 + '4294[0-8]\d{5}|429[0-3]\d{6}|42[0-8]\d{7}|4[01]\d{8}|' 530 + '[0-3]?\d{0,8}\d))|' 531 + '(1:(((\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|' 532 + '1\d{2}|2[0-4]\d|25[0-5])):(6553[0-5]|655[0-2]\d|' 533 + '65[0-4]\d{2}|6[0-4]\d{3}|[0-5]?\d{0,3}\d))|' 534 + '(2:(429496729[0-5]|42949672[0-8]\d|4294967[01]\d{2}|' 535 + '429496[0-6]\d{3}|42949[0-5]\d{4}|4294[0-8]\d{5}|' 536 + '429[0-3]\d{6}|42[0-8]\d{7}|4[01]\d{8}|[0-3]?\d{0,8}\d):' 537 + '(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|' 538 + '[0-5]?\d{0,3}\d))|' 539 + '(([3-9a-fA-F]|[1-9a-fA-F][\da-fA-F]{1,3}):' 540 + '[\da-fA-F]{1,12})'; 541 } 542 description 543 "A route distinguisher is an 8-octet value used to distinguish 544 routes from different BGP VPNs (RFC 4364). A route 545 distinguisher consists of three fields: A 2-octet type field, 546 an administrator field, and an assigned number field. 547 According to the data formats for type 0, 1, and 2 defined in 548 RFC4364, the encoding pattern is defined as: 550 0:2-octet-asn:4-octet-number 551 1:4-octet-ipv4addr:2-octet-number 552 2:4-octet-asn:2-octet-number. 553 2-octet-other-hex-number:6-octet-hex-number 555 Some valid examples are: 0:100:100, 1:1.1.1.1:100, and 556 2:1234567890:203."; 557 reference 558 "RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; 559 } 561 /*** collection of types common to multicast ***/ 562 typedef ipv4-multicast-group-address { 563 type inet:ipv4-address { 564 pattern '(2((2[4-9])|(3[0-9]))\.).*'; 565 } 566 description 567 "This type represents an IPv4 multicast group address, 568 which is in the range from 224.0.0.0 to 239.255.255.255."; 569 reference 570 "RFC1112: Host Extensions for IP Multicasting."; 571 } 573 typedef ipv6-multicast-group-address { 574 type inet:ipv6-address { 575 pattern 576 '(([fF]{2}[0-9a-fA-F]{2}):).*'; 577 } 578 description 579 "This type represents an IPv6 multicast group address, 580 which is in the range of FF00::/8."; 581 reference 582 "RFC4291: IP Version 6 Addressing Architecture. Sec 2.7. 583 RFC7346: IPv6 Multicast Address Scopes."; 584 } 586 typedef ip-multicast-group-address { 587 type union { 588 type ipv4-multicast-group-address; 589 type ipv6-multicast-group-address; 590 } 591 description 592 "This type represents an IP multicast group address and is IP 593 version neutral. The format of the textual representation 594 implies the IP version."; 595 } 597 typedef ipv4-multicast-source-address { 598 type union { 599 type enumeration { 600 enum '*' { 601 description 602 "Any source address."; 603 } 604 } 605 type inet:ipv4-address; 606 } 607 description 608 "Multicast source IPv4 address type."; 609 } 611 typedef ipv6-multicast-source-address { 612 type union { 613 type enumeration { 614 enum '*' { 615 description 616 "Any source address."; 617 } 618 } 619 type inet:ipv6-address; 620 } 621 description 622 "Multicast source IPv6 address type."; 623 } 625 /*** collection of types common to protocols ***/ 626 typedef bandwidth-ieee-float32 { 627 type string { 628 pattern 629 '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' 630 + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' 631 + '1[01]\d|0?\d?\d)?)'; 632 } 633 description 634 "Bandwidth in IEEE 754 floating point 32-bit binary format: 635 (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), 636 where Exponent uses 8 bits, and Fraction uses 23 bits. 637 The units are octets per second. 638 The encoding format is the external hexadecimal-significand 639 character sequences specified in IEEE 754 and C99, 640 restricted to be normalized, non-negative, and non-fraction: 641 0x1.hhhhhhp{+}d or 0X1.HHHHHHP{+}D 642 where 'h' and 'H' are hexadecimal digits, 'd' and 'D' are 643 integers in the range of [0..127]. 644 When six hexadecimal digits are used for 'hhhhhh' or 'HHHHHH', 645 the least significant digit must be an even number. 646 'x' and 'X' indicate hexadecimal; 'p' and 'P' indicate power 647 of two. 648 Some examples are: 0x0p0, 0x1p10, and 0x1.abcde2p+20"; 649 reference 650 "IEEE Std 754-2008: IEEE Standard for Floating-Point 651 Arithmetic."; 652 } 654 typedef link-access-type { 655 type enumeration { 656 enum "broadcast" { 657 description 658 "Specify broadcast multi-access network."; 659 } 660 enum "non-broadcast-multiaccess" { 661 description 662 "Specify Non-Broadcast Multi-Access (NBMA) network."; 663 } 664 enum "point-to-multipoint" { 665 description 666 "Specify point-to-multipoint network."; 667 } 668 enum "point-to-point" { 669 description 670 "Specify point-to-point network."; 671 } 672 } 673 description 674 "Link access type."; 675 } 677 typedef timer-multiplier { 678 type uint8; 679 description 680 "The number of timer value intervals that should be 681 interpreted as a failure."; 682 } 684 typedef timer-value-seconds16 { 685 type union { 686 type uint16 { 687 range "1..65535"; 688 } 689 type enumeration { 690 enum "infinity" { 691 description "The timer is set to infinity."; 692 } 693 enum "not-set" { 694 description "The timer is not set."; 695 } 696 } 697 } 698 units seconds; 699 description "Timer value type, in seconds (16 bit range)."; 700 } 702 typedef timer-value-seconds32 { 703 type union { 704 type uint32 { 705 range "1..4294967295"; 706 } 707 type enumeration { 708 enum "infinity" { 709 description "The timer is set to infinity."; 710 } 711 enum "not-set" { 712 description "The timer is not set."; 713 } 714 } 715 } 716 units seconds; 717 description "Timer value type, in seconds (32 bit range)."; 719 } 721 typedef timer-value-milliseconds { 722 type union { 723 type uint32{ 724 range "1..4294967295"; 725 } 726 type enumeration { 727 enum "infinity" { 728 description "The timer is set to infinity."; 729 } 730 enum "not-set" { 731 description "The timer is not set."; 732 } 733 } 734 } 735 units milliseconds; 736 description "Timer value type, in milliseconds."; 737 } 739 /*** collection of types related to MPLS/GMPLS ***/ 740 typedef generalized-label { 741 type binary; 742 description 743 "Generalized label. Nodes sending and receiving the 744 Generalized Label know the kinds of link they are 745 using. Hence, the Generalized Label does not identify 746 its type. Instead, nodes are expected to know from 747 the context and type of label to expect."; 748 reference "RFC3471: Section 3.2"; 749 } 751 identity mpls-label-special-purpose-value { 752 description 753 "Base identity for deriving identities describing 754 special-purpose Multiprotocol Label Switching (MPLS) label 755 values."; 756 reference 757 "RFC7274: Allocating and Retiring Special-Purpose MPLS 758 Labels."; 759 } 761 identity ipv4-explicit-null-label { 762 base mpls-label-special-purpose-value; 763 description 764 "This identity represents the IPv4 Explicit NULL Label."; 765 reference 766 "RFC3032: MPLS Label Stack Encoding. Section 2.1."; 768 } 770 identity router-alert-label { 771 base mpls-label-special-purpose-value; 772 description 773 "This identity represents the Router Alert Label."; 774 reference 775 "RFC3032: MPLS Label Stack Encoding. Section 2.1."; 776 } 778 identity ipv6-explicit-null-label { 779 base mpls-label-special-purpose-value; 780 description 781 "This identity represents the IPv6 Explicit NULL Label."; 782 reference 783 "RFC3032: MPLS Label Stack Encoding. Section 2.1."; 784 } 786 identity implicit-null-label { 787 base mpls-label-special-purpose-value; 788 description 789 "This identity represents the Implicit NULL Label."; 790 reference 791 "RFC3032: MPLS Label Stack Encoding. Section 2.1."; 792 } 794 identity entropy-label-indicator { 795 base mpls-label-special-purpose-value; 796 description 797 "This identity represents the Entropy Label Indicator."; 798 reference 799 "RFC6790: The Use of Entropy Labels in MPLS Forwarding. 800 Sections 3 and 10.1."; 801 } 803 identity gal-label { 804 base mpls-label-special-purpose-value; 805 description 806 "This identity represents the Generic Associated Channel Label 807 (GAL)."; 808 reference 809 "RFC5586: MPLS Generic Associated Channel. 810 Sections 4 and 10."; 811 } 813 identity oam-alert-label { 814 base mpls-label-special-purpose-value; 815 description 816 "This identity represents the OAM Alert Label."; 817 reference 818 "RFC3429: Assignment of the 'OAM Alert Label' for Multiprotocol 819 Label Switching Architecture (MPLS) Operation and Maintenance 820 (OAM) Functions. 821 Sections 3 and 6."; 822 } 824 identity extension-label { 825 base mpls-label-special-purpose-value; 826 description 827 "This identity represents the Extension Label."; 828 reference 829 "RFC7274: Allocating and Retiring Special-Purpose MPLS Labels. 830 Sections 3.1 and 5."; 831 } 833 typedef mpls-label-special-purpose { 834 type identityref { 835 base mpls-label-special-purpose-value; 836 } 837 description 838 "This type represents the special-purpose Multiprotocol Label 839 Switching (MPLS) label values."; 840 reference 841 "RFC3032: MPLS Label Stack Encoding. 842 RFC7274: Allocating and Retiring Special-Purpose MPLS 843 Labels."; 844 } 846 typedef mpls-label-general-use { 847 type uint32 { 848 range "16..1048575"; 849 } 850 description 851 "The 20 bits label values in an MPLS label stack entry, 852 specified in RFC3032. This label value does not include 853 the encodings of Traffic Class and TTL (time to live). 854 The label range specified by this type is for general use, 855 with special-purpose MPLS label values excluded."; 856 reference 857 "RFC3032: MPLS Label Stack Encoding."; 858 } 860 typedef mpls-label { 861 type union { 862 type mpls-label-special-purpose; 863 type mpls-label-general-use; 865 } 866 description 867 "The 20 bits label values in an MPLS label stack entry, 868 specified in RFC3032. This label value does not include 869 the encodings of Traffic Class and TTL (time to live)."; 870 reference 871 "RFC3032: MPLS Label Stack Encoding."; 872 } 874 /* 875 * Groupings 876 */ 877 grouping mpls-label-stack { 878 description 879 "A grouping that specifies an MPLS label stack."; 880 container mpls-label-stack { 881 description 882 "Container for a list of MPLS label stack entries."; 883 list entry { 884 key "id"; 885 description 886 "List of MPLS label stack entries."; 887 leaf id { 888 type uint8; 889 description 890 "Identifies the sequence of an MPLS label stack entries. 891 An entry with smaller ID value is precedes an entry in 892 the label stack with a smaller ID."; 893 } 894 leaf label { 895 type rt-types:mpls-label; 896 description 897 "Label value."; 898 } 899 leaf ttl { 900 type uint8; 901 description 902 "Time to Live (TTL)."; 903 reference 904 "RFC3032: MPLS Label Stack Encoding."; 905 } 906 leaf traffic-class { 907 type uint8 { 908 range "0..7"; 909 } 910 description 911 "Traffic Class (TC)."; 912 reference 913 "RFC5462: Multiprotocol Label Switching (MPLS) Label 914 Stack Entry: 'EXP' Field Renamed to 'Traffic Class' 915 Field."; 916 } 917 } 918 } 919 } // mpls-label-stack 921 grouping vpn-route-targets { 922 description 923 "A grouping that specifies Route Target import-export rules 924 used in the BGP enabled Virtual Private Networks (VPNs)."; 925 reference 926 "RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs). 927 RFC4664: Framework for Layer 2 Virtual Private Networks 928 (L2VPNs)"; 929 list vpn-target { 930 key route-target; 931 description 932 "List of Route Targets."; 933 leaf route-target { 934 type rt-types:route-target; 935 description 936 "Route Target value"; 937 } 938 leaf route-target-type { 939 type rt-types:route-target-type; 940 mandatory true; 941 description 942 "Import/export type of the Route Target."; 943 } 944 } 945 } // vpn-route-targets 946 } 947 949 4. IANA Considerations 951 RFC Ed.: In this section, replace all occurrences of 'XXXX' with the 952 actual RFC number (and remove this note). 954 This document registers the following namespace URIs in the IETF XML 955 registry [RFC3688]: 957 -------------------------------------------------------------------- 958 URI: urn:ietf:params:xml:ns:yang:ietf-routing-types 959 Registrant Contact: The IESG. 960 XML: N/A, the requested URI is an XML namespace. 961 -------------------------------------------------------------------- 963 This document registers the following YANG modules in the YANG Module 964 Names registry [RFC6020]: 966 -------------------------------------------------------------------- 967 name: ietf-routing-types 968 namespace: urn:ietf:params:xml:ns:yang:ietf-routing-types 969 prefix: rt-types 970 reference: RFC XXXX 971 -------------------------------------------------------------------- 973 5. Security Considerations 975 This document defines common data types using the YANG data modeling 976 language. The definitions themselves have no security impact on the 977 Internet, but the usage of these definitions in concrete YANG modules 978 might have. The security considerations spelled out in the YANG 979 specification [RFC7950] apply for this document as well. 981 6. Acknowledgements 983 The Routing Area Yang Architecture design team members included Acee 984 Lindem, Anees Shaikh, Christian Hopps, Dean Bogdanovic, Ebben Aries, 985 Lou Berger, Qin Wu, Rob Shakir, Xufeng Liu, and Yingzhen Qu. 987 7. References 989 7.1. Normative References 991 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 992 Requirement Levels", BCP 14, RFC 2119, 993 DOI 10.17487/RFC2119, March 1997, 994 . 996 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 997 the Network Configuration Protocol (NETCONF)", RFC 6020, 998 DOI 10.17487/RFC6020, October 2010, 999 . 1001 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 1002 RFC 7950, DOI 10.17487/RFC7950, August 2016, 1003 . 1005 7.2. Informative References 1007 [IEEE754] IEEE, "IEEE Standard for Floating-Point Arithmetic", IEEE 1008 Std 754-2008, August 2008. 1010 [I-D.ietf-bfd-yang] 1011 Zheng, L., Rahman, R., Networks, J., Jethanandani, M., and 1012 G. Mirsky, "Yang Data Model for Bidirectional Forwarding 1013 Detection (BFD)", draft-ietf-bfd-yang-04 (work in 1014 progress), January 2017. 1016 [I-D.ietf-idr-bgp-model] 1017 Shaikh, A., Shakir, R., Patel, K., Hares, S., D'Souza, K., 1018 Bansal, D., Clemm, A., Zhdankin, A., Jethanandani, M., and 1019 X. Liu, "BGP Model for Service Provider Networks", draft- 1020 ietf-idr-bgp-model-02 (work in progress), July 2016. 1022 [I-D.ietf-ospf-yang] 1023 Yeung, D., Qu, Y., Zhang, Z., Chen, I., and A. Lindem, 1024 "Yang Data Model for OSPF Protocol", draft-ietf-ospf- 1025 yang-06 (work in progress), October 2016. 1027 [I-D.ietf-pim-yang] 1028 Liu, X., McAllister, P., Peter, A., Sivakumar, M., Liu, 1029 Y., and f. hu, "A YANG data model for Protocol-Independent 1030 Multicast (PIM)", draft-ietf-pim-yang-05 (work in 1031 progress), February 2017. 1033 [I-D.ietf-teas-yang-rsvp] 1034 Beeram, V., Saad, T., Gandhi, R., Liu, X., Shah, H., Chen, 1035 X., Jones, R., and B. Wen, "A YANG Data Model for Resource 1036 Reservation Protocol (RSVP)", draft-ietf-teas-yang-rsvp-06 1037 (work in progress), October 2016. 1039 [I-D.ietf-teas-yang-te] 1040 Saad, T., Gandhi, R., Liu, X., Beeram, V., Shah, H., 1041 Bryskin, I., Chen, X., Jones, R., and B. Wen, "A YANG Data 1042 Model for Traffic Engineering Tunnels and Interfaces", 1043 draft-ietf-teas-yang-te-05 (work in progress), October 1044 2016. 1046 [I-D.ietf-bess-l2vpn-yang] 1047 Shah, H., Brissette, P., Chen, I., Hussain, I., and B. 1048 Wen, "YANG Data Model for MPLS-based L2VPN", draft-ietf- 1049 bess-l2vpn-yang-02 (work in progress), October 2016. 1051 [I-D.ietf-mpls-base-yang] 1052 Raza, K., Gandhi, R., Liu, X., Beeram, V., Saad, T., 1053 Bryskin, I., Chen, X., Jones, R., and B. Wen, "A YANG Data 1054 Model for MPLS Base", draft-ietf-mpls-base-yang-01 (work 1055 in progress), July 2016. 1057 [RFC3032] Rosen, E., Tappan, D., Fedorkow, G., Rekhter, Y., 1058 Farinacci, D., Li, T., and A. Conta, "MPLS Label Stack 1059 Encoding", RFC 3032, DOI 10.17487/RFC3032, January 2001, 1060 . 1062 [RFC3209] Awduche, D., Berger, L., Gan, D., Li, T., Srinivasan, V., 1063 and G. Swallow, "RSVP-TE: Extensions to RSVP for LSP 1064 Tunnels", RFC 3209, DOI 10.17487/RFC3209, December 2001, 1065 . 1067 [RFC3471] Berger, L., Ed., "Generalized Multi-Protocol Label 1068 Switching (GMPLS) Signaling Functional Description", 1069 RFC 3471, DOI 10.17487/RFC3471, January 2003, 1070 . 1072 [RFC4364] Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private 1073 Networks (VPNs)", RFC 4364, DOI 10.17487/RFC4364, February 1074 2006, . 1076 [RFC4664] Andersson, L., Ed. and E. Rosen, Ed., "Framework for Layer 1077 2 Virtual Private Networks (L2VPNs)", RFC 4664, 1078 DOI 10.17487/RFC4664, September 2006, 1079 . 1081 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 1082 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 1083 . 1085 [RFC7274] Kompella, K., Andersson, L., and A. Farrel, "Allocating 1086 and Retiring Special-Purpose MPLS Labels", RFC 7274, 1087 DOI 10.17487/RFC7274, June 2014, 1088 . 1090 7.3. URIs 1092 [1] http://www.iana.org/assignments/address-family-numbers/address- 1093 family-numbers.xhtml 1095 Authors' Addresses 1097 Xufeng Liu 1098 Jabil 1099 8281 Greensboro Drive, Suite 200 1100 McLean VA 22102 1101 USA 1103 EMail: Xufeng_Liu@jabil.com 1105 Yingzhen Qu 1106 Futurewei Technologies, Inc. 1107 2330 Central Expressway 1108 Santa Clara CA 95050 1109 USA 1111 EMail: yingzhen.qu@huawei.com 1113 Acee Lindem 1114 Cisco Systems 1115 301 Midenhall Way 1116 Cary, NC 27513 1117 USA 1119 EMail: acee@cisco.com 1121 Christian Hopps 1122 Deutsche Telekom 1124 EMail: chopps@chopps.org 1126 Lou Berger 1127 LabN Consulting, L.L.C. 1129 EMail: lberger@labn.net