rfc8519.alt-original   rfc8519.txt 
NETMOD WG M. Jethanandani Internet Engineering Task Force (IETF) M. Jethanandani
Internet-Draft VMware Request for Comments: 8519 VMware
Intended status: Standards Track S. Agarwal Category: Standards Track S. Agarwal
Expires: May 10, 2019 Cisco Systems, Inc. ISSN: 2070-1721 Cisco Systems, Inc.
L. Huang L. Huang
D. Blair D. Blair
November 6, 2018 March 2019
Network Access Control List (ACL) YANG Data Model YANG Data Model for Network Access Control Lists (ACLs)
draft-ietf-netmod-acl-model-21
Abstract Abstract
This document defines a data model for Access Control List (ACL). An This document defines a data model for Access Control Lists (ACLs).
ACL is a user-ordered set of rules, used to configure the forwarding An ACL is a user-ordered set of rules used to configure the
behavior in device. Each rule is used to find a match on a packet, forwarding behavior in a device. Each rule is used to find a match
and define actions that will be performed on the packet. on a packet and define actions that will be performed on the packet.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
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 https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 7841.
This Internet-Draft will expire on May 10, 2019. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
https://www.rfc-editor.org/info/rfc8519.
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
1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 4 1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
1.3. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4 1.3. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4
2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4
3. Understanding ACL's Filters and Actions . . . . . . . . . . . 5 3. Understanding ACL's Filters and Actions . . . . . . . . . . . 4
3.1. ACL Modules . . . . . . . . . . . . . . . . . . . . . . . 6 3.1. ACL Modules . . . . . . . . . . . . . . . . . . . . . . . 5
4. ACL YANG Models . . . . . . . . . . . . . . . . . . . . . . . 10 4. ACL YANG Models . . . . . . . . . . . . . . . . . . . . . . . 9
4.1. IETF Access Control List module . . . . . . . . . . . . . 10 4.1. IETF Access Control List Module . . . . . . . . . . . . . 9
4.2. IETF Packet Fields module . . . . . . . . . . . . . . . . 24 4.2. IETF Packet Fields Module . . . . . . . . . . . . . . . . 24
4.3. ACL Examples . . . . . . . . . . . . . . . . . . . . . . 37 4.3. ACL Examples . . . . . . . . . . . . . . . . . . . . . . 36
4.4. Port Range Usage and Other Examples . . . . . . . . . . . 39 4.4. Port Range Usage and Other Examples . . . . . . . . . . . 38
5. Security Considerations . . . . . . . . . . . . . . . . . . . 43 5. Security Considerations . . . . . . . . . . . . . . . . . . . 42
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 44 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 43
6.1. URI Registration . . . . . . . . . . . . . . . . . . . . 44 6.1. URI Registration . . . . . . . . . . . . . . . . . . . . 43
6.2. YANG Module Name Registration . . . . . . . . . . . . . . 44 6.2. YANG Module Name Registration . . . . . . . . . . . . . . 43
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 45 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 44
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 45 7.1. Normative References . . . . . . . . . . . . . . . . . . 44
8.1. Normative References . . . . . . . . . . . . . . . . . . 45 7.2. Informative References . . . . . . . . . . . . . . . . . 45
8.2. Informative References . . . . . . . . . . . . . . . . . 47 Appendix A. Extending ACL Model Examples . . . . . . . . . . . . 46
Appendix A. Extending ACL model examples . . . . . . . . . . . . 48 A.1. Example of a Company's Proprietary Module . . . . . . . . 46
A.1. A company proprietary module example . . . . . . . . . . 48 A.2. Linux nftables . . . . . . . . . . . . . . . . . . . . . 50
A.2. Linux nftables . . . . . . . . . . . . . . . . . . . . . 51 A.3. Ethertypes . . . . . . . . . . . . . . . . . . . . . . . 51
A.3. Ethertypes . . . . . . . . . . . . . . . . . . . . . . . 52 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 59
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 60 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 60
1. Introduction 1. Introduction
Access Control List (ACL) is one of the basic elements used to An Access Control List (ACL) is one of the basic elements used to
configure device forwarding behavior. It is used in many networking configure device-forwarding behavior. It is used in many networking
technologies such as Policy Based Routing (PBR), firewalls etc. technologies such as Policy-Based Routing (PBR), firewalls, etc.
An ACL is an user-ordered set of rules, that is used to filter An ACL is a user-ordered set of rules that is used to filter traffic
traffic on a networking device. Each rule is represented by an on a networking device. Each rule is represented by an Access
Access Control Entry (ACE). Control Entry (ACE).
Each ACE has a group of match criteria and a group of actions. Each ACE has a group of match criteria and a group of actions.
The match criteria allow for definition of packet headers and The match criteria allow for the definition of packet headers and
metadata, the contents of which must match the definitions. metadata, the contents of which must match the definitions.
o Packet header matches apply to fields visible in the packet such o Packet header matches apply to fields visible in the packet such
as address or Class of Service (CoS) or port numbers. as address, Class of Service (CoS), or port number.
o In case a vendor supports it, metadata matches apply to fields o In case a vendor supports it, metadata matches apply to fields
associated with the packet but not in the packet header such as associated with the packet, that are not in the packet header,
input interface or length of the packet as received over the wire. such as the input interface or length of the packet as received
over the wire.
The actions specify what to do with the packet when the matching The actions specify what to do with the packet when the matching
criteria are met. These actions are any operations that would apply criteria are met. These actions are any operations that would apply
to the packet, such as counting, policing, or simply forwarding. The to the packet, such as counting, policing, or simply forwarding. The
list of potential actions is unbounded depending on the capabilities list of potential actions is unbounded depending on the capabilities
of the networking devices. of the networking devices.
Access Control List is also widely knowns as ACL (pronounce as [ak-uh Access Control List is also widely known as ACL (pronounced as
l]) or Access List. In this document, Access Control List, ACL and [ak-uh l]) or Access List. In this document, Access Control List,
Access List are used interchangeably. ACL, and Access List are used interchangeably.
The matching of filters and actions in an ACE/ACL are triggered only The matching of filters and actions in an ACE/ACL is triggered only
after the application/attachment of the ACL to an interface, VRF, after the application/attachment of the ACL to an interface, a
vty/tty session, QoS policy, or routing protocols, amongst various Virtual Routing and Forwarding (VRF) interface, a vty/tty session, a
other configuration attachment points. Once attached, it is used for QoS policy, or routing protocols, amongst various other configuration
filtering traffic using the match criteria in the ACEs and taking attachment points. Once attached, it is used for filtering traffic
appropriate action(s) that have been configured against that ACE. In using the match criteria in the ACEs and taking appropriate action(s)
order to apply an ACL to any attachment point other than an that has been configured against that ACE. In order to apply an ACL
interface, vendors would have to augment the ACL YANG model. to any attachment point other than an interface, vendors would have
to augment the ACL YANG model.
1.1. Definitions and Acronyms 1.1. Definitions and Acronyms
ACE: Access Control Entry ACE: Access Control Entry
ACL: Access Control List ACL: Access Control List
CoS: Class of Service CoS: Class of Service
DSCP: Differentiated Services Code Point DSCP: Differentiated Services Code Point
skipping to change at page 4, line ? skipping to change at page 3, line 47
ICMP: Internet Control Message Protocol ICMP: Internet Control Message Protocol
IP: Internet Protocol IP: Internet Protocol
IPv4: Internet Protocol version 4 IPv4: Internet Protocol version 4
IPv6: Internet Protocol version 6 IPv6: Internet Protocol version 6
MAC: Media Access Control MAC: Media Access Control
PBR: Policy Based Routing PBR: Policy-Based Routing
TCP: Transmission Control Protocol TCP: Transmission Control Protocol
UDP: User Datagram Protocol UDP: User Datagram Protocol
1.2. Terminology 1.2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in
14 [RFC2119] [RFC8174] when, and only when, they appear in all BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
1.3. Tree Diagram 1.3. Tree Diagram
For a reference to the annotations used in tree diagrams included in For a reference to the annotations used in the tree diagrams included
this draft, please see YANG Tree Diagrams [RFC8340]. in this document, please see "YANG Tree Diagrams" [RFC8340].
2. Problem Statement 2. Problem Statement
This document defines a YANG 1.1 [RFC7950] data model for the This document defines a YANG 1.1 data model [RFC7950] for the
configuration of ACLs. The model defines matching rules for commonly configuration of ACLs. The model defines matching rules for commonly
used protocols such as, Ethernet, IPv4, IPv6, TCP, UDP and ICMP. If used protocols such as Ethernet, IPv4, IPv6, TCP, UDP, and ICMP. If
more protocols need to be supported in the future, this base model more protocols need to be supported in the future, this base model
can be augmented. An example of such an augmentation can be seen in can be augmented. An example of such an augmentation can be seen in
the Appendix. Appendix A.
ACL implementations in every device may vary greatly in terms of the ACL implementations in every device may vary greatly in terms of the
filter constructs and actions that they support. Therefore, this filter constructs and actions that they support. Therefore, this
draft proposes a model that can be augmented by standard extensions document proposes a model that can be augmented by standard
and vendor proprietary models. extensions and vendor proprietary models.
3. Understanding ACL's Filters and Actions 3. Understanding ACL's Filters and Actions
Although different vendors have different ACL data models, there is a Although different vendors have different ACL data models, there is a
common understanding of what Access Control List (ACL) is. A network common understanding of what an ACL is. A network system usually has
system usually has a list of ACLs, and each ACL contains an ordered a list of ACLs, and each ACL contains an ordered list of rules, also
list of rules, also known as Access Control Entries (ACE). Each ACE known as ACEs. Each ACE has a group of match criteria and a group of
has a group of match criteria and a group of actions. The match actions. The match criteria allows for definition of the contents of
criteria allow for definition of contents of the packet headers or the packet headers or metadata, if supported by the vendor. Packet
metadata, if supported by the vendor. Packet header matching applies header matching applies to fields visible in the packet such as
to fields visible in the packet such as address or CoS or port address, CoS, or port number. Metadata matching applies to fields
numbers. Metadata matching applies to fields associated with the associated with the packet, that are not in the packet header, such
packet, but not in the packet header, such as input interface, packet as the input interface, packet length, or source or destination
length, or source or destination prefix length. The actions can be prefix length. The actions can be any sort of operation from logging
any sort of operation from logging to rate limiting or dropping to to rate-limiting or dropping to simply forwarding. Actions on the
simply forwarding. Actions on the first matching ACE are applied first matching ACE are applied with no processing of subsequent ACEs.
with no processing of subsequent ACEs.
The model also includes a container to hold overall operational state The model also includes a container to hold overall operational state
for each ACL and operational state for each ACE. One ACL can be for each ACL and for each ACE. One ACL can be applied to multiple
applied to multiple targets within the device, such as interface of a targets within the device, such as the interface of a networking
networking device, applications or features running in the device, device, applications or features running in the device, etc. When
etc. When applied to interfaces of a networked device, distinct ACLs applied to interfaces of a networked device, distinct ACLs are
are defined for the ingress (input) or egress (output) interface. defined for the ingress (input) or egress (output) interface.
This draft tries to address the commonalities between all vendors and This document tries to address the commonalities between all vendors
create a common model, which can be augmented with proprietary and creates a common model, which can be augmented with proprietary
models. The base model is simple in design, and we hope to achieve models. The base model is simple in design, and we hope to achieve
enough flexibility for each vendor to extend the base model. enough flexibility for each vendor to extend the base model.
The use of feature statements in the model allows vendors to The use of feature statements in the model allows vendors to
advertise match rules they are capable and willing to support. There advertise match rules they are capable and willing to support. There
are two sets of feature statements a device needs to advertise. The are two sets of feature statements a device needs to advertise. The
first set of feature statements specify the capability of the device. first set of feature statements specifies the capability of the
These include features such as "Device can support matching on device. These include features such as "Device can support matching
Ethernet headers" or "Device can support matching on IPv4 headers". on Ethernet headers" or "Device can support matching on IPv4
The second set of feature statements specify the combinations of headers". The second set of feature statements specifies the
headers the device is willing to support. These include features combinations of headers the device is willing to support. These
such as "Plain IPv6 ACL supported" or "Ethernet, IPv4 and IPv6 ACL include features such as "Plain IPv6 ACL supported" or "Ethernet,
combinations supported". IPv4 and IPv6 ACL combinations supported".
3.1. ACL Modules 3.1. ACL Modules
There are two YANG modules in the model. The first module, "ietf- There are two YANG modules in the model. The first module, "ietf-
access-control-list", defines generic ACL aspects which are common to access-control-list", defines generic ACL aspects that are common to
all ACLs regardless of their type or vendor. In effect, the module all ACLs regardless of their type or vendor. In effect, the module
can be viewed as providing a generic ACL "superclass". It imports can be viewed as providing a generic ACL "superclass". It imports
the second module, "ietf-packet-fields". The match container in the second module, "ietf-packet-fields". The match container in
"ietf-access-control-list" uses groupings in "ietf-packet-fields" to "ietf-access-control-list" uses groupings in "ietf-packet-fields" to
specify match fields such as port numbers or protocol. The specify match fields such as port numbers or protocols. The
combination of 'if-feature' checks and 'must' statements allow for combination of 'if-feature' checks and 'must' statements allows for
the selection of relevant match fields that a user can define rules the selection of relevant match fields that a user can define rules
for. for.
If there is a need to define a new "matches" choice, such as IPFIX If there is a need to define a new "matches" choice, such as IP Flow
[RFC7011], the container "matches" can be augmented. Information Export (IPFIX) [RFC7011], the container "matches" can be
augmented.
module: ietf-access-control-list module: ietf-access-control-list
+--rw acls +--rw acls
+--rw acl* [name] +--rw acl* [name]
| +--rw name string | +--rw name string
| +--rw type? acl-type | +--rw type? acl-type
| +--rw aces | +--rw aces
| +--rw ace* [name] | +--rw ace* [name]
| +--rw name string | +--rw name string
| +--rw matches | +--rw matches
skipping to change at page 10, line 7 skipping to change at page 9, line 24
+--rw acl-set* [name] +--rw acl-set* [name]
+--rw name -> /acls/acl/name +--rw name -> /acls/acl/name
+--ro ace-statistics* [name] {interface-stats}? +--ro ace-statistics* [name] {interface-stats}?
+--ro name +--ro name
| -> /acls/acl/aces/ace/name | -> /acls/acl/aces/ace/name
+--ro matched-packets? yang:counter64 +--ro matched-packets? yang:counter64
+--ro matched-octets? yang:counter64 +--ro matched-octets? yang:counter64
4. ACL YANG Models 4. ACL YANG Models
4.1. IETF Access Control List module 4.1. IETF Access Control List Module
"ietf-access-control-list" module defines the "acls" container that The "ietf-access-control-list" module defines the "acls" container
has a list of "acl". Each "acl" has information identifying the that has a list of each "acl". Each "acl" has information
access list by a name ("name") and a list ("aces") of rules identifying the access list by a name ("name") and a list ("aces") of
associated with the "name". Each of the entries in the list rules associated with the "name". Each of the entries in the list
("aces"), indexed by the string "name", has containers defining ("aces"), indexed by the string "name", has containers defining
"matches" and "actions". "matches" and "actions".
The model defines several ACL types and actions in the form of The model defines several ACL types and actions in the form of
identities and features. Features are used by implementors to select identities and features. Features are used by implementors to select
the ACL types the system can support and identities are used to the ACL types the system can support, and identities are used to
validate the types that have been selected. These types are validate the types that have been selected. These types are
implicitly inherited by the "ace", thus safeguarding against implicitly inherited by the "ace", thus safeguarding against
misconfiguration of "ace" types in an "acl". misconfiguration of "ace" types in an "acl".
The "matches" define criteria used to identify patterns in "ietf- The "matches" define criteria used to identify patterns in "ietf-
packet-fields". The choice statements within the match container packet-fields". The choice statements within the match container
allow for selection of one header within each of "l2", "l3", or "l4" allow for the selection of one header within each of "l2", "l3", or
headers. The "actions" define behavior to undertake once a "match" "l4" headers. The "actions" define the behavior to undertake once a
has been identified. In addition to permit and deny for actions, a "match" has been identified. In addition to permit and deny actions,
logging option allows for a match to be logged that can later be used a logging option allows for a match to be logged that can later be
to determine which rule was matched upon. The model also defines the used to determine which rule was matched upon. The model also
ability for ACLs to be attached to a particular interface. defines the ability for ACLs to be attached to a particular
interface.
Statistics in the ACL can be collected for an "ace" or for an Statistics in the ACL can be collected for an "ace" or for an
"interface". The feature statements defined for statistics can be "interface". The feature statements defined for statistics can be
used to determine whether statistics are being collected per "ace", used to determine whether statistics are being collected per "ace" or
or per "interface". per "interface".
This module imports definitions from Common YANG Data Types
[RFC6991], and A YANG Data Model for Interface Management [RFC8343].
<CODE BEGINS> file "ietf-access-control-list@2018-11-06.yang"
module ietf-access-control-list {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-access-control-list";
prefix acl;
import ietf-yang-types {
prefix yang;
reference
"RFC 6991 - Common YANG Data Types.";
}
import ietf-packet-fields {
prefix pf;
reference
"RFC XXXX - Network ACL YANG Model.";
}
import ietf-interfaces {
prefix if;
reference
"RFC 8343 - A YANG Data Model for Interface Management.";
}
organization
"IETF NETMOD (Network Modeling Language)
Working Group";
contact
"WG Web: http://tools.ietf.org/wg/netmod/
WG List: netmod@ietf.org
Editor: Mahesh Jethanandani
mjethanandani@gmail.com
Editor: Lisa Huang
lyihuang16@gmail.com
Editor: Sonal Agarwal
sagarwal12@gmail.com
Editor: Dana Blair
dblair@cisco.com";
description This module imports definitions from "Common YANG Data Types"
"This YANG module defines a component that describe the [RFC6991] and "A YANG Data Model for Interface Management" [RFC8343].
configuration and monitoring of Access Control Lists (ACLs).
Copyright (c) 2018 IETF Trust and the persons identified as <CODE BEGINS> file "ietf-access-control-list@2019-03-04.yang"
the document authors. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD
License set forth in Section 4.c of the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see module ietf-access-control-list {
the RFC itself for full legal notices."; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-access-control-list";
prefix acl;
revision 2018-11-06 { import ietf-yang-types {
description prefix yang;
"Initial version."; reference
"RFC 6991 - Common YANG Data Types.";
}
reference import ietf-packet-fields {
"RFC XXX: Network Access Control List (ACL) YANG Data Model."; prefix pf;
} reference
"RFC 8519 - YANG Data Model for Network Access Control
Lists (ACLs).";
}
/* import ietf-interfaces {
* Identities prefix if;
*/ reference
"RFC 8343 - A YANG Data Model for Interface Management.";
}
/* organization
* Forwarding actions for a packet "IETF NETMOD (Network Modeling) Working Group.";
*/
identity forwarding-action {
description
"Base identity for actions in the forwarding category";
}
identity accept { contact
base forwarding-action; "WG Web: <https://datatracker.ietf.org/wg/netmod/>
description WG List: netmod@ietf.org
"Accept the packet";
}
identity drop { Editor: Mahesh Jethanandani
base forwarding-action; mjethanandani@gmail.com
description Editor: Lisa Huang
"Drop packet without sending any ICMP error message"; lyihuang16@gmail.com
} Editor: Sonal Agarwal
sagarwal12@gmail.com
Editor: Dana Blair
dblair@cisco.com";
identity reject { description
base forwarding-action; "This YANG module defines a component that describes the
description configuration and monitoring of Access Control Lists (ACLs).
"Drop the packet and send an ICMP error message to the source";
}
/* Copyright (c) 2019 IETF Trust and the persons identified as
* Logging actions for a packet the document authors. All rights reserved.
*/
identity log-action {
description
"Base identity for defining the destination for logging actions";
}
identity log-syslog { Redistribution and use in source and binary forms, with or
base log-action; without modification, is permitted pursuant to, and subject
description to the license terms contained in, the Simplified BSD
"System log (syslog) the information for the packet"; License set forth in Section 4.c of the IETF Trust's Legal
} Provisions Relating to IETF Documents
identity log-none { (http://trustee.ietf.org/license-info).
base log-action;
description
"No logging for the packet";
}
/* This version of this YANG module is part of RFC 8519; see
* ACL type identities the RFC itself for full legal notices.";
*/
identity acl-base {
description
"Base Access Control List type for all Access Control List type
identifiers.";
}
identity ipv4-acl-type { revision 2019-03-04 {
base acl:acl-base; description
if-feature "ipv4"; "Initial version.";
description reference
"An ACL that matches on fields from the IPv4 header "RFC 8519: YANG Data Model for Network Access Control
(e.g. IPv4 destination address) and layer 4 headers (e.g. TCP Lists (ACLs).";
destination port). An acl of type ipv4 does not contain }
matches on fields in the ethernet header or the IPv6 header.";
}
identity ipv6-acl-type { /*
base acl:acl-base; * Identities
if-feature "ipv6"; */
description /*
"An ACL that matches on fields from the IPv6 header * Forwarding actions for a packet
(e.g. IPv6 destination address) and layer 4 headers (e.g. TCP */
destination port). An acl of type ipv6 does not contain
matches on fields in the ethernet header or the IPv4 header.";
}
identity eth-acl-type { identity forwarding-action {
base acl:acl-base; description
if-feature "eth"; "Base identity for actions in the forwarding category.";
description }
"An ACL that matches on fields in the ethernet header,
like 10/100/1000baseT or WiFi Access Control List. An acl of
type ethernet does not contain matches on fields in the IPv4
header, IPv6 header or layer 4 headers.";
}
identity mixed-eth-ipv4-acl-type { identity accept {
base "acl:eth-acl-type"; base forwarding-action;
base "acl:ipv4-acl-type"; description
if-feature "mixed-eth-ipv4"; "Accept the packet.";
description }
"An ACL that contains a mix of entries that
match on fields in ethernet headers,
entries that match on IPv4 headers.
Matching on layer 4 header fields may also exist in the
list.";
}
identity mixed-eth-ipv6-acl-type { identity drop {
base "acl:eth-acl-type"; base forwarding-action;
base "acl:ipv6-acl-type"; description
if-feature "mixed-eth-ipv6"; "Drop packet without sending any ICMP error message.";
description }
"ACL that contains a mix of entries that identity reject {
match on fields in ethernet headers, entries base forwarding-action;
that match on fields in IPv6 headers. Matching on description
layer 4 header fields may also exist in the list."; "Drop the packet and send an ICMP error message to the source.";
} }
identity mixed-eth-ipv4-ipv6-acl-type { /*
base "acl:eth-acl-type"; * Logging actions for a packet
base "acl:ipv4-acl-type"; */
base "acl:ipv6-acl-type";
if-feature "mixed-eth-ipv4-ipv6";
description
"ACL that contains a mix of entries that
match on fields in ethernet headers, entries
that match on fields in IPv4 headers, and entries
that match on fields in IPv6 headers. Matching on
layer 4 header fields may also exist in the list.";
}
/* identity log-action {
* Features description
*/ "Base identity for defining the destination for logging
actions.";
}
/* identity log-syslog {
* Features supported by device base log-action;
*/ description
feature match-on-eth { "System log (syslog) the information for the packet.";
description }
"The device can support matching on ethernet headers.";
}
feature match-on-ipv4 { identity log-none {
description base log-action;
"The device can support matching on IPv4 headers."; description
"No logging for the packet.";
}
} /*
* ACL type identities
*/
feature match-on-ipv6 { identity acl-base {
description description
"The device can support matching on IPv6 headers."; "Base Access Control List type for all Access Control List type
} identifiers.";
}
feature match-on-tcp { identity ipv4-acl-type {
description base acl:acl-base;
"The device can support matching on TCP headers."; if-feature "ipv4";
} description
"An ACL that matches on fields from the IPv4 header
(e.g., IPv4 destination address) and Layer 4 headers (e.g., TCP
destination port). An ACL of type ipv4 does not contain
matches on fields in the Ethernet header or the IPv6 header.";
}
identity ipv6-acl-type {
base acl:acl-base;
if-feature "ipv6";
description
"An ACL that matches on fields from the IPv6 header
(e.g., IPv6 destination address) and Layer 4 headers (e.g., TCP
destination port). An ACL of type ipv6 does not contain
matches on fields in the Ethernet header or the IPv4 header.";
}
feature match-on-udp { identity eth-acl-type {
description base acl:acl-base;
"The device can support matching on UDP headers."; if-feature "eth";
} description
"An ACL that matches on fields in the Ethernet header,
like 10/100/1000baseT or a Wi-Fi Access Control List. An ACL
of type ethernet does not contain matches on fields in the
IPv4 header, the IPv6 header, or Layer 4 headers.";
}
feature match-on-icmp { identity mixed-eth-ipv4-acl-type {
description base acl:eth-acl-type;
"The device can support matching on ICMP (v4 and v6) headers."; base acl:ipv4-acl-type;
} if-feature "mixed-eth-ipv4";
description
"An ACL that contains a mix of entries that match
on fields in Ethernet headers and in IPv4 headers.
Matching on Layer 4 header fields may also exist in the
list.";
}
/* identity mixed-eth-ipv6-acl-type {
* Header classifications combinations supported by base acl:eth-acl-type;
* device base acl:ipv6-acl-type;
*/ if-feature "mixed-eth-ipv6";
feature eth { description
if-feature "match-on-eth"; "An ACL that contains a mix of entries that match on fields
description in Ethernet headers and in IPv6 headers. Matching
"Plain Ethernet ACL supported"; on Layer 4 header fields may also exist in the list.";
} }
feature ipv4 { identity mixed-eth-ipv4-ipv6-acl-type {
if-feature "match-on-ipv4"; base acl:eth-acl-type;
description base acl:ipv4-acl-type;
"Plain IPv4 ACL supported"; base acl:ipv6-acl-type;
} if-feature "mixed-eth-ipv4-ipv6";
description
"An ACL that contains a mix of entries that
match on fields in Ethernet headers, IPv4 headers, and IPv6
headers. Matching on Layer 4 header fields may also exist
in the list.";
}
feature ipv6 { /*
if-feature "match-on-ipv6"; * Features
description */
"Plain IPv6 ACL supported";
}
feature mixed-eth-ipv4 { /*
if-feature "match-on-eth and match-on-ipv4"; * Features supported by device
description */
"Ethernet and IPv4 ACL combinations supported"; feature match-on-eth {
description
"The device can support matching on Ethernet headers.";
}
} feature match-on-ipv4 {
description
"The device can support matching on IPv4 headers.";
}
feature mixed-eth-ipv6 { feature match-on-ipv6 {
if-feature "match-on-eth and match-on-ipv6"; description
description "The device can support matching on IPv6 headers.";
"Ethernet and IPv6 ACL combinations supported"; }
}
feature mixed-eth-ipv4-ipv6 { feature match-on-tcp {
if-feature "match-on-eth and match-on-ipv4 description
and match-on-ipv6"; "The device can support matching on TCP headers.";
description }
"Ethernet, IPv4 and IPv6 ACL combinations supported.";
}
/* feature match-on-udp {
* Stats Features description
*/ "The device can support matching on UDP headers.";
feature interface-stats { }
description
"ACL counters are available and reported only per interface";
}
feature acl-aggregate-stats { feature match-on-icmp {
description description
"ACL counters are aggregated over all interfaces, and reported "The device can support matching on ICMP (v4 and v6) headers.";
only per ACL entry"; }
}
/* /*
* Attachment point features * Header classifications combinations supported by
*/ * device
feature interface-attachment { */
description
"ACLs are set on interfaces.";
}
/* feature eth {
* Typedefs if-feature "match-on-eth";
*/ description
typedef acl-type { "Plain Ethernet ACL supported.";
type identityref { }
base acl-base;
}
description
"This type is used to refer to an Access Control List
(ACL) type";
}
/*
* Groupings
*/
grouping acl-counters {
description
"Common grouping for ACL counters";
leaf matched-packets { feature ipv4 {
type yang:counter64; if-feature "match-on-ipv4";
config false; description
description "Plain IPv4 ACL supported.";
"Count of the number of packets matching the current ACL }
entry.
An implementation should provide this counter on a feature ipv6 {
per-interface per-ACL-entry basis if possible. if-feature "match-on-ipv6";
description
"Plain IPv6 ACL supported.";
}
If an implementation only supports ACL counters on a per feature mixed-eth-ipv4 {
entry basis (i.e., not broken out per interface), then the if-feature "match-on-eth and match-on-ipv4";
value should be equal to the aggregate count across all description
interfaces. "Ethernet and IPv4 ACL combinations supported.";
}
An implementation that provides counters on a per entry per feature mixed-eth-ipv6 {
interface basis is not required to also provide an aggregate if-feature "match-on-eth and match-on-ipv6";
count, e.g., per entry -- the user is expected to be able description
implement the required aggregation if such a count is "Ethernet and IPv6 ACL combinations supported.";
needed."; }
}
leaf matched-octets { feature mixed-eth-ipv4-ipv6 {
type yang:counter64; if-feature
config false; "match-on-eth and match-on-ipv4
description and match-on-ipv6";
"Count of the number of octets (bytes) matching the current description
ACL entry. "Ethernet, IPv4, and IPv6 ACL combinations supported.";
}
An implementation should provide this counter on a /*
per-interface per-ACL-entry if possible. * Stats Features
*/
feature interface-stats {
description
"ACL counters are available and reported only per interface.";
}
If an implementation only supports ACL counters per entry feature acl-aggregate-stats {
(i.e., not broken out per interface), then the value description
should be equal to the aggregate count across all interfaces. "ACL counters are aggregated over all interfaces and reported
only per ACL entry.";
}
An implementation that provides counters per entry per /*
interface is not required to also provide an aggregate count, * Attachment point features
e.g., per entry -- the user is expected to be able implement */
the required aggregation if such a count is needed."; feature interface-attachment {
} description
"ACLs are set on interfaces.";
}
} /*
* Typedefs
*/
typedef acl-type {
type identityref {
base acl-base;
}
description
"This type is used to refer to an ACL type.";
}
/* /*
* Configuration and monitoring data nodes * Groupings
*/ */
container acls { grouping acl-counters {
description description
"This is a top level container for Access Control Lists. "Common grouping for ACL counters.";
It can have one or more acl nodes."; leaf matched-packets {
list acl { type yang:counter64;
key "name"; config false;
description description
"An Access Control List (ACL) is an ordered list of "Count of the number of packets matching the current ACL
Access Control Entries (ACE). Each ACE has a entry.
list of match criteria and a list of actions.
Since there are several kinds of Access Control Lists
implemented with different attributes for
different vendors, this model accommodates customizing
Access Control Lists for each kind and, for each vendor.";
leaf name {
type string {
length "1..64";
}
description
"The name of access list. A device MAY restrict the length
and value of this name, possibly space and special
characters are not allowed.";
}
leaf type {
type acl-type;
description
"Type of access control list. Indicates the primary intended
type of match criteria (e.g. ethernet, IPv4, IPv6, mixed,
etc) used in the list instance.";
}
container aces {
description
"The aces container contains one or more ace nodes.";
list ace {
key "name";
ordered-by user;
description
"List of Access Control Entries (ACEs)";
leaf name {
type string {
length "1..64";
}
description
"A unique name identifying this Access Control
Entry (ACE).";
}
container matches { An implementation should provide this counter on a
description per-interface, per-ACL-entry basis if possible.
"The rules in this set determine what fields will be
matched upon before any action is taken on them.
The rules are selected based on the feature set
defined by the server and the acl-type defined.
If no matches are defined in a particular container,
then any packet will match that container. If no
matches are specified at all in an ACE, then any
packet will match the ACE.";
choice l2 { If an implementation only supports ACL counters on a per-
container eth { entry basis (i.e., not broken out per interface), then the
when "derived-from-or-self(/acls/acl/type, " + value should be equal to the aggregate count across all
"'acl:eth-acl-type')"; interfaces.
if-feature match-on-eth;
uses pf:acl-eth-header-fields;
description
"Rule set that matches ethernet headers.";
}
description
"Match layer 2 headers, for example ethernet
header fields.";
}
choice l3 { An implementation that provides counters on a per-entry, per-
container ipv4 { interface basis is not required to also provide an aggregate
when "derived-from-or-self(/acls/acl/type, " + count, e.g., per entry -- the user is expected to be able to
"'acl:ipv4-acl-type')"; implement the required aggregation if such a count is
if-feature match-on-ipv4; needed.";
uses pf:acl-ip-header-fields;
uses pf:acl-ipv4-header-fields;
description
"Rule set that matches IPv4 headers.";
}
container ipv6 { }
when "derived-from-or-self(/acls/acl/type, " +
"'acl:ipv6-acl-type')";
if-feature match-on-ipv6;
uses pf:acl-ip-header-fields;
uses pf:acl-ipv6-header-fields;
description
"Rule set that matches IPv6 headers.";
} leaf matched-octets {
description type yang:counter64;
"Choice of either ipv4 or ipv6 headers"; config false;
} description
"Count of the number of octets (bytes) matching the current
ACL entry.
choice l4 { An implementation should provide this counter on a
container tcp { per-interface, per-ACL-entry basis if possible.
if-feature match-on-tcp;
uses pf:acl-tcp-header-fields;
container source-port {
choice source-port {
case range-or-operator {
uses pf:port-range-or-operator;
description
"Source port definition from range or
operator.";
}
description
"Choice of source port definition using
range/operator or a choice to support future
'case' statements, such as one enabling a
group of source ports to be referenced.";
}
description
"Source port definition.";
}
container destination-port {
choice destination-port {
case range-or-operator {
uses pf:port-range-or-operator;
description
"Destination port definition from range or
operator.";
}
description
"Choice of destination port definition using
range/operator or a choice to support future
'case' statements, such as one enabling a
group of destination ports to be referenced.";
}
description
"Destination port definition.";
}
description
"Rule set that matches TCP headers.";
}
container udp { If an implementation only supports ACL counters per entry
if-feature match-on-udp; (i.e., not broken out per interface), then the value
uses pf:acl-udp-header-fields; should be equal to the aggregate count across all interfaces.
container source-port {
choice source-port {
case range-or-operator {
uses pf:port-range-or-operator;
description
"Source port definition from range or
operator.";
}
description
"Choice of source port definition using
range/operator or a choice to support future
'case' statements, such as one enabling a
group of source ports to be referenced.";
}
description
"Source port definition.";
}
container destination-port {
choice destination-port {
case range-or-operator {
uses pf:port-range-or-operator;
description
"Destination port definition from range or
operator.";
}
description
"Choice of destination port definition using
range/operator or a choice to support future
'case' statements, such as one enabling a
group of destination ports to be referenced.";
}
description
"Destination port definition.";
}
description
"Rule set that matches UDP headers.";
}
container icmp { An implementation that provides counters per entry per
if-feature match-on-icmp; interface is not required to also provide an aggregate count,
uses pf:acl-icmp-header-fields; e.g., per entry -- the user is expected to be able to
description implement the required aggregation if such a count is needed.";
"Rule set that matches ICMP headers."; }
} }
description
"Choice of TCP, UDP or ICMP headers.";
} /*
* Configuration and monitoring data nodes
*/
leaf egress-interface { container acls {
type if:interface-ref; description
description "This is a top-level container for Access Control Lists.
"Egress interface. This should not be used if this ACL It can have one or more acl nodes.";
is attached as an egress ACL (or the value should list acl {
equal the interface to which the ACL is attached)."; key "name";
} description
"An ACL is an ordered list of ACEs. Each ACE has a
list of match criteria and a list of actions.
Since there are several kinds of ACLs implemented
with different attributes for different vendors,
this model accommodates customizing ACLs for
each kind and for each vendor.";
leaf name {
type string {
length "1..64";
}
description
"The name of the access list. A device MAY further
restrict the length of this name; space and special
characters are not allowed.";
leaf ingress-interface { }
type if:interface-ref; leaf type {
description type acl-type;
"Ingress interface. This should not be used if this ACL description
is attached as an ingress ACL (or the value should "Type of ACL. Indicates the primary intended
equal the interface to which the ACL is attached)"; type of match criteria (e.g., Ethernet, IPv4, IPv6, mixed,
} etc.) used in the list instance.";
} }
container aces {
description
"The aces container contains one or more ACE nodes.";
list ace {
key "name";
ordered-by user;
description
"List of ACEs.";
leaf name {
type string {
length "1..64";
}
description
"A unique name identifying this ACE.";
}
container matches {
description
"The rules in this set determine what fields will be
matched upon before any action is taken on them.
The rules are selected based on the feature set
defined by the server and the acl-type defined.
If no matches are defined in a particular container,
then any packet will match that container. If no
matches are specified at all in an ACE, then any
packet will match the ACE.";
container actions { choice l2 {
description container eth {
"Definitions of action for this ace entry"; when "derived-from-or-self(/acls/acl/type, "
leaf forwarding { + "'acl:eth-acl-type')";
type identityref { if-feature "match-on-eth";
base forwarding-action; uses pf:acl-eth-header-fields;
} description
mandatory true; "Rule set that matches Ethernet headers.";
description }
"Specifies the forwarding action per ace entry"; description
} "Match Layer 2 headers, for example, Ethernet
header fields.";
}
choice l3 {
container ipv4 {
when "derived-from-or-self(/acls/acl/type, "
+ "'acl:ipv4-acl-type')";
if-feature "match-on-ipv4";
uses pf:acl-ip-header-fields;
uses pf:acl-ipv4-header-fields;
description
"Rule set that matches IPv4 headers.";
}
leaf logging { container ipv6 {
type identityref { when "derived-from-or-self(/acls/acl/type, "
base log-action; + "'acl:ipv6-acl-type')";
} if-feature "match-on-ipv6";
default log-none; uses pf:acl-ip-header-fields;
description uses pf:acl-ipv6-header-fields;
"Specifies the log action and destination for description
matched packets. Default value is not to log the "Rule set that matches IPv6 headers.";
packet."; }
} description
} "Choice of either IPv4 or IPv6 headers";
container statistics { }
if-feature "acl-aggregate-stats";
config false;
description
"Statistics gathered across all attachment points for the
given ACL.";
uses acl-counters; choice l4 {
} container tcp {
} if-feature "match-on-tcp";
} uses pf:acl-tcp-header-fields;
} container source-port {
container attachment-points { choice source-port {
description case range-or-operator {
"Enclosing container for the list of uses pf:port-range-or-operator;
attachment-points on which ACLs are set"; description
"Source port definition from range or
operator.";
}
description
"Choice of source port definition using
range/operator or a choice to support future
'case' statements, such as one enabling a
group of source ports to be referenced.";
}
description
"Source port definition.";
}
container destination-port {
choice destination-port {
case range-or-operator {
uses pf:port-range-or-operator;
description
"Destination port definition from range or
operator.";
}
description
"Choice of destination port definition using
range/operator or a choice to support future
'case' statements, such as one enabling a
group of destination ports to be referenced.";
}
description
"Destination port definition.";
}
description
"Rule set that matches TCP headers.";
}
/* container udp {
* Groupings if-feature "match-on-udp";
*/ uses pf:acl-udp-header-fields;
grouping interface-acl { container source-port {
description choice source-port {
"Grouping for per-interface ingress ACL data"; case range-or-operator {
uses pf:port-range-or-operator;
description
"Source port definition from range or
operator.";
}
description
"Choice of source port definition using
range/operator or a choice to support future
'case' statements, such as one enabling a
group of source ports to be referenced.";
}
description
"Source port definition.";
}
container destination-port {
choice destination-port {
case range-or-operator {
uses pf:port-range-or-operator;
description
"Destination port definition from range or
operator.";
}
description
"Choice of destination port definition using
range/operator or a choice to support future
'case' statements, such as one enabling a
group of destination ports to be referenced.";
}
description
"Destination port definition.";
}
description
"Rule set that matches UDP headers.";
}
container acl-sets { container icmp {
description if-feature "match-on-icmp";
"Enclosing container the list of ingress ACLs on the uses pf:acl-icmp-header-fields;
interface"; description
"Rule set that matches ICMP headers.";
}
description
"Choice of TCP, UDP, or ICMP headers.";
}
list acl-set { leaf egress-interface {
key "name"; type if:interface-ref;
ordered-by user; description
description "Egress interface. This should not be used if this ACL
"List of ingress ACLs on the interface"; is attached as an egress ACL (or the value should
equal the interface to which the ACL is attached).";
}
leaf name { leaf ingress-interface {
type leafref { type if:interface-ref;
path "/acls/acl/name"; description
} "Ingress interface. This should not be used if this ACL
description is attached as an ingress ACL (or the value should
"Reference to the ACL name applied on ingress"; equal the interface to which the ACL is attached).";
} }
}
list ace-statistics { container actions {
if-feature "interface-stats"; description
key "name"; "Definition of actions for this ace entry.";
config false; leaf forwarding {
description type identityref {
"List of Access Control Entries (ACEs)"; base forwarding-action;
leaf name { }
type leafref { mandatory true;
path "/acls/acl/aces/ace/name"; description
} "Specifies the forwarding action per ace entry.";
description
"The ace name";
} }
uses acl-counters;
}
}
}
}
list interface { leaf logging {
if-feature interface-attachment; type identityref {
key "interface-id"; base log-action;
description }
"List of interfaces on which ACLs are set"; default "log-none";
description
"Specifies the log action and destination for
matched packets. Default value is not to log the
packet.";
}
}
container statistics {
if-feature "acl-aggregate-stats";
config false;
description
"Statistics gathered across all attachment points for the
given ACL.";
uses acl-counters;
}
}
}
}
container attachment-points {
description
"Enclosing container for the list of
attachment points on which ACLs are set.";
/*
* Groupings
*/
grouping interface-acl {
description
"Grouping for per-interface ingress ACL data.";
container acl-sets {
description
"Enclosing container for the list of ingress ACLs on the
interface.";
list acl-set {
key "name";
ordered-by user;
description
"List of ingress ACLs on the interface.";
leaf name {
type leafref {
path "/acls/acl/name";
}
description
"Reference to the ACL name applied on the ingress.";
}
list ace-statistics {
if-feature "interface-stats";
key "name";
config false;
description
"List of ACEs.";
leaf name {
type leafref {
path "/acls/acl/aces/ace/name";
}
description
"Name of the ace entry.";
}
uses acl-counters;
}
}
}
}
leaf interface-id { list interface {
type if:interface-ref; if-feature "interface-attachment";
description key "interface-id";
"Reference to the interface id list key"; description
} "List of interfaces on which ACLs are set.";
container ingress { leaf interface-id {
uses interface-acl; type if:interface-ref;
description description
"The ACLs applied to ingress interface"; "Reference to the interface id list key.";
} }
container egress {
uses interface-acl;
description
"The ACLs applied to egress interface";
}
}
}
}
}
<CODE ENDS> container ingress {
uses interface-acl;
description
"The ACLs applied to the ingress interface.";
}
container egress {
uses interface-acl;
description
"The ACLs applied to the egress interface.";
}
}
}
}
}
<CODE ENDS>
4.2. IETF Packet Fields module 4.2. IETF Packet Fields Module
The packet fields module defines the necessary groups for matching on The packet fields module defines the necessary groups for matching on
fields in the packet including ethernet, ipv4, ipv6, and transport fields in the packet including Ethernet, IPv4, IPv6, and transport-
layer fields. The "type" node determines which of these fields get layer fields. The "type" node determines which of these fields get
included for any given ACL with the exception of TCP, UDP and ICMP included for any given ACL with the exception of TCP, UDP, and ICMP
header fields. Those fields can be used in conjunction with any of header fields. Those fields can be used in conjunction with any of
the above layer 2 or layer 3 fields. the above Layer 2 or Layer 3 fields.
Since the number of match criteria are very large, the base draft Since the number of match criteria are very large, the base
does not include these directly but references them by 'uses' specification does not include these directly but references them by
statement to keep the base module simple. In case more match the 'uses' statement to keep the base module simple. In case more
conditions are needed, those can be added by augmenting choices match conditions are needed, those can be added by augmenting choices
within container "matches" in ietf-access-control-list.yang model. within container "matches" in the ietf-access-control-list.yang data
model.
This module imports definitions from Common YANG Data Types [RFC6991] This module imports definitions from "Common YANG Data Types"
and references IP [RFC0791], ICMP [RFC0792], TCP [RFC0793], [RFC6991] and references "Internet Protocol" [RFC0791], "Internet
Definition of the Differentiated Services Field in the IPv4 and IPv6 Control Message Protocol" [RFC0792], "Transmission Control Protocol"
Headers [RFC2474], The Addition of Explicit Congestion Notification [RFC0793], "Definition of the Differentiated Services Field (DS
(ECN) to IP [RFC3168], , IPv6 Scoped Address Architecture [RFC4007], Field) in the IPv4 and IPv6 Headers" [RFC2474], "The Addition of
IPv6 Addressing Architecture [RFC4291], A Recommendation for IPv6 Explicit Congestion Notification (ECN) to IP" [RFC3168], "IPv6 Scoped
Address Text Representation [RFC5952], IPv6 [RFC8200]. Address Architecture" [RFC4007], "IP Version 6 Addressing
Architecture" [RFC4291], "A Recommendation for IPv6 Address Text
Representation" [RFC5952], and "Internet Protocol, Version 6 (IPv6)
Specification" [RFC8200].
<CODE BEGINS> file "ietf-packet-fields@2018-11-06.yang" <CODE BEGINS> file "ietf-packet-fields@2019-03-04.yang"
module ietf-packet-fields { module ietf-packet-fields {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-packet-fields"; namespace "urn:ietf:params:xml:ns:yang:ietf-packet-fields";
prefix packet-fields; prefix packet-fields;
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
reference reference
"RFC 6991 - Common YANG Data Types."; "RFC 6991 - Common YANG Data Types.";
skipping to change at page 25, line 33 skipping to change at page 25, line 4
prefix inet; prefix inet;
reference reference
"RFC 6991 - Common YANG Data Types."; "RFC 6991 - Common YANG Data Types.";
} }
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
reference reference
"RFC 6991 - Common YANG Data Types."; "RFC 6991 - Common YANG Data Types.";
} }
import ietf-ethertypes { import ietf-ethertypes {
prefix eth; prefix eth;
reference reference
"RFC XXXX - Network ACL YANG Model."; "RFC 8519 - YANG Data Model for Network Access Control
Lists (ACLs).";
} }
organization organization
"IETF NETMOD (Network Modeling Language) Working "IETF NETMOD (Network Modeling) Working Group.";
Group";
contact contact
"WG Web: http://tools.ietf.org/wg/netmod/ "WG Web: <https://datatracker.ietf.org/wg/netmod/>
WG List: netmod@ietf.org WG List: netmod@ietf.org
Editor: Mahesh Jethanandani Editor: Mahesh Jethanandani
mjethanandani@gmail.com mjethanandani@gmail.com
Editor: Lisa Huang Editor: Lisa Huang
lyihuang16@gmail.com lyihuang16@gmail.com
Editor: Sonal Agarwal Editor: Sonal Agarwal
sagarwal12@gmail.com sagarwal12@gmail.com
Editor: Dana Blair Editor: Dana Blair
dblair@cisco.com"; dblair@cisco.com";
description description
"This YANG module defines groupings that are used by "This YANG module defines groupings that are used by
ietf-access-control-list YANG module. Their usage is not the ietf-access-control-list YANG module. Their usage
limited to ietf-access-control-list and can be is not limited to ietf-access-control-list and can be
used anywhere as applicable. used anywhere as applicable.
Copyright (c) 2018 IETF Trust and the persons identified as Copyright (c) 2019 IETF Trust and the persons identified as
the document authors. All rights reserved. the document authors. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD
License set forth in Section 4.c of the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see Redistribution and use in source and binary forms, with or
the RFC itself for full legal notices."; without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD
License set forth in Section 4.c of the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).
revision 2018-11-06 { This version of this YANG module is part of RFC 8519; see
the RFC itself for full legal notices.";
revision 2019-03-04 {
description description
"Initial version."; "Initial version.";
reference reference
"RFC XXX: Network Access Control List (ACL) YANG Data Model."; "RFC 8519: YANG Data Model for Network Access Control
Lists (ACLs).";
} }
/* /*
* Typedefs * Typedefs
*/ */
typedef operator { typedef operator {
type enumeration { type enumeration {
enum lte { enum lte {
description description
"Less than or equal."; "Less than or equal to.";
} }
enum gte { enum gte {
description description
"Greater than or equal."; "Greater than or equal to.";
} }
enum eq { enum eq {
description description
"Equal to."; "Equal to.";
} }
enum neq { enum neq {
description description
"Not equal to."; "Not equal to.";
} }
} }
description description
"The source and destination port range definitions "The source and destination port range definitions
can be further qualified using an operator. An can be further qualified using an operator. An
operator is needed only if lower-port is specified operator is needed only if the lower-port is specified
and upper-port is not specified. The operator and the upper-port is not specified. The operator
therefore further qualifies lower-port only."; therefore further qualifies the lower-port only.";
} }
/* /*
* Groupings * Groupings
*/ */
grouping port-range-or-operator { grouping port-range-or-operator {
choice port-range-or-operator { choice port-range-or-operator {
case range { case range {
leaf lower-port { leaf lower-port {
type inet:port-number; type inet:port-number;
must ". <= ../upper-port" { must '. <= ../upper-port' {
error-message error-message
"The lower-port must be less than or equal to "The lower-port must be less than or equal to
upper-port."; the upper-port.";
} }
mandatory true; mandatory true;
description description
"Lower boundry for a port."; "Lower boundary for a port.";
} }
leaf upper-port { leaf upper-port {
type inet:port-number; type inet:port-number;
mandatory true; mandatory true;
description description
"Upper boundry for port."; "Upper boundary for a port.";
} }
} }
case operator { case operator {
leaf operator { leaf operator {
type operator; type operator;
default eq; default "eq";
description description
"Operator to be applied on the port below."; "Operator to be applied on the port below.";
} }
leaf port { leaf port {
type inet:port-number; type inet:port-number;
mandatory true; mandatory true;
description description
"Port number along with operator on which to "Port number along with the operator on which to
match."; match.";
} }
} }
description description
"Choice of specifying a port range or a single "Choice of specifying a port range or a single
port along with an operator."; port along with an operator.";
} }
description description
"Grouping for port definitions in the form of a "Grouping for port definitions in the form of a
choice statement."; choice statement.";
} }
grouping acl-ip-header-fields { grouping acl-ip-header-fields {
description description
"IP header fields common to ipv4 and ipv6"; "IP header fields common to IPv4 and IPv6";
reference reference
"RFC 791: Internet Protocol."; "RFC 791: Internet Protocol.";
leaf dscp { leaf dscp {
type inet:dscp; type inet:dscp;
description description
"Differentiated Services Code Point."; "Differentiated Services Code Point.";
reference reference
"RFC 2474: Definition of Differentiated services field "RFC 2474: Definition of the Differentiated Services
(DS field) in the IPv4 and IPv6 headers."; Field (DS Field) in the IPv4 and IPv6
Headers.";
} }
leaf ecn { leaf ecn {
type uint8 { type uint8 {
range 0..3; range "0..3";
} }
description description
"Explicit Congestion Notification."; "Explicit Congestion Notification.";
reference reference
"RFC 3168: Explicit Congestion Notification."; "RFC 3168: The Addition of Explicit Congestion
Notification (ECN) to IP.";
} }
leaf length { leaf length {
type uint16; type uint16;
description description
"In IPv4 header field, this field is known as the Total Length. "In the IPv4 header field, this field is known as the Total
Total Length is the length of the datagram, measured in octets, Length. Total Length is the length of the datagram, measured
including internet header and data. in octets, including internet header and data.
In IPv6 header field, this field is known as the Payload In the IPv6 header field, this field is known as the Payload
Length, the length of the IPv6 payload, i.e. the rest of Length, which is the length of the IPv6 payload, i.e., the rest
the packet following the IPv6 header, in octets."; of the packet following the IPv6 header, in octets.";
reference reference
"RFC 791: Internet Protocol, "RFC 791: Internet Protocol
RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.";
} }
leaf ttl { leaf ttl {
type uint8; type uint8;
description description
"This field indicates the maximum time the datagram is allowed "This field indicates the maximum time the datagram is allowed
to remain in the internet system. If this field contains the to remain in the internet system. If this field contains the
value zero, then the datagram must be dropped. value zero, then the datagram must be dropped.
In IPv6, this field is known as the Hop Limit."; In IPv6, this field is known as the Hop Limit.";
reference reference
"RFC 791: Internet Protocol, "RFC 791: Internet Protocol
RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.";
} }
leaf protocol { leaf protocol {
type uint8; type uint8;
description description
"Internet Protocol number. Refers to the protocol of the "Internet Protocol number. Refers to the protocol of the
payload. In IPv6, this field is known as 'next-header, payload. In IPv6, this field is known as 'next-header',
and if extension headers are present, the protocol is and if extension headers are present, the protocol is
present in the 'upper-layer' header."; present in the 'upper-layer' header.";
reference reference
"RFC 791: Internet Protocol, "RFC 791: Internet Protocol
RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.";
} }
} }
grouping acl-ipv4-header-fields { grouping acl-ipv4-header-fields {
description description
"Fields in IPv4 header."; "Fields in the IPv4 header.";
leaf ihl { leaf ihl {
type uint8 { type uint8 {
range "5..60"; range "5..60";
} }
description description
"An IPv4 header field, the Internet Header Length (IHL) is "In an IPv4 header field, the Internet Header Length (IHL) is
the length of the internet header in 32 bit words, and the length of the internet header in 32-bit words and
thus points to the beginning of the data. Note that the thus points to the beginning of the data. Note that the
minimum value for a correct header is 5."; minimum value for a correct header is 5.";
} }
leaf flags { leaf flags {
type bits { type bits {
bit reserved { bit reserved {
position 0; position 0;
description description
"Reserved. Must be zero."; "Reserved. Must be zero.";
} }
bit fragment { bit fragment {
position 1; position 1;
description description
"Setting value to 0 indicates may fragment, while setting "Setting the value to 0 indicates may fragment, while
the value to 1 indicates do not fragment."; setting the value to 1 indicates do not fragment.";
} }
bit more { bit more {
position 2; position 2;
description description
"Setting the value to 0 indicates this is the last fragment, "Setting the value to 0 indicates this is the last fragment,
and setting the value to 1 indicates more fragments are and setting the value to 1 indicates more fragments are
coming."; coming.";
} }
} }
description description
"Bit definitions for the flags field in IPv4 header."; "Bit definitions for the Flags field in the IPv4 header.";
} }
leaf offset { leaf offset {
type uint16 { type uint16 {
range "20..65535"; range "20..65535";
} }
description description
"The fragment offset is measured in units of 8 octets (64 bits). "The fragment offset is measured in units of 8 octets (64 bits).
The first fragment has offset zero. The length is 13 bits"; The first fragment has offset zero. The length is 13 bits";
} }
leaf identification { leaf identification {
type uint16; type uint16;
description description
"An identifying value assigned by the sender to aid in "An identifying value assigned by the sender to aid in
assembling the fragments of a datagram."; assembling the fragments of a datagram.";
} }
choice destination-network { choice destination-network {
case destination-ipv4-network { case destination-ipv4-network {
leaf destination-ipv4-network { leaf destination-ipv4-network {
skipping to change at page 31, line 22 skipping to change at page 30, line 39
} }
} }
description description
"Choice of specifying a source IPv4 address or "Choice of specifying a source IPv4 address or
referring to a group of IPv4 source addresses."; referring to a group of IPv4 source addresses.";
} }
} }
grouping acl-ipv6-header-fields { grouping acl-ipv6-header-fields {
description description
"Fields in IPv6 header"; "Fields in the IPv6 header.";
choice destination-network { choice destination-network {
case destination-ipv6-network { case destination-ipv6-network {
leaf destination-ipv6-network { leaf destination-ipv6-network {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description description
"Destination IPv6 address prefix."; "Destination IPv6 address prefix.";
} }
} }
description description
"Choice of specifying a destination IPv6 address "Choice of specifying a destination IPv6 address
or referring to a group of IPv6 destination or referring to a group of IPv6 destination
addresses."; addresses.";
} }
choice source-network { choice source-network {
case source-ipv6-network { case source-ipv6-network {
leaf source-ipv6-network { leaf source-ipv6-network {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description description
"Source IPv6 address prefix."; "Source IPv6 address prefix.";
} }
} }
description description
"Choice of specifying a source IPv6 address or "Choice of specifying a source IPv6 address or
referring to a group of IPv6 source addresses."; referring to a group of IPv6 source addresses.";
} }
leaf flow-label { leaf flow-label {
type inet:ipv6-flow-label; type inet:ipv6-flow-label;
description description
"IPv6 Flow label."; "IPv6 Flow label.";
} }
reference reference
"RFC 4291: IP Version 6 Addressing Architecture "RFC 4291: IP Version 6 Addressing Architecture
RFC 4007: IPv6 Scoped Address Architecture RFC 4007: IPv6 Scoped Address Architecture
RFC 5952: A Recommendation for IPv6 Address Text RFC 5952: A Recommendation for IPv6 Address Text
Representation"; Representation.";
} }
grouping acl-eth-header-fields { grouping acl-eth-header-fields {
description description
"Fields in Ethernet header."; "Fields in the Ethernet header.";
leaf destination-mac-address { leaf destination-mac-address {
type yang:mac-address; type yang:mac-address;
description description
"Destination IEEE 802 MAC address."; "Destination IEEE 802 Media Access Control (MAC)
address.";
} }
leaf destination-mac-address-mask { leaf destination-mac-address-mask {
type yang:mac-address; type yang:mac-address;
description description
"Destination IEEE 802 MAC address mask."; "Destination IEEE 802 MAC address mask.";
} }
leaf source-mac-address { leaf source-mac-address {
type yang:mac-address; type yang:mac-address;
description description
"Source IEEE 802 MAC address."; "Source IEEE 802 MAC address.";
skipping to change at page 32, line 47 skipping to change at page 32, line 16
"Source IEEE 802 MAC address mask."; "Source IEEE 802 MAC address mask.";
} }
leaf ethertype { leaf ethertype {
type eth:ethertype; type eth:ethertype;
description description
"The Ethernet Type (or Length) value represented "The Ethernet Type (or Length) value represented
in the canonical order defined by IEEE 802. in the canonical order defined by IEEE 802.
The canonical representation uses lowercase The canonical representation uses lowercase
characters."; characters.";
reference reference
"IEEE 802-2014 Clause 9.2"; "IEEE 802-2014, Clause 9.2.";
} }
reference reference
"IEEE 802: IEEE Standard for Local and Metropolitan "IEEE 802: IEEE Standard for Local and Metropolitan
Area Networks: Overview and Architecture."; Area Networks: Overview and Architecture.";
} }
grouping acl-tcp-header-fields { grouping acl-tcp-header-fields {
description description
"Collection of TCP header fields that can be used to "Collection of TCP header fields that can be used to
setup a match filter."; set up a match filter.";
leaf sequence-number { leaf sequence-number {
type uint32; type uint32;
description description
"Sequence number that appears in the packet."; "Sequence number that appears in the packet.";
} }
leaf acknowledgement-number { leaf acknowledgement-number {
type uint32; type uint32;
description description
"The acknowledgement number that appears in the "The acknowledgement number that appears in the
packet."; packet.";
} }
leaf data-offset { leaf data-offset {
type uint8 { type uint8 {
range "5..15"; range "5..15";
} }
description description
"Specifies the size of the TCP header in 32-bit "Specifies the size of the TCP header in 32-bit
words. The minimum size header is 5 words and words. The minimum size header is 5 words and
the maximum is 15 words thus giving the minimum the maximum is 15 words; thus, this gives a
size of 20 bytes and maximum of 60 bytes, minimum size of 20 bytes and a maximum of 60
allowing for up to 40 bytes of options in the bytes, allowing for up to 40 bytes of options
header."; in the header.";
} }
leaf reserved { leaf reserved {
type uint8; type uint8;
description description
"Reserved for future use."; "Reserved for future use.";
} }
leaf flags { leaf flags {
type bits { type bits {
bit cwr { bit cwr {
position 1; position 1;
description description
"Congestion Window Reduced (CWR) flag is set by "The Congestion Window Reduced (CWR) flag is set
the sending host to indicate that it received by the sending host to indicate that it received
a TCP segment with the ECE flag set and had a TCP segment with the ECN-Echo (ECE) flag set
responded in congestion control mechanism."; and had responded in the congestion control
mechanism.";
reference reference
"RFC 3168: The Addition of Explicit Congestion "RFC 3168: The Addition of Explicit Congestion
Notification (ECN) to IP."; Notification (ECN) to IP.";
} }
bit ece { bit ece {
position 2; position 2;
description description
"ECN-Echo has a dual role, depending on the value "ECN-Echo has a dual role, depending on the value
of the SYN flag. It indicates: of the SYN flag. It indicates the following: if
If the SYN flag is set (1), that the TCP peer is ECN the SYN flag is set (1), the TCP peer is ECN
capable. If the SYN flag is clear (0), that a packet capable, and if the SYN flag is clear (0), a packet
with Congestion Experienced flag set (ECN=11) in IP with the Congestion Experienced flag set (ECN=11)
header was received during normal transmission in the IP header was received during normal
(added to header by RFC 3168). This serves as an transmission (added to the header by RFC 3168).
indication of network congestion (or impending This serves as an indication of network congestion
congestion) to the TCP sender."; (or impending congestion) to the TCP sender.";
reference reference
"RFC 3168: The Addition of Explicit Congestion "RFC 3168: The Addition of Explicit Congestion
Notification (ECN) to IP."; Notification (ECN) to IP.";
} }
bit urg { bit urg {
position 3; position 3;
description description
"Indicates that the Urgent pointer field is significant."; "Indicates that the Urgent Pointer field is significant.";
} }
bit ack { bit ack {
position 4; position 4;
description description
"Indicates that the Acknowledgment field is significant. "Indicates that the Acknowledgement field is significant.
All packets after the initial SYN packet sent by the All packets after the initial SYN packet sent by the
client should have this flag set."; client should have this flag set.";
} }
bit psh { bit psh {
position 5; position 5;
description description
"Push function. Asks to push the buffered data to the "Push function. Asks to push the buffered data to the
receiving application."; receiving application.";
} }
bit rst { bit rst {
position 6; position 6;
description description
"Reset the connection."; "Reset the connection.";
} }
bit syn { bit syn {
position 7; position 7;
description description
"Synchronize sequence numbers. Only the first packet "Synchronize sequence numbers. Only the first packet
sent from each end should have this flag set. Some sent from each end should have this flag set. Some
other flags and fields change meaning based on this other flags and fields change meaning based on this
flag, and some are only valid for when it is set, flag, and some are only valid for when it is set,
and others when it is clear."; and others when it is clear.";
} }
bit fin { bit fin {
position 8; position 8;
description description
"Last package from sender."; "Last package from the sender.";
} }
} }
description description
"Also known as Control Bits. Contains 9 1-bit flags."; "Also known as Control Bits. Contains nine 1-bit flags.";
reference reference
"RFC 793: Transmission Control Protocol (TCP)."; "RFC 793: Transmission Control Protocol.";
} }
leaf window-size { leaf window-size {
type uint16; type uint16;
units "bytes"; units "bytes";
description description
"The size of the receive window, which specifies "The size of the receive window, which specifies
the number of window size units beyond the segment the number of window size units beyond the segment
identified by the sequence number in the acknowledgment identified by the sequence number in the Acknowledgement
field that the sender of this segment is currently field that the sender of this segment is currently
willing to receive."; willing to receive.";
} }
leaf urgent-pointer { leaf urgent-pointer {
type uint16; type uint16;
description description
"This field is an offset from the sequence number "This field is an offset from the sequence number
indicating the last urgent data byte."; indicating the last urgent data byte.";
} }
leaf options { leaf options {
type binary { type binary {
length "1..40"; length "1..40";
} }
description description
"The length of this field is determined by the "The length of this field is determined by the
data offset field. Options have up to three Data Offset field. Options have up to three
fields: Option-Kind (1 byte), Option-Length fields: Option-Kind (1 byte), Option-Length
(1 byte), Option-Data (variable). The Option-Kind (1 byte), and Option-Data (variable). The Option-Kind
field indicates the type of option, and is the field indicates the type of option and is the
only field that is not optional. Depending on only field that is not optional. Depending on
what kind of option we are dealing with, what kind of option we are dealing with,
the next two fields may be set: the Option-Length the next two fields may be set: the Option-Length
field indicates the total length of the option, field indicates the total length of the option,
and the Option-Data field contains the value of and the Option-Data field contains the value of
the option, if applicable."; the option, if applicable.";
} }
} }
grouping acl-udp-header-fields { grouping acl-udp-header-fields {
description description
"Collection of UDP header fields that can be used "Collection of UDP header fields that can be used
to setup a match filter."; to set up a match filter.";
leaf length { leaf length {
type uint16; type uint16;
description description
"A field that specifies the length in bytes of "A field that specifies the length in bytes of
the UDP header and UDP data. The minimum the UDP header and UDP data. The minimum
length is 8 bytes because that is the length of length is 8 bytes because that is the length of
the header. The field size sets a theoretical the header. The field size sets a theoretical
limit of 65,535 bytes (8 byte header + 65,527 limit of 65,535 bytes (8-byte header plus 65,527
bytes of data) for a UDP datagram. However the bytes of data) for a UDP datagram. However, the
actual limit for the data length, which is actual limit for the data length, which is
imposed by the underlying IPv4 protocol, is imposed by the underlying IPv4 protocol, is
65,507 bytes (65,535 minus 8 byte UDP header 65,507 bytes (65,535 minus 8-byte UDP header
minus 20 byte IP header). minus 20-byte IP header).
In IPv6 jumbograms it is possible to have In IPv6 jumbograms, it is possible to have
UDP packets of size greater than 65,535 bytes. UDP packets of a size greater than 65,535 bytes.
RFC 2675 specifies that the length field is set RFC 2675 specifies that the Length field is set
to zero if the length of the UDP header plus to zero if the length of the UDP header plus
UDP data is greater than 65,535."; UDP data is greater than 65,535.";
} }
} }
grouping acl-icmp-header-fields { grouping acl-icmp-header-fields {
description description
"Collection of ICMP header fields that can be "Collection of ICMP header fields that can be
used to setup a match filter."; used to set up a match filter.";
leaf type { leaf type {
type uint8; type uint8;
description description
"Also known as Control messages."; "Also known as control messages.";
reference reference
"RFC 792: Internet Control Message Protocol (ICMP), "RFC 792: Internet Control Message Protocol
RFC 4443: Internet Control Message Protocol (ICMPv6) RFC 4443: Internet Control Message Protocol (ICMPv6)
for Internet Protocol Version 6 (IPv6) for Internet Protocol Version 6 (IPv6)
Specifciation."; Specification.";
} }
leaf code { leaf code {
type uint8; type uint8;
description description
"ICMP subtype. Also known as Control messages."; "ICMP subtype. Also known as control messages.";
reference reference
"RFC 792: Internet Control Message Protocol (ICMP), "RFC 792: Internet Control Message Protocol
RFC 4443: Internet Control Message Protocol (ICMPv6) RFC 4443: Internet Control Message Protocol (ICMPv6)
for Internet Protocol Version 6 (IPv6) for Internet Protocol Version 6 (IPv6)
Specifciation."; Specification.";
} }
leaf rest-of-header { leaf rest-of-header {
type binary; type binary;
description description
"Unbounded in length, the contents vary based on the "Unbounded in length, the contents vary based on the
ICMP type and code. Also referred to as 'Message Body' ICMP type and code. Also referred to as 'Message Body'
in ICMPv6."; in ICMPv6.";
reference reference
"RFC 792: Internet Control Message Protocol (ICMP), "RFC 792: Internet Control Message Protocol
RFC 4443: Internet Control Message Protocol (ICMPv6) RFC 4443: Internet Control Message Protocol (ICMPv6)
for Internet Protocol Version 6 (IPv6) for Internet Protocol Version 6 (IPv6)
Specifciation."; Specification.";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
4.3. ACL Examples 4.3. ACL Examples
Requirement: Deny tcp traffic from 192.0.2.0/24, destined to Requirement: Deny tcp traffic from 192.0.2.0/24, destined to
198.51.100.0/24. 198.51.100.0/24.
Here is the acl configuration xml for this Access Control List: Here is the ACL configuration xml for this Access Control List:
[note: '\' line wrapping for formatting only] [note: '\' line wrapping for formatting only]
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<acls <acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"> xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list">
<acl> <acl>
<name>sample-ipv4-acl</name> <name>sample-ipv4-acl</name>
<type>ipv4-acl-type</type> <type>ipv4-acl-type</type>
<aces> <aces>
<ace> <ace>
<name>rule1</name> <name>rule1</name>
<matches> <matches>
<ipv4> <ipv4>
<protocol>6</protocol> <protocol>6</protocol>
<destination-ipv4-network>198.51.100.0/24</destination\ <destination-ipv4-network>198.51.100.0/24</destination\
-ipv4-network> -ipv4-network>
<source-ipv4-network>192.0.2.0/24</source-ipv4-network\ <source-ipv4-network>192.0.2.0/24</source-ipv4-network>
>
</ipv4> </ipv4>
</matches> </matches>
<actions> <actions>
<forwarding>drop</forwarding> <forwarding>drop</forwarding>
</actions> </actions>
</ace> </ace>
</aces> </aces>
</acl> </acl>
</acls> </acls>
</config> </config>
The acl and aces can be described in CLI as the following: The ACL and ACEs can be described in the command-line interface (CLI)
as the following:
acl ipv4 sample-ipv4-acl acl ipv4 sample-ipv4-acl
deny tcp 192.0.2.0/24 198.51.100.0/24 deny tcp 192.0.2.0/24 198.51.100.0/24
Requirement: Accept all DNS traffic destined for 2001:db8::/32 on Requirement: Accept all DNS traffic destined for 2001:db8::/32 on
port 53. port 53.
[note: '\' line wrapping for formatting only] [note: '\' line wrapping for formatting only]
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
skipping to change at page 39, line 41 skipping to change at page 38, line 41
</actions> </actions>
</ace> </ace>
</aces> </aces>
</acl> </acl>
</acls> </acls>
</config> </config>
4.4. Port Range Usage and Other Examples 4.4. Port Range Usage and Other Examples
When a lower-port and an upper-port are both present, it represents a When a lower-port and an upper-port are both present, it represents a
range between lower-port and upper-port with both the lower-port and range between the lower-port and upper-port with both the lower-port
upper-port included. When only a port is present, it represents a and upper-port included. When only a port is present, it represents
port, with the operator specifying the range. a port, with the operator specifying the range.
The following XML example represents a configuration where TCP The following XML example represents a configuration where TCP
traffic from source ports 16384, 16385, 16386, and 16387 is dropped. traffic from source ports 16384, 16385, 16386, and 16387 is dropped.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<acls <acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"> xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list">
<acl> <acl>
<name>sample-port-acl</name> <name>sample-port-acl</name>
skipping to change at page 41, line 33 skipping to change at page 40, line 33
<actions> <actions>
<forwarding>drop</forwarding> <forwarding>drop</forwarding>
</actions> </actions>
</ace> </ace>
</aces> </aces>
</acl> </acl>
</acls> </acls>
</config> </config>
The following XML example represents a configuration of a single The following XML example represents a configuration of a single
port, port 21 that accepts TCP traffic. port, port 21, that accepts TCP traffic.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<acls <acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"> xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list">
<acl> <acl>
<name>sample-ipv4-acl</name> <name>sample-ipv4-acl</name>
<type>ipv4-acl-type</type> <type>ipv4-acl-type</type>
<aces> <aces>
<ace> <ace>
skipping to change at page 42, line 33 skipping to change at page 41, line 33
<actions> <actions>
<forwarding>accept</forwarding> <forwarding>accept</forwarding>
</actions> </actions>
</ace> </ace>
</aces> </aces>
</acl> </acl>
</acls> </acls>
</config> </config>
The following XML example represents a configuration specifying all The following XML example represents a configuration specifying all
ports that are not equal to 21, that will drop TCP packets destined ports that are not equal to 21 that will drop TCP packets destined
for those ports. for those ports.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<acls <acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"> xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list">
<acl> <acl>
<name>sample-ipv4-acl</name> <name>sample-ipv4-acl</name>
<type>ipv4-acl-type</type> <type>ipv4-acl-type</type>
<aces> <aces>
skipping to change at page 43, line 34 skipping to change at page 42, line 34
<forwarding>drop</forwarding> <forwarding>drop</forwarding>
</actions> </actions>
</ace> </ace>
</aces> </aces>
</acl> </acl>
</acls> </acls>
</config> </config>
5. Security Considerations 5. Security Considerations
The YANG module specified in this document defines a schema for data The YANG modules specified in this document define a schema for data
that is designed to be accessed via network management protocol such that is designed to be accessed via network management protocol such
as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer
is the secure transport layer and the mandatory-to-implement secure is the secure transport layer, and the mandatory-to-implement secure
transport is SSH [RFC6242]. The lowest RESTCONF layer is HTTPS, and transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer
the mandatory-to-implement secure transport is TLS [RFC8446]. is HTTPS, and the mandatory-to-implement secure transport is TLS
[RFC8446].
The NETCONF Access Control Model (NACM [RFC8341]) provides the means The NETCONF Access Control Model (NACM) [RFC8341] provides the means
to restrict access for particular NETCONF users to a pre-configured to restrict access for particular NETCONF or RESTCONF users to a
subset of all available NETCONF protocol operations and content. preconfigured subset of all available NETCONF or RESTCONF protocol
operations and content.
There are a number of data nodes defined in the YANG module which are There are a number of data nodes defined in these YANG modules that
writable/creatable/deletable (i.e., config true, which is the are 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. effect on network operations. These are the subtrees and data nodes
and their sensitivity/vulnerability:
These are the subtrees and data nodes and their sensitivity/
vulnerability:
/acls/acl/aces: This list specifies all the configured access /acls/acl/aces: This list specifies all the configured access
control entries on the device. Unauthorized write access to this control entries on the device. Unauthorized write access to this
list can allow intruders to modify the entries so as to permit list can allow intruders to modify the entries so as to permit
traffic that should not be permitted, or deny traffic that should traffic that should not be permitted, or deny traffic that should
be permitted. The former may result in a DoS attack, or be permitted. The former may result in a DoS attack, or
compromise the device. The latter may result in a DoS attack. compromise the device. The latter may result in a DoS attack.
The impact of an unauthorized read access of the list will allow The impact of an unauthorized read access of the list will allow
the attacker to determine which rules are in effect, to better the attacker to determine which rules are in effect, to better
craft an attack. craft an attack.
skipping to change at page 44, line 31 skipping to change at page 43, line 31
ace entries, overwhelming the server in the process. Unauthorized ace entries, overwhelming the server in the process. Unauthorized
read access of this node can allow intruders to access logging read access of this node can allow intruders to access logging
information, which could be used to craft an attack the server. information, which could be used to craft an attack the server.
6. IANA Considerations 6. IANA Considerations
This document registers three URIs and three YANG modules. This document registers three URIs and three YANG modules.
6.1. URI Registration 6.1. URI Registration
This document registers three URIs in the IETF XML registry This document registers three URIs in the "IETF XML Registry"
[RFC3688]. Following the format in RFC 3688, the following [RFC3688] as follows:
registration is requested to be made:
URI: urn:ietf:params:xml:ns:yang:ietf-access-control-list URI: urn:ietf:params:xml:ns:yang:ietf-access-control-list
URI: urn:ietf:params:xml:ns:yang:ietf-packet-fields URI: urn:ietf:params:xml:ns:yang:ietf-packet-fields
URI: urn:ietf:params:xml:ns:yang:ietf-ethertypes URI: urn:ietf:params:xml:ns:yang:ietf-ethertypes
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.
6.2. YANG Module Name Registration 6.2. YANG Module Name Registration
This document registers three YANG module in the YANG Module Names This document registers three YANG modules in the "YANG Module Names"
registry YANG [RFC6020]. registry [RFC6020].
name: ietf-access-control-list Name: ietf-access-control-list
namespace: urn:ietf:params:xml:ns:yang:ietf-access-control-list Namespace: urn:ietf:params:xml:ns:yang:ietf-access-control-list
prefix: acl Prefix: acl
reference: RFC XXXX Reference: RFC 8519
name: ietf-packet-fields Name: ietf-packet-fields
namespace: urn:ietf:params:xml:ns:yang:ietf-packet-fields Namespace: urn:ietf:params:xml:ns:yang:ietf-packet-fields
prefix: packet-fields Prefix: packet-fields
reference: RFC XXXX Reference: RFC 8519
name: ietf-ethertypes Name: ietf-ethertypes
namespace: urn:ietf:params:xml:ns:yang:ietf-ethertypes Namespace: urn:ietf:params:xml:ns:yang:ietf-ethertypes
prefix: ethertypes Prefix: ethertypes
reference: RFC XXXX Reference: RFC 8519
8. References 7. References
8.1. Normative References 7.1. Normative References
[RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, [RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791,
DOI 10.17487/RFC0791, September 1981, DOI 10.17487/RFC0791, September 1981,
<https://www.rfc-editor.org/info/rfc791>. <https://www.rfc-editor.org/info/rfc791>.
[RFC0792] Postel, J., "Internet Control Message Protocol", STD 5, [RFC0792] Postel, J., "Internet Control Message Protocol", STD 5,
RFC 792, DOI 10.17487/RFC0792, September 1981, RFC 792, DOI 10.17487/RFC0792, September 1981,
<https://www.rfc-editor.org/info/rfc792>. <https://www.rfc-editor.org/info/rfc792>.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, [RFC0793] Postel, J., "Transmission Control Protocol", STD 7,
skipping to change at page 47, line 14 skipping to change at page 45, line 40
[RFC8200] Deering, S. and R. Hinden, "Internet Protocol, Version 6 [RFC8200] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", STD 86, RFC 8200, (IPv6) Specification", STD 86, RFC 8200,
DOI 10.17487/RFC8200, July 2017, DOI 10.17487/RFC8200, July 2017,
<https://www.rfc-editor.org/info/rfc8200>. <https://www.rfc-editor.org/info/rfc8200>.
[RFC8343] Bjorklund, M., "A YANG Data Model for Interface [RFC8343] Bjorklund, M., "A YANG Data Model for Interface
Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, Management", RFC 8343, DOI 10.17487/RFC8343, March 2018,
<https://www.rfc-editor.org/info/rfc8343>. <https://www.rfc-editor.org/info/rfc8343>.
8.2. Informative References 7.2. Informative References
[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
the Network Configuration Protocol (NETCONF)", RFC 6020, the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010, DOI 10.17487/RFC6020, October 2010,
<https://www.rfc-editor.org/info/rfc6020>. <https://www.rfc-editor.org/info/rfc6020>.
skipping to change at page 48, line 9 skipping to change at page 46, line 37
[RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration
Access Control Model", STD 91, RFC 8341, Access Control Model", STD 91, RFC 8341,
DOI 10.17487/RFC8341, March 2018, DOI 10.17487/RFC8341, March 2018,
<https://www.rfc-editor.org/info/rfc8341>. <https://www.rfc-editor.org/info/rfc8341>.
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>. <https://www.rfc-editor.org/info/rfc8446>.
Appendix A. Extending ACL model examples Appendix A. Extending ACL Model Examples
A.1. A company proprietary module example A.1. Example of a Company's Proprietary Module
Module "example-newco-acl" is an example of company proprietary model The "example-newco-acl" module is an example of a company's
that augments "ietf-acl" module. It shows how to use 'augment' with proprietary model that augments the "ietf-acl" module. It shows how
an XPath expression to add additional match criteria, actions, and to use 'augment' with an XML Path Language (XPath) expression to add
default actions for when no ACE matches are found. All these are additional match criteria, actions, and default actions for when no
company proprietary extensions or system feature extensions. ACE matches are found. All these are company proprietary extensions
"example-newco-acl" is just an example and it is expected that or system feature extensions. "example-newco-acl" is just an
vendors will create their own proprietary models. example, and it is expected that vendors will create their own
proprietary models.
module example-newco-acl { module example-newco-acl {
yang-version 1.1; yang-version 1.1;
namespace "http://example.com/ns/example-newco-acl"; namespace "http://example.com/ns/example-newco-acl";
prefix example-newco-acl; prefix example-newco-acl;
import ietf-access-control-list { import ietf-access-control-list {
prefix "acl"; prefix acl;
} }
organization organization
"Newco model group."; "Newco model group.";
contact contact
"abc@newco.com"; "abc@newco.com";
description description
"This YANG module augments IETF ACL Yang."; "This YANG module augments the IETF ACL YANG module.";
revision 2018-11-06 { revision 2019-03-04 {
description description
"Creating NewCo proprietary extensions to ietf-acl model"; "Creating NewCo proprietary extensions to the ietf-acl
model.";
reference reference
"RFC XXXX: Network Access Control List (ACL) "RFC 8519: YANG Data Model for Network Access Control
YANG Data Model"; Lists (ACLs).";
} }
augment "/acl:acls/acl:acl/" + augment "/acl:acls/acl:acl/"
"acl:aces/acl:ace/" + + "acl:aces/acl:ace/"
"acl:matches" { + "acl:matches" {
description
description "Newco proprietary simple filter matches"; "Newco proprietary simple filter matches.";
choice protocol-payload-choice { choice protocol-payload-choice {
description "Newco proprietary payload match condition"; description
"Newco proprietary payload match condition.";
list protocol-payload { list protocol-payload {
key value-keyword; key "value-keyword";
ordered-by user; ordered-by user;
description "Match protocol payload"; description
"Match protocol payload.";
uses match-simple-payload-protocol-value; uses match-simple-payload-protocol-value;
} }
} }
choice metadata { choice metadata {
description "Newco proprietary interface match condition"; description
"Newco proprietary interface match condition.";
leaf packet-length { leaf packet-length {
type uint16; type uint16;
description "Match on packet length"; description
"Match on packet length.";
} }
} }
} }
augment "/acl:acls/acl:acl/" + augment "/acl:acls/acl:acl/"
"acl:aces/acl:ace/" + + "acl:aces/acl:ace/"
"acl:actions" { + "acl:actions" {
description "Newco proprietary simple filter actions"; description
"Newco proprietary simple filter actions.";
choice action { choice action {
description ""; description
"Newco proprietary action choices.";
case count { case count {
description "Count the packet in the named counter"; description
"Count the packet in the named counter.";
leaf count { leaf count {
type uint32; type uint32;
description "Count"; description
"Count.";
} }
} }
case policer { case policer {
description "Name of policer to use to rate-limit traffic"; description
"Name of policer used to rate-limit traffic.";
leaf policer { leaf policer {
type string; type string;
description "Name of the policer"; description
"Name of the policer.";
} }
} }
case hiearchical-policer { case hierarchical-policer {
leaf hierarchitacl-policer { leaf hierarchical-policer {
type string; type string;
description description
"Name of the hierarchical policer."; "Name of the hierarchical policer.";
} }
description description
"Name of hierarchical policer to use to "Name of the hierarchical policer used to
rate-limit traffic"; rate-limit traffic.";
} }
} }
} }
augment "/acl:acls/acl:acl" + augment "/acl:acls/acl:acl"
"/acl:aces/acl:ace/" + + "/acl:aces/acl:ace/"
"acl:actions" { + "acl:actions" {
leaf default-action { leaf default-action {
type identityref { type identityref {
base acl:forwarding-action; base acl:forwarding-action;
} }
default acl:drop; default "acl:drop";
description description
"Actions that occur if no ace is matched."; "Actions that occur if no ACE is matched.";
} }
description description
"Newco proprietary default action"; "Newco proprietary default action.";
} }
grouping match-simple-payload-protocol-value { grouping match-simple-payload-protocol-value {
description "Newco proprietary payload"; description
"Newco proprietary payload";
leaf value-keyword { leaf value-keyword {
type enumeration { type enumeration {
enum icmp { enum icmp {
description "Internet Control Message Protocol"; description
"Internet Control Message Protocol.";
} }
enum icmp6 { enum icmp6 {
description description
"Internet Control Message Protocol "Internet Control Message Protocol
Version 6"; Version 6.";
} }
enum range { enum range {
description "Range of values"; description
"Range of values.";
} }
} }
description "(null)"; description
"(null).";
} }
} }
} }
The following figure is the tree diagram of example-newco-acl. In The following figure is the tree diagram of example-newco-acl. In
this example, /ietf-acl:acls/ietf-acl:acl/ietf-acl:aces/ietf-acl:ace/ this example, /ietf-acl:acls/ietf-acl:acl/ietf-acl:aces/ietf-acl:ace/
ietf-acl:matches are augmented with two new choices, protocol- ietf-acl:matches are augmented with two new choices: protocol-
payload-choice and metadata. The protocol-payload-choice uses a payload-choice and metadata. The protocol-payload-choice uses a
grouping with an enumeration of all supported protocol values. grouping with an enumeration of all supported protocol values.
Metadata matches apply to fields associated with the packet but not Metadata matches apply to fields associated with the packet, that are
in the packet header such as overall packet length. In another not in the packet header, such as overall packet length. In another
example, /ietf-acl:acls/ietf-acl:acl/ietf-acl:aces/ietf-acl:ace/ietf- example, /ietf-acl:acls/ietf-acl:acl/ietf-acl:aces/ietf-acl:ace/ietf-
acl:actions are augmented with a new choice of actions. acl:actions are augmented with a new choice of actions.
module: example-newco-acl module: example-newco-acl
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches: augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:matches:
+--rw (protocol-payload-choice)? +--rw (protocol-payload-choice)?
| +--:(protocol-payload) | +--:(protocol-payload)
| +--rw protocol-payload* [value-keyword] | +--rw protocol-payload* [value-keyword]
| +--rw value-keyword enumeration | +--rw value-keyword enumeration
+--rw (metadata)? +--rw (metadata)?
+--:(packet-length) +--:(packet-length)
+--rw packet-length? uint16 +--rw packet-length? uint16
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:actions: augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:actions:
+--rw (action)? +--rw (action)?
+--:(count) +--:(count)
| +--rw count? uint32 | +--rw count? uint32
+--:(policer) +--:(policer)
| +--rw policer? string | +--rw policer? string
+--:(hiearchical-policer) +--:(hierarchical-policer)
+--rw hierarchitacl-policer? string +--rw hierarchical-policer? string
augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:actions: augment /acl:acls/acl:acl/acl:aces/acl:ace/acl:actions:
+--rw default-action? identityref +--rw default-action? identityref
A.2. Linux nftables A.2. Linux nftables
As Linux platform is becoming more popular as networking platform, As the Linux platform is becoming more popular than the networking
the Linux data model is changing. Previously ACLs in Linux were platform, the Linux data model is changing. Previously, ACLs in
highly protocol specific and different utilities were used (iptables, Linux were highly protocol specific, and different utilities were
ip6tables, arptables, ebtables), so each one had separate data model. used (iptables, ip6tables, arptables, and ebtables), so each one had
Recently, this has changed and a single utility, nftables, has been a separate data model. Recently, this has changed, and a single
developed. With a single application, it has a single data model for utility, nftables, has been developed. With a single application, it
filewall filters and it follows very similarly to the ietf-access- has a single data model for firewall filters, and it follows very
control list module proposed in this draft. The nftables support similarly the ietf-access-control list module proposed in this
input and output ACEs and each ACE can be defined with match and document. The nftables support input and output ACEs, and each ACE
action. can be defined with match and action.
The example in Section 4.3 can be configured using nftable tool as The example in Section 4.3 can be configured using nftable tool as
below. below.
nft add table ip filter nft add table ip filter
nft add chain filter input nft add chain filter input
nft add rule ip filter input ip protocol tcp ip saddr \ nft add rule ip filter input ip protocol tcp ip saddr \
192.0.2.1/24 drop 192.0.2.1/24 drop
The configuration entries added in nftable would be. The configuration entries added in nftable would be:
table ip filter { table ip filter {
chain input { chain input {
ip protocol tcp ip saddr 192.0.2.1/24 drop ip protocol tcp ip saddr 192.0.2.1/24 drop
} }
} }
We can see that there are many similarities between Linux nftables We can see that there are many similarities between Linux nftables
and IETF ACL YANG data models and its extension models. It should be and IETF ACL YANG data models and their extension models. It should
fairly easy to do translation between ACL YANG model described in be fairly easy to do translation between the ACL YANG model described
this draft and Linux nftables. in this document and Linux nftables.
A.3. Ethertypes A.3. Ethertypes
The ACL module is dependent on the definition of ethertypes. IEEE The ACL module is dependent on the definition of Ethertypes. IEEE
owns the allocation of those ethertypes. This model is being owns the allocation of those Ethertypes. This model is being
included here to enable definition of those types till such time that included here to enable the definition of those types till such time
IEEE takes up the task of publication of the model that defines those that IEEE takes up the task of publication of the model that defines
ethertypes. At that time, this model can be deprecated. those Ethertypes. At that time, this model can be deprecated.
<CODE BEGINS> file "ietf-ethertypes@2018-11-06.yang" <CODE BEGINS> file "ietf-ethertypes@2019-03-04.yang"
module ietf-ethertypes { module ietf-ethertypes {
namespace "urn:ietf:params:xml:ns:yang:ietf-ethertypes"; namespace "urn:ietf:params:xml:ns:yang:ietf-ethertypes";
prefix ethertypes; prefix ethertypes;
organization organization
"IETF NETMOD (NETCONF Data Modeling Language)"; "IETF NETMOD (Network Modeling) Working Group.";
contact contact
"WG Web: <http://tools.ietf.org/wg/netmod/> "WG Web: <https://datatracker.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org> WG List: <mailto:netmod@ietf.org>
Editor: Mahesh Jethanandani Editor: Mahesh Jethanandani
<mjethanandani@gmail.com>"; <mjethanandani@gmail.com>";
description description
"This module contains the common definitions for the "This module contains common definitions for the
Ethertype used by different modules. It is a Ethertype used by different modules. It is a
placeholder module, till such time that IEEE placeholder module, till such time that IEEE
starts a project to define these Ethertypes starts a project to define these Ethertypes
and publishes a standard. and publishes a standard.
At that time this module can be deprecated."; At that time, this module can be deprecated.
revision 2018-11-06 { Copyright (c) 2019 IETF Trust and the persons identified as
the document authors. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD
License set forth in Section 4.c of the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8519; see
the RFC itself for full legal notices.";
revision 2019-03-04 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: IETF Ethertype YANG Data Module."; "RFC 8519: YANG Data Model for Network Access Control
Lists (ACLs).";
} }
typedef ethertype { typedef ethertype {
type union { type union {
type uint16; type uint16;
type enumeration { type enumeration {
enum ipv4 { enum ipv4 {
value 2048; value 2048;
description description
"Internet Protocol version 4 (IPv4) with a "Internet Protocol version 4 (IPv4) with a
hex value of 0x0800."; hex value of 0x0800.";
reference reference
"RFC 791: Internet Protocol."; "RFC 791: Internet Protocol.";
} }
enum arp { enum arp {
value 2054; value 2054;
description description
"Address Resolution Protocol (ARP) with a "Address Resolution Protocol (ARP) with a
hex value of 0x0806."; hex value of 0x0806.";
reference reference
"RFC 826: An Ethernet Address Resolution Protocol."; "RFC 826: An Ethernet Address Resolution Protocol: Or
Converting Network Protocol Addresses to 48.bit
Ethernet Address for Transmission on Ethernet
Hardware.";
} }
enum wlan { enum wlan {
value 2114; value 2114;
description description
"Wake-on-LAN. Hex value of 0x0842."; "Wake-on-LAN. Hex value of 0x0842.";
} }
enum trill { enum trill {
value 8947; value 8947;
description description
"Transparent Interconnection of Lots of Links. "Transparent Interconnection of Lots of Links.
Hex value of 0x22F3."; Hex value of 0x22F3.";
reference reference
"RFC 6325: Routing Bridges (RBridges): Base Protocol "RFC 6325: Routing Bridges (RBridges): Base Protocol
Specification."; Specification.";
} }
enum srp { enum srp {
value 8938; value 8938;
description description
"Stream Reservation Protocol. Hex value of "Stream Reservation Protocol. Hex value of
0x22EA."; 0x22EA.";
reference reference
"IEEE 801.1Q-2011."; "IEEE 801.1Q-2011.";
} }
enum decnet { enum decnet {
value 24579; value 24579;
description description
"DECnet Phase IV. Hex value of 0x6003."; "DECnet Phase IV. Hex value of 0x6003.";
} }
enum rarp { enum rarp {
value 32821; value 32821;
description description
"Reverse Address Resolution Protocol. "Reverse Address Resolution Protocol.
Hex value 0x8035."; Hex value 0x8035.";
reference reference
"RFC 903. A Reverse Address Resolution Protocol."; "RFC 903: A Reverse Address Resolution Protocol.";
} }
enum appletalk { enum appletalk {
value 32923; value 32923;
description description
"Appletalk (Ethertalk). Hex value 0x809B."; "Appletalk (Ethertalk). Hex value of 0x809B.";
} }
enum aarp { enum aarp {
value 33011; value 33011;
description description
"Appletalk Address Resolution Protocol. Hex value "Appletalk Address Resolution Protocol. Hex value
of 0x80F3."; of 0x80F3.";
} }
enum vlan { enum vlan {
value 33024; value 33024;
description description
"VLAN-tagged frame (802.1Q) and Shortest Path "VLAN-tagged frame (IEEE 802.1Q) and Shortest Path
Bridging IEEE 802.1aq with NNI compatibility. Bridging IEEE 802.1aq with Network-Network
Hex value 0x8100."; Interface (NNI) compatibility. Hex value of
0x8100.";
reference reference
"802.1Q."; "IEEE 802.1Q.";
} }
enum ipx { enum ipx {
value 33079; value 33079;
description description
"Internetwork Packet Exchange (IPX). Hex value "Internetwork Packet Exchange (IPX). Hex value
of 0x8137."; of 0x8137.";
} }
enum qnx { enum qnx {
value 33284; value 33284;
description description
"QNX Qnet. Hex value of 0x8204."; "QNX Qnet. Hex value of 0x8204.";
} }
enum ipv6 { enum ipv6 {
value 34525; value 34525;
description description
"Internet Protocol Version 6 (IPv6). Hex value "Internet Protocol Version 6 (IPv6). Hex value
of 0x86DD."; of 0x86DD.";
reference reference
"RFC 8200: Internet Protocol, Version 6 (IPv6) "RFC 8200: Internet Protocol, Version 6 (IPv6)
Specification Specification
RFC 8201: Path MTU Discovery for IPv6."; RFC 8201: Path MTU Discovery for IP version 6.";
} }
enum efc { enum efc {
value 34824; value 34824;
description description
"Ethernet flow control using pause frames. "Ethernet flow control using pause frames.
Hex value of 0x8808"; Hex value of 0x8808.";
reference reference
"IEEE Std. 802.1Qbb."; "IEEE 802.1Qbb.";
} }
enum esp { enum esp {
value 34825; value 34825;
description description
"Ethernet Slow Protocol. Hex value of 0x8809."; "Ethernet Slow Protocol. Hex value of 0x8809.";
reference reference
"IEEE Std. 802.3-2015"; "IEEE 802.3-2015.";
} }
enum cobranet { enum cobranet {
value 34841; value 34841;
description description
"CobraNet. Hex value of 0x8819"; "CobraNet. Hex value of 0x8819.";
} }
enum mpls-unicast { enum mpls-unicast {
value 34887; value 34887;
description description
"MultiProtocol Label Switch (MPLS) unicast traffic. "Multiprotocol Label Switching (MPLS) unicast traffic.
Hex value of 0x8847."; Hex value of 0x8847.";
reference reference
"RFC 3031: Multiprotocol Label Switching Architecture."; "RFC 3031: Multiprotocol Label Switching Architecture.";
} }
enum mpls-multicast { enum mpls-multicast {
value 34888; value 34888;
description description
"MultiProtocol Label Switch (MPLS) multicast traffic. "MPLS multicast traffic. Hex value of 0x8848.";
Hex value of 0x8848.";
reference reference
"RFC 3031: Multiprotocol Label Switching Architecture."; "RFC 3031: Multiprotocol Label Switching Architecture.";
} }
enum pppoe-discovery { enum pppoe-discovery {
value 34915; value 34915;
description description
"Point-to-Point Protocol over Ethernet. Used during "Point-to-Point Protocol over Ethernet. Used during
the discovery process. Hex value of 0x8863."; the discovery process. Hex value of 0x8863.";
reference reference
"RFC 2516: A method for Transmitting PPP over Ethernet "RFC 2516: A Method for Transmitting PPP Over Ethernet
PPPoE."; (PPPoE).";
} }
enum pppoe-session { enum pppoe-session {
value 34916; value 34916;
description description
"Point-to-Point Protocol over Ethernet. Used during "Point-to-Point Protocol over Ethernet. Used during
session stage. Hex value of 0x8864."; session stage. Hex value of 0x8864.";
reference reference
"RFC 2516: A method for Transmitting PPP over Ethernet "RFC 2516: A Method for Transmitting PPP Over Ethernet
PPPoE."; (PPPoE).";
} }
enum intel-ans { enum intel-ans {
value 34925; value 34925;
description description
"Intel Advanced Networking Services. Hex value of "Intel Advanced Networking Services. Hex value of
0x886D."; 0x886D.";
} }
enum jumbo-frames { enum jumbo-frames {
value 34928; value 34928;
description description
"Jumbo frames or Ethernet frames with more than "Jumbo frames or Ethernet frames with more than
1500 bytes of payload, upto 9000 bytes."; 1500 bytes of payload, up to 9000 bytes.";
} }
enum homeplug { enum homeplug {
value 34939; value 34939;
description description
"Family name for the various power line "Family name for the various power line
communications. Hex value of 0x887B."; communications. Hex value of 0x887B.";
} }
enum eap { enum eap {
value 34958; value 34958;
description description
"Ethernet Access Protocol (EAP) over LAN. Hex value "Ethernet Access Protocol (EAP) over LAN. Hex value
of 0x888E."; of 0x888E.";
reference reference
"IEEE 802.1X"; "IEEE 802.1X.";
} }
enum profinet { enum profinet {
value 34962; value 34962;
description description
"PROcess FIeld Net (PROFINET). Hex value of 0x8892."; "PROcess FIeld Net (PROFINET). Hex value of 0x8892.";
} }
enum hyperscsi { enum hyperscsi {
value 34970; value 34970;
description description
"SCSI over Ethernet. Hex value of 0x889A"; "Small Computer System Interface (SCSI) over Ethernet.
Hex value of 0x889A.";
} }
enum aoe { enum aoe {
value 34978; value 34978;
description description
"Advanced Technology Advancement (ATA) over Ethernet. "Advanced Technology Advancement (ATA) over Ethernet.
Hex value of 0x88A2."; Hex value of 0x88A2.";
} }
enum ethercat { enum ethercat {
value 34980; value 34980;
description description
"Ethernet for Control Automation Technology (EtherCAT). "Ethernet for Control Automation Technology (EtherCAT).
Hex value of 0x88A4."; Hex value of 0x88A4.";
} }
enum provider-bridging { enum provider-bridging {
value 34984; value 34984;
description description
"Provider Bridging (802.1ad) and Shortest Path Bridging "Provider Bridging (802.1ad) and Shortest Path Bridging
(801.1aq). Hex value of 0x88A8."; (801.1aq). Hex value of 0x88A8.";
reference reference
"IEEE 802.1ad, IEEE 802.1aq)."; "IEEE 802.1ad and IEEE 802.1aq).";
} }
enum ethernet-powerlink { enum ethernet-powerlink {
value 34987; value 34987;
description description
"Ethernet Powerlink. Hex value of 0x88AB."; "Ethernet Powerlink. Hex value of 0x88AB.";
} }
enum goose { enum goose {
value 35000; value 35000;
description description
"Generic Object Oriented Substation Event (GOOSE). "Generic Object Oriented Substation Event (GOOSE).
Hex value of 0x88B8."; Hex value of 0x88B8.";
reference reference
"IEC/ISO 8802-2 and 8802-3."; "IEC/ISO 8802-2 and 8802-3.";
} }
enum gse { enum gse {
value 35001; value 35001;
description description
"Generic Substation Events. Hex value of 88B9."; "Generic Substation Events. Hex value of 88B9.";
reference reference
"IEC 61850."; "IEC 61850.";
} }
enum sv { enum sv {
value 35002; value 35002;
description description
"Sampled Value Transmission. Hex value of 0x88BA."; "Sampled Value Transmission. Hex value of 0x88BA.";
reference reference
"IEC 61850."; "IEC 61850.";
} }
enum lldp { enum lldp {
value 35020; value 35020;
description description
"Link Layer Discovery Protocol (LLDP). Hex value of "Link Layer Discovery Protocol (LLDP). Hex value of
0x88CC."; 0x88CC.";
reference reference
"IEEE 802.1AB."; "IEEE 802.1AB.";
} }
enum sercos { enum sercos {
value 35021; value 35021;
description description
"Sercos Interface. Hex value of 0x88CD."; "Sercos Interface. Hex value of 0x88CD.";
} }
enum wsmp { enum wsmp {
value 35036; value 35036;
description description
"WAVE Short Message Protocl (WSMP). Hex value of "WAVE Short Message Protocol (WSMP). Hex value of
0x88DC."; 0x88DC.";
} }
enum homeplug-av-mme { enum homeplug-av-mme {
value 35041; value 35041;
description description
"HomePlug AV MME. Hex value of 88E1."; "HomePlug AV Mobile Management Entity (MME). Hex value
of 88E1.";
} }
enum mrp { enum mrp {
value 35043; value 35043;
description description
"Media Redundancy Protocol (MRP). Hex value of "Media Redundancy Protocol (MRP). Hex value of
0x88E3."; 0x88E3.";
reference reference
"IEC62439-2."; "IEC 62439-2.";
} }
enum macsec { enum macsec {
value 35045; value 35045;
description description
"MAC Security. Hex value of 0x88E5."; "MAC Security. Hex value of 0x88E5.";
reference reference
"IEEE 802.1AE."; "IEEE 802.1AE.";
} }
enum pbb { enum pbb {
value 35047; value 35047;
description description
"Provider Backbone Bridges (PBB). Hex value of "Provider Backbone Bridges (PBB). Hex value of
0x88E7."; 0x88E7.";
reference reference
"IEEE 802.1ah."; "IEEE 802.1ah.";
} }
enum cfm { enum cfm {
value 35074; value 35074;
description description
"Connectivity Fault Management (CFM). Hex value of "Connectivity Fault Management (CFM). Hex value of
0x8902."; 0x8902.";
reference reference
"IEEE 802.1ag."; "IEEE 802.1ag.";
} }
enum fcoe { enum fcoe {
value 35078; value 35078;
description description
"Fiber Channel over Ethernet (FCoE). Hex value of "Fiber Channel over Ethernet (FCoE). Hex value of
0x8906."; 0x8906.";
reference reference
"T11 FC-BB-5."; "T11 FC-BB-5.";
} }
enum fcoe-ip { enum fcoe-ip {
value 35092; value 35092;
description description
"FCoE Initialization Protocol. Hex value of 0x8914."; "FCoE Initialization Protocol. Hex value of 0x8914.";
} }
enum roce { enum roce {
value 35093; value 35093;
description description
"RDMA over Converged Ethernet (RoCE). Hex value of "RDMA over Converged Ethernet (RoCE). Hex value of
0x8915."; 0x8915.";
} }
enum tte { enum tte {
value 35101; value 35101;
description description
"TTEthernet Protocol Control Frame (TTE). Hex value "TTEthernet Protocol Control Frame (TTE). Hex value
of 0x891D."; of 0x891D.";
reference reference
"SAE AS6802."; "SAE AS6802.";
} }
enum hsr { enum hsr {
value 35119; value 35119;
description description
"High-availability Seamless Redundancy (HSR). Hex "High-availability Seamless Redundancy (HSR). Hex
value of 0x892F."; value of 0x892F.";
reference reference
"IEC 62439-3:2016."; "IEC 62439-3:2016.";
} }
} }
} }
description description
"The uint16 type placeholder is defined to enable "The uint16 type placeholder is defined to enable
users to manage their own ethertypes not users to manage their own ethertypes not
covered by the module. Otherwise the module contains covered by the module. Otherwise, the module contains
enum definitions for the more commonly used ethertypes."; enum definitions for the more commonly used ethertypes.";
} }
} }
<CODE ENDS> <CODE ENDS>
7. Acknowledgements Acknowledgements
Alex Clemm, Andy Bierman and Lisa Huang started it by sketching out Alex Clemm, Andy Bierman, and Lisa Huang started by sketching an
an initial IETF draft in several past IETF meetings. That draft initial draft version in several past IETF meetings. That document
included an ACL YANG model structure and a rich set of match filters, included an ACL YANG model structure and a rich set of match filters,
and acknowledged contributions by Louis Fourie, Dana Blair, Tula and it acknowledged contributions by Louis Fourie, Dana Blair, Tula
Kraiser, Patrick Gili, George Serpa, Martin Bjorklund, Kent Watsen, Kraiser, Patrick Gili, George Serpa, Martin Bjorklund, Kent Watsen,
and Phil Shafer. Many people have reviewed the various earlier and Phil Shafer. Many people have reviewed the various earlier draft
drafts that made the draft went into IETF charter. versions that made the document that went into IETF charter.
Dean Bogdanovic, Kiran Agrahara Sreenivasa, Lisa Huang, and Dana Dean Bogdanovic, Kiran Agrahara Sreenivasa, Lisa Huang, and Dana
Blair each evaluated the YANG model in previous drafts separately, Blair each evaluated the YANG model in earlier draft versions
and then worked together to created a ACL draft that was supported by separately, and then they worked together to create an ACL draft
different vendors. That draft removed vendor specific features, and version that was supported by different vendors. That document
gave examples to allow vendors to extend in their own proprietary removed vendor-specific features and gave examples that allowed
ACL. The earlier draft was superseded with this updated draft and vendors to extend their own proprietary ACLs. That earlier draft
received more participation from many vendors. version was superseded with this document and received participation
from many vendors.
Authors would like to thank Jason Sterne, Lada Lhotka, Juergen The authors would like to thank Jason Sterne, Lada Lhotka, Juergen
Schoenwalder, David Bannister, Jeff Haas, Kristian Larsson and Einar Schoenwalder, David Bannister, Jeff Haas, Kristian Larsson, and Einar
Nilsen-Nygaard for their review of and suggestions to the draft. Nilsen-Nygaard for their reviews of and suggestions for the document.
Authors' Addresses Authors' Addresses
Mahesh Jethanandani Mahesh Jethanandani
VMware VMware
Email: mjethanandani@gmail.com Email: mjethanandani@gmail.com
Sonal Agarwal Sonal Agarwal
Cisco Systems, Inc. Cisco Systems, Inc.
 End of changes. 329 change blocks. 
1087 lines changed or deleted 1101 lines changed or added

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