Network Working Group J. Dong Internet-Draft X. Wei Intended status: Standards Track Huawei Technologies Expires: October 24, 2015 April 22, 2015 A YANG Data Model for Layer-2 Network Topologies draft-ietf-i2rs-yang-l2-network-topology-00 Abstract This document defines a YANG data model for layer-2 network topologies. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on October 24, 2015. Copyright Notice Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must Dong & Wei Expires October 24, 2015 [Page 1] Internet-Draft Layer-2 Network Topology Data Model April 2015 include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Layer-2 Topology Model . . . . . . . . . . . . . . . . . . . 2 3. Layer-2 Topology Yang Module . . . . . . . . . . . . . . . . 5 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 5. Security Considerations . . . . . . . . . . . . . . . . . . . 13 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 6.1. Normative References . . . . . . . . . . . . . . . . . . 13 6.2. Informative References . . . . . . . . . . . . . . . . . 13 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 1. Introduction [I-D.medved-i2rs-topology-im] specifies the generic network topology information model, and approaches to extend the generic network topology information model to specific type of network topologies. It also provides the extensions made for Layer-3 unicast IGP, IS-IS and OSPF topologies. [I-D.ietf-i2rs-yang-network-topo] defines the Yang [RFC6020] [RFC6021] data models for generic network topology, L3 unicast IGP, IS-IS, OSPF and TED which are derived from the information model defined in [I-D.medved-i2rs-topology-im]. Besides the information collected through "live" layer-3 IGP, [I-D.amante-i2rs-topology-use-cases] also specifies the collection of network information which is not visible within the Layer 3 IGP's LSDB. Such information can be links, nodes, or properties of those links or nodes in lower layers of the network. The requirements on the topology data model in [I-D.medved-i2rs-topology-requirements] also include the physical properties associated with the ports/ interfaces, and information associated with the network element's immediately adjacent neighbors. This document defines the Yang data model for layer-2 network topologies by extending the generic network topology data model defined in [I-D.ietf-i2rs-yang-network-topo]. 2. Layer-2 Topology Model In order to represent a layer-2 network topology, the generic network topology model needs to be extended to contain layer-2 specific information. Module "l2-topology" applies the generic network topology model to layer-2 network topologies, and augments the Dong & Wei Expires October 24, 2015 [Page 2] Internet-Draft Layer-2 Network Topology Data Model April 2015 generic network topology with information specific to layer-2 networks. The relationship between the l2-topology model and the generic network topology model is shown in the figure below: +---------------------+ | network-topology | +----------+----------+ ^ | | +----------^----------+ | l2-topology | +---------------------+ Figure 1. L2-topology and generic network-topology For layer-2 network topology, there are some layer-2 specific parameters and capabilities to be added to the generic network topology model, such as properties of layer-2 links or nodes, descriptions, layer-2 addresses, encapsulations, etc. Part of the Information collected through LLDP could be included in the layer-2 network topology. The structure of "L2-topology" data model is depicted in the following diagram. Brackets enclose list keys, "rw" means configuration data, "ro" means operational state data, "?" designates optional nodes, "*" designates nodes that can have multiple instances. Dong & Wei Expires October 24, 2015 [Page 3] Internet-Draft Layer-2 Network Topology Data Model April 2015 module: ietf-l2-topology augment /nt:network/nt:network-types: +--rw l2-network! augment /nt:network: +--rw l2-network-attributes +--rw name? string +--rw flag* flag-type augment /nt:network/nt:node: +--rw l2-node-attributes +--rw name? string +--rw description? string +--rw chassis-id? yang:mac-address +--rw management-address* inet:ip-prefix +--rw management-vid? vlan +--rw nick-name? nickname {TRILL}? +--rw flag* flag-type augment /nt:network/ntopo:link: +--rw l2-link-attributes +--rw name? string +--rw rate? decimal64 +--rw flag* flag-type augment /nt:network/nt:node/ntopo:termination-point: +--rw l2-termination-point-attributes +--rw description? string +--rw mac-address? yang:mac-address +--rw port-vlan-id? vlan +--rw ppvid | +--rw ppvid? vlan | +--rw ppvid-flags? bits +--rw vlan-name* [vlan-id] | +--rw vlan-id vlan | +--rw vlan-name? string +--rw encapsulation? identityref +--rw maximum-frame-size? uint32 +--rw link-aggregation | +--rw aggregation-status? bits | +--rw aggregated-port-id? string +--ro tp-state? enumeration The L2-topology module augments the generic network-topology module as follows: o A new network type "l2-network-type" is introduced. This is represented by a container object, and is inserted under the "network-types" container of the generic network module in [I-D.ietf-i2rs-yang-network-topo]. Dong & Wei Expires October 24, 2015 [Page 4] Internet-Draft Layer-2 Network Topology Data Model April 2015 o Additional network attributes are introduced in a grouping "l2- network-attributes", which augments the "network" list of the network module in [I-D.ietf-i2rs-yang-network-topo]. The attributes include an Layer-2 network name and a set of flags. Each type of flag is represented by a separate identity. o Additional data objects for nodes are introduced by augmenting the "node" list of the generic network module. New objects include a series of layer-2 node parameters, as well as a set of flags. o Additional data objects for termination points are introduced by augmenting the "termination-point" list of the generic network- topology module. New objects include a series of port properties and parameters. o Links are augmented as well with a set of parameters, allowing to associate a link with an L2 name, the link rate and another set of flags. 3. Layer-2 Topology Yang Module file "ietf-l2-topology@2015-04-22.yang" module ietf-l2-topology { yang-version 1; namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology"; prefix "l2t"; import network { prefix "nt"; } import network-topology { prefix "ntopo"; } import ietf-inet-types { prefix "inet"; } import ietf-yang-types { prefix "yang"; } organization "TBD"; contact "I-D Editor: jie.dong@huawei.com"; description Dong & Wei Expires October 24, 2015 [Page 5] Internet-Draft Layer-2 Network Topology Data Model April 2015 "This module defines a model for the layer-2 topology of a network"; revision "2015-04-22" { description "Initial revision"; reference "draft-ietf-i2rs-yang-l2-network-topology-00"; } /* * Typedefs */ typedef vlan { description "VLAN ID"; type uint16 { range "0..4095"; } } typedef nickname { description "TRILL Nickname"; type uint16; } typedef flag-type { type identityref { base "flag-identity"; } } /* * Features */ feature QinQ { description "Indicates that the system supports the qinq functions"; } feature PBB { description "Indicates that the device supports the provider-backbone-bridging functions"; } feature VPLS { description "Indicates that the device supports the VPLS functions"; Dong & Wei Expires October 24, 2015 [Page 6] Internet-Draft Layer-2 Network Topology Data Model April 2015 reference "RFC 4761, RFC 4762"; } feature TRILL { description "Indicates that the device supports the TRILL functions"; reference "RFC 6325"; } feature VXLAN { description "Indicates that the device supports the VXLAN functions"; reference "RFC 7348"; } /* * Identities */ identity flag-identity { description "Base type for flags"; } identity encapsulation-type { description "Base identity from which specific encapsulation types are derived."; } identity ethernet { base encapsulation-type; description "native ethernet encapsulation"; } identity vlan { base encapsulation-type; description "vlan encapsulation"; } identity qinq { base encapsulation-type; description "qinq encapsulation"; } Dong & Wei Expires October 24, 2015 [Page 7] Internet-Draft Layer-2 Network Topology Data Model April 2015 identity pbb { base encapsulation-type; description "pbb encapsulation"; } identity trill { base encapsulation-type; description "trill encapsulation"; } identity vpls { base encapsulation-type; description "vpls encapsulation"; } identity vxlan { base encapsulation-type; description "vxlan encapsulation"; } /* * Groupings */ grouping l2-network-type { container l2-network { presence "indicates L2 Network"; } } grouping l2-network-attributes { container l2-network-attributes { leaf name { description "Name of the network"; type string; } leaf-list flag { description "L2 network flags"; type flag-type; } } Dong & Wei Expires October 24, 2015 [Page 8] Internet-Draft Layer-2 Network Topology Data Model April 2015 } grouping l2-node-attributes { container l2-node-attributes { leaf name { description "Node name"; type string; } leaf description { description "Node description"; type string; } leaf chassis-id { description "System MAC address"; type yang:mac-address; } leaf-list management-address { description "System management address"; type inet:ip-prefix; } leaf management-vid { description "System management VID"; type vlan; } leaf nick-name { if-feature TRILL; description "Nickname of RBridge"; type nickname; } leaf-list flag { description "Node operational flags"; type flag-type; } } } // grouping l2-node-attributes grouping l2-link-attributes { container l2-link-attributes { leaf name { description "Link name"; type string; } leaf rate { description "Link rate"; type decimal64 { Dong & Wei Expires October 24, 2015 [Page 9] Internet-Draft Layer-2 Network Topology Data Model April 2015 fraction-digits 2; } } leaf-list flag { description "Link flags"; type flag-type; } } } // grouping l2-link-attributes grouping l2-termination-point-attributes { container l2-termination-point-attributes { leaf description { description "Port description"; type string; } leaf mac-address { description "Interface MAC address"; type yang:mac-address; } leaf port-vlan-id { description "Port VLAN ID"; type vlan; } container ppvid { description "Port and protocol VLAN ID"; leaf ppvid { type vlan; } leaf ppvid-flags { type bits { bit port-protocol-vlan-supported { position 1; } bit port-protocol-vlan-enabled { position 2; } } } } list vlan-name { key "vlan-id"; description "Interface configured VLANs"; leaf vlan-id { type vlan; Dong & Wei Expires October 24, 2015 [Page 10] Internet-Draft Layer-2 Network Topology Data Model April 2015 } leaf vlan-name { type string; } } leaf encapsulation { description "encapsulation type of this termination point."; type identityref { base encapsulation-type; } } leaf maximum-frame-size { description "interface maximum frame size"; type uint32; } container link-aggregation { leaf aggregation-status { description "Link aggregation capabilities and status"; type bits { bit aggregation-capability { position 0; } bit aggregation-status { position 1; } } } leaf aggregated-port-id { type string; } } leaf tp-state { config false; type enumeration { enum "forwarding" { value 0; description "the termination point is in forwarding state"; } enum "blocking" { value 1; description "the termination point is in blocking state"; } Dong & Wei Expires October 24, 2015 [Page 11] Internet-Draft Layer-2 Network Topology Data Model April 2015 enum "others" { value 2; description "the termination point is in other state"; } } } } } // grouping l2-termination-point-attributes /* * Data nodes */ augment "/nt:network/nt:network-types" { uses l2-network-type; } augment "/nt:network" { when "nt:network-types/l2-network"; uses l2-network-attributes; } augment "/nt:network/nt:node" { when "../nt:network-types/l2-network"; uses l2-node-attributes; } augment "/nt:network/ntopo:link" { when "/nt:network/nt:network-types/l2-network"; uses l2-link-attributes; } augment "/nt:network/nt:node/ntopo:termination-point" { when "/nt:network/nt:network-types/l2-network"; uses l2-termination-point-attributes; } /* * Notifications: to be added */ } // module l2-topology Dong & Wei Expires October 24, 2015 [Page 12] Internet-Draft Layer-2 Network Topology Data Model April 2015 4. IANA Considerations This document makes no request of IANA. Note to RFC Editor: this section may be removed on publication as an RFC. 5. Security Considerations The transport protocol used for sending the topology data MUST support authentication and SHOULD support encryption. The data-model by itself does not create any security implications. 6. References 6.1. Normative References [I-D.ietf-i2rs-yang-network-topo] Clemm, A., Medved, J., Varga, R., Tkacik, T., Bahadur, N., and H. Ananthakrishnan, "A Data Model for Network Topologies", draft-ietf-i2rs-yang-network-topo-00 (work in progress), April 2015. [I-D.medved-i2rs-topology-im] Medved, J., Bahadur, N., Clemm, A., and H. Ananthakrishnan, "An Information Model for Network Topologies", draft-medved-i2rs-topology-im-01 (work in progress), October 2013. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010. [RFC6021] Schoenwaelder, J., "Common YANG Data Types", RFC 6021, October 2010. 6.2. Informative References [I-D.amante-i2rs-topology-use-cases] Medved, J., Previdi, S., Lopez, V., and S. Amante, "Topology API Use Cases", draft-amante-i2rs-topology-use- cases-01 (work in progress), October 2013. Dong & Wei Expires October 24, 2015 [Page 13] Internet-Draft Layer-2 Network Topology Data Model April 2015 [I-D.medved-i2rs-topology-requirements] Medved, J., Previdi, S., Gredler, H., Nadeau, T., and S. Amante, "Topology API Requirements", draft-medved-i2rs- topology-requirements-00 (work in progress), February 2013. Authors' Addresses Jie Dong Huawei Technologies Huawei Campus, No. 156 Beiqing Rd. Beijing 100095 China Email: jie.dong@huawei.com Xiugang Wei Huawei Technologies Huawei Campus, No. 156 Beiqing Rd. Beijing 100095 China Email: weixiugang@huawei.com Dong & Wei Expires October 24, 2015 [Page 14]