draft-ietf-i2rs-yang-l2-network-topology-03.txt   draft-ietf-i2rs-yang-l2-network-topology-04.txt 
Network Working Group J. Dong Network Working Group J. Dong
Internet-Draft X. Wei Internet-Draft X. Wei
Intended status: Standards Track Huawei Technologies Intended status: Standards Track Huawei Technologies
Expires: January 9, 2017 July 08, 2016 Expires: September 6, 2018 March 5, 2018
A YANG Data Model for Layer-2 Network Topologies A YANG Data Model for Layer-2 Network Topologies
draft-ietf-i2rs-yang-l2-network-topology-03 draft-ietf-i2rs-yang-l2-network-topology-04
Abstract Abstract
This document defines a YANG data model for Layer 2 network This document defines a YANG data model for Layer 2 network
topologies. topologies.
Requirements Language Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 9, 2017. This Internet-Draft will expire on September 6, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Layer 2 Topology Model . . . . . . . . . . . . . . . . . . . 2 2. Layer 2 Topology Model . . . . . . . . . . . . . . . . . . . 2
3. Layer-2 Topology Yang Module . . . . . . . . . . . . . . . . 6 3. Layer 2 Topology Yang Module . . . . . . . . . . . . . . . . 5
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
5. Security Considerations . . . . . . . . . . . . . . . . . . . 19 5. Security Considerations . . . . . . . . . . . . . . . . . . . 17
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.1. Normative References . . . . . . . . . . . . . . . . . . 19 7.1. Normative References . . . . . . . . . . . . . . . . . . 19
7.2. Informative References . . . . . . . . . . . . . . . . . 19 7.2. Informative References . . . . . . . . . . . . . . . . . 19
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 20 Appendix A. Companion YANG model for non-NMDA compliant
implementations . . . . . . . . . . . . . . . . . . 20
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25
1. Introduction 1. Introduction
[I-D.ietf-i2rs-yang-network-topo] defines the YANG [RFC6020] [I-D.ietf-i2rs-yang-network-topo] defines the YANG [RFC6020]
[RFC6991] [I-D.ietf-netmod-rfc6020bis] data models of the abstract [RFC7950] data models of the abstract (generic) network and network
(generic) network and network topology. Such models can be augmented topology. Such models can be augmented with technology-specific
with technology-specific details to build more specific topology details to build more specific topology models.
models.
This document defines the YANG data model for Layer 2 network This document defines the YANG data model for Layer 2 network
topologies by augmenting the generic network and network topology topologies by augmenting the generic network and network topology
data models with L2 specific topology attributes. data models with L2 specific topology attributes.
2. Layer 2 Topology Model 2. Layer 2 Topology Model
The Layer 2 network topology model is designed to be generic and The Layer 2 network topology model is designed to be generic and
applicable to Layer 2 networks built with different L2 technologies. applicable to Layer 2 networks built with different L2 technologies.
It can be used to describe both the physical and the logical It can be used to describe both the physical and the logical
(virtual) L2 network topologies. (virtual) L2 network topologies.
The Layer 2 topology model applies the generic network and network The Layer 2 topology model applies the generic network and network
topology models to Layer 2 network topologies, and augments the topology models to Layer 2 network topologies, and augments the
generic models with information specific in Layer 2 networks. The generic models with information specific to Layer 2 networks. The
relationship between the Layer 2 topology model and the generic relationship between the Layer 2 topology model and the generic
network and network topology model is shown in the figure below: network and network topology model is shown in the figure below:
+---------------------+ +---------------------+
| ietf-network | | ietf-network |
+----------^----------+ +----------^----------+
| |
| |
+---------------------+ +---------------------+
|ietf-network-topology| |ietf-network-topology|
skipping to change at page 3, line 29 skipping to change at page 3, line 29
In order to represent a Layer 2 network topology, the generic network In order to represent a Layer 2 network topology, the generic network
and topology models are augmented with Layer-2 specific information, and topology models are augmented with Layer-2 specific information,
such as the identifiers, descriptions, attributes and states of the such as the identifiers, descriptions, attributes and states of the
Layer-2 networks, nodes, links and termination points. Some of the Layer-2 networks, nodes, links and termination points. Some of the
information may be collected via Link Layer Discovery Protocol (LLDP) information may be collected via Link Layer Discovery Protocol (LLDP)
or other Layer-2 protocols, and some of them may be locally or other Layer-2 protocols, and some of them may be locally
configured. configured.
The structure of "ietf-l2-topology" data model is depicted in the The structure of "ietf-l2-topology" data model is depicted in the
following diagram. Brackets enclose list keys, "rw" means following diagram. The notation syntax follows
configuration data, "ro" means operational state data, "?" designates [I-D.ietf-netmod-yang-tree-diagrams]. For purpose of brevity,
optional nodes, "*" designates nodes that can have multiple notifications are not depicted.
instances.
module: ietf-l2-topology module: ietf-l2-topology
augment /nw:networks/nw:network/nw:network-types: augment /nw:networks/nw:network/nw:network-types:
+--rw l2-network! +--rw l2-network!
augment /nw:networks/nw:network: augment /nw:networks/nw:network:
+--rw l2-network-attributes +--rw l2-network-attributes
+--rw name? string +--rw name? string
+--rw flag* flag-type +--rw flag* flag-type
augment /nw:networks/nw:network/nw:node: augment /nw:networks/nw:network/nw:node:
+--rw l2-node-attributes +--rw l2-node-attributes
+--rw name? string +--rw name? string
+--rw description? string +--rw description? string
+--rw management-address* inet:ip-address +--rw management-address* inet:ip-address
+--rw sys-mac-address? yang:mac-address +--rw sys-mac-address? yang:mac-address
+--rw management-vid? vlan {VLAN}? +--rw management-vid? vlan {VLAN}?
+--rw nick-name* trill-nickname {TRILL}? +--rw nick-name* trill-nickname {TRILL}?
+--rw vn-id* vni {VXLAN}? +--rw vn-id* vni {VXLAN}?
+--rw flag* flag-type +--rw flag* flag-type
augment /nw:networks/nw:network/nt:link: augment /nw:networks/nw:network/nt:link:
+--rw l2-link-attributes +--rw l2-link-attributes
+--rw name? string +--rw name? string
+--rw flag* flag-type +--rw flag* flag-type
+--rw rate? decimal64 +--rw rate? decimal64
+--rw delay? uint32 +--rw delay? uint32
+--rw srlg* uint32 +--rw srlg* uint32
augment /nw:networks/nw:network/nw:node/nt:termination-point: augment /nw:networks/nw:network/nw:node/nt:termination-point:
+--rw l2-termination-point-attributes +--rw l2-termination-point-attributes
+--rw description? string +--rw description? string
+--rw maximum-frame-size? uint32 +--rw maximum-frame-size? uint32
+--rw (l2-termination-point-type)? +--rw (l2-termination-point-type)?
| +--:(ethernet) | +--:(ethernet)
| | +--rw mac-address? yang:mac-address | | +--rw mac-address? yang:mac-address
| | +--rw eth-encapsulation? identityref | | +--rw eth-encapsulation? identityref
| | +--rw port-vlan-id? vlan {VLAN}? | | +--rw port-vlan-id? vlan {VLAN}?
| | +--rw vlan-id-name* [vlan-id] {VLAN}? | | +--rw vlan-id-name* [vlan-id] {VLAN}?
| | +--rw vlan-id vlan | | +--rw vlan-id vlan
| | +--rw vlan-name? string | | +--rw vlan-name? string
| +--:(legacy) | +--:(legacy)
| +--rw layer-2-address? yang:phys-address | +--rw layer-2-address? yang:phys-address
| +--rw encapsulation? identityref | +--rw encapsulation? identityref
+--ro tp-state? enumeration +--ro tp-state? enumeration
notifications: notifications:
+---n l2-node-event +---n l2-node-event
| +--ro event-type? l2-network-event-type | +--ro event-type?
| +--ro network-ref? -> /nw:networks/network/network-id | +--ro node-ref?
| +--ro node-ref? -> /nw:networks/network[nw:network-id = current()/../network-ref]/node/node-id | +--ro network-ref?
| +--ro l2-network! | +--ro l2-network!
| +--ro l2-node-attributes | +--ro l2-node-attributes
| +--ro name? string +---n l2-link-event
| +--ro description? string | +--ro event-type?
| +--ro management-address* inet:ip-address | +--ro link-ref?
| +--ro sys-mac-address? yang:mac-address | +--ro network-ref?
| +--ro management-vid? vlan {VLAN}? | +--ro l2-network!
| +--ro nick-name* trill-nickname {TRILL}? | +--ro l2-link-attributes
| +--ro vn-id* vni {VXLAN}? +---n l2-termination-point-event
| +--ro flag* flag-type +--ro event-type?
+---n l2-link-event +--ro tp-ref?
| +--ro event-type? l2-network-event-type +--ro node-ref?
| +--ro network-ref? -> /nw:networks/network/network-id +--ro network-ref?
| +--ro link-ref? -> /nw:networks/network[nw:network-id = current()/../network-ref]/nt:link/link-id +--ro l2-network!
| +--ro l2-network! +--ro l2-termination-point-attributes
| +--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? -> /nw:networks/network/network-id
+--ro node-ref? -> /nw:networks/network[nw:network-id = current()/../network-ref]/node/node-id
+--ro tp-ref? -> /nw:networks/network[nw:network-id = current()/../network-ref]/node[nw:node-id = current()/../node-ref]/nt:termination-point/tp-id
+--ro l2-network!
+--ro l2-termination-point-attributes
+--ro description? string
+--ro maximum-frame-size? uint32
+--ro (l2-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 layer-2-address? yang:phys-address
| +--ro encapsulation? identityref
+--ro tp-state? enumeration
The L2-topology module augments the generic ietf-network and ietf- The L2-topology module augments the generic ietf-network and ietf-
network-topology modules as follows: network-topology modules as follows:
o A new network type "l2-network-type" is introduced. This is o A new network type "l2-network-type" is introduced. This is
represented by a container object, and is inserted under the represented by a container object, and is inserted under the
"network-types" container of the generic ietf-network module in "network-types" container of the generic ietf-network module in
[I-D.ietf-i2rs-yang-network-topo]. [I-D.ietf-i2rs-yang-network-topo].
o Additional network attributes are introduced in a grouping "l2- o Additional network attributes are introduced in a grouping "l2-
skipping to change at page 6, line 12 skipping to change at page 5, line 30
termination point descriptions, Layer-2 termination point type termination point descriptions, Layer-2 termination point type
specific attributes and Layer-2 termination point states. specific attributes and Layer-2 termination point states.
o Links in the ietf-network-topology module are augmented as well 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 set of Layer-2 parameters, allowing to associate a link
with a name, a set of Layer-2 link attributes and flags. with a name, a set of Layer-2 link attributes and flags.
o The optional L2 technology specific attributes are introduced in o The optional L2 technology specific attributes are introduced in
this module as Layer-2 features. this module as Layer-2 features.
3. Layer-2 Topology Yang Module 3. Layer 2 Topology Yang Module
<CODE BEGINS> file "ietf-l2-topology@2016-07-07.yang" <CODE BEGINS> file "ietf-l2-topology@2018-03-05.yang"
module ietf-l2-topology { module ietf-l2-topology {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology"; namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology";
prefix "l2t"; prefix "l2t";
import ietf-network { import ietf-network {
prefix "nw"; prefix "nw";
} }
import ietf-network-topology { import ietf-network-topology {
prefix "nt"; prefix "nt";
} }
import ietf-inet-types { import ietf-inet-types {
prefix "inet"; prefix "inet";
} reference "RFC 6991";
}
import ietf-yang-types { import ietf-yang-types {
prefix "yang"; prefix "yang";
} reference "RFC 6991";
}
organization organization
"IETF I2RS (Interface to the Routing System) Working Group"; "IETF I2RS (Interface to the Routing System) Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/i2rs/> "WG Web: <http://tools.ietf.org/wg/i2rs/>
WG List: <mailto:i2rs@ietf.org> WG List: <mailto:i2rs@ietf.org>
WG Chair: Susan Hares Editor: Jie Dong
<mailto:shares@ndzh.com> <mailto:jie.dong@huawei.com>
WG Chair: Russ White Editor: Xiugang Wei
<mailto:russ@riw.us> <mailto:weixiugang@huawei.com>";
Editor: Jie Dong description
<mailto:jie.dong@huawei.com> "This module defines a basic model for
the layer-2 topology of a network.
Editor: Xiugang Wei Copyright (c) 2018 IETF Trust and the persons identified as
<mailto:weixiugang@huawei.com>"; authors of the code. All rights reserved.
description Redistribution and use in source and binary forms, with or
"This module defines a basic model for without modification, is permitted pursuant to, and subject
the layer-2 topology of a network"; to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
revision "2016-07-07" { This version of this YANG module is part of
description "Initial revision"; draft-ietf-i2rs-yang-l2-network-topo-04;
reference "draft-ietf-i2rs-l2-network-topology-03"; see the RFC itself for full legal notices.";
}
/* revision "2018-03-05" {
* Typedefs description "Initial revision";
*/ reference "draft-ietf-i2rs-l2-network-topology-04";
}
typedef vlan { /*
type uint16 { * Typedefs
range "0..4095"; */
}
description "VLAN ID";
}
typedef trill-nickname { typedef vlan {
type uint16; type uint16 {
description "TRILL Nickname"; range "0..4095";
} }
description "VLAN ID";
}
typedef trill-nickname {
type uint16;
description "TRILL Nickname";
}
typedef vni { typedef vni {
type uint32 { type uint32 {
range "1..16777215"; range "1..16777215";
} }
description "VxLAN Network Identifier"; description "VxLAN Network Identifier";
} }
typedef flag-type { typedef flag-type {
type identityref { type identityref {
base "flag-identity"; base "flag-identity";
} }
description "Base type for flags"; description "Base type for flags";
} }
typedef l2-network-event-type { typedef l2-network-event-type {
type enumeration { type enumeration {
enum "add" { enum "add" {
value 0; value 0;
description "An L2 node or link or termination-point description "An L2 node or link or termination-point
has been added"; has been added";
} }
enum "remove" { enum "remove" {
value 1; value 1;
description "An L2 node or link or termination-point description "An L2 node or link or termination-point
has been removed"; has been removed";
} }
enum "update" { enum "update" {
value 2; value 2;
description "An L2 node or link or termination-point description "An L2 node or link or termination-point
has been updated"; has been updated";
} }
} }
description "l2 network event type for notifications"; description "l2 network event type for notifications";
} // l2-topology-event-type } // l2-topology-event-type
/* /*
* Features * Features
*/ */
feature VLAN { feature VLAN {
description description
"Indicates that the system supports the "Indicates that the system supports the
vlan functions"; vlan functions";
} }
feature QinQ { feature QinQ {
description description
"Indicates that the system supports the "Indicates that the system supports the
qinq functions"; qinq functions";
} }
feature PBB { feature PBB {
description description
"Indicates that the device supports the
provider-backbone-bridging functions";
}
feature VPLS {
description
"Indicates that the device supports the "Indicates that the device supports the
provider-backbone-bridging functions"; VPLS functions";
} reference "RFC 4761, RFC 4762";
}
feature VPLS { feature TRILL {
description description
"Indicates that the device supports the "Indicates that the device supports the
VPLS functions"; TRILL functions";
reference "RFC 4761, RFC 4762"; reference "RFC 6325";
} }
feature TRILL { feature VXLAN {
description description
"Indicates that the device supports the "Indicates that the device supports the
TRILL functions"; VXLAN functions";
reference "RFC 6325"; reference "RFC 7348";
}
} /*
* Identities
*/
feature VXLAN { identity flag-identity {
description description "Base type for flags";
"Indicates that the device supports the }
VXLAN functions";
reference "RFC 7348";
}
/* identity encapsulation-type {
* Identities description
*/ "Base identity from which specific encapsulation
types are derived.";
}
identity flag-identity { identity eth-encapsulation-type {
description "Base type for flags"; base encapsulation-type;
} description
"Base identity from which specific ethernet
encapsulation types are derived.";
identity encapsulation-type { }
description
"Base identity from which specific encapsulation
types are derived.";
}
identity eth-encapsulation-type { identity ethernet {
base encapsulation-type; base eth-encapsulation-type;
description description
"Base identity from which specific ethernet "native ethernet encapsulation";
encapsulation types are derived."; }
} identity vlan {
base eth-encapsulation-type;
description
"vlan encapsulation";
}
identity ethernet { identity qinq {
base eth-encapsulation-type; base eth-encapsulation-type;
description description
"native ethernet encapsulation"; "qinq encapsulation";
} }
identity vlan { identity pbb {
base eth-encapsulation-type; base eth-encapsulation-type;
description description
"vlan encapsulation"; "pbb encapsulation";
} }
identity qinq { identity trill {
base eth-encapsulation-type; base eth-encapsulation-type;
description description
"qinq encapsulation"; "trill encapsulation";
}
} identity vpls {
base eth-encapsulation-type;
description
"vpls encapsulation";
}
identity vxlan {
base eth-encapsulation-type;
description
"vxlan encapsulation";
}
identity pbb { identity frame-relay {
base eth-encapsulation-type; base encapsulation-type;
description description
"pbb encapsulation"; "Frame Relay encapsulation";
} }
identity trill { identity ppp {
base eth-encapsulation-type; base encapsulation-type;
description description
"trill encapsulation"; "PPP encapsulation";
} }
identity vpls { identity hdlc {
base eth-encapsulation-type; base encapsulation-type;
description description
"vpls encapsulation"; "HDLC encapsulation";
} }
identity vxlan { identity atm {
base eth-encapsulation-type; base encapsulation-type;
description description
"vxlan encapsulation"; "Base identity from which specific ATM
} encapsulation types are derived.";
identity frame-relay { }
base encapsulation-type;
description
"Frame Relay encapsulation";
}
identity ppp { identity pwe3 {
base encapsulation-type; base encapsulation-type;
description description
"PPP encapsulation"; "Base identity from which specific pw
} encapsulation types are derived.";
}
identity hdlc { /*
base encapsulation-type; * Groupings
description */
"HDLC encapsulation";
}
identity atm { grouping l2-network-type {
base encapsulation-type; description "Identify the topology type to be L2.";
description container l2-network {
"Base identity from which specific ATM presence "indicates L2 Network";
encapsulation types are derived."; description
"The presence of the container node indicates
L2 Topology";
}
}
} 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";
}
identity pwe3 { leaf-list flag {
base encapsulation-type; type flag-type;
description description "L2 network flags";
"Base identity from which specific pw }
encapsulation types are derived."; }
} }
/* grouping l2-node-attributes {
* Groupings 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 sys-mac-address {
type yang:mac-address;
description "System MAC-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 vn-id {
if-feature VXLAN;
type vni;
description "VNI of the VxLAN";
}
leaf-list flag {
type flag-type;
description "Node operational flags";
}
}
} // grouping l2-node-attributes
grouping l2-network-type { grouping l2-link-attributes {
description "Identify the topology type to be L2."; description "L2 link attributes";
container l2-network { container l2-link-attributes {
presence "indicates L2 Network"; description "Containing L2 link attributes";
description leaf name {
"The presence of the container node indicates type string;
L2 Topology"; description "Link name";
} }
} leaf-list flag {
type flag-type;
description "Link flags";
}
leaf rate {
type decimal64 {
fraction-digits 2;
}
description "Link rate";
grouping l2-network-attributes { }
description "L2 Topology scope attributes"; leaf delay {
container l2-network-attributes { type uint32;
description "Containing L2 network attributes"; description "Link delay in microseconds";
leaf name { }
type string; leaf-list srlg {
description "Name of the L2 network"; 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-list flag { leaf maximum-frame-size {
type flag-type; type uint32;
description "L2 network flags"; description "Maximum frame size";
} }
}
}
grouping l2-node-attributes { choice l2-termination-point-type {
description "L2 node attributes"; description
container l2-node-attributes { "Indicates termination-point type
description "Containing L2 node attributes"; specific attributes";
leaf name { case ethernet {
type string; leaf mac-address {
description "Node name"; type yang:mac-address;
} description "Interface MAC address";
leaf description { }
type string;
description "Node description";
}
leaf-list management-address {
type inet:ip-address;
description "System management address";
}
leaf sys-mac-address {
type yang:mac-address;
description "System MAC-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 vn-id {
if-feature VXLAN;
type vni;
description "VNI of the VxLAN";
}
leaf-list flag {
type flag-type;
description "Node operational flags";
}
}
} // grouping l2-node-attributes
grouping l2-link-attributes { leaf eth-encapsulation {
description "L2 link attributes"; type identityref {
container l2-link-attributes { base eth-encapsulation-type;
description "Containing L2 link attributes"; }
leaf name { description
type string; "Encapsulation type of this
description "Link name"; ternimation point.";
} }
leaf-list flag {
type flag-type;
description "Link flags";
} leaf port-vlan-id {
leaf rate { if-feature VLAN;
type decimal64 { type vlan;
fraction-digits 2; description "Port VLAN ID";
} }
description "Link rate";
} list vlan-id-name {
leaf delay { if-feature VLAN;
type uint32; key "vlan-id";
description "Link delay in microseconds"; description "Interface configured VLANs";
} leaf vlan-id {
leaf-list srlg { type vlan;
type uint32; description "VLAN ID";
description }
"List of Shared Risk Link Groups leaf vlan-name {
this link belongs to."; type string;
} description "VLAN Name";
} }
} // grouping l2-link-attributes }
} //case ethernet
grouping l2-termination-point-attributes { case legacy {
description "L2 termination point attributes"; leaf layer-2-address {
container l2-termination-point-attributes { type yang:phys-address;
description "Containing L2 TP attributes"; description "Interface Layer 2 address";
leaf description { }
type string;
description "Port description";
}
leaf maximum-frame-size { leaf encapsulation {
type uint32; type identityref {
description "Maximum frame size"; base encapsulation-type;
} }
description
"Encapsulation type of this termination point.";
}
} //case legacy
choice l2-termination-point-type { } //choice termination-point-type
description
"Indicates termination-point type
specific attributes";
case ethernet {
leaf mac-address {
type yang:mac-address;
description "Interface MAC address";
}
leaf eth-encapsulation { leaf tp-state {
type identityref { type enumeration {
base eth-encapsulation-type; 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";
} }
description }
"Encapsulation type of this } // grouping l2-termination-point-attributes
ternimation point.";
}
leaf port-vlan-id { /*
if-feature VLAN; * Data nodes
type vlan; */
description "Port VLAN ID";
}
list vlan-id-name { augment "/nw:networks/nw:network/nw:network-types" {
if-feature VLAN; description
key "vlan-id"; "Introduce new network type for L2 topology";
description "Interface configured VLANs"; uses l2-network-type;
leaf vlan-id { }
type vlan;
description "VLAN ID";
}
leaf vlan-name {
type string;
description "VLAN Name";
}
}
} //case ethernet
case legacy { augment "/nw:networks/nw:network" {
leaf layer-2-address { when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" {
type yang:phys-address; description
description "Interface Layer 2 address"; "Augmentation parameters apply only for networks
} with L2 topology";
}
description
"Configuration parameters for the L2 network
as a whole";
uses l2-network-attributes;
}
leaf encapsulation { augment "/nw:networks/nw:network/nw:node" {
type identityref { when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" {
base encapsulation-type; description
} "Augmentation parameters apply only for networks
description with L2 topology";
"Encapsulation type of this termination point."; }
} description
} //case legacy "Configuration parameters for L2 at the node
level";
uses l2-node-attributes;
}
} //choice termination-point-type augment "/nw:networks/nw:network/nt:link" {
when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" {
description
"Augmentation parameters apply only for networks
with L2 topology";
}
description "Augment L2 topology link information";
uses l2-link-attributes;
}
augment "/nw:networks/nw:network/nw:node/nt:termination-point" {
when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" {
description
"Augmentation parameters apply only for networks
with L2 topology";
}
description
"Augment L2 topology termination point information";
uses l2-termination-point-attributes;
}
leaf tp-state { /*
type enumeration { * Notifications
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 ***/ notification l2-node-event {
description "Notification event for L2 node";
leaf event-type {
type l2-network-event-type;
description "Event type";
}
uses nw: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 nt: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 nt:tp-ref;
uses l2-network-type;
uses l2-termination-point-attributes;
}
} // module l2-topology
<CODE ENDS>
4. IANA Considerations
This document registers the following namespace URIs in the "IETF XML
Registry" [RFC3688]:
URI: urn:ietf:params:xml:ns:yang:ietf-l2-topology
Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-l2-topology-state
Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.
This document registers the following YANG modules in the "YANG
Module Names" registry [RFC6020]:
Name: ietf-l2-topology
Namespace: urn:ietf:params:xml:ns:yang:ietf-l2-topology
Prefix: l2t
Reference: draft-ietf-i2rs-yang-l2-network-topology-04.txt (RFC form)
Name: ietf-l2-topology-state
Namespace: urn:ietf:params:xml:ns:yang:ietf-l2-topology-state
Prefix: l2t-s
Reference: draft-ietf-i2rs-yang-l2-network-topology-04.txt (RFC form)
5. Security Considerations
The YANG module defined in this document is designed to be accessed
via network management protocols such as NETCONF [RFC6241] or
RESTCONF [RFC8040] . The lowest NETCONF layer is the secure transport
layer, and the mandatory-to-implement secure transport is Secure
Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the
mandatory-to-implement secure transport is TLS [RFC5246].
The NETCONF access control model [RFC6536] provides the means to
restrict access for particular NETCONF or RESTCONF users to a
preconfigured subset of all available NETCONF or RESTCONF protocol
operations and content.
In general, Layer 2 network topologies are system-controlled and
provide ephemeral topology information. In an NMDA-complient server,
they are only part of <operational> which provides read-only access
to clients, they are less vulnerable. That said, the YANG module
does in principle allow information to be configurable.
The Layer 2 topology module define information that can be
configurable in certain instances, for example in the case of virtual
topologies that can be created by client applications. In such
cases, a malicious client could introduce topologies that are
undesired. Specifically, a malicious client could attempt to remove
or add a node, a link, a termination point, by creating or deleting
corresponding elements in the node, link, and termination point
lists, respectively. In the case of a topology that is learned, the
server will automatically prohibit such misconfiguration attempts.
In the case of a topology that is configured, i.e. whose origin is
"intended", the undesired configuration could become effective and be
reflected in the operational state datastore, leading to disruption
of services provided via this topology might be disrupted. For those
reasons, it is important that the NETCONF access control model is
vigorously applied to prevent topology misconfiguration by
unauthorized clients.
There are a number of data nodes defined in this YANG module that are
writable/creatable/deletable (i.e., config true, which is the
default). These data nodes may be considered sensitive or vulnerable
in some network environments. Write operations (e.g., edit-config)
to these data nodes without proper protection can have a negative
effect on network operations. These are the subtrees and data nodes
and their sensitivity/vulnerability in the ietf-network module:
l2-network-attributes: A malicious client could attempt to sabotage
the configuration of any of the contained attributes, such as the
name or the flag data nodes.
l2-node-attributes: A malicious client could attempt to sabotage the
configuration of important node attributes, such as the name or the
management-address.
l2-link-attributes: A malicious client could attempt to sabotage the
configuration of important link attributes, such as the rate or the
delay data nodes.
l2-termination-point-attributes: A malicious client could attempt to
sabotage the configuration of important termination point attributes,
such as the maximum-frame-size.
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., Bahadur, N.,
Ananthakrishnan, H., and X. Liu, "A Data Model for Network
Topologies", draft-ietf-i2rs-yang-network-topo-20 (work in
progress), December 2017.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010,
<https://www.rfc-editor.org/info/rfc6020>.
[RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types",
RFC 6991, DOI 10.17487/RFC6991, July 2013,
<https://www.rfc-editor.org/info/rfc6991>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>.
7.2. Informative References
[I-D.ietf-netmod-revised-datastores]
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore
Architecture", draft-ietf-netmod-revised-datastores-10
(work in progress), January 2018.
[I-D.ietf-netmod-yang-tree-diagrams]
Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft-
ietf-netmod-yang-tree-diagrams-06 (work in progress),
February 2018.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008,
<https://www.rfc-editor.org/info/rfc5246>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure
Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
<https://www.rfc-editor.org/info/rfc6242>.
[RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration
Protocol (NETCONF) Access Control Model", RFC 6536,
DOI 10.17487/RFC6536, March 2012,
<https://www.rfc-editor.org/info/rfc6536>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>.
Appendix A. Companion YANG model for non-NMDA compliant implementations
The YANG module ietf-l2-topology defined in this document augments
two modules, ietf-network and ietf-network-topology, that are
designed to be used in conjunction with implementations that support
the Network Management Datastore Architecture (NMDA) defined in
[I-D.ietf-netmod-revised-datastores]. In order to allow
implementations to use the model even in cases when NMDA is not
supported, a set of companion modules have been defined that
represent a state model of networks and network topologies, ietf-
network-state and ietf-network-topology-state, respectively.
In order to be able to use the model for layer 2 topologies defined
in this document in conjunction with non-NMDA compliant
implementations, a corresponding companion module is defined that
represent the operational state of layer 2 network topologies. The
module ietf-l2-topology-state mirrors the module ietf-l2-topology
defined earlier in this document. However, it augments ietf-network-
state and ietf-network-topology-state (instead of ietf-network and
ietf-network-topology) and all its data nodes are non-configurable.
The companion module ietf-l2-topology SHOULD NOT be supported by
implementations that support NMDA. It is for this reason that this
module is defined in the Appendix.
As the structure of this modules mirrors that of its underlying
modules, the YANG tree is not depicted separately.
<CODE BEGINS> file "ietf-l2-topology-state@2018-03-05.yang"
module ietf-l2-topology-state {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology-state";
prefix "l2t-s";
import ietf-network-state {
prefix "nw-s";
}
import ietf-network-topology-state {
prefix "nt-s";
}
import ietf-l2-topology {
prefix "l2t";
}
organization
"IETF I2RS (Interface to the Routing System) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/i2rs/>
WG List: <mailto:i2rs@ietf.org>
Editor: Jie Dong
<mailto:jie.dong@huawei.com>
Editor: Xiugang Wei
<mailto:weixiugang@huawei.com>";
grouping network-ref {
description description
"Grouping for an absolute reference to a network topology "This module defines a basic model for
instance."; the layer-2 topology of a network.
leaf network-ref {
type leafref { Copyright (c) 2018 IETF Trust and the persons identified as
path "/nw:networks/nw:network/nw:network-id"; authors of the code. All rights reserved.
}
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of
draft-ietf-i2rs-yang-l2-network-topo-04;
see the RFC itself for full legal notices.";
revision "2018-03-05" {
description "Initial revision";
reference "draft-ietf-i2rs-l2-network-topology-04";
}
/*
* Features
*/
feature VLAN {
description description
"An absolute reference to a network topology instance."; "Indicates that the system supports the
vlan functions";
} }
}
grouping link-ref { feature QinQ {
description
"Grouping for an absolute reference to a link instance.";
uses network-ref;
leaf link-ref {
type leafref {
path "/nw:networks/nw:network"
+"[nw:network-id = current()/../network-ref]"
+"/nt:link/nt:link-id";
}
description description
"An absolute reference to a link instance."; "Indicates that the system supports the
qinq functions";
} }
}
grouping node-ref { feature PBB {
description
"Grouping for an absolute reference to a node instance.";
uses network-ref;
leaf node-ref {
type leafref {
path "/nw:networks/nw:network"
+"[nw:network-id = current()/../network-ref]"
+"/nw:node/nw:node-id";
}
description description
"An absolute reference to a node instance."; "Indicates that the device supports the
provider-backbone-bridging functions";
} }
}
grouping tp-ref { feature VPLS {
description
"Grouping for an absolute reference to a termination point.";
uses node-ref;
leaf tp-ref {
type leafref {
path "/nw:networks/nw:network"
+"[nw:network-id = current()/../network-ref]"
+"/nw:node[nw:node-id = current()/../node-ref]"
+"/nt:termination-point/nt:tp-id";
}
description description
"Grouping for an absolute reference to a TP."; "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";
} }
}
/* /*
* Data nodes * Data nodes
*/ */
augment "/nw:networks/nw:network/nw:network-types" { augment "/nw-s:networks/nw-s:network/nw-s:network-types" {
description description
"Introduce new network type for L2 topology"; "Introduce new network type for L2 topology";
uses l2-network-type; uses l2t:l2-network-type;
} }
augment "/nw:networks/nw:network" { augment "/nw-s:networks/nw-s:network" {
when "/nw:networks/nw:network/nw:network-types/l2-network" { when "/nw-s:networks/nw-s:network/nw-s:network-types/"+
"l2t-s:l2-network" {
description description
"Augmentation parameters apply only for networks "Augmentation parameters apply only for networks
with L2 topology"; with L2 topology";
} }
description description
"Configuration parameters for the L2 network "Configuration parameters for the L2 network
as a whole"; as a whole";
uses l2-network-attributes; uses l2t:l2-network-attributes;
} }
augment "/nw:networks/nw:network/nw:node" { augment "/nw-s:networks/nw-s:network/nw-s:node" {
when "/nw:networks/nw:network/nw:network-types/l2-network" { when "/nw-s:networks/nw-s:network/nw-s:network-types/"+
"l2t-s:l2-network" {
description description
"Augmentation parameters apply only for networks "Augmentation parameters apply only for networks
with L2 topology"; with L2 topology";
} }
description description
"Configuration parameters for L2 at the node "Configuration parameters for L2 at the node
level"; level";
uses l2-node-attributes; uses l2t:l2-node-attributes;
} }
augment "/nw:networks/nw:network/nt:link" { augment "/nw-s:networks/nw-s:network/nt-s:link" {
when "/nw:networks/nw:network/nw:network-types/l2-network" { when "/nw-s:networks/nw-s:network/nw-s:network-types/"+
"l2t-s:l2-network" {
description description
"Augmentation parameters apply only for networks "Augmentation parameters apply only for networks
with L2 topology"; with L2 topology";
} }
description "Augment L2 topology link information"; description "Augment L2 topology link information";
uses l2-link-attributes; uses l2t:l2-link-attributes;
} }
augment "/nw:networks/nw:network/nw:node/nt:termination-point" { augment "/nw-s:networks/nw-s:network/nw-s:node/"+
when "/nw:networks/nw:network/nw:network-types/l2-network" { "nt-s:termination-point" {
when "/nw-s:networks/nw-s:network/nw-s:network-types/"+
"l2t-s:l2-network" {
description description
"Augmentation parameters apply only for networks "Augmentation parameters apply only for networks
with L2 topology"; with L2 topology";
} }
description description
"Augment L2 topology termination point information"; "Augment L2 topology termination point information";
uses l2-termination-point-attributes; uses l2t:l2-termination-point-attributes;
} }
/* /*
* Notifications * Notifications
*/ */
notification l2-node-event { notification l2-node-event {
description "Notification event for L2 node"; description "Notification event for L2 node";
leaf event-type { leaf event-type {
type l2-network-event-type; type l2t:l2-network-event-type;
description "Event type"; description "Event type";
} }
uses node-ref; uses nw-s:node-ref;
uses l2-network-type; uses l2t:l2-network-type;
uses l2-node-attributes; uses l2t:l2-node-attributes;
} }
notification l2-link-event { notification l2-link-event {
description "Notification event for L2 link"; description "Notification event for L2 link";
leaf event-type { leaf event-type {
type l2-network-event-type; type l2t:l2-network-event-type;
description "Event type"; description "Event type";
} }
uses link-ref; uses nt-s:link-ref;
uses l2-network-type; uses l2t:l2-network-type;
uses l2-link-attributes; uses l2t:l2-link-attributes;
} }
notification l2-termination-point-event { notification l2-termination-point-event {
description "Notification event for L2 termination point"; description "Notification event for L2 termination point";
leaf event-type { leaf event-type {
type l2-network-event-type; type l2t:l2-network-event-type;
description "Event type"; description "Event type";
} }
uses tp-ref; uses nt-s:tp-ref;
uses l2-network-type; uses l2t:l2-network-type;
uses l2-termination-point-attributes; uses l2t:l2-termination-point-attributes;
} }
} // module l2-topology } // module l2-topology-state
<CODE ENDS> <CODE ENDS>
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. 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.,
Ananthakrishnan, H., and X. Liu, "A Data Model for Network
Topologies", draft-ietf-i2rs-yang-network-topo-03 (work in
progress), June 2016.
[I-D.ietf-netmod-rfc6020bis]
Bjorklund, M., "The YANG 1.1 Data Modeling Language",
draft-ietf-netmod-rfc6020bis-14 (work in progress), June
2016.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010,
<http://www.rfc-editor.org/info/rfc6020>.
[RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types",
RFC 6991, DOI 10.17487/RFC6991, July 2013,
<http://www.rfc-editor.org/info/rfc6991>.
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.
Authors' Addresses Authors' Addresses
Jie Dong Jie Dong
Huawei Technologies Huawei Technologies
Huawei Campus, No. 156 Beiqing Rd. Huawei Campus, No. 156 Beiqing Rd.
Beijing 100095 Beijing 100095
China China
Email: jie.dong@huawei.com Email: jie.dong@huawei.com
 End of changes. 110 change blocks. 
627 lines changed or deleted 865 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/