< draft-ietf-i2rs-yang-l2-network-topology-06.txt   draft-ietf-i2rs-yang-l2-network-topology-07.txt >
Network Working Group J. Dong Network Working Group J. Dong
Internet-Draft X. Wei Internet-Draft X. Wei
Intended status: Standards Track Q. Wu Intended status: Standards Track Q. Wu
Expires: April 25, 2019 Huawei Technologies Expires: December 26, 2019 Huawei
October 22, 2018 M. Boucadair
Orange
A. Liu
Tecent
June 24, 2019
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-06 draft-ietf-i2rs-yang-l2-network-topology-07
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 Editorial Note (To be removed by RFC Editor)
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", Please update these statements within the document with the RFC
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this number to be assigned to this document:
document are to be interpreted as described in RFC 2119 [RFC2119].
o "This version of this YANG module is part of RFC XXXX;"
o "RFC XXXX: A YANG Data Model for Layer-2 Network Topologies";
o reference: RFC XXXX
Please update the "revision" date of the YANG module.
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 https://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 April 25, 2019. This Internet-Draft will expire on December 26, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2019 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
(https://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. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Layer 2 Topology Yang Module . . . . . . . . . . . . . . . . 5 3. Layer 2 Topology Model . . . . . . . . . . . . . . . . . . . 3
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 4. Layer 2 Topology YANG Module . . . . . . . . . . . . . . . . 6
5. Security Considerations . . . . . . . . . . . . . . . . . . . 17 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19 6. Security Considerations . . . . . . . . . . . . . . . . . . . 18
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 20
7.1. Normative References . . . . . . . . . . . . . . . . . . 19 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.2. Informative References . . . . . . . . . . . . . . . . . 20 8.1. Normative References . . . . . . . . . . . . . . . . . . 20
Appendix A. Companion YANG model for non-NMDA compliant 8.2. Informative References . . . . . . . . . . . . . . . . . 21
implementations . . . . . . . . . . . . . . . . . . 20 Appendix A. Companion YANG Module for Non-NMDA Compliant
Appendix B. An Example . . . . . . . . . . . . . . . . . . . . . 24 Implementations . . . . . . . . . . . . . . . . . . 22
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 29 Appendix B. An Example . . . . . . . . . . . . . . . . . . . . . 25
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 30
1. Introduction 1. Introduction
[RFC8345] defines the YANG [RFC6020] [RFC7950] data models of the [RFC8345] defines the YANG [RFC6020] [RFC7950] data models of the
abstract (generic) network and network topology. Such models can be abstract (generic) network and network topology. Such models can be
augmented with technology-specific details to build more specific augmented with technology-specific details to build more specific
topology models. topology 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. A sample example
is provided in Appendix B.
2. Layer 2 Topology Model This document uses the common YANG types defined in [RFC6991] and
adopts the Network Management Datastore Architecture (NMDA
[RFC8342]).
The Layer 2 network topology model is designed to be generic and The terminology for describing YANG modules is defined in [RFC7950].
applicable to Layer 2 networks built with different L2 technologies. The meanings of the symbols used in the tree diagram are defined in
It can be used to describe both the physical and the logical [RFC8340].
(virtual) L2 network topologies.
The Layer 2 topology model applies the generic network and network 2. Terminology
topology models to Layer 2 network topologies, and augments the
generic models with information specific to Layer 2 networks. The The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
relationship between the Layer 2 topology model and the generic "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
network and network topology model is shown in the figure below: "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
3. Layer 2 Topology Model
The Layer 2 network topology YANG module is designed to be generic
and applicable to Layer 2 networks built with different L2
technologies. It can be used to describe both the physical and the
logical (virtual) L2 network topologies.
The relationship between the Layer 2 topology module and the generic
network and network topology module is shown in Figure 1. 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 Protocol (LLDP)
or other Layer-2 protocols, and some of them may be locally
configured.
+---------------------+ +---------------------+
| ietf-network | | ietf-network |
+----------^----------+ +----------^----------+
| |
| |
+---------------------+ +---------------------+
|ietf-network-topology| |ietf-network-topology|
+----------^----------+ +----------^----------+
| |
| |
+----------^----------+ +----------^----------+
| ietf-l2-topology | | ietf-l2-topology |
+---------------------+ +---------------------+
Figure 1. L2-topology model structure
In order to represent a Layer 2 network topology, the generic network Figure 1: L2-topology YANG Module Structure
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 Protocol (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 The structure of "ietf-l2-topology" YANG module is depicted in the
following diagram. The notation syntax follows [RFC8340]. For following tree diagram:
purpose of brevity, notifications are not depicted.
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* l2-flag-type +--rw flag* l2-flag-type
augment /nw:networks/nw:network/nw:node: augment /nw:networks/nw:network/nw:node:
+--rw l2-node-attributes +--rw l2-node-attributes
skipping to change at page 4, line 42 skipping to change at page 5, line 15
| +--ro l2-network! | +--ro l2-network!
| +--ro l2-link-attributes | +--ro l2-link-attributes
+---n l2-termination-point-event +---n l2-termination-point-event
+--ro event-type? +--ro event-type?
+--ro tp-ref? +--ro tp-ref?
+--ro node-ref? +--ro node-ref?
+--ro network-ref? +--ro network-ref?
+--ro l2-network! +--ro l2-network!
+--ro l2-termination-point-attributes +--ro l2-termination-point-attributes
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
[RFC8345]. defned in [RFC8345].
o Additional network attributes are introduced in a grouping "l2- o Additional network attributes are introduced in a grouping "l2-
network-attributes", which augments the "network" list of the network-attributes", which augments the "network" list of the
ietf-network module. The attributes include Layer-2 network name 'ietf-network' module. The attributes include Layer-2 network
and a set of flags. Each type of flag is represented by a name and a set of flags. Each type of flag is represented by a
separate identity. separate identity.
o Additional data objects for Layer-2 nodes are introduced by o Additional data objects for Layer-2 nodes are introduced by
augmenting the "node" list of the generic ietf-network module. augmenting the "node" list of the generic 'ietf-network' module.
New objects include Layer-2 node identifier, description, New objects include Layer-2 node identifier, description,
management address, and a set of flags. management address, and a set of flags.
o Additional data objects for Layer-2 termination points are o Additional data objects for Layer-2 termination points are
introduced by augmenting the "termination-point" list of the ietf- introduced by augmenting the "termination-point" list of the
network-topology module defined in [RFC8345]. New objects include 'ietf-network-topology' module defined in [RFC8345]. New objects
Layer-2 termination point descriptions, Layer-2 termination point include Layer-2 termination point descriptions, Layer-2
type specific attributes and Layer-2 termination point states. termination point type 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 4. Layer 2 Topology YANG Module
<CODE BEGINS> file "ietf-l2-topology@2018-10-18.yang" This module uses the common YANG types defined in [RFC6991] and types
module ietf-l2-topology { defined in [RFC8345].
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology";
prefix "l2t";
import ietf-network { <CODE BEGINS> file "ietf-l2-topology@2019-06-21.yang"
prefix "nw"; module ietf-l2-topology {
} yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology";
prefix "l2t";
import ietf-network-topology { import ietf-network {
prefix "nt"; prefix "nw";
} reference
"RFC 8345: A YANG Data Model for Network Topologies";
}
import ietf-network-topology {
prefix "nt";
reference
"RFC 8345: A YANG Data Model for Network Topologies";
}
import ietf-inet-types {
prefix "inet";
reference "Section 4 of RFC 6991";
}
import ietf-yang-types {
prefix "yang";
reference "Section 3 of RFC 6991";
}
import ietf-inet-types { organization
prefix "inet"; "IETF I2RS (Interface to the Routing System) Working Group";
reference "RFC 6991"; contact
} "WG Web: <http://tools.ietf.org/wg/i2rs/>
WG List: <mailto:i2rs@ietf.org>
Editor: Jie Dong
<mailto:jie.dong@huawei.com>
import ietf-yang-types { Editor: Xiugang Wei
prefix "yang"; <mailto:weixiugang@huawei.com>
reference "RFC 6991";
}
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 Editor: Qin Wu
<mailto:weixiugang@huawei.com>"; <mailto:bill.wu@huawei.com>
description Editor: Mohamed Boucadair
"This module defines a basic model for <mailto:mohamed.boucadair@orange.com>
the layer-2 topology of a network.
Copyright (c) 2018 IETF Trust and the persons identified as Editor: Anders Liu
authors of the code. All rights reserved. <andersliu@tencent.com>";
Redistribution and use in source and binary forms, with or description
without modification, is permitted pursuant to, and subject "This module defines a basic model for
to the license terms contained in, the Simplified BSD License the layer-2 topology of a network.
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 Copyright (c) 2019 IETF Trust and the persons identified as
draft-ietf-i2rs-yang-l2-network-topo-06; authors of the code. All rights reserved.
see the RFC itself for full legal notices.";
revision "2018-10-18" { Redistribution and use in source and binary forms, with or
description "Initial revision"; without modification, is permitted pursuant to, and subject
reference "draft-ietf-i2rs-l2-network-topology-06"; 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
* Typedefs draft-ietf-i2rs-yang-l2-network-topo-07;
*/ see the RFC itself for full legal notices.";
typedef vlan { revision "2019-06-04" {
type uint16 { description "Initial revision";
range "0..4095"; reference
} "RFC XXXX: A YANG Data Model for Layer-2 Network Topologies";
description "VLAN ID"; }
reference "IEEE 802.1Q";
}
typedef trill-nickname { /*
type uint16; * Typedefs
description "TRILL Nickname"; */
reference "RFC 6326";
typedef vlan {
type uint16 {
range "1..4094";
} }
description "VLAN ID";
reference "IEEE 802.1Q";
}
typedef vni { typedef trill-nickname {
type uint32 { type uint16;
range "1..16777215"; description "TRILL Nickname";
} reference "RFC 6326";
description "VxLAN Network Identifier"; }
reference "RFC 7348";
typedef vni {
type uint32 {
range "1..16777215";
} }
description "VxLAN Network Identifier";
reference "RFC 7348";
}
typedef l2-flag-type { typedef l2-flag-type {
type identityref { type identityref {
base "flag-identity"; base "flag-identity";
}
description "Base type for l2 flags";
} }
typedef node-flag-type { description "Base type for l2 flags";
type identityref { }
base "flag-identity"; typedef node-flag-type {
} type identityref {
description "Node flag attributes"; base "flag-identity";
} }
typedef link-flag-type { description "Node flag attributes";
type identityref { }
base "flag-identity"; typedef link-flag-type {
} type identityref {
description "Link flag attributes"; base "flag-identity";
} }
description "Link flag attributes";
}
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";
} // l2-topology-event-type
/*
* Features
*/
feature VLAN {
description
"Indicates that the system supports the
vlan functions";
} }
description "l2 network event type for notifications";
} // l2-topology-event-type
feature QinQ { /*
description * Features
"Indicates that the system supports the */
qinq functions"; feature VLAN {
reference "IEEE 802.1ad"; description
} "Indicates that the system supports the
vlan functions.";
}
feature PBB { feature QinQ {
description description
"Indicates that the device supports the "Indicates that the system supports the
provider-backbone-bridging functions"; qinq functions";
reference "IEEE 802.1ah"; reference "IEEE 802.1ad.";
} }
feature VPLS { feature PBB {
description description
"Indicates that the device supports the "Indicates that the device supports the
VPLS functions"; provider-backbone-bridging functions";
reference "RFC 4761, RFC 4762"; reference "IEEE 802.1ah.";
} }
feature TRILL { feature VPLS {
description description
"Indicates that the device supports the "Indicates that the device supports the
TRILL functions"; VPLS functions.";
reference "RFC 6325"; reference "RFC 4761, RFC 4762";
} }
feature VXLAN { feature TRILL {
description description
"Indicates that the device supports the "Indicates that the device supports the
VXLAN functions"; TRILL functions.";
reference "RFC 6325";
}
reference "RFC 7348"; feature VXLAN {
} description
"Indicates that the device supports the
VXLAN functions.";
reference "RFC 7348";
}
/* /*
* Identities * Identities
*/ */
identity flag-identity { identity flag-identity {
description "Base type for flags"; description "Base type for flags.";
} }
/*Consider udpating this part to make use of draft-ietf-softwire-iftunnel*/
identity encapsulation-type { identity encapsulation-type {
description description
"Base identity from which specific encapsulation "Base identity from which specific encapsulation
types are derived."; types are derived.";
} }
identity eth-encapsulation-type { identity eth-encapsulation-type {
base encapsulation-type; base encapsulation-type;
description description
"Base identity from which specific ethernet "Base identity from which specific Ethernet
encapsulation types are derived."; encapsulation types are derived.";
} }
identity ethernet { identity ethernet {
base eth-encapsulation-type; base eth-encapsulation-type;
description description
"native ethernet encapsulation"; "native Ethernet encapsulation.";
} }
identity vlan { identity vlan {
base eth-encapsulation-type; base eth-encapsulation-type;
description description
"vlan encapsulation"; "VLAN encapsulation.";
} }
identity qinq { identity qinq {
base eth-encapsulation-type; base eth-encapsulation-type;
description description
"qinq encapsulation"; "QinQ encapsulation.";
} }
identity pbb { identity pbb {
base eth-encapsulation-type; base eth-encapsulation-type;
description description
"pbb encapsulation"; "PBB encapsulation.";
}
} identity trill {
base eth-encapsulation-type;
description
"TRILL encapsulation.";
}
identity trill { identity vpls {
base eth-encapsulation-type; base eth-encapsulation-type;
description description
"trill encapsulation"; "VPLS encapsulation.";
} }
identity vpls { identity vxlan {
base eth-encapsulation-type; base eth-encapsulation-type;
description description
"vpls encapsulation"; "VXLAN encapsulation.";
} }
identity vxlan { identity frame-relay {
base eth-encapsulation-type; base encapsulation-type;
description description
"vxlan encapsulation"; "Frame Relay encapsulation.";
} }
identity frame-relay { identity ppp {
base encapsulation-type; base encapsulation-type;
description description
"Frame Relay encapsulation"; "PPP encapsulation";
} }
identity ppp { identity hdlc {
base encapsulation-type; base encapsulation-type;
description description
"PPP encapsulation"; "HDLC encapsulation.";
} }
identity hdlc { identity atm {
base encapsulation-type; base encapsulation-type;
description description
"HDLC encapsulation"; "Base identity from which specific ATM
} encapsulation types are derived.";
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.";
}
identity pwe3 { /*
base encapsulation-type; * Groupings
*/
grouping l2-network-type {
description "Identify the topology type to be L2.";
container l2-network {
presence "indicates L2 Network";
description description
"Base identity from which specific pw "The presence of the container node indicates
encapsulation types are derived."; L2 Topology.";
} }
}
/* grouping l2-network-attributes {
* Groupings description "L2 Topology scope attributes";
*/ container l2-network-attributes {
description "Containing L2 network attributes";
leaf name {
type string;
description "Name of the L2 network.";
}
grouping l2-network-type { leaf-list flag {
description "Identify the topology type to be L2."; type l2-flag-type;
container l2-network { description "L2 network flags";
presence "indicates L2 Network";
description
"The presence of the container node indicates
L2 Topology";
} }
} }
}
grouping l2-network-attributes { grouping l2-node-attributes {
description "L2 Topology scope attributes"; description "L2 node attributes";
container l2-network-attributes { container l2-node-attributes {
description "Containing L2 network attributes"; description "Containing L2 node attributes";
leaf name { leaf name {
type string; type string;
description "Name of the L2 network"; description "Node name.";
} }
leaf description {
leaf-list flag { type string;
type l2-flag-type; description "Node description.";
description "L2 network flags"; }
} 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 flag {
type node-flag-type;
description "Node operational flags.";
} }
} }
} // grouping l2-node-attributes
grouping l2-node-attributes { grouping l2-link-attributes {
description "L2 node attributes"; description "L2 link attributes";
container l2-node-attributes { container l2-link-attributes {
description "Containing L2 node attributes"; description "Containing L2 link attributes.";
leaf name { leaf name {
type string; type string;
description "Node name"; description "Link name.";
}
leaf-list flag {
type link-flag-type;
description "Link flags.";
}
leaf rate {
type decimal64 {
fraction-digits 2;
} }
leaf description { description "Link rate.";
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 flag {
type node-flag-type;
description "Node operational flags";
}
} }
} // grouping l2-node-attributes leaf delay {
type uint32;
grouping l2-link-attributes { description "Link delay in microseconds.";
description "L2 link attributes"; }
container l2-link-attributes { leaf-list srlg {
description "Containing L2 link attributes"; type uint32;
leaf name { description
type string; "List of Shared Risk Link Groups
description "Link name"; this link belongs to.";
} reference "RFC 4202";
leaf-list flag { }
type link-flag-type; }
description "Link flags"; } // grouping l2-link-attributes
}
leaf rate {
type decimal64 {
fraction-digits 2;
}
description "Link rate";
} grouping l2-termination-point-attributes {
leaf delay { description "L2 termination point attributes";
type uint32; container l2-termination-point-attributes {
description "Link delay in microseconds"; description "Containing L2 TP attributes";
} leaf description {
leaf-list srlg { type string;
type uint32; description "Port description.";
description
"List of Shared Risk Link Groups
this link belongs to.";
reference "RFC 4202";
}
} }
} // grouping l2-link-attributes
grouping l2-termination-point-attributes { leaf maximum-frame-size {
description "L2 termination point attributes"; type uint32;
container l2-termination-point-attributes { description "Maximum frame size.";
description "Containing L2 TP attributes"; }
leaf description {
type string;
description "Port description";
}
leaf maximum-frame-size { choice l2-termination-point-type {
type uint32; description
description "Maximum frame size"; "Indicates termination-point type
} specific attributes.";
case ethernet {
leaf mac-address {
type yang:mac-address;
description "Interface MAC address.";
}
choice l2-termination-point-type { leaf eth-encapsulation {
description type identityref {
"Indicates termination-point type base eth-encapsulation-type;
specific attributes";
case ethernet {
leaf mac-address {
type yang:mac-address;
description "Interface MAC address";
} }
description
"Encapsulation type of this
ternimation point.";
}
leaf eth-encapsulation { leaf port-vlan-id {
type identityref { if-feature VLAN;
base eth-encapsulation-type; type vlan;
} description "Port VLAN ID is the VLAN id that
description will be assigned to any untagged frames entering
"Encapsulation type of this the switch on the specific port.";
ternimation point."; }
}
leaf port-vlan-id { list vlan-id-name {
if-feature VLAN; if-feature VLAN;
key "vlan-id";
description "Interface configured VLANs.";
leaf vlan-id {
type vlan; type vlan;
description "Port VLAN ID"; description "VLAN ID.";
} }
leaf vlan-name {
list vlan-id-name { type string;
if-feature VLAN; description "VLAN name.";
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 layer-2-address { } //case ethernet
type yang:phys-address;
description "Interface Layer 2 address";
}
leaf encapsulation { case legacy {
type identityref { leaf layer-2-address {
base encapsulation-type; type yang:phys-address;
} description "Interface Layer 2 address.";
description }
"Encapsulation type of this termination point.";
leaf encapsulation {
type identityref {
base encapsulation-type;
} }
} //case legacy such as atm, ppp, hdlc,etc. description
"Encapsulation type of this termination point.";
}
} //case legacy such as atm, ppp, hdlc,etc.
} //choice termination-point-type } //choice termination-point-type
leaf tp-state { leaf tp-state {
type enumeration { type enumeration {
enum in-use { enum in-use {
value 0; value 0;
description description
"the termination point is in forwarding state"; "the termination point is in forwarding state.";
} }
enum blocking { enum blocking {
value 1; value 1;
description description
"the termination point is in blocking state"; "the termination point is in blocking state.";
} }
enum down { enum down {
value 2; value 2;
description description
"the termination point is in down state"; "the termination point is in down state.";
} }
enum others { enum others {
value 3; value 3;
description description
"the termination point is in other state"; "the termination point is in other state.";
}
} }
config false;
description "State of the termination point";
} }
config false;
description "State of the termination point";
} }
} // grouping l2-termination-point-attributes }
} // grouping l2-termination-point-attributes
/* /*
* Data nodes * Data nodes
*/ */
augment "/nw:networks/nw:network/nw:network-types" { augment "/nw:networks/nw:network/nw:network-types" {
description description
"Introduce new network type for L2 topology"; "Introduce new network type for L2 topology.";
uses l2-network-type; uses l2-network-type;
} }
augment "/nw:networks/nw:network" { augment "/nw:networks/nw:network" {
when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" { when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" {
description
"Augmentation parameters apply only for networks
with L2 topology";
}
description description
"Configuration parameters for the L2 network "Augmentation parameters apply only for networks
as a whole"; with L2 topology.";
uses l2-network-attributes;
} }
description
"Configuration parameters for the L2 network
as a whole";
uses l2-network-attributes;
}
augment "/nw:networks/nw:network/nw:node" { augment "/nw:networks/nw:network/nw:node" {
when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" { when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" {
description
"Augmentation parameters apply only for networks
with L2 topology";
}
description description
"Configuration parameters for L2 at the node "Augmentation parameters apply only for networks
level"; with L2 topology.";
uses l2-node-attributes;
} }
description
"Configuration parameters for L2 at the node
level.";
uses l2-node-attributes;
}
augment "/nw:networks/nw:network/nt:link" { augment "/nw:networks/nw:network/nt:link" {
when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" { when "/nw:networks/nw:network/nw:network-types/l2t: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";
uses l2-link-attributes;
} }
description "Augment L2 topology link information";
uses l2-link-attributes;
}
augment "/nw:networks/nw:network/nw:node/nt:termination-point" { augment "/nw:networks/nw:network/nw:node/nt:termination-point" {
when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" { when "/nw:networks/nw:network/nw:network-types/l2t:l2-network" {
description
"Augmentation parameters apply only for networks
with L2 topology";
}
description description
"Augment L2 topology termination point information"; "Augmentation parameters apply only for networks
uses l2-termination-point-attributes; with L2 topology.";
} }
description
"Augment L2 topology termination point information.";
uses 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 l2-network-event-type;
description "Event type"; description "Event type.";
}
uses nw:node-ref;
uses l2-network-type;
uses l2-node-attributes;
} }
uses nw:node-ref;
uses l2-network-type;
uses 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 l2-network-event-type;
description "Event type"; description "Event type";
}
uses nt:link-ref;
uses l2-network-type;
uses l2-link-attributes;
} }
uses nt:link-ref;
uses l2-network-type;
uses 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 l2-network-event-type;
description "Event type"; description "Event type";
}
uses nt:tp-ref;
uses l2-network-type;
uses l2-termination-point-attributes;
} }
uses nt:tp-ref;
uses l2-network-type;
uses l2-termination-point-attributes;
}
} // module l2-topology } // module l2-topology
<CODE ENDS> <CODE ENDS>
5. IANA Considerations
4. IANA Considerations This document requests IANA to register the following URIs in the
"ns" subregistry within the "IETF XML Registry" [RFC3688]:
This document registers the following namespace URIs in the "IETF XML URI: urn:ietf:params:xml:ns:yang:ietf-l2-topology
Registry" [RFC3688]: Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-l2-topology URI: urn:ietf:params:xml:ns:yang:ietf-l2-topology-state
Registrant Contact: The IESG. Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace. XML: N/A; the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-l2-topology-state This document requests IANA to register the following YANG modules in
Registrant Contact: The IESG. the "YANG Module Names" subregistry [RFC7950] within the "YANG
XML: N/A; the requested URI is an XML namespace. Parameters" registry.
This document registers the following YANG modules in the "YANG name: ietf-l2-topology
Module Names" registry [RFC6020]: namespace: urn:ietf:params:xml:ns:yang:ietf-l2-topology
prefix: l2t
reference: RFC XXXX
Name: ietf-l2-topology name: ietf-l2-topology-state
Namespace: urn:ietf:params:xml:ns:yang:ietf-l2-topology namespace: urn:ietf:params:xml:ns:yang:ietf-l2-topology-state
Prefix: l2t prefix: l2t-s
Reference: draft-ietf-i2rs-yang-l2-network-topology-06.txt (RFC form) reference: RFC XXXX
Name: ietf-l2-topology-state These modules are not maintained by IANA.
Namespace: urn:ietf:params:xml:ns:yang:ietf-l2-topology-state
Prefix: l2t-s
Reference: draft-ietf-i2rs-yang-l2-network-topology-06.txt (RFC form)
5. Security Considerations 6. Security Considerations
The YANG module defined in this document is designed to be accessed The YANG module specified in this document defines a schema for data
via network management protocols such as NETCONF [RFC6241] or that is designed to be accessed via network management protocols such
RESTCONF [RFC8040] . The lowest NETCONF layer is the secure transport as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer
layer, and the mandatory-to-implement secure transport is Secure is the secure transport layer, and the mandatory-to-implement secure
Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer
mandatory-to-implement secure transport is TLS [RFC5246]. is HTTPS, and the mandatory-to-implement secure transport is TLS
[RFC8446].
The NETCONF access control model [RFC6536] provides the means to The Network Configuration Access Control Model (NACM) [RFC8341]
restrict access for particular NETCONF or RESTCONF users to a provides the means to restrict access for particular NETCONF or
preconfigured subset of all available NETCONF or RESTCONF protocol RESTCONF users to a preconfigured subset of all available NETCONF or
operations and content. RESTCONF protocol operations and content.
In general, Layer 2 network topologies are system-controlled and In general, Layer 2 network topologies are system-controlled and
provide ephemeral topology information. In an NMDA-complient server, provide ephemeral topology information. In an NMDA-complient server,
they are only part of <operational> which provides read-only access they are only part of <operational> which provides read-only access
to clients, they are less vulnerable. That said, the YANG module to clients, they are less vulnerable. That said, the YANG module
does in principle allow information to be configurable. does in principle allow information to be configurable.
The Layer 2 topology module define information that can be The Layer 2 topology module define information that can be
configurable in certain instances, for example in the case of virtual configurable in certain instances, for example in the case of virtual
topologies that can be created by client applications. In such topologies that can be created by client applications. In such
skipping to change at page 18, line 38 skipping to change at page 19, line 32
unauthorized clients. unauthorized clients.
There are a number of data nodes defined in this YANG module that are There are a number of data nodes defined in this YANG module that are
writable/creatable/deletable (i.e., config true, which is the writable/creatable/deletable (i.e., config true, which is the
default). These data nodes may be considered sensitive or vulnerable default). These data nodes may be considered sensitive or vulnerable
in some network environments. Write operations (e.g., edit-config) in some network environments. Write operations (e.g., edit-config)
to these data nodes without proper protection can have a negative to these data nodes without proper protection can have a negative
effect on network operations. These are the subtrees and data nodes effect on network operations. These are the subtrees and data nodes
and their sensitivity/vulnerability in the ietf-network module: and their sensitivity/vulnerability in the ietf-network module:
l2-network-attributes: A malicious client could attempt to sabotage o l2-network-attributes: A malicious client could attempt to
the configuration of any of the contained attributes, such as the sabotage the configuration of any of the contained attributes,
name or the flag data nodes. such as the name or the flag data nodes.
l2-node-attributes: A malicious client could attempt to sabotage the o l2-node-attributes: A malicious client could attempt to sabotage
configuration of important node attributes, such as the name or the the configuration of important node attributes, such as the name
management-address. or the management-address.
l2-link-attributes: A malicious client could attempt to sabotage the o l2-link-attributes: A malicious client could attempt to sabotage
configuration of important link attributes, such as the rate or the the configuration of important link attributes, such as the rate
delay data nodes. or the delay data nodes.
l2-termination-point-attributes: A malicious client could attempt to o l2-termination-point-attributes: A malicious client could attempt
sabotage the configuration of important termination point attributes, to sabotage the configuration of important termination point
such as the maximum-frame-size. attributes, such as the maximum-frame-size.
6. Acknowledgements 7. Acknowledgements
The authors would like to acknowledge the comments and suggestions The authors would like to acknowledge the comments and suggestions
received from Susan Hares, Alia Atlas, Juergen Schoenwaelder, Mach received from Susan Hares, Alia Atlas, Juergen Schoenwaelder, Mach
Chen, Alexander Clemm and Sriganesh Kini. Chen, Alexander Clemm and Sriganesh Kini.
7. References 8. References
7.1. Normative References 8.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004, DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>. <https://www.rfc-editor.org/info/rfc3688>.
skipping to change at page 19, line 45 skipping to change at page 20, line 41
<https://www.rfc-editor.org/info/rfc6991>. <https://www.rfc-editor.org/info/rfc6991>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016, RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>. <https://www.rfc-editor.org/info/rfc7950>.
[RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG",
RFC 7951, DOI 10.17487/RFC7951, August 2016, RFC 7951, DOI 10.17487/RFC7951, August 2016,
<https://www.rfc-editor.org/info/rfc7951>. <https://www.rfc-editor.org/info/rfc7951>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration
Access Control Model", STD 91, RFC 8341,
DOI 10.17487/RFC8341, March 2018,
<https://www.rfc-editor.org/info/rfc8341>.
[RFC8345] Clemm, A., Medved, J., Varga, R., Bahadur, N., [RFC8345] Clemm, A., Medved, J., Varga, R., Bahadur, N.,
Ananthakrishnan, H., and X. Liu, "A YANG Data Model for Ananthakrishnan, H., and X. Liu, "A YANG Data Model for
Network Topologies", RFC 8345, DOI 10.17487/RFC8345, March Network Topologies", RFC 8345, DOI 10.17487/RFC8345, March
2018, <https://www.rfc-editor.org/info/rfc8345>. 2018, <https://www.rfc-editor.org/info/rfc8345>.
7.2. Informative References [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>.
8.2. Informative References
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, (TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008, DOI 10.17487/RFC5246, August 2008,
<https://www.rfc-editor.org/info/rfc5246>. <https://www.rfc-editor.org/info/rfc5246>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>. <https://www.rfc-editor.org/info/rfc6241>.
skipping to change at page 20, line 39 skipping to change at page 22, line 5
[RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
<https://www.rfc-editor.org/info/rfc8340>. <https://www.rfc-editor.org/info/rfc8340>.
[RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore Architecture and R. Wilton, "Network Management Datastore Architecture
(NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
<https://www.rfc-editor.org/info/rfc8342>. <https://www.rfc-editor.org/info/rfc8342>.
Appendix A. Companion YANG model for non-NMDA compliant implementations Appendix A. Companion YANG Module for Non-NMDA Compliant
Implementations
The YANG module ietf-l2-topology defined in this document augments The YANG module ietf-l2-topology defined in this document augments
two modules, ietf-network and ietf-network-topology, that are two modules, ietf-network and ietf-network-topology, that are
designed to be used in conjunction with implementations that support designed to be used in conjunction with implementations that support
the Network Management Datastore Architecture (NMDA) defined in the Network Management Datastore Architecture (NMDA) defined in
[RFC8342]. In order to allow implementations to use the model even [RFC8342]. In order to allow implementations to use the model even
in cases when NMDA is not supported, a set of companion modules have in cases when NMDA is not supported, a set of companion modules have
been defined that represent a state model of networks and network been defined that represent a state model of networks and network
topologies, ietf- network-state and ietf-network-topology-state, topologies, ietf- network-state and ietf-network-topology-state,
respectively. respectively.
skipping to change at page 21, line 18 skipping to change at page 22, line 34
state and ietf-network-topology-state (instead of ietf-network and state and ietf-network-topology-state (instead of ietf-network and
ietf-network-topology) and all its data nodes are non-configurable. ietf-network-topology) and all its data nodes are non-configurable.
The companion module ietf-l2-topology SHOULD NOT be supported by The companion module ietf-l2-topology SHOULD NOT be supported by
implementations that support NMDA. It is for this reason that this implementations that support NMDA. It is for this reason that this
module is defined in the Appendix. module is defined in the Appendix.
As the structure of this modules mirrors that of its underlying As the structure of this modules mirrors that of its underlying
modules, the YANG tree is not depicted separately. modules, the YANG tree is not depicted separately.
<CODE BEGINS> file "ietf-l2-topology-state@2018-10-18.yang" <CODE BEGINS> file "ietf-l2-topology-state@2019-06-04.yang"
module ietf-l2-topology-state { module ietf-l2-topology-state {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology-state"; namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology-state";
prefix "l2t-s"; prefix "l2t-s";
import ietf-network-state { import ietf-network-state {
prefix "nw-s"; prefix "nw-s";
} }
import ietf-network-topology-state { import ietf-network-topology-state {
skipping to change at page 22, line 13 skipping to change at page 23, line 28
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of This version of this YANG module is part of
draft-ietf-i2rs-yang-l2-network-topo-05; draft-ietf-i2rs-yang-l2-network-topo-07;
see the RFC itself for full legal notices."; see the RFC itself for full legal notices.";
revision "2018-10-18" { revision "2019-06-04" {
description "Initial revision"; description "Initial revision";
reference "draft-ietf-i2rs-l2-network-topology-06"; reference "draft-ietf-i2rs-l2-network-topology-07";
} }
/* /*
* Data nodes * Data nodes
*/ */
augment "/nw-s:networks/nw-s:network/nw-s: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 l2t:l2-network-type; uses l2t:l2-network-type;
skipping to change at page 29, line 23 skipping to change at page 30, line 26
} }
] ]
} }
] ]
} }
} }
Authors' Addresses Authors' Addresses
Jie Dong Jie Dong
Huawei Technologies Huawei
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
Xiugang Wei Xiugang Wei
Huawei Technologies Huawei
Huawei Campus, No. 156 Beiqing Rd. Huawei Campus, No. 156 Beiqing Rd.
Beijing 100095 Beijing 100095
China China
Email: weixiugang@huawei.com Email: weixiugang@huawei.com
Qin Wu Qin Wu
Huawei Technologies Huawei
101 Software Avenue, Yuhua District 101 Software Avenue, Yuhua District
Nanjing 210012 Nanjing 210012
China China
Email: bill.wu@huawei.com Email: bill.wu@huawei.com
Mohamed Boucadair
Orange
Rennes 35000
France
Email: mohamed.boucadair@orange.com
Anders Liu
Tecent
Yinke Building 38 Haidian St, Haidian District
Beijing 100080
China
Email: andersliu@tencent.com
 End of changes. 149 change blocks. 
567 lines changed or deleted 623 lines changed or added

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