Internet DRAFT - draft-fan-yang-mac
draft-fan-yang-mac
Network Working Group H. Fan
Internet-Draft Huawei
Intended status: Standards Track
Expires: June 30, 2017 December 27, 2016
A Yang Data Model for MAC Management
draft-fan-yang-mac-00
Abstract
This memo proposes a yang model for MAC management.
Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on June 30, 2017.
Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
Fan Expires June 30, 2017 [Page 1]
Internet-Draft Abbreviated-Title December 2016
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. The Design of the MAC Data Model . . . . . . . . . . . . . . . 2
3. Definition of ietf-mac module . . . . . . . . . . . . . . . . 5
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27
5. Security Considerations . . . . . . . . . . . . . . . . . . . 28
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 28
7. Normative References . . . . . . . . . . . . . . . . . . . . . 28
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 28
1. Introduction
IP network elements normally maintain a MAC table where the
information of MAC address, and the associated VLAN number and
interfaces are maintianed. When forwarding a packet, the device can
use the informaiton in the MAC table to find out the egress quickly
so as to reduce the broadcast quickly.
The records in a MAC table can be generated either automatically or
by managers. This memo proposes a yang model enabling managers to
mange the records in the MAC talbe of a network device.
2. The Design of the MAC Data Model
module: ietf-mac
+--rw mac
+--rw globalAttribute
| +--rw macAgeTimeEnable? macAgeTimeType
| +--rw macAgingTime? uint32
+--rw vlanFdbs
| +--rw vlanFdb* [macAddress vlanId slotId]
| +--rw macAddress yang:mac-address
| +--rw vlanId macVlanId
| +--rw slotId string
| +--rw macType macType
| +--rw outIfName? string
| +--ro outNickname string
| +--rw isCeDefault? boolean
| +--rw ceVlanId? macVlanId
| +--rw isFlood? boolean
| +--rw isIMac? boolean
| +--ro learnedPeriod? uint32
| +--rw outPeerIPs
Fan Expires June 30, 2017 [Page 2]
Internet-Draft Abbreviated-Title December 2016
| +--ro outPeerIP* [outPeerIP]
| +--ro outPeerIP inet:ip-address
+--rw vsiFdbs
| +--rw vsiFdb* [vsiName slotId vlanid macAddress]
| +--rw vsiName string
| +--rw slotId string
| +--rw vlanid uint16
| +--rw vlanifName? string
| +--rw pevid? macVlanId
| +--rw cevid? macVlanId
| +--rw macAddress yang:mac-address
| +--rw macType macType
| +--rw outIfType macOutIfType
| +--rw outIfName string
| +--rw pwId? uint32
| +--rw pwEncap macPwEncapType
| +--rw peerIp? inet:ip-address
| +--rw pwName? string
| +--rw isIMac boolean
| +--ro learnedPeriod? uint32
+--rw vsiFdbDynamics
| +--ro vsiFdbDynamic* [vsiName slotId vlanid
macAddress outIfName]
| +--ro vsiName string
| +--ro slotId string
| +--ro vlanid uint16
| +--ro vlanifName? string
| +--ro pevid? macVlanId
| +--ro cevid? macVlanId
| +--ro macAddress yang:mac-address
| +--ro macType macType
| +--ro outIfType macOutIfType
| +--ro outIfName string
| +--ro pwId? uint32
| +--ro pwEncap macPwEncapType
| +--ro peerIp inet:ip-address
| +--ro pwName? string
| +--ro isIMac boolean
+--rw bdFdbs
| +--rw bdFdb* [slotId macAddress bdId]
| +--rw slotId string
| +--rw macAddress yang:mac-address
| +--rw bdId uint32
| +--rw macType macType
| +--rw outIfName string
| +--rw unTag? boolean
| +--rw peDefault? boolean
Fan Expires June 30, 2017 [Page 3]
Internet-Draft Abbreviated-Title December 2016
| +--rw ceDefault? boolean
| +--rw vid? macVlanId
| +--rw cevid? macVlanId
| +--ro learnedPeriod? uint32
+--rw macLimitRules
| +--rw macLimitRule* [ruleName]
| +--rw ruleName string
| +--rw maximum uint32
| +--rw rate? uint16
| +--rw action? macLimitForward
| +--rw alarm? macEnableStatus
+--rw vlanMacLimits
| +--rw vlanMacLimit* [vlanId]
| +--rw vlanId macVlanId
| +--rw maximum uint32
| +--rw rate? uint16
| +--rw action? macLimitForward
| +--rw alarm? macEnableStatus
+--rw vsiMacLimits
| +--rw vsiMacLimit* [vsiName]
| +--rw vsiName string
| +--rw maximum uint32
| +--rw rate? uint16
| +--rw action? macLimitForward
| +--rw alarm? macEnableStatus
| +--rw upThreshold uint8
| +--rw downThreshold uint8
+--rw bdMacLimits
| +--rw bdMacLimit* [bdId]
| +--rw bdId uint32
| +--rw maximum uint32
| +--rw rate? uint16
| +--rw action? macLimitForward
| +--rw alarm? macEnableStatus
+--rw ifMacLimits
| +--rw ifMacLimit* [ifName limitType]
| +--rw ifName string
| +--rw limitType limitType
| +--rw ruleName? -> /mac/macLimitRules
/macLimitRule/ruleName
| +--rw maximum uint32
| +--rw rate? uint16
| +--rw action? macLimitForward
| +--rw alarm? macEnableStatus
+--rw ifVlanMacLimits
+--ro ifVlanMacLimit* [ifName vlanBegin limitType]
+--ro ifName string
Fan Expires June 30, 2017 [Page 4]
Internet-Draft Abbreviated-Title December 2016
+--ro vlanBegin macVlanId
+--ro vlanEnd? macVlanId
+--ro limitType limitType
+--ro ruleName? -> /mac/macLimitRules
/macLimitRule/ruleName
+--ro maximum uint32
+--ro rate uint16
+--ro action? macLimitForward
+--ro alarm? macEnableStatus
3. Definition of ietf-mac module
<CODE BEGINS> file "ietf-mac@2016-12-23.yang"
module ietf-mac {
namespace "http://www.huawei.com/netconf/vrp/huawei-mac";
prefix mac;
import ietf-inet-types {
prefix "inet";
}
import ietf-yang-types {
prefix yang;
}
organization
"Huawei Technologies Co.,Ltd.";
contact
"Huawei Industrial Base Bantian, Longgang Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com Email: support@huawei.com";
description
"MAC address forwarding.";
revision 2016-12-30 {
description
"Init revision";
reference "Huawei private.";
}
typedef macVlanId {
type uint16 {
range "1..4094";
}
description
Fan Expires June 30, 2017 [Page 5]
Internet-Draft Abbreviated-Title December 2016
"VLAN Id.";
}
typedef macType {
type enumeration {
enum "static" {
value 0;
description
"Static MAC address entry.";
}
enum "dynamic" {
value 1;
description
"Dynamic MAC address entry.";
}
enum "blackHole" {
value 2;
description
"Blackhole MAC address entry";
}
enum "sticky" {
value 3;
description
"sticky MAC address entry";
}
}
description
"MAC address type.";
}
typedef limitType {
type enumeration {
enum "macLimit" {
value 0;
description
"Interface MAC rule limit.";
}
enum "macApply" {
value 1;
description
"Interface MAC rule application.";
}
}
description
"MAC address limit type.";
}
Fan Expires June 30, 2017 [Page 6]
Internet-Draft Abbreviated-Title December 2016
typedef macLimitForward {
type enumeration {
enum "forward" {
value 0;
description
"Forward.";
}
enum "discard" {
value 1;
description
"Discard.";
}
}
description
"MAC address limit forward type.";
}
typedef macEnableStatus {
type enumeration {
enum "enable" {
value 0;
description
"Enable.";
}
enum "disable" {
value 1;
description
"Disable.";
}
}
description
"MAC enable type.";
}
typedef macOutIfType {
type enumeration {
enum "ac" {
value 0;
description
"AC.";
}
enum "pw" {
value 1;
description
"PW.";
}
}
Fan Expires June 30, 2017 [Page 7]
Internet-Draft Abbreviated-Title December 2016
description
"MAC out if type.";
}
typedef macPwEncapType {
type enumeration {
enum "ethernet" {
value 0;
description
"Ethernet.";
}
enum "vlan" {
value 1;
description
"VLAN.";
}
}
description
"MAC encapsulation type.";
}
typedef directionType {
type enumeration {
enum "inbound" {
value 0;
description
"Inbound.";
}
enum "outbound" {
value 1;
description
"Outbound.";
}
}
description
"Direction type.";
}
typedef discardType {
type enumeration {
enum "broadcastDiscard" {
value 0;
description
"Discard broadcast.";
}
enum "unknownMulticastDiscard" {
value 1;
description
Fan Expires June 30, 2017 [Page 8]
Internet-Draft Abbreviated-Title December 2016
"Discard unknown multicast.";
}
enum "unknownUnicastDiscard" {
value 2;
description
"Discard Unknown unicast.";
}
}
description
"Discard type.";
}
typedef broadcastDomainType {
type enumeration {
enum "VLAN" {
value 0;
description
"VLAN Type.";
}
enum "VSI" {
value 1;
description
"VSI Type.";
}
enum "BD" {
value 2;
description
"BD Type.";
}
}
description
"Domain type.";
}
typedef macAgeTimeType {
type enumeration {
enum "enable" {
value 0;
description
"Enable MAC address global aging.";
}
enum "disable" {
value 1;
description
"Disable MAC address global aging.";
}
Fan Expires June 30, 2017 [Page 9]
Internet-Draft Abbreviated-Title December 2016
}
description
"MAC address age time type.";
}
container mac {
description
"MAC address forwarding. ";
container globalAttribute {
description
"MAC global attribute.";
leaf macAgeTimeEnable {
type macAgeTimeType;
default "enable";
description
"Whether MAC address aging is enabled.";
}
leaf macAgingTime {
when "not(../macAgeTimeEnable='disable') or
../macAgeTimeEnable='enable'";
type uint32 {
range "60..1000000";
}
default "300";
description
"Aging time.";
}
}
container vlanFdbs {
description
"VLAN forwarding table.";
list vlanFdb {
key "macAddress vlanId slotId";
description
"VLAN forwarding entry.";
leaf macAddress {
type yang:mac-address;
description
"MAC address in the format of H-H-H.";
}
leaf vlanId {
type macVlanId;
description
"VLAN ID.";
}
leaf slotId {
type string {
Fan Expires June 30, 2017 [Page 10]
Internet-Draft Abbreviated-Title December 2016
length "1..24";
}
description
"Slot ID.";
}
leaf macType {
type macType;
must "((../macType='static' or ../macType='blackHole') )";
mandatory true;
description
"MAC address type, such as blackhole, static, and dynamic.";
}
leaf outIfName {
when "not(../macType='blackHole') or ../macType='static'";
type string;
description
"Outbound interface name.";
}
leaf outNickname {
type string {
length "1..31";
}
config false;
mandatory true;
description
"Nickname.";
}
leaf isCeDefault {
when "not(../macType='blackHole')";
type boolean;
default "false";
description
"CE default VLAN.";
}
leaf ceVlanId {
when "not(../macType='blackHole') or ../isCeDefault='false'
and ../macType='static'";
type macVlanId;
description
"User VLAN ID.";
}
leaf isFlood {
type boolean;
default "false";
description
"Flooding MAC.";
}
Fan Expires June 30, 2017 [Page 11]
Internet-Draft Abbreviated-Title December 2016
leaf isIMac {
type boolean;
default "false";
description
"Ingress MAC.";
}
leaf learnedPeriod {
type uint32 {
range "0..4294967294";
}
default "0";
config false;
description
"Dynamic MAC Holding Time.";
}
container outPeerIPs {
description
"Out Peer IPs.";
list outPeerIP {
key "outPeerIP";
config false;
description
"Out Peer IP.";
leaf outPeerIP {
type inet:ip-address;
description
"Out Peer IP.";
}
}
}
}
}
container vsiFdbs {
description
"VSI forwarding table.";
list vsiFdb {
key "vsiName slotId vlanid macAddress";
description
"VSI Forwarding entry.";
leaf vsiName {
type string {
length "1..31";
}
description
"VSI Name.";
}
leaf slotId {
Fan Expires June 30, 2017 [Page 12]
Internet-Draft Abbreviated-Title December 2016
type string {
length "1..24";
}
description
"Slot ID.";
}
leaf vlanid {
type uint16 {
range "0..4094";
}
description
"VLAN ID.";
}
leaf vlanifName {
when "not(../outIfType='pw' or ../macType='blackHole')
or ../outIfType='ac' and ../macType='static'";
type string;
description
"VLANIF interface.";
}
leaf pevid {
when "not(../outIfType='pw' or ../macType='blackHole')
or ../outIfType='ac' and ../macType='static'";
type macVlanId;
description
"Outer VLAN tag.";
}
leaf cevid {
when "not(../outIfType='pw' or ../macType='blackHole')
or ../outIfType='ac' and ../macType='static'";
type macVlanId;
description
"Inner VLAN tag.";
}
leaf macAddress {
type yang:mac-address;
description
"MAC address in the format of H-H-H.";
}
leaf macType {
type macType;
must "((../macType='static' or ../macType='blackHole') )";
mandatory true;
description
"MAC Type of an interface.";
}
leaf outIfType {
Fan Expires June 30, 2017 [Page 13]
Internet-Draft Abbreviated-Title December 2016
when "not(../macType='blackHole') or ../macType='static'";
type macOutIfType;
mandatory true;
description
"Outbound interface type.";
}
leaf outIfName {
when "not(../outIfType='pw' or ../macType='blackHole'
or ../outIfType='pw' and ../macType='static')
or ../outIfType='ac' and ../macType='static'";
type string;
mandatory true;
description
"Outbound interface name.";
}
leaf pwId {
when "not(../macType='blackHole' or ../outIfType='ac'
and ../macType='static') or ../outIfType='pw'
and ../macType='static'";
type uint32 {
range "1..4294967295";
}
description
"PW ID.";
}
leaf pwEncap {
when "not(../macType='blackHole' or ../outIfType='ac'
and ../macType='static') or ../outIfType='pw'
and ../macType='static'";
type macPwEncapType;
mandatory true;
description
"PW encapsulation type.";
}
leaf peerIp {
when "not(../macType='blackHole' or ../outIfType='ac'
and ../macType='static') or ../outIfType='pw'
and ../macType='static'";
type inet:ip-address;
description
"Peer IP address.";
}
leaf pwName {
type string {
length "1..31";
}
description
Fan Expires June 30, 2017 [Page 14]
Internet-Draft Abbreviated-Title December 2016
"PW Name.";
}
leaf isIMac {
type boolean;
mandatory true;
description
"Ingress MAC.";
}
leaf learnedPeriod {
type uint32 {
range "0..4294967294";
}
default "0";
config false;
description
"Dynamic MAC Holding Time.";
}
}
}
container vsiFdbDynamics {
description
"VSI Forwarding Table on Slot.";
list vsiFdbDynamic {
key "vsiName slotId vlanid macAddress outIfName";
config false;
description
"VSI Forwarding Table on Slot.";
leaf vsiName {
type string {
length "1..31";
}
description
"VSI Name.";
}
leaf slotId {
type string {
length "1..24";
}
description
"Slot ID.";
}
leaf vlanid {
type uint16 {
range "0..4094";
}
description
"VLAN ID.";
Fan Expires June 30, 2017 [Page 15]
Internet-Draft Abbreviated-Title December 2016
}
leaf vlanifName {
type string;
description
"VLANIF interface.";
}
leaf pevid {
type macVlanId;
description
"Outer VLAN tag.";
}
leaf cevid {
type macVlanId;
description
"Inner VLAN tag.";
}
leaf macAddress {
type yang:mac-address;
description
"MAC address in the format of H-H-H.";
}
leaf macType {
type macType;
mandatory true;
description
"MAC Type of an interface.";
}
leaf outIfType {
type macOutIfType;
mandatory true;
description
"Outbound interface type.";
}
leaf outIfName {
type string;
description
"Outbound interface name.";
}
leaf pwId {
type uint32 {
range "1..4294967295";
}
description
"PW ID.";
}
leaf pwEncap {
type macPwEncapType;
Fan Expires June 30, 2017 [Page 16]
Internet-Draft Abbreviated-Title December 2016
mandatory true;
description
"PW encapsulation type.";
}
leaf peerIp {
type inet:ip-address;
mandatory true;
description
"Peer IP address.";
}
leaf pwName {
type string {
length "1..31";
}
description
"PW Name.";
}
leaf isIMac {
type boolean;
mandatory true;
description
"Ingress MAC.";
}
}
}
container bdFdbs {
description
"BD forwarding entries.";
list bdFdb {
key "slotId macAddress bdId";
description
"BD forwarding entry.";
leaf slotId {
type string {
length "1..50";
}
description
"Slot number.";
}
leaf macAddress {
type yang:mac-address;
description
"MAC address of a bridge domain.";
}
leaf bdId {
type uint32 {
range "1..16777215";
Fan Expires June 30, 2017 [Page 17]
Internet-Draft Abbreviated-Title December 2016
}
description
"ID of a bridge domain.";
}
leaf macType {
type macType;
must "((../macType='static' or ../macType='blackHole') )";
mandatory true;
description
"MAC address type of a bridge domain.";
}
leaf outIfName {
when "not(../macType='blackHole') or ../unTag='false'
and ../peDefault='false' and ../ceDefault='false'
and ../macType='static'";
type string;
mandatory true;
description
"Outbound interface name.";
}
leaf unTag {
when "not(../macType='blackHole') or ../unTag='false'
and ../peDefault='false' and ../ceDefault='false'
and ../macType='static'";
type boolean;
default "false";
description
"Packets without VLAN tags.";
}
leaf peDefault {
when "not(../macType='blackHole' or ../unTag='true')
or ../unTag='false' and ../peDefault='false'
and ../ceDefault='false' and ../macType='static'";
type boolean;
default "false";
description
"PE default VLAN.";
}
leaf ceDefault {
when "not(../peDefault='true' or ../macType='blackHole'
or ../unTag='true') or ../unTag='false'
and ../peDefault='false' and ../ceDefault='false'
and ../macType='static'";
type boolean;
default "false";
description
"CE default VLAN.";
Fan Expires June 30, 2017 [Page 18]
Internet-Draft Abbreviated-Title December 2016
}
leaf vid {
when "not(../peDefault='true' or ../macType='blackHole'
or ../unTag='true') or ../unTag='false'
and ../peDefault='false' and ../ceDefault='false'
and ../macType='static'";
type macVlanId;
description
"Outer VLAN tag.";
}
leaf cevid {
when "not(../peDefault='true' or ../ceDefault='true'
or ../macType='blackHole' or ../unTag='true')
or ../unTag='false' and ../peDefault='false'
and ../ceDefault='false' and ../macType='static'";
type macVlanId;
description
"Inner VLAN tag.";
}
leaf learnedPeriod {
type uint32 {
range "0..4294967294";
}
default "0";
config false;
description
"Dynamic MAC Holding Time.";
}
}
}
container macLimitRules {
description
"Global MAC address learning limit rule.";
list macLimitRule {
key "ruleName";
description
"Global MAC address learning limit.";
leaf ruleName {
type string {
length "1..31";
}
description
"Global MAC address learning limit rule name.";
}
leaf maximum {
type uint32 {
range "0..131072";
Fan Expires June 30, 2017 [Page 19]
Internet-Draft Abbreviated-Title December 2016
}
must "not(../rate=0) or (../rate=0 and ../maximum>0)";
mandatory true;
description
"Maximum number of MAC addresses that can be learned.";
}
leaf rate {
type uint16 {
range "0..1000";
}
must "not(../maximum=0) or (../maximum=0 and ../rate>0)";
default "0";
description
"Interval at which MAC addresses are learned.";
}
leaf action {
type macLimitForward;
default "discard";
description
"Discard or forward after the number of learned MAC
addresses reaches the maximum number.";
}
leaf alarm {
type macEnableStatus;
default "enable";
description
"Whether an alarm is generated after the number of
learned MAC addresses reaches the maximum number.";
}
}
}
container vlanMacLimits {
description
"VLAN MAC address limit list.";
list vlanMacLimit {
key "vlanId";
description
"VLAN MAC address limit.";
leaf vlanId {
type macVlanId;
description
"VLAN ID.";
}
leaf maximum {
type uint32 {
range "0..130048";
}
Fan Expires June 30, 2017 [Page 20]
Internet-Draft Abbreviated-Title December 2016
must "not(../rate=0) or (../rate=0 and ../maximum>0)";
mandatory true;
description
"Maximum number of MAC addresses that can be learned
in a VLAN.";
}
leaf rate {
type uint16 {
range "0..1000";
}
must "not(../maximum=0) or (../maximum=0 and ../rate>0)";
default "0";
description
"Interval at which MAC addresses are learned in a VLAN.";
}
leaf action {
type macLimitForward;
default "discard";
description
"Discard or forward after the number of learned MAC
addresses reaches the maximum number in a VLAN.";
}
leaf alarm {
type macEnableStatus;
default "enable";
description
"Whether an alarm is generated after the number of learned
MAC addresses reaches the maximum number in a VLAN.";
}
}
}
container vsiMacLimits {
description
"VSI MAC address limit list.";
list vsiMacLimit {
key "vsiName";
description
"VSI MAC address limit.";
leaf vsiName {
type string {
length "1..31";
}
description
"VSI name.";
}
leaf maximum {
type uint32 {
Fan Expires June 30, 2017 [Page 21]
Internet-Draft Abbreviated-Title December 2016
range "0..524288";
}
must "not(../rate=0) or (../rate=0 and ../maximum>0)";
mandatory true;
description
"Maximum number of MAC addresses that can be learned in a
VSI.";
}
leaf rate {
type uint16 {
range "0..1000";
}
must "not(../maximum=0) or (../maximum=0 and ../rate>0)";
default "0";
description
"Interval at which MAC addresses are learned in a VSI.";
}
leaf action {
type macLimitForward;
default "discard";
description
"Discard or forward after the number of learned MAC
addresses reaches the maximum number in a VSI.";
}
leaf alarm {
type macEnableStatus;
default "disable";
description
"Whether an alarm is generated after the number of learned
MAC addresses reaches the maximum number in a VSI.";
}
leaf upThreshold {
type uint8 {
range "80..100";
}
must "(../upThreshold>=../downThreshold)";
mandatory true;
description
"Upper limit for the number of MAC addresses.";
}
leaf downThreshold {
type uint8 {
range "60..100";
}
mandatory true;
description
"Upper limit for the number of MAC addresses.";
Fan Expires June 30, 2017 [Page 22]
Internet-Draft Abbreviated-Title December 2016
}
}
}
container bdMacLimits {
description
"BD MAC address limit list.";
list bdMacLimit {
key "bdId";
description
"BD MAC address limit.";
leaf bdId {
type uint32 {
range "1..16777215";
}
description
"Specifies the ID of a bridge domain.";
}
leaf maximum {
type uint32 {
range "0..130048";
}
must "not(../rate=0) or (../rate=0 and ../maximum>0)";
mandatory true;
description
"Maximum number of MAC addresses that can be learned in a
BD.";
}
leaf rate {
type uint16 {
range "0..1000";
}
default "0";
description
"Interval at which MAC addresses are learned in a BD.";
}
leaf action {
type macLimitForward;
default "discard";
description
"Forward or discard the packet.";
}
leaf alarm {
type macEnableStatus;
default "enable";
description
"Whether an alarm is generated after the number of learned
MAC addresses reaches the maximum number.";
Fan Expires June 30, 2017 [Page 23]
Internet-Draft Abbreviated-Title December 2016
}
}
}
container ifMacLimits {
description
"Interface MAC address limit list.";
list ifMacLimit {
key "ifName limitType";
description
"Interface MAC address limit.";
leaf ifName {
type string;
description
"Interface name.";
}
leaf limitType {
type limitType;
description
"Interface MAC limit type.";
}
leaf ruleName {
type leafref {
path "/mac/macLimitRules/macLimitRule/ruleName";
}
description
"Rule name.";
}
leaf maximum {
when "not(../limitType='macApply')
or ../limitType='macLimit'";
type uint32 {
range "0..131072";
}
must "not(../rate=0) or (../rate=0 and ../maximum>0)";
mandatory true;
description
"Maximum number of MAC addresses that can be learned
on an interface.";
}
leaf rate {
when "not(../limitType='macApply')
or ../limitType='macLimit'";
type uint16 {
range "0..1000";
}
must "not(../maximum=0) or (../maximum=0 and ../rate>0)";
default "0";
Fan Expires June 30, 2017 [Page 24]
Internet-Draft Abbreviated-Title December 2016
description
"Interval (ms) at which MAC addresses are learned on
an interface.";
}
leaf action {
when "not(../limitType='macApply')
or ../limitType='macLimit'";
type macLimitForward;
default "discard";
description
"Discard or forward after the number of learned MAC
addresses reaches the maximum number on an interface";
}
leaf alarm {
when "not(../limitType='macApply')
or ../limitType='macLimit'";
type macEnableStatus;
default "enable";
description
"Whether an alarm is generated after the number of learned
MAC addresses reaches the maximum number on an interface.";
}
}
}
container ifVlanMacLimits {
description
"Interface + VLAN MAC address limit list.";
list ifVlanMacLimit {
key "ifName vlanBegin limitType";
config false;
description
"Interface + VLAN MAC address limit.";
leaf ifName {
type string;
description
"Name of an interface. ";
}
leaf vlanBegin {
type macVlanId;
description
"Start VLAN ID.";
}
leaf vlanEnd {
type macVlanId;
must "(../vlanEnd>=../vlanBegin)
or not(../limitType='macApply')";
description
Fan Expires June 30, 2017 [Page 25]
Internet-Draft Abbreviated-Title December 2016
"End VLAN ID.";
}
leaf limitType {
type limitType;
description
"Interface MAC limit type.";
}
leaf ruleName {
type leafref {
path "/mac/macLimitRules/macLimitRule/ruleName";
}
description
"Rule name.";
}
leaf maximum {
when "not(../limitType='macApply')
or ../limitType='macLimit'";
type uint32 {
range "0..131072";
}
mandatory true;
description
"Maximum number of MAC addresses that can be learned on
an interface.";
}
leaf rate {
when "not(../limitType='macApply')
or ../limitType='macLimit'";
type uint16 {
range "0..1000";
}
mandatory true;
description
"Interval (ms) at which MAC addresses are learned on
an interface.";
}
leaf action {
when "not(../limitType='macApply')
or ../limitType='macLimit'";
type macLimitForward;
default "discard";
description
"Discard or forward the packet.";
}
leaf alarm {
when "not(../limitType='macApply')
or ../limitType='macLimit'";
Fan Expires June 30, 2017 [Page 26]
Internet-Draft Abbreviated-Title December 2016
type macEnableStatus;
default "enable";
description
"Whether an alarm is generated after the number of learned
MAC addresses reaches the maximum number.";
}
}
}
}
}
<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.
Fan Expires June 30, 2017 [Page 27]
Internet-Draft Abbreviated-Title December 2016
5. Security Considerations
TBD
6. Acknowledgements
Authors would like to thank the comments and suggestions from Dacheng
Zhang.
7. Normative References
[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>.
Author's Address
Huihua Fan
Huawei
EMail: fanhuihua@huawei.com
Fan Expires June 30, 2017 [Page 28]