idnits 2.17.1 draft-ietf-i2rs-yang-l2-network-topology-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 -- The document date (July 6, 2015) is 3216 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) == Unused Reference: 'I-D.amante-i2rs-topology-use-cases' is defined on line 834, but no explicit reference was found in the text == Unused Reference: 'I-D.medved-i2rs-topology-requirements' is defined on line 839, but no explicit reference was found in the text == Outdated reference: A later version (-20) exists of draft-ietf-i2rs-yang-network-topo-01 ** Obsolete normative reference: RFC 6021 (Obsoleted by RFC 6991) Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. Dong 3 Internet-Draft X. Wei 4 Intended status: Standards Track Huawei Technologies 5 Expires: January 7, 2016 July 6, 2015 7 A YANG Data Model for Layer-2 Network Topologies 8 draft-ietf-i2rs-yang-l2-network-topology-01 10 Abstract 12 This document defines a YANG data model for Layer 2 network 13 topologies. 15 Requirements Language 17 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 18 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 19 document are to be interpreted as described in RFC 2119 [RFC2119]. 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at http://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on January 7, 2016. 38 Copyright Notice 40 Copyright (c) 2015 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (http://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 56 2. Layer-2 Topology Model . . . . . . . . . . . . . . . . . . . 2 57 3. Layer-2 Topology Yang Module . . . . . . . . . . . . . . . . 6 58 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 59 5. Security Considerations . . . . . . . . . . . . . . . . . . . 18 60 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18 61 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 62 7.1. Normative References . . . . . . . . . . . . . . . . . . 18 63 7.2. Informative References . . . . . . . . . . . . . . . . . 18 64 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 66 1. Introduction 68 [I-D.ietf-i2rs-yang-network-topo] defines the Yang [RFC6020] 69 [RFC6021] data models of the abstract (generic) network and network 70 topology. Such models can be augmented with technology-specific 71 details to build more specific topology models. 73 This document defines the Yang data model for Layer 2 network 74 topologies by augmenting the generic network and network topology 75 data models with L2 specific topology attributes. 77 2. Layer-2 Topology Model 79 The Layer 2 network topology model is designed to be generic and 80 applicable to Layer 2 networks built with different L2 technologies. 82 The Layer 2 topology model applies the generic network and network 83 topology models to Layer 2 network topologies, and augments the 84 generic models with information specific in Layer 2 networks. The 85 relationship between the Layer 2 topology model and the generic 86 network and network topology model is shown in the figure below: 88 +---------------------+ 89 | ietf-network | 90 +----------^----------+ 91 | 92 | 93 +---------------------+ 94 |ietf-network-topology| 95 +----------^----------+ 96 | 97 | 98 +----------^----------+ 99 | ietf-l2-topology | 100 +---------------------+ 101 Figure 1. L2-topology model structure 103 In order to represent a Layer 2 network topology, the generic network 104 and topology models are augmented with Layer-2 specific information, 105 such as the identifiers, descriptions, attributes and states of the 106 Layer-2 networks, nodes, links and termination points. Some of the 107 information may be collected via Link Layer Discovery Protocl (LLDP) 108 or other Layer-2 protocols, and some of them may be locally 109 configured. 111 The structure of "ietf-l2-topology" data model is depicted in the 112 following diagram. Brackets enclose list keys, "rw" means 113 configuration data, "ro" means operational state data, "?" designates 114 optional nodes, "*" designates nodes that can have multiple 115 instances. 117 module: ietf-l2-topology 118 augment /nw:network/nw:network-types: 119 +--rw l2-network! 120 augment /nw:network: 121 +--rw l2-network-attributes 122 +--rw name? string 123 +--rw flag* flag-type 124 augment /nw:network/nw:node: 125 +--rw l2-node-attributes 126 +--rw name? string 127 +--rw description? string 128 +--rw management-address* inet:ip-address 129 +--rw management-vid? vlan {VLAN}? 130 +--rw nick-name* trill-nickname {TRILL}? 131 +--rw flag* flag-type 132 augment /nw:network/nt:link: 133 +--rw l2-link-attributes 134 +--rw name? string 135 +--rw flag* flag-type 136 +--rw rate? decimal64 137 +--rw delay? uint32 138 +--rw srlg* uint32 139 augment /nw:network/nw:node/nt:termination-point: 140 +--rw l2-termination-point-attributes 141 +--rw description? string 142 +--rw maximum-frame-size? uint32 143 +--rw (l2-termination-point-type)? 144 | +--:(ethernet) 145 | | +--rw mac-address? yang:mac-address 146 | | +--rw eth-encapsulation? identityref 147 | | +--rw port-vlan-id? vlan {VLAN}? 148 | | +--rw vlan-id-name* [vlan-id] {VLAN}? 149 | | +--rw vlan-id vlan 150 | | +--rw vlan-name? string 151 | +--:(legacy) 152 | +--rw encapsulation? identityref 153 +--ro tp-state? enumeration 154 notifications: 155 +---n l2-node-event 156 | +--ro event-type? l2-network-event-type 157 | +--ro network-ref? leafref 158 | +--ro node-ref? leafref 159 | +--ro l2-network! 160 | +--ro l2-node-attributes 161 | +--ro name? string 162 | +--ro description? string 163 | +--ro management-address* inet:ip-prefix 164 | +--ro management-vid? vlan {VLAN}? 165 | +--ro nick-name* trill-nickname {TRILL}? 166 | +--ro flag* flag-type 167 +---n l2-link-event 168 | +--ro event-type? l2-network-event-type 169 | +--ro network-ref? leafref 170 | +--ro link-ref? leafref 171 | +--ro l2-network! 172 | +--ro l2-link-attributes 173 | +--ro name? string 174 | +--ro flag* flag-type 175 | +--ro rate? decimal64 176 | +--ro delay? uint32 177 | +--ro srlg* uint32 178 +---n l2-termination-point-event 179 +--ro event-type? l2-network-event-type 180 +--ro network-ref? leafref 181 +--ro node-ref? leafref 182 +--ro tp-ref? leafref 183 +--ro l2-network! 184 +--ro l2-termination-point-attributes 185 +--ro description? string 186 +--ro maximum-frame-size? uint32 187 +--ro (termination-point-type)? 188 | +--:(ethernet) 189 | | +--ro mac-address? yang:mac-address 190 | | +--ro eth-encapsulation? identityref 191 | | +--ro port-vlan-id? vlan {VLAN}? 192 | | +--ro vlan-id-name* [vlan-id] {VLAN}? 193 | | +--ro vlan-id vlan 194 | | +--ro vlan-name? string 195 | +--:(legacy) 196 | +--ro encapsulation? identityref 197 +--ro tp-state? enumeration 199 The L2-topology module augments the generic ietf-network and ietf- 200 network-topology modules as follows: 202 o A new network type "l2-network-type" is introduced. This is 203 represented by a container object, and is inserted under the 204 "network-types" container of the generic ietf-network module in 205 [I-D.ietf-i2rs-yang-network-topo]. 207 o Additional network attributes are introduced in a grouping "l2- 208 network-attributes", which augments the "network" list of the 209 ietf-network module. The attributes include Layer-2 network name 210 and a set of flags. Each type of flag is represented by a 211 separate identity. 213 o Additional data objects for Layer-2 nodes are introduced by 214 augmenting the "node" list of the generic ietf-network module. 215 New objects include Layer-2 node identifier, description, 216 management address, and a set of flags. 218 o Additional data objects for Layer-2 termination points are 219 introduced by augmenting the "termination-point" list of the ietf- 220 network-topology module defined in 221 [I-D.ietf-i2rs-yang-network-topo]. New objects include Layer-2 222 termination point descriptions, Layer-2 termination point type 223 specific attributes and Layer-2 termination point states. 225 o Links in the ietf-network-topology module are augmented as well 226 with a set of Layer-2 parameters, allowing to associate a link 227 with a name, a set of Layer-2 link attributes and flags. 229 o The optional L2 technology specific attributes are introduced in 230 this module as Layer-2 features. 232 3. Layer-2 Topology Yang Module 234 235 file "ietf-l2-topology@2015-06-23.yang" 236 module ietf-l2-topology { 237 yang-version 1; 238 namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology"; 239 prefix "l2t"; 241 import ietf-network { 242 prefix "nw"; 243 } 245 import ietf-network-topology { 246 prefix "nt"; 247 } 249 import ietf-inet-types { 250 prefix "inet"; 251 } 253 import ietf-yang-types { 254 prefix "yang"; 255 } 257 organization "TBD"; 258 contact "I-D Editor: jie.dong@huawei.com"; 260 description 261 "This module defines a basic model for 262 the layer-2 topology of a network"; 264 revision "2015-06-23" { 265 description "Initial revision"; 266 reference "draft-ietf-i2rs-l2-network-topology-01"; 267 } 269 /* 270 * Typedefs 271 */ 273 typedef vlan { 274 type uint16 { 275 range "0..4095"; 276 } 277 description "VLAN ID"; 278 } 279 typedef trill-nickname { 280 type uint16; 281 description "TRILL Nickname"; 282 } 284 typedef flag-type { 285 type identityref { 286 base "flag-identity"; 287 } 288 description "Base type for flags"; 289 } 291 typedef l2-network-event-type { 292 type enumeration { 293 enum "add" { 294 value 0; 295 description "An L2 node or link or termination-point 296 has been added"; 297 } 298 enum "remove" { 299 value 1; 300 description "An L2 node or link or termination-point 301 has been removed"; 302 } 303 enum "update" { 304 value 2; 305 description "An L2 node or link or termination-point 306 has been updated"; 307 } 308 } 309 description "l2 network event type for notifications"; 310 } // l2-topology-event-type 312 /* 313 * Features 314 */ 316 feature VLAN { 317 description 318 "Indicates that the system supports the 319 vlan functions"; 320 } 322 feature QinQ { 323 description 324 "Indicates that the system supports the 325 qinq functions"; 326 } 328 feature PBB { 329 description 330 "Indicates that the device supports the 331 provider-backbone-bridging functions"; 332 } 334 feature VPLS { 335 description 336 "Indicates that the device supports the 337 VPLS functions"; 338 reference "RFC 4761, RFC 4762"; 339 } 341 feature TRILL { 342 description 343 "Indicates that the device supports the 344 TRILL functions"; 345 reference "RFC 6325"; 346 } 348 feature VXLAN { 349 description 350 "Indicates that the device supports the 351 VXLAN functions"; 352 reference "RFC 7348"; 353 } 355 /* 356 * Identities 357 */ 359 identity flag-identity { 360 description "Base type for flags"; 361 } 363 identity encapsulation-type { 364 description 365 "Base identity from which specific encapsulation 366 types are derived."; 367 } 369 identity eth-encapsulation-type { 370 base encapsulation-type; 371 description 372 "Base identity from which specific ethernet 373 encapsulation types are derived."; 375 } 377 identity ethernet { 378 base eth-encapsulation-type; 379 description 380 "native ethernet encapsulation"; 381 } 383 identity vlan { 384 base eth-encapsulation-type; 385 description 386 "vlan encapsulation"; 387 } 389 identity qinq { 390 base eth-encapsulation-type; 391 description 392 "qinq encapsulation"; 393 } 395 identity pbb { 396 base eth-encapsulation-type; 397 description 398 "pbb encapsulation"; 399 } 401 identity trill { 402 base eth-encapsulation-type; 403 description 404 "trill encapsulation"; 405 } 407 identity vpls { 408 base eth-encapsulation-type; 409 description 410 "vpls encapsulation"; 411 } 413 identity vxlan { 414 base eth-encapsulation-type; 415 description 416 "vxlan encapsulation"; 417 } 419 identity frame-relay { 420 base encapsulation-type; 421 description 422 "Frame Relay encapsulation"; 423 } 425 identity ppp { 426 base encapsulation-type; 427 description 428 "PPP encapsulation"; 429 } 431 identity hdlc { 432 base encapsulation-type; 433 description 434 "HDLC encapsulation"; 435 } 437 identity atm { 438 base encapsulation-type; 439 description 440 "Base identity from which specific ATM 441 encapsulation types are derived."; 443 } 445 identity pwe3 { 446 base encapsulation-type; 447 description 448 "Base identity from which specific pw 449 encapsulation types are derived."; 450 } 452 /* 453 * Groupings 454 */ 456 grouping l2-network-type { 457 description "Identify the topology type to be L2."; 458 container l2-network { 459 presence "indicates L2 Network"; 460 description 461 "The presence of the container node indicates 462 L2 Topology"; 463 } 464 } 465 grouping l2-network-attributes { 466 description "L2 Topology scope attributes"; 467 container l2-network-attributes { 468 description "Containing L2 network attributes"; 469 leaf name { 470 type string; 471 description "Name of the L2 network"; 472 } 474 leaf-list flag { 475 type flag-type; 476 description "L2 network flags"; 477 } 478 } 479 } 481 grouping l2-node-attributes { 482 description "L2 node attributes"; 483 container l2-node-attributes { 484 description "Containing L2 node attributes"; 485 leaf name { 486 type string; 487 description "Node name"; 488 } 489 leaf description { 490 type string; 491 description "Node description"; 492 } 493 leaf-list management-address { 494 type inet:ip-address; 495 description "System management address"; 496 } 497 leaf management-vid { 498 if-feature VLAN; 499 type vlan; 500 description "System management VID"; 501 } 502 leaf-list nick-name { 503 if-feature TRILL; 504 type trill-nickname; 505 description "Nickname of the RBridge"; 506 } 507 leaf-list flag { 508 type flag-type; 509 description "Node operational flags"; 510 } 511 } 512 } // grouping l2-node-attributes 513 grouping l2-link-attributes { 514 description "L2 link attributes"; 515 container l2-link-attributes { 516 description "Containing L2 link attributes"; 517 leaf name { 518 type string; 519 description "Link name"; 520 } 521 leaf-list flag { 522 type flag-type; 523 description "Link flags"; 524 } 525 leaf rate { 526 type decimal64 { 527 fraction-digits 2; 528 } 529 description "Link rate"; 531 } 532 leaf delay { 533 type uint32; 534 description "Link delay in microseconds"; 535 } 536 leaf-list srlg { 537 type uint32; 538 description 539 "List of Shared Risk Link Groups 540 this link belongs to."; 541 } 542 } 543 } // grouping l2-link-attributes 545 grouping l2-termination-point-attributes { 546 description "L2 termination point attributes"; 547 container l2-termination-point-attributes { 548 description "Containing L2 TP attributes"; 549 leaf description { 550 type string; 551 description "Port description"; 552 } 554 leaf maximum-frame-size { 555 type uint32; 556 description "Maximum frame size"; 557 } 559 choice l2-termination-point-type { 560 description 561 "Indicates termination-point type 562 specific attributes"; 563 case ethernet { 564 leaf mac-address { 565 type yang:mac-address; 566 description "Interface MAC address"; 567 } 569 leaf eth-encapsulation { 570 type identityref { 571 base eth-encapsulation-type; 572 } 573 description 574 "Encapsulation type of this 575 ternimation point."; 576 } 578 leaf port-vlan-id { 579 if-feature VLAN; 580 type vlan; 581 description "Port VLAN ID"; 582 } 584 list vlan-id-name { 585 if-feature VLAN; 586 key "vlan-id"; 587 description "Interface configured VLANs"; 588 leaf vlan-id { 589 type vlan; 590 description "VLAN ID"; 591 } 592 leaf vlan-name { 593 type string; 594 description "VLAN Name"; 595 } 596 } 597 } //case ethernet 599 case legacy { 600 leaf encapsulation { 601 type identityref { 602 base encapsulation-type; 603 } 604 description 605 "Encapsulation type of this termination point."; 606 } 607 } //case legacy 609 } //choice termination-point-type 611 leaf tp-state { 612 type enumeration { 613 enum in-use { 614 value 0; 615 description 616 "the termination point is in forwarding state"; 617 } 618 enum blocking { 619 value 1; 620 description 621 "the termination point is in blocking state"; 622 } 623 enum down { 624 value 2; 625 description 626 "the termination point is in down state"; 627 } 628 enum others { 629 value 3; 630 description 631 "the termination point is in other state"; 632 } 633 } 634 config false; 635 description "State of the termination point"; 636 } 637 } 638 } // grouping l2-termination-point-attributes 640 /*** grouping of network/node/link/tp leaf-refs ***/ 642 grouping network-ref { 643 description 644 "Grouping for an absolute reference to a network topology 645 instance."; 646 leaf network-ref { 647 type leafref { 648 path "/nw:network/nw:network-id"; 649 } 650 description 651 "An absolute reference to a network topology instance."; 652 } 653 } 655 grouping link-ref { 656 description 657 "Grouping for an absolute reference to a link instance."; 658 uses network-ref; 659 leaf link-ref { 660 type leafref { 661 path "/nw:network" 662 +"[nw:network-id = current()/../network-ref]" 663 +"/nt:link/nt:link-id"; 664 } 665 description 666 "An absolute reference to a link instance."; 667 } 668 } 670 grouping node-ref { 671 description 672 "Grouping for an absolute reference to a node instance."; 673 uses network-ref; 674 leaf node-ref { 675 type leafref { 676 path "/nw:network" 677 +"[nw:network-id = current()/../network-ref]" 678 +"/nw:node/nw:node-id"; 679 } 680 description 681 "An absolute reference to a node instance."; 682 } 683 } 685 grouping tp-ref { 686 description 687 "Grouping for an absolute reference to a termination point."; 688 uses node-ref; 689 leaf tp-ref { 690 type leafref { 691 path "/nw:network" 692 +"[nw:network-id = current()/../network-ref]" 693 +"/nw:node[nw:node-id = current()/../node-ref]" 694 +"/nt:termination-point/nt:tp-id"; 695 } 696 description 697 "Grouping for an absolute reference to a TP."; 698 } 699 } 701 /* 702 * Data nodes 703 */ 704 augment "/nw:network/nw:network-types" { 705 description 706 "Introduce new network type for L2 topology"; 707 uses l2-network-type; 708 } 710 augment "/nw:network" { 711 when "nw:network-types/l2-network" { 712 description 713 "Augmentation parameters apply only for networks 714 with L2 topology"; 715 } 716 description 717 "Configuration parameters for the L2 network 718 as a whole"; 719 uses l2-network-attributes; 720 } 722 augment "/nw:network/nw:node" { 723 when "../nw:network-types/l2-network" { 724 description 725 "Augmentation parameters apply only for networks 726 with L2 topology"; 727 } 728 description 729 "Configuration parameters for L2 at the node 730 level"; 731 uses l2-node-attributes; 732 } 734 augment "/nw:network/nt:link" { 735 when "/nw:network/nw:network-types/l2-network" { 736 description 737 "Augmentation parameters apply only for networks 738 with L2 topology"; 739 } 740 description "Augment L2 topology link information"; 741 uses l2-link-attributes; 742 } 744 augment "/nw:network/nw:node/nt:termination-point" { 745 when "/nw:network/nw:network-types/l2-network" { 746 description 747 "Augmentation parameters apply only for networks 748 with L2 topology"; 749 } 750 description 751 "Augment L2 topology termination point configuration"; 753 uses l2-termination-point-attributes; 754 } 756 /* 757 * Notifications 758 */ 760 notification l2-node-event { 761 description "Notification event for L2 node"; 762 leaf event-type { 763 type l2-network-event-type; 764 description "Event type"; 765 } 766 uses node-ref; 767 uses l2-network-type; 768 uses l2-node-attributes; 769 } 771 notification l2-link-event { 772 description "Notification event for L2 link"; 773 leaf event-type { 774 type l2-network-event-type; 775 description "Event type"; 776 } 777 uses link-ref; 778 uses l2-network-type; 779 uses l2-link-attributes; 780 } 782 notification l2-termination-point-event { 783 description "Notification event for L2 termination point"; 784 leaf event-type { 785 type l2-network-event-type; 786 description "Event type"; 787 } 788 uses tp-ref; 789 uses l2-network-type; 790 uses l2-termination-point-attributes; 791 } 793 } // module l2-topology 794 796 4. IANA Considerations 798 TBD 800 5. Security Considerations 802 The transport protocol used for sending the topology data MUST 803 support authentication and SHOULD support encryption. The data-model 804 by itself does not create any security implications. 806 6. Acknowledgements 808 The authors would like to acknowledge the comments and suggestions 809 received from Susan Hares, Alia Atlas, Juergen Schoenwaelder, Mach 810 Chen, Alexander Clemm and Sriganesh Kini. 812 7. References 814 7.1. Normative References 816 [I-D.ietf-i2rs-yang-network-topo] 817 Clemm, A., Medved, J., Varga, R., Tkacik, T., Bahadur, N., 818 and H. Ananthakrishnan, "A Data Model for Network 819 Topologies", draft-ietf-i2rs-yang-network-topo-01 (work in 820 progress), June 2015. 822 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 823 Requirement Levels", BCP 14, RFC 2119, March 1997. 825 [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the 826 Network Configuration Protocol (NETCONF)", RFC 6020, 827 October 2010. 829 [RFC6021] Schoenwaelder, J., "Common YANG Data Types", RFC 6021, 830 October 2010. 832 7.2. Informative References 834 [I-D.amante-i2rs-topology-use-cases] 835 Medved, J., Previdi, S., Lopez, V., and S. Amante, 836 "Topology API Use Cases", draft-amante-i2rs-topology-use- 837 cases-01 (work in progress), October 2013. 839 [I-D.medved-i2rs-topology-requirements] 840 Medved, J., Previdi, S., Gredler, H., Nadeau, T., and S. 841 Amante, "Topology API Requirements", draft-medved-i2rs- 842 topology-requirements-00 (work in progress), February 843 2013. 845 Authors' Addresses 847 Jie Dong 848 Huawei Technologies 849 Huawei Campus, No. 156 Beiqing Rd. 850 Beijing 100095 851 China 853 Email: jie.dong@huawei.com 855 Xiugang Wei 856 Huawei Technologies 857 Huawei Campus, No. 156 Beiqing Rd. 858 Beijing 100095 859 China 861 Email: weixiugang@huawei.com