Network Working Group J. Dong
Internet-Draft X. Wei
Intended status: Standards Track Huawei Technologies
Expires: January 7, 2016 July 6, 2015
A YANG Data Model for Layer-2 Network Topologies
draft-ietf-i2rs-yang-l2-network-topology-01
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 January 7, 2016.
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 January 7, 2016 [Page 1]
Internet-Draft Layer-2 Network Topology Data Model July 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 . . . . . . . . . . . . . . . . 6
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
5. Security Considerations . . . . . . . . . . . . . . . . . . . 18
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 18
7.1. Normative References . . . . . . . . . . . . . . . . . . 18
7.2. Informative References . . . . . . . . . . . . . . . . . 18
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19
1. Introduction
[I-D.ietf-i2rs-yang-network-topo] defines the Yang [RFC6020]
[RFC6021] data models of the abstract (generic) network and network
topology. Such models can be augmented with technology-specific
details to build more specific topology models.
This document defines the Yang data model for Layer 2 network
topologies by augmenting the generic network and network topology
data models with L2 specific topology attributes.
2. Layer-2 Topology Model
The Layer 2 network topology model is designed to be generic and
applicable to Layer 2 networks built with different L2 technologies.
The Layer 2 topology model applies the generic network and network
topology models to Layer 2 network topologies, and augments the
generic models with information specific in Layer 2 networks. The
relationship between the Layer 2 topology model and the generic
network and network topology model is shown in the figure below:
Dong & Wei Expires January 7, 2016 [Page 2]
Internet-Draft Layer-2 Network Topology Data Model July 2015
+---------------------+
| ietf-network |
+----------^----------+
|
|
+---------------------+
|ietf-network-topology|
+----------^----------+
|
|
+----------^----------+
| ietf-l2-topology |
+---------------------+
Figure 1. L2-topology model structure
In order to represent a Layer 2 network topology, the generic network
and topology models are augmented with Layer-2 specific information,
such as the identifiers, descriptions, attributes and states of the
Layer-2 networks, nodes, links and termination points. Some of the
information may be collected via Link Layer Discovery Protocl (LLDP)
or other Layer-2 protocols, and some of them may be locally
configured.
The structure of "ietf-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.
module: ietf-l2-topology
augment /nw:network/nw:network-types:
+--rw l2-network!
augment /nw:network:
+--rw l2-network-attributes
+--rw name? string
+--rw flag* flag-type
augment /nw:network/nw:node:
+--rw l2-node-attributes
+--rw name? string
+--rw description? string
+--rw management-address* inet:ip-address
+--rw management-vid? vlan {VLAN}?
+--rw nick-name* trill-nickname {TRILL}?
+--rw flag* flag-type
augment /nw:network/nt:link:
+--rw l2-link-attributes
+--rw name? string
+--rw flag* flag-type
Dong & Wei Expires January 7, 2016 [Page 3]
Internet-Draft Layer-2 Network Topology Data Model July 2015
+--rw rate? decimal64
+--rw delay? uint32
+--rw srlg* uint32
augment /nw:network/nw:node/nt:termination-point:
+--rw l2-termination-point-attributes
+--rw description? string
+--rw maximum-frame-size? uint32
+--rw (l2-termination-point-type)?
| +--:(ethernet)
| | +--rw mac-address? yang:mac-address
| | +--rw eth-encapsulation? identityref
| | +--rw port-vlan-id? vlan {VLAN}?
| | +--rw vlan-id-name* [vlan-id] {VLAN}?
| | +--rw vlan-id vlan
| | +--rw vlan-name? string
| +--:(legacy)
| +--rw encapsulation? identityref
+--ro tp-state? enumeration
notifications:
+---n l2-node-event
| +--ro event-type? l2-network-event-type
| +--ro network-ref? leafref
| +--ro node-ref? leafref
| +--ro l2-network!
| +--ro l2-node-attributes
| +--ro name? string
| +--ro description? string
| +--ro management-address* inet:ip-prefix
| +--ro management-vid? vlan {VLAN}?
| +--ro nick-name* trill-nickname {TRILL}?
| +--ro flag* flag-type
+---n l2-link-event
| +--ro event-type? l2-network-event-type
| +--ro network-ref? leafref
| +--ro link-ref? leafref
| +--ro l2-network!
| +--ro l2-link-attributes
| +--ro name? string
| +--ro flag* flag-type
| +--ro rate? decimal64
| +--ro delay? uint32
| +--ro srlg* uint32
+---n l2-termination-point-event
+--ro event-type? l2-network-event-type
+--ro network-ref? leafref
+--ro node-ref? leafref
+--ro tp-ref? leafref
+--ro l2-network!
Dong & Wei Expires January 7, 2016 [Page 4]
Internet-Draft Layer-2 Network Topology Data Model July 2015
+--ro l2-termination-point-attributes
+--ro description? string
+--ro maximum-frame-size? uint32
+--ro (termination-point-type)?
| +--:(ethernet)
| | +--ro mac-address? yang:mac-address
| | +--ro eth-encapsulation? identityref
| | +--ro port-vlan-id? vlan {VLAN}?
| | +--ro vlan-id-name* [vlan-id] {VLAN}?
| | +--ro vlan-id vlan
| | +--ro vlan-name? string
| +--:(legacy)
| +--ro encapsulation? identityref
+--ro tp-state? enumeration
The L2-topology module augments the generic ietf-network and ietf-
network-topology modules 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 ietf-network module in
[I-D.ietf-i2rs-yang-network-topo].
o Additional network attributes are introduced in a grouping "l2-
network-attributes", which augments the "network" list of the
ietf-network module. The attributes include Layer-2 network name
and a set of flags. Each type of flag is represented by a
separate identity.
o Additional data objects for Layer-2 nodes are introduced by
augmenting the "node" list of the generic ietf-network module.
New objects include Layer-2 node identifier, description,
management address, and a set of flags.
o Additional data objects for Layer-2 termination points are
introduced by augmenting the "termination-point" list of the ietf-
network-topology module defined in
[I-D.ietf-i2rs-yang-network-topo]. New objects include Layer-2
termination point descriptions, Layer-2 termination point type
specific attributes and Layer-2 termination point states.
o Links in the ietf-network-topology module are augmented as well
with a set of Layer-2 parameters, allowing to associate a link
with a name, a set of Layer-2 link attributes and flags.
o The optional L2 technology specific attributes are introduced in
this module as Layer-2 features.
Dong & Wei Expires January 7, 2016 [Page 5]
Internet-Draft Layer-2 Network Topology Data Model July 2015
3. Layer-2 Topology Yang Module
<CODE BEGINS>
file "ietf-l2-topology@2015-06-23.yang"
module ietf-l2-topology {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology";
prefix "l2t";
import ietf-network {
prefix "nw";
}
import ietf-network-topology {
prefix "nt";
}
import ietf-inet-types {
prefix "inet";
}
import ietf-yang-types {
prefix "yang";
}
organization "TBD";
contact "I-D Editor: jie.dong@huawei.com";
description
"This module defines a basic model for
the layer-2 topology of a network";
revision "2015-06-23" {
description "Initial revision";
reference "draft-ietf-i2rs-l2-network-topology-01";
}
/*
* Typedefs
*/
typedef vlan {
type uint16 {
range "0..4095";
}
description "VLAN ID";
}
Dong & Wei Expires January 7, 2016 [Page 6]
Internet-Draft Layer-2 Network Topology Data Model July 2015
typedef trill-nickname {
type uint16;
description "TRILL Nickname";
}
typedef flag-type {
type identityref {
base "flag-identity";
}
description "Base type for flags";
}
typedef l2-network-event-type {
type enumeration {
enum "add" {
value 0;
description "An L2 node or link or termination-point
has been added";
}
enum "remove" {
value 1;
description "An L2 node or link or termination-point
has been removed";
}
enum "update" {
value 2;
description "An L2 node or link or termination-point
has been updated";
}
}
description "l2 network event type for notifications";
} // l2-topology-event-type
/*
* Features
*/
feature VLAN {
description
"Indicates that the system supports the
vlan functions";
}
feature QinQ {
description
"Indicates that the system supports the
Dong & Wei Expires January 7, 2016 [Page 7]
Internet-Draft Layer-2 Network Topology Data Model July 2015
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";
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 eth-encapsulation-type {
base encapsulation-type;
description
Dong & Wei Expires January 7, 2016 [Page 8]
Internet-Draft Layer-2 Network Topology Data Model July 2015
"Base identity from which specific ethernet
encapsulation types are derived.";
}
identity ethernet {
base eth-encapsulation-type;
description
"native ethernet encapsulation";
}
identity vlan {
base eth-encapsulation-type;
description
"vlan encapsulation";
}
identity qinq {
base eth-encapsulation-type;
description
"qinq encapsulation";
}
identity pbb {
base eth-encapsulation-type;
description
"pbb encapsulation";
}
identity trill {
base eth-encapsulation-type;
description
"trill encapsulation";
}
identity vpls {
base eth-encapsulation-type;
description
"vpls encapsulation";
}
identity vxlan {
base eth-encapsulation-type;
description
"vxlan encapsulation";
}
identity frame-relay {
Dong & Wei Expires January 7, 2016 [Page 9]
Internet-Draft Layer-2 Network Topology Data Model July 2015
base encapsulation-type;
description
"Frame Relay encapsulation";
}
identity ppp {
base encapsulation-type;
description
"PPP encapsulation";
}
identity hdlc {
base encapsulation-type;
description
"HDLC encapsulation";
}
identity atm {
base encapsulation-type;
description
"Base identity from which specific ATM
encapsulation types are derived.";
}
identity pwe3 {
base encapsulation-type;
description
"Base identity from which specific pw
encapsulation types are derived.";
}
/*
* Groupings
*/
grouping l2-network-type {
description "Identify the topology type to be L2.";
container l2-network {
presence "indicates L2 Network";
description
"The presence of the container node indicates
L2 Topology";
}
}
Dong & Wei Expires January 7, 2016 [Page 10]
Internet-Draft Layer-2 Network Topology Data Model July 2015
grouping l2-network-attributes {
description "L2 Topology scope attributes";
container l2-network-attributes {
description "Containing L2 network attributes";
leaf name {
type string;
description "Name of the L2 network";
}
leaf-list flag {
type flag-type;
description "L2 network flags";
}
}
}
grouping l2-node-attributes {
description "L2 node attributes";
container l2-node-attributes {
description "Containing L2 node attributes";
leaf name {
type string;
description "Node name";
}
leaf description {
type string;
description "Node description";
}
leaf-list management-address {
type inet:ip-address;
description "System management address";
}
leaf management-vid {
if-feature VLAN;
type vlan;
description "System management VID";
}
leaf-list nick-name {
if-feature TRILL;
type trill-nickname;
description "Nickname of the RBridge";
}
leaf-list flag {
type flag-type;
description "Node operational flags";
}
}
} // grouping l2-node-attributes
Dong & Wei Expires January 7, 2016 [Page 11]
Internet-Draft Layer-2 Network Topology Data Model July 2015
grouping l2-link-attributes {
description "L2 link attributes";
container l2-link-attributes {
description "Containing L2 link attributes";
leaf name {
type string;
description "Link name";
}
leaf-list flag {
type flag-type;
description "Link flags";
}
leaf rate {
type decimal64 {
fraction-digits 2;
}
description "Link rate";
}
leaf delay {
type uint32;
description "Link delay in microseconds";
}
leaf-list srlg {
type uint32;
description
"List of Shared Risk Link Groups
this link belongs to.";
}
}
} // grouping l2-link-attributes
grouping l2-termination-point-attributes {
description "L2 termination point attributes";
container l2-termination-point-attributes {
description "Containing L2 TP attributes";
leaf description {
type string;
description "Port description";
}
leaf maximum-frame-size {
type uint32;
description "Maximum frame size";
}
choice l2-termination-point-type {
description
Dong & Wei Expires January 7, 2016 [Page 12]
Internet-Draft Layer-2 Network Topology Data Model July 2015
"Indicates termination-point type
specific attributes";
case ethernet {
leaf mac-address {
type yang:mac-address;
description "Interface MAC address";
}
leaf eth-encapsulation {
type identityref {
base eth-encapsulation-type;
}
description
"Encapsulation type of this
ternimation point.";
}
leaf port-vlan-id {
if-feature VLAN;
type vlan;
description "Port VLAN ID";
}
list vlan-id-name {
if-feature VLAN;
key "vlan-id";
description "Interface configured VLANs";
leaf vlan-id {
type vlan;
description "VLAN ID";
}
leaf vlan-name {
type string;
description "VLAN Name";
}
}
} //case ethernet
case legacy {
leaf encapsulation {
type identityref {
base encapsulation-type;
}
description
"Encapsulation type of this termination point.";
}
} //case legacy
Dong & Wei Expires January 7, 2016 [Page 13]
Internet-Draft Layer-2 Network Topology Data Model July 2015
} //choice termination-point-type
leaf tp-state {
type enumeration {
enum in-use {
value 0;
description
"the termination point is in forwarding state";
}
enum blocking {
value 1;
description
"the termination point is in blocking state";
}
enum down {
value 2;
description
"the termination point is in down state";
}
enum others {
value 3;
description
"the termination point is in other state";
}
}
config false;
description "State of the termination point";
}
}
} // grouping l2-termination-point-attributes
/*** grouping of network/node/link/tp leaf-refs ***/
grouping network-ref {
description
"Grouping for an absolute reference to a network topology
instance.";
leaf network-ref {
type leafref {
path "/nw:network/nw:network-id";
}
description
"An absolute reference to a network topology instance.";
}
}
grouping link-ref {
description
Dong & Wei Expires January 7, 2016 [Page 14]
Internet-Draft Layer-2 Network Topology Data Model July 2015
"Grouping for an absolute reference to a link instance.";
uses network-ref;
leaf link-ref {
type leafref {
path "/nw:network"
+"[nw:network-id = current()/../network-ref]"
+"/nt:link/nt:link-id";
}
description
"An absolute reference to a link instance.";
}
}
grouping node-ref {
description
"Grouping for an absolute reference to a node instance.";
uses network-ref;
leaf node-ref {
type leafref {
path "/nw:network"
+"[nw:network-id = current()/../network-ref]"
+"/nw:node/nw:node-id";
}
description
"An absolute reference to a node instance.";
}
}
grouping tp-ref {
description
"Grouping for an absolute reference to a termination point.";
uses node-ref;
leaf tp-ref {
type leafref {
path "/nw:network"
+"[nw:network-id = current()/../network-ref]"
+"/nw:node[nw:node-id = current()/../node-ref]"
+"/nt:termination-point/nt:tp-id";
}
description
"Grouping for an absolute reference to a TP.";
}
}
/*
* Data nodes
*/
Dong & Wei Expires January 7, 2016 [Page 15]
Internet-Draft Layer-2 Network Topology Data Model July 2015
augment "/nw:network/nw:network-types" {
description
"Introduce new network type for L2 topology";
uses l2-network-type;
}
augment "/nw:network" {
when "nw:network-types/l2-network" {
description
"Augmentation parameters apply only for networks
with L2 topology";
}
description
"Configuration parameters for the L2 network
as a whole";
uses l2-network-attributes;
}
augment "/nw:network/nw:node" {
when "../nw:network-types/l2-network" {
description
"Augmentation parameters apply only for networks
with L2 topology";
}
description
"Configuration parameters for L2 at the node
level";
uses l2-node-attributes;
}
augment "/nw:network/nt:link" {
when "/nw:network/nw:network-types/l2-network" {
description
"Augmentation parameters apply only for networks
with L2 topology";
}
description "Augment L2 topology link information";
uses l2-link-attributes;
}
augment "/nw:network/nw:node/nt:termination-point" {
when "/nw:network/nw:network-types/l2-network" {
description
"Augmentation parameters apply only for networks
with L2 topology";
}
description
"Augment L2 topology termination point configuration";
Dong & Wei Expires January 7, 2016 [Page 16]
Internet-Draft Layer-2 Network Topology Data Model July 2015
uses l2-termination-point-attributes;
}
/*
* Notifications
*/
notification l2-node-event {
description "Notification event for L2 node";
leaf event-type {
type l2-network-event-type;
description "Event type";
}
uses node-ref;
uses l2-network-type;
uses l2-node-attributes;
}
notification l2-link-event {
description "Notification event for L2 link";
leaf event-type {
type l2-network-event-type;
description "Event type";
}
uses link-ref;
uses l2-network-type;
uses l2-link-attributes;
}
notification l2-termination-point-event {
description "Notification event for L2 termination point";
leaf event-type {
type l2-network-event-type;
description "Event type";
}
uses tp-ref;
uses l2-network-type;
uses l2-termination-point-attributes;
}
} // module l2-topology
<CODE ENDS>
4. IANA Considerations
TBD
Dong & Wei Expires January 7, 2016 [Page 17]
Internet-Draft Layer-2 Network Topology Data Model July 2015
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. Acknowledgements
The authors would like to acknowledge the comments and suggestions
received from Susan Hares, Alia Atlas, Juergen Schoenwaelder, Mach
Chen, Alexander Clemm and Sriganesh Kini.
7. References
7.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-01 (work in
progress), June 2015.
[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.
7.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.
[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.
Dong & Wei Expires January 7, 2016 [Page 18]
Internet-Draft Layer-2 Network Topology Data Model July 2015
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 January 7, 2016 [Page 19]