draft-ietf-i2rs-yang-l2-network-topology-04.txt   draft-ietf-i2rs-yang-l2-network-topology-05.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: September 6, 2018 March 5, 2018 Expires: December 31, 2018 June 29, 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-04 draft-ietf-i2rs-yang-l2-network-topology-05
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
skipping to change at page 1, line 37 skipping to change at page 1, line 37
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 September 6, 2018. This Internet-Draft will expire on December 31, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2018 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
(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
skipping to change at page 2, line 21 skipping to change at page 2, line 21
2. Layer 2 Topology Model . . . . . . . . . . . . . . . . . . . 2 2. Layer 2 Topology Model . . . . . . . . . . . . . . . . . . . 2
3. Layer 2 Topology Yang Module . . . . . . . . . . . . . . . . 5 3. Layer 2 Topology Yang Module . . . . . . . . . . . . . . . . 5
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
5. Security Considerations . . . . . . . . . . . . . . . . . . . 17 5. Security Considerations . . . . . . . . . . . . . . . . . . . 17
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18 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
Appendix A. Companion YANG model for non-NMDA compliant Appendix A. Companion YANG model for non-NMDA compliant
implementations . . . . . . . . . . . . . . . . . . 20 implementations . . . . . . . . . . . . . . . . . . 20
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25 Appendix B. An Example . . . . . . . . . . . . . . . . . . . . . 24
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28
1. Introduction 1. Introduction
[I-D.ietf-i2rs-yang-network-topo] defines the YANG [RFC6020] [RFC8345] defines the YANG [RFC6020] [RFC7950] data models of the
[RFC7950] data models of the abstract (generic) network and network abstract (generic) network and network topology. Such models can be
topology. Such models can be augmented with technology-specific augmented with technology-specific details to build more 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.
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
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. The notation syntax follows following diagram. The notation syntax follows [RFC8340]. For
[I-D.ietf-netmod-yang-tree-diagrams]. For purpose of brevity, purpose of brevity, notifications are not depicted.
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* 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
+--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* l2-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* l2-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
skipping to change at page 4, line 51 skipping to change at page 4, line 50
+--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 in
[I-D.ietf-i2rs-yang-network-topo]. [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 name
and a set of flags. Each type of flag is represented by a 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 ietf-
network-topology module defined in network-topology module defined in [RFC8345]. New objects include
[I-D.ietf-i2rs-yang-network-topo]. New objects include Layer-2 Layer-2 termination point descriptions, Layer-2 termination point
termination point descriptions, Layer-2 termination point type 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@2018-03-05.yang" <CODE BEGINS> file "ietf-l2-topology@2018-06-29.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 {
skipping to change at page 6, line 36 skipping to change at page 6, line 36
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-04; draft-ietf-i2rs-yang-l2-network-topo-04;
see the RFC itself for full legal notices."; see the RFC itself for full legal notices.";
revision "2018-03-05" { revision "2018-06-29" {
description "Initial revision"; description "Initial revision";
reference "draft-ietf-i2rs-l2-network-topology-04"; reference "draft-ietf-i2rs-l2-network-topology-05";
} }
/* /*
* Typedefs * Typedefs
*/ */
typedef vlan { typedef vlan {
type uint16 { type uint16 {
range "0..4095"; range "0..4095";
} }
skipping to change at page 7, line 16 skipping to change at page 7, line 15
description "TRILL Nickname"; 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 l2-flag-type {
type identityref { type identityref {
base "flag-identity"; base "flag-identity";
} }
description "Base type for flags"; description "Base type for l2 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" {
skipping to change at page 11, line 21 skipping to change at page 11, line 20
grouping l2-network-attributes { grouping l2-network-attributes {
description "L2 Topology scope attributes"; description "L2 Topology scope attributes";
container l2-network-attributes { container l2-network-attributes {
description "Containing L2 network attributes"; description "Containing L2 network attributes";
leaf name { leaf name {
type string; type string;
description "Name of the L2 network"; description "Name of the L2 network";
} }
leaf-list flag { leaf-list flag {
type flag-type; type l2-flag-type;
description "L2 network flags"; description "L2 network flags";
} }
} }
} }
grouping l2-node-attributes { grouping l2-node-attributes {
description "L2 node attributes"; description "L2 node attributes";
container l2-node-attributes { container l2-node-attributes {
description "Containing L2 node attributes"; description "Containing L2 node attributes";
leaf name { leaf name {
skipping to change at page 12, line 15 skipping to change at page 12, line 14
if-feature TRILL; if-feature TRILL;
type trill-nickname; type trill-nickname;
description "Nickname of the RBridge"; description "Nickname of the RBridge";
} }
leaf-list vn-id { leaf-list vn-id {
if-feature VXLAN; if-feature VXLAN;
type vni; type vni;
description "VNI of the VxLAN"; description "VNI of the VxLAN";
} }
leaf-list flag { leaf-list flag {
type flag-type; type l2-flag-type;
description "Node operational flags"; description "Node operational flags";
} }
} }
} // grouping l2-node-attributes } // grouping l2-node-attributes
grouping l2-link-attributes { grouping l2-link-attributes {
description "L2 link attributes"; description "L2 link attributes";
container l2-link-attributes { container l2-link-attributes {
description "Containing L2 link attributes"; description "Containing L2 link attributes";
leaf name { leaf name {
type string; type string;
description "Link name"; description "Link name";
} }
leaf-list flag { leaf-list flag {
type flag-type; type l2-flag-type;
description "Link flags"; description "Link flags";
} }
leaf rate { leaf rate {
type decimal64 { type decimal64 {
fraction-digits 2; fraction-digits 2;
} }
description "Link rate"; description "Link rate";
} }
leaf delay { leaf delay {
skipping to change at page 14, line 5 skipping to change at page 14, line 5
list vlan-id-name { list vlan-id-name {
if-feature VLAN; if-feature VLAN;
key "vlan-id"; key "vlan-id";
description "Interface configured VLANs"; description "Interface configured VLANs";
leaf vlan-id { leaf vlan-id {
type vlan; type vlan;
description "VLAN ID"; description "VLAN ID";
} }
leaf vlan-name { leaf vlan-name {
type string; type string;
description "VLAN Name"; description "VLAN name";
} }
} }
} //case ethernet } //case ethernet
case legacy { case legacy {
leaf layer-2-address { leaf layer-2-address {
type yang:phys-address; type yang:phys-address;
description "Interface Layer 2 address"; description "Interface Layer 2 address";
} }
skipping to change at page 17, line 27 skipping to change at page 17, line 27
URI: urn:ietf:params:xml:ns:yang:ietf-l2-topology-state 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.
This document registers the following YANG modules in the "YANG This document registers the following YANG modules in the "YANG
Module Names" registry [RFC6020]: Module Names" registry [RFC6020]:
Name: ietf-l2-topology Name: ietf-l2-topology
Namespace: urn:ietf:params:xml:ns:yang:ietf-l2-topology Namespace: urn:ietf:params:xml:ns:yang:ietf-l2-topology
Prefix: l2t Prefix: l2t
Reference: draft-ietf-i2rs-yang-l2-network-topology-04.txt (RFC form) Reference: draft-ietf-i2rs-yang-l2-network-topology-05.txt (RFC form)
Name: ietf-l2-topology-state Name: ietf-l2-topology-state
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
Reference: draft-ietf-i2rs-yang-l2-network-topology-04.txt (RFC form) Reference: draft-ietf-i2rs-yang-l2-network-topology-05.txt (RFC form)
5. Security Considerations 5. Security Considerations
The YANG module defined in this document is designed to be accessed The YANG module defined in this document is designed to be accessed
via network management protocols such as NETCONF [RFC6241] or via network management protocols such as NETCONF [RFC6241] or
RESTCONF [RFC8040] . The lowest NETCONF layer is the secure transport RESTCONF [RFC8040] . The lowest NETCONF layer is the secure transport
layer, and the mandatory-to-implement secure transport is Secure layer, and the mandatory-to-implement secure transport is Secure
Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the
mandatory-to-implement secure transport is TLS [RFC5246]. mandatory-to-implement secure transport is TLS [RFC5246].
skipping to change at page 19, line 9 skipping to change at page 19, line 9
6. Acknowledgements 6. 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 7. References
7.1. Normative 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 [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>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
skipping to change at page 19, line 37 skipping to change at page 19, line 31
<https://www.rfc-editor.org/info/rfc6020>. <https://www.rfc-editor.org/info/rfc6020>.
[RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types",
RFC 6991, DOI 10.17487/RFC6991, July 2013, RFC 6991, DOI 10.17487/RFC6991, July 2013,
<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>.
7.2. Informative References [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG",
RFC 7951, DOI 10.17487/RFC7951, August 2016,
<https://www.rfc-editor.org/info/rfc7951>.
[I-D.ietf-netmod-revised-datastores] [RFC8345] Clemm, A., Medved, J., Varga, R., Bahadur, N.,
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., Ananthakrishnan, H., and X. Liu, "A YANG Data Model for
and R. Wilton, "Network Management Datastore Network Topologies", RFC 8345, DOI 10.17487/RFC8345, March
Architecture", draft-ietf-netmod-revised-datastores-10 2018, <https://www.rfc-editor.org/info/rfc8345>.
(work in progress), January 2018.
[I-D.ietf-netmod-yang-tree-diagrams] 7.2. Informative References
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 [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 28 skipping to change at page 20, line 18
[RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration
Protocol (NETCONF) Access Control Model", RFC 6536, Protocol (NETCONF) Access Control Model", RFC 6536,
DOI 10.17487/RFC6536, March 2012, DOI 10.17487/RFC6536, March 2012,
<https://www.rfc-editor.org/info/rfc6536>. <https://www.rfc-editor.org/info/rfc6536>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>. <https://www.rfc-editor.org/info/rfc8040>.
[RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
<https://www.rfc-editor.org/info/rfc8340>.
[RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore Architecture
(NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
<https://www.rfc-editor.org/info/rfc8342>.
Appendix A. Companion YANG model for non-NMDA compliant implementations Appendix A. Companion YANG model 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
[I-D.ietf-netmod-revised-datastores]. In order to allow [RFC8342]. In order to allow implementations to use the model even
implementations to use the model even in cases when NMDA is not in cases when NMDA is not supported, a set of companion modules have
supported, a set of companion modules have been defined that been defined that represent a state model of networks and network
represent a state model of networks and network topologies, ietf- topologies, ietf- network-state and ietf-network-topology-state,
network-state and ietf-network-topology-state, respectively. respectively.
In order to be able to use the model for layer 2 topologies defined In order to be able to use the model for layer 2 topologies defined
in this document in conjunction with non-NMDA compliant in this document in conjunction with non-NMDA compliant
implementations, a corresponding companion module is defined that implementations, a corresponding companion module is defined that
represent the operational state of layer 2 network topologies. The represent the operational state of layer 2 network topologies. The
module ietf-l2-topology-state mirrors the module ietf-l2-topology module ietf-l2-topology-state mirrors the module ietf-l2-topology
defined earlier in this document. However, it augments ietf-network- defined earlier in this document. However, it augments ietf-network-
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-03-05.yang" <CODE BEGINS> file "ietf-l2-topology-state@2018-06-29.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 21, line 51 skipping to change at page 21, line 51
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-04; draft-ietf-i2rs-yang-l2-network-topo-05;
see the RFC itself for full legal notices."; see the RFC itself for full legal notices.";
revision "2018-03-05" { revision "2018-06-29" {
description "Initial revision"; description "Initial revision";
reference "draft-ietf-i2rs-l2-network-topology-04"; reference "draft-ietf-i2rs-l2-network-topology-05";
}
/*
* Features
*/
feature VLAN {
description
"Indicates that the system supports the
vlan functions";
}
feature QinQ {
description
"Indicates that the system supports the
qinq functions";
}
feature PBB {
description
"Indicates that the device supports the
provider-backbone-bridging functions";
}
feature VPLS {
description
"Indicates that the device supports the
VPLS functions";
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-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 25, line 4 skipping to change at page 24, line 7
uses nt-s:link-ref; uses nt-s:link-ref;
uses l2t:l2-network-type; uses l2t:l2-network-type;
uses l2t: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 l2t:l2-network-event-type; type l2t:l2-network-event-type;
description "Event type"; description "Event type";
} }
uses nt-s:tp-ref; uses nt-s:tp-ref;
uses l2t:l2-network-type; uses l2t:l2-network-type;
uses l2t:l2-termination-point-attributes; uses l2t:l2-termination-point-attributes;
} }
} // module l2-topology-state } // module l2-topology-state
<CODE ENDS> <CODE ENDS>
Authors' Addresses Appendix B. An Example
This section contains an example of an instance data tree in JSON
encoding [RFC7951]. The example instantiates "ietf-l2- topology" for
the topology that is depicted in the following diagram. There are
three nodes: D1, D2, and D3. D1 has three termination points: 1-0-1,
1-2-1, and 1-3-1. D2 has three termination points as well: 2-1-1,
2-0-1, and 2-3-1. D3 has two termination points: 3-1-1 and 3-2-1.
In addition, there are six links, two between each pair of nodes,
with one going in each direction.
+------------+ +------------+
| D1 | | D2 |
/-\ /-\ /-\ /-\
| | 1-0-1 | |---------------->| | 2-1-1 | |
| | 1-2-1 | |<----------------| | 2-0-1 | |
\-/ 1-3-1 \-/ \-/ 2-3-1 \-/
| /----\ | | /----\ |
+---| |---+ +---| |---+
\----/ \----/
A | A |
| | | |
| | | |
| | +------------+ | |
| | | D3 | | |
| | /-\ /-\ | |
| +----->| | 3-1-1 | |-------+ |
+---------| | 3-2-1 | |<---------+
\-/ \-/
| |
+------------+
Figure 2. A Network Topology Example
The corresponding instance data tree is depicted as below. Note that
some lines have been wrapped to adhere to the 72-character line
limitation of RFCs.
{
"ietf-network:networks": {
"network": [
{
"network-types": {
"ietf-l2-topology:l2-network": {}
},
"network-id": "l2-topo-example",
"node": [
{
"node-id": "D1",
"termination-point": [
{
"tp-id": "1-0-1",
"ietf-l2-topology:
l2-termination-point-attributes": {
"mac-address": "A1:B2:C3:D4:E5:F0"
}
},
{
"tp-id": "1-2-1",
"ietf-l2-topology:
l2-termination-point-attributes": {
"mac-address": "A1:B2:C3:D4:E5:F1"
}
},
{
"tp-id": "1-3-1",
"ietf-l2-topology:
l2-termination-point-attributes": {
"mac-address": "A1:B2:C3:D4:E5:F2"
}
}
],
"ietf-l2-topology:l2-node-attributes": {
"management-address": ["10.1.1.1"]
}
},
{
"node-id": "D2",
"termination-point": [
{
"tp-id": "2-0-1",
"ietf-l2-topology:
l2-termination-point-attributes": {
"mac-address": "A2:B2:C3:D4:E5:F0"
}
},
{
"tp-id": "2-1-1",
"ietf-l2-topology:
l2-termination-point-attributes": {
"mac-address": "A2:B2:C3:D4:E5:F2"
}
},
{
"tp-id": "2-3-1",
"ietf-l2-topology:
l2-termination-point-attributes": {
"mac-address": "A2:B2:C3:D4:E5:F3"
}
}
],
"ietf-l2-topology:l2-node-attributes": {
"management-address": ["10.1.1.2"]
}
},
{
"node-id": "D3",
"termination-point": [
{
"tp-id": "3-1-1",
"ietf-l2-topology:
l2-termination-point-attributes": {
"mac-address": "A3:B2:C3:D4:E5:F0"
}
},
{
"tp-id": "3-2-1",
"ietf-l2-topology:
l2-termination-point-attributes": {
"mac-address": "A3:B2:C3:D4:E5:F1"
}
}
],
"ietf-l3-unicast-topology:l3-node-attributes": {
"management-address": ["10.1.1.3"]
}
}
],
"ietf-network-topology:link": [
{
"link-id": "D1,1-2-1,D2,2-1-1",
"source": {
"source-node": "D1",
"source-tp": "1-2-1"
}
"destination": {
"dest-node": "D2",
"dest-tp": "2-1-1"
},
"ietf-l2-topology:l2-link-attributes": {
"rate": "1000"
}
},
{
"link-id": "D2,2-1-1,D1,1-2-1",
"source": {
"source-node": "D2",
"source-tp": "2-1-1"
}
"destination": {
"dest-node": "D1",
"dest-tp": "1-2-1"
},
"ietf-l2-topology:l2-link-attributes": {
"rate": "1000"
}
},
{
"link-id": "D1,1-3-1,D3,3-1-1",
"source": {
"source-node": "D1",
"source-tp": "1-3-1"
}
"destination": {
"dest-node": "D3",
"dest-tp": "3-1-1"
},
"ietf-l2-topology:l2-link-attributes": {
"rate": "1000"
}
},
{
"link-id": "D3,3-1-1,D1,1-3-1",
"source": {
"source-node": "D3",
"source-tp": "3-1-1"
}
"destination": {
"dest-node": "D1",
"dest-tp": "1-3-1"
},
"ietf-l2-topology:l2-link-attributes": {
"rate": "1000"
}
},
{
"link-id": "D2,2-3-1,D3,3-2-1",
"source": {
"source-node": "D2",
"source-tp": "2-3-1"
}
"destination": {
"dest-node": "D3",
"dest-tp": "3-2-1"
},
"ietf-l2-topology:l2-link-attributes": {
"rate": "1000"
}
},
{
"link-id": "D3,3-2-1,D2,2-3-1",
"source": {
"source-node": "D3",
"source-tp": "3-2-1"
}
"destination": {
"dest-node": "D2",
"dest-tp": "2-3-1"
},
"ietf-l2-topology:l2-link-attributes": {
"rate": "1000"
}
}
]
}
]
}
}
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
Xiugang Wei Xiugang Wei
Huawei Technologies Huawei Technologies
 End of changes. 35 change blocks. 
101 lines changed or deleted 275 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/