draft-ietf-netmod-acl-model-08.txt   draft-ietf-netmod-acl-model-09.txt 
NETMOD WG D. Bogdanovic NETMOD WG D. Bogdanovic
Internet-Draft Volta Networks Internet-Draft Volta Networks
Intended status: Standards Track K. Sreenivasa Intended status: Standards Track K. Sreenivasa
Expires: January 9, 2017 Cisco Systems Expires: April 15, 2017 Cisco Systems
L. Huang L. Huang
General Electric General Electric
D. Blair D. Blair
Cisco Systems Cisco Systems
July 08, 2016 October 12, 2016
Network Access Control List (ACL) YANG Data Model Network Access Control List (ACL) YANG Data Model
draft-ietf-netmod-acl-model-08 draft-ietf-netmod-acl-model-09
Abstract Abstract
This document describes a data model of Access Control List (ACL) This document describes a data model of Access Control List (ACL)
basic building blocks. basic building blocks.
Editorial Note (To be removed by RFC Editor)
This draft contains many placeholder values that need to be replaced
with finalized values at the time of publication. This note
summarizes all of the substitutions that are needed. Please note
that no other RFC Editor instructions are specified anywhere else in
this document.
Artwork in this document contains shorthand references to drafts in
progress. Please apply the following replacements
o "XXXX" --> the assigned RFC value for this draft.
o Revision date in model (Oct 12, 2016) needs to get updated with
the date the draft gets approved. The date also needs to get
reflected on the line with <CODE BEGINS>.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 9, 2017. This Internet-Draft will expire on April 15, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://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 . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3 1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3
2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4
3. Design of the ACL Model . . . . . . . . . . . . . . . . . . . 4 3. Understanding ACL's Filters and Actions . . . . . . . . . . . 4
3.1. ACL Modules . . . . . . . . . . . . . . . . . . . . . . . 4 3.1. ACL Modules . . . . . . . . . . . . . . . . . . . . . . . 5
4. ACL YANG Models . . . . . . . . . . . . . . . . . . . . . . . 6 4. ACL YANG Models . . . . . . . . . . . . . . . . . . . . . . . 7
4.1. IETF Access Contorl List module . . . . . . . . . . . . . 6 4.1. IETF Access Control List module . . . . . . . . . . . . . 7
4.2. IETF-PACKET-FIELDS module . . . . . . . . . . . . . . . . 10 4.2. IETF Packet Fields module . . . . . . . . . . . . . . . . 12
4.3. An ACL Example . . . . . . . . . . . . . . . . . . . . . 14 4.3. An ACL Example . . . . . . . . . . . . . . . . . . . . . 16
4.4. Port Range Usage Example . . . . . . . . . . . . . . . . 15 4.4. Port Range Usage Example . . . . . . . . . . . . . . . . 16
5. Linux nftables . . . . . . . . . . . . . . . . . . . . . . . 16 5. Security Considerations . . . . . . . . . . . . . . . . . . . 17
6. Security Considerations . . . . . . . . . . . . . . . . . . . 17 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 19
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 8.1. Normative References . . . . . . . . . . . . . . . . . . 19
9.1. Normative References . . . . . . . . . . . . . . . . . . 18 8.2. Informative References . . . . . . . . . . . . . . . . . 19
9.2. Informative References . . . . . . . . . . . . . . . . . 19 Appendix A. Extending ACL model examples . . . . . . . . . . . . 20
Appendix A. Extending ACL model examples . . . . . . . . . . . . 19 A.1. Example of extending existing model for route filtering . 20
A.1. Example of extending existing model for route filtering . 19 A.2. A company proprietary module example . . . . . . . . . . 22
A.2. A company proprietary module example . . . . . . . . . . 21 A.3. Example to augment model with mixed ACL type . . . . . . 27
A.3. Attaching Access Control List to interfaces . . . . . . . 25 A.4. Linux nftables . . . . . . . . . . . . . . . . . . . . . 28
A.4. Example to augment model with mixed ACL type . . . . . . 27 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27
1. Introduction 1. Introduction
Access Control List (ACL) is one of the basic elements to configure Access Control List (ACL) is one of the basic elements to configure
device forwarding behavior. It is used in many networking concepts device forwarding behavior. It is used in many networking concepts
such as Policy Based Routing, Firewalls etc. such as Policy Based Routing, Firewalls etc.
An ACL is an ordered set of rules that is used to filter traffic on a An ACL is an ordered set of rules that is used to filter traffic on a
networking device. Each rule is represented by an Access Control networking device. Each rule is represented by an Access Control
Entry (ACE). Entry (ACE).
skipping to change at page 3, line 19 skipping to change at page 3, line 38
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 is met. These actions are any operations that would apply criteria is 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 endless depending on the innovations of list of potential actions is endless depending on the innovations of
the networked devices. the networked devices.
Access Control List is also widely knowns as ACL (pronounce as [ak-uh Access Control List is also widely knowns as ACL (pronounce as [ak-uh
l]) or Access List. In this document, Access Control List, ACL and l]) or Access List. In this document, Access Control List, ACL and
Access List are interchangeable. Access List are interchangeable.
The matching of filters and actions in an ACE/ACL are triggered only
after application/attachment of the ACL to an interface, VRF, vty/tty
session, QoS policy, routing protocols amongst various other config
attachment points. Once attached, it is used for filtering traffic
using the match cirteria in the ACE's and taking appropriate
action(s) that have been configured against that ACE. In order to
apply an ACL to any attachment point, 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
DSCP: Differentiated Services Code Point DSCP: Differentiated Services Code Point
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
skipping to change at page 3, line 43 skipping to change at page 4, line 22
IPv6: Internet Protocol version 6 IPv6: Internet Protocol version 6
MAC: Media Access Control MAC: Media Access Control
TCP: Transmission Control Protocol TCP: Transmission Control Protocol
2. Problem Statement 2. Problem Statement
This document defines a YANG [RFC6020] data model for the This document defines a YANG [RFC6020] data model for the
configuration of ACLs. It is very important that model can be easily configuration of ACLs. It is very important that model can be easily
reused between vendors and between applications. used by applications/attachments.
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 simple model that can be augmented by standard draft proposes a model that can be augmented by standard extensions
extensions and vendor proprietary models. and vendor proprietary models.
3. Design of the ACL Model 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 access control list (ACL) is. A network
system usually have a list of ACLs, and each ACL contains an ordered system usually have a list of ACLs, and each ACL contains an ordered
list of rules, also known as access list entries - ACEs. Each ACE list of rules, also known as access list entries - ACEs. Each ACE
has a group of match criteria and a group of action criteria. The has a group of match criteria and a group of action criteria. The
match criteria consist of packet header matching. It as also match criteria consist of packet header matching. It as also
possible for ACE to match on metadata, if supported by the vendor. possible for ACE to match on metadata, if supported by the vendor.
Packet header matching applies to fields visible in the packet such Packet header matching applies to fields visible in the packet such
as address or class of service or port numbers. Metadata matching as address or class of service or port numbers. Metadata matching
skipping to change at page 6, line 7 skipping to change at page 7, line 7
| | +--rw deny? empty | | +--rw deny? empty
| +--:(permit) | +--:(permit)
| +--rw permit? empty | +--rw permit? empty
+--ro ace-oper-data +--ro ace-oper-data
+--ro match-counter? yang:counter64 +--ro match-counter? yang:counter64
Figure 1 Figure 1
4. ACL YANG Models 4. ACL YANG Models
4.1. IETF Access Contorl List module 4.1. IETF Access Control List module
"ietf-access-control-list" is the standard top level module for "ietf-access-control-list" is the standard top level module for
access lists. The "access-lists" container stores a list of "acl". access lists. The "access-lists" container stores a list of "acl".
Each "acl" has information identifying the access list by a Each "acl" has information identifying the access list by a
name("acl-name") and a list("access-list-entries") of rules name("acl-name") and a list("access-list-entries") of rules
associated with the "acl-name". Each of the entries in the associated with the "acl-name". Each of the entries in the
list("access-list-entries"), indexed by the string "rule-name", has list("access-list-entries"), indexed by the string "rule-name", has
containers defining "matches" and "actions". The "matches" define containers defining "matches" and "actions". The "matches" define
criteria used to identify patterns in "ietf-packet-fields". The criteria used to identify patterns in "ietf-packet-fields". The
"actions" define behavior to undertake once a "match" has been "actions" define behavior to undertake once a "match" has been
identified. identified.
<CODE BEGINS>file "ietf-access-control-list@2016-07-08.yang" <CODE BEGINS>file "ietf-access-control-list@2016-10-12.yang"
module ietf-access-control-list { module ietf-access-control-list {
yang-version 1.1;
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;
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
} }
import ietf-packet-fields { import ietf-packet-fields {
prefix packet-fields; prefix packet-fields;
} }
organization "IETF NETMOD (NETCONF Data Modeling Language) organization "IETF NETMOD (NETCONF Data Modeling Language)
Working Group"; Working Group";
contact contact
"WG Web: http://tools.ietf.org/wg/netmod/ "WG Web: http://tools.ietf.org/wg/netmod/
WG List: netmod@ietf.org WG List: netmod@ietf.org
WG Chair: Juergen Schoenwaelder
j.schoenwaelder@jacobs-university.de
WG Chair: Tom Nadeau
tnadeau@lucidvision.com
Editor: Dean Bogdanovic Editor: Dean Bogdanovic
ivandean@gmail.com ivandean@gmail.com
Editor: Kiran Agrahara Sreenivasa Editor: Kiran Agrahara Sreenivasa
kkoushik@cisco.com kkoushik@cisco.com
Editor: Lisa Huang Editor: Lisa Huang
lyihuang16@gmail.com lyihuang16@gmail.com
Editor: Dana Blair Editor: Dana Blair
dblair@cisco.com"; dblair@cisco.com";
description description
"This YANG module defines a component that describing the "This YANG module defines a component that describing the
configuration of Access Control Lists (ACLs). configuration of Access Control Lists (ACLs).
Copyright (c) 2016 IETF Trust and the persons identified as Copyright (c) 2016 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 Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD to the license terms contained in, the Simplified BSD
License set forth in Section 4.c of the IETF Trust's Legal License set forth in Section 4.c of the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
revision 2016-07-08 { revision 2016-10-12 {
description description
"Base model for Network Access Control List (ACL)."; "Base model for Network Access Control List (ACL).";
reference reference
"RFC XXXX: Network Access Control List (ACL) "RFC XXXX: Network Access Control List (ACL)
YANG Data Model"; YANG Data Model";
} }
/*
* Identities
*/
identity acl-base { identity acl-base {
description description
"Base Access Control List type for all Access Control List type "Base Access Control List type for all Access Control List type
identifiers."; identifiers.";
} }
identity ipv4-acl { identity ipv4-acl {
base acl:acl-base; base acl:acl-base;
description description
"ACL that primarily matches on fields from the IPv4 header "ACL that primarily matches on fields from the IPv4 header
(e.g. IPv4 destination address) and layer 4 headers (e.g. TCP (e.g. IPv4 destination address) and layer 4 headers (e.g. TCP
destination port). An acl of type ipv4-acl does not contain destination port). An acl of type ipv4-acl does not contain
matches on fields in the ethernet header or the IPv6 header."; matches on fields in the ethernet header or the IPv6 header.";
} }
identity ipv6-acl { identity ipv6-acl {
base acl:acl-base; base acl:acl-base;
skipping to change at page 7, line 49 skipping to change at page 9, line 4
matches on fields in the ethernet header or the IPv4 header."; matches on fields in the ethernet header or the IPv4 header.";
} }
identity eth-acl { identity eth-acl {
base acl:acl-base; base acl:acl-base;
description description
"ACL that primarily matches on fields in the ethernet header, "ACL that primarily matches on fields in the ethernet header,
like 10/100/1000baseT or WiFi Access Control List. An acl of like 10/100/1000baseT or WiFi Access Control List. An acl of
type eth-acl does not contain matches on fields in the IPv4 type eth-acl does not contain matches on fields in the IPv4
header, IPv6 header or layer 4 headers."; header, IPv6 header or layer 4 headers.";
} }
/*
* Typedefs
*/
typedef acl-type { typedef acl-type {
type identityref { type identityref {
base acl-base; base acl-base;
} }
description description
"This type is used to refer to an Access Control List "This type is used to refer to an Access Control List
(ACL) type"; (ACL) type";
} }
typedef access-control-list-ref { typedef access-control-list-ref {
type leafref { type leafref {
path "/access-lists/acl/acl-name"; path "/access-lists/acl/acl-name";
} }
description description
"This type is used by data models that need to reference an "This type is used by data models that need to reference an
Access Control List"; Access Control List";
} }
/*
* Configuration data nodes
*/
container access-lists { container access-lists {
description description
"This is a top level container for Access Control Lists. "This is a top level container for Access Control Lists.
It can have one or more Access Control Lists."; It can have one or more Access Control Lists.";
list acl { list acl {
key "acl-type acl-name"; key "acl-type acl-name";
description description
"An Access Control List(ACL) is an ordered list of "An Access Control List(ACL) is an ordered list of
Access List Entries (ACE). Each Access Control Entry has a Access List Entries (ACE). Each Access Control Entry has a
list of match criteria and a list of actions. list of match criteria and a list of actions.
skipping to change at page 10, line 21 skipping to change at page 11, line 35
} }
case permit { case permit {
leaf permit { leaf permit {
type empty; type empty;
description description
"Permit action."; "Permit action.";
} }
} }
} }
} }
/*
* Operational state data nodes
*/
container ace-oper-data { container ace-oper-data {
config false; config false;
description description
"Operational data for this Access List Entry."; "Operational data for this Access List Entry.";
leaf match-counter { leaf match-counter {
type yang:counter64; type yang:counter64;
description description
"Number of matches for this Access List Entry"; "Number of matches for this Access List Entry";
} }
} }
skipping to change at page 10, line 34 skipping to change at page 12, line 4
"Operational data for this Access List Entry."; "Operational data for this Access List Entry.";
leaf match-counter { leaf match-counter {
type yang:counter64; type yang:counter64;
description description
"Number of matches for this Access List Entry"; "Number of matches for this Access List Entry";
} }
} }
} }
} }
} }
} }
} }
<CODE ENDS> <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. Since the number of match criteria is very large, the layer fields. Since the number of match criteria is very large, the
base draft does not include these directly but references them by base draft does not include these directly but references them by
"uses" to keep the base module simple. In case more match conditions "uses" to keep the base module simple. In case more match conditions
are needed, those can be added by augmenting choices within container are needed, those can be added by augmenting choices within container
"matches" in ietf-access-control-list.yang model. "matches" in ietf-access-control-list.yang model.
<CODE BEGINS>file "ietf-packet-fields@2016-07-08.yang" <CODE BEGINS>file "ietf-packet-fields@2016-10-12.yang"
module ietf-packet-fields { module ietf-packet-fields {
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;
} }
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
} }
organization "IETF NETMOD (NETCONF Data Modeling Language) Working organization "IETF NETMOD (NETCONF Data Modeling Language) Working
Group"; Group";
contact contact
"WG Web: http://tools.ietf.org/wg/netmod/ "WG Web: http://tools.ietf.org/wg/netmod/
WG List: netmod@ietf.org WG List: netmod@ietf.org
WG Chair: Juergen Schoenwaelder
j.schoenwaelder@jacobs-university.de
WG Chair: Tom Nadeau
tnadeau@lucidvision.com
Editor: Dean Bogdanovic Editor: Dean Bogdanovic
deanb@juniper.net ivandean@gmail.com
Editor: Kiran Agrahara Sreenivasa Editor: Kiran Agrahara Sreenivasa
kkoushik@cisco.com kkoushik@cisco.com
Editor: Lisa Huang Editor: Lisa Huang
lyihuang16@gmail.com lyihuang16@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 ietf-access-control-list YANG module. Their usage is not
limited to ietf-access-control-list and can be limited to ietf-access-control-list and can be
used anywhere as applicable. used anywhere as applicable.
Copyright (c) 2016 IETF Trust and the persons identified as Copyright (c) 2016 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 Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD to the license terms contained in, the Simplified BSD
skipping to change at page 11, line 43 skipping to change at page 13, line 10
Copyright (c) 2016 IETF Trust and the persons identified as Copyright (c) 2016 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 Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD to the license terms contained in, the Simplified BSD
License set forth in Section 4.c of the IETF Trust's Legal License set forth in Section 4.c of the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
revision 2016-07-08 { revision 2016-10-12 {
description description
"Initial version of packet fields used by "Initial version of packet fields used by
ietf-access-control-list"; ietf-access-control-list";
reference reference
"RFC XXXX: Network Access Control List (ACL) "RFC XXXX: Network Access Control List (ACL)
YANG Data Model"; YANG Data Model";
} }
grouping acl-transport-header-fields { grouping acl-transport-header-fields {
description description
"Transport header fields"; "Transport header fields";
container source-port-range { container source-port-range {
presence "Enables setting source port range"; presence "Enables setting source port range";
description description
"Inclusive range representing source ports to be used. "Inclusive range representing source ports to be used.
When only lower-port is present, it represents a single port."; When only lower-port is present, it represents a single port.";
leaf lower-port { leaf lower-port {
type inet:port-number; type inet:port-number;
mandatory true; mandatory true;
description description
"Lower boundary for port."; "Lower boundary for port.";
} }
leaf upper-port { leaf upper-port {
type inet:port-number; type inet:port-number;
must ". >= ../lower-port" { must ". >= ../lower-port" {
error-message error-message
"The upper-port must be greater than or equal to lower-port"; "The upper-port must be greater than or equal to lower-port";
} }
description description
"Upper boundary for port . If existing, the upper port "Upper boundary for port . If existing, the upper port
must be greater or equal to lower-port."; must be greater or equal to lower-port.";
} }
} }
container destination-port-range { container destination-port-range {
presence "Enables setting destination port range"; presence "Enables setting destination port range";
description description
"Inclusive range representing destination ports to be used. When "Inclusive range representing destination ports to be used. When
only lower-port is present, it represents a single port."; only lower-port is present, it represents a single port.";
leaf lower-port { leaf lower-port {
type inet:port-number; type inet:port-number;
mandatory true; mandatory true;
description description
"Lower boundary for port."; "Lower boundary for port.";
} }
leaf upper-port { leaf upper-port {
type inet:port-number; type inet:port-number;
must ". >= ../lower-port" { must ". >= ../lower-port" {
error-message error-message
skipping to change at page 14, line 5 skipping to change at page 15, line 20
description description
"Source IPv6 address prefix."; "Source IPv6 address prefix.";
} }
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 Representation"; RFC 5952: A Recommendation for IPv6 Address Text Representation";
} }
grouping acl-eth-header-fields { grouping acl-eth-header-fields {
description description
"Fields in Ethernet header."; "Fields in 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 MAC address.";
} }
leaf destination-mac-address-mask { leaf destination-mac-address-mask {
skipping to change at page 14, line 41 skipping to change at page 16, line 8
reference reference
"IEEE 802: IEEE Standard for Local and Metropolitan Area "IEEE 802: IEEE Standard for Local and Metropolitan Area
Networks: Overview and Architecture."; Networks: Overview and Architecture.";
} }
} }
<CODE ENDS> <CODE ENDS>
4.3. An ACL Example 4.3. An ACL Example
Requirement: Deny All traffic from 10.10.10.1/24. Requirement: Deny tcp traffic from 10.10.10.1/24, destined to
11.11.11.1/24.
Here is the acl configuration xml for this Access Control List: Here is the acl configuration xml for this Access Control List:
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<access-lists xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"> <access-lists xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list">
<acl> <acl>
<acl-name>sample-ipv4-acl</acl-name> <acl-name>sample-ipv4-acl</acl-name>
<acl-type>ipv4-acl</acl-type> <acl-type>ipv4</acl-type>
<access-list-entries> <access-list-entries>
<ace> <ace>
<rule-name>rule1</rule-name> <rule-name>rule1</rule-name>
<matches> <matches>
<source-ipv4-network> <source-ipv4-network>
10.10.10.1/24 10.10.10.1/24
</source-ipv4-network> </source-ipv4-network>
<destination-ipv4-network>
11.11.11.1/24
</destination-ipv4-network>
</matches> </matches>
<actions> <actions>
<deny /> <deny />
</actions> </actions>
<protocol>
tcp
</protocol>
</ace> </ace>
</access-list-entries> </access-list-entries>
</acl> </acl>
</access-lists> </access-lists>
</data> </data>
The acl and aces can be described in CLI as the following: The acl and aces can be described in CLI as the following:
access-list ip sample-ip-acl access-list ipv4 sample-ipv4-acl
deny tcp 10.10.10.1/24 any deny tcp 10.10.10.1/24 11.11.11.1/24
4.4. Port Range Usage Example 4.4. Port Range Usage Example
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 lower-port and upper-port with both the lower-port and
upper-port are included. When only a lower-port presents, it upper-port are included. When only a lower-port presents, it
represents a single port. represents a single port.
With the follow XML snippet: With the follow XML snippet:
skipping to change at page 16, line 10 skipping to change at page 17, line 23
This represents source ports 16384,16385, 16386, and 16387. This represents source ports 16384,16385, 16386, and 16387.
With the follow XML snippet: With the follow XML snippet:
<source-port-range> <source-port-range>
<lower-port>16384</lower-port> <lower-port>16384</lower-port>
<upper-port>65535</upper-port> <upper-port>65535</upper-port>
</source-port-range> </source-port-range>
This represents source ports greater than/equal to 16384. This represents source ports greater than/equal to 16384 and less
than equal to 65535.
With the follow XML snippet: With the follow XML snippet:
<source-port-range> <source-port-range>
<lower-port>21</lower-port> <lower-port>21</lower-port>
</source-port-range> </source-port-range>
This represents port 21. This represents port 21.
5. Linux nftables 5. Security Considerations
As Linux platform is becoming more popular as networking platform,
the Linux data model is changing. Previously ACLs in Linux were
highly protocol specific and different utilities were used (iptables,
ip6tables, arptables, ebtables), so each one had separate data model.
Recently, this has changed and a single utility, nftables, has been
developed. With a single application, it has a single data model for
filewall filters and it follows very similarly to the ietf-access-
control list module proposed in this draft. The nftables support
input and output ACEs and each ACE can be defined with match and
action.
The example in Section 4.3 can be configured using nftable tool as
below.
nft add table ip filter
nft add chain filter input
nft add rule ip filter input ip protocol tcp ip saddr 10.10.10.1/24 drop
The configuration entries added in nftable would be.
table ip filter {
chain input {
ip protocol tcp ip saddr 10.10.10.1/24 drop
}
}
We can see that there are many similarities between Linux nftables
and IETF ACL YANG data models and its extension models. It should be
fairly easy to do translation between ACL YANG model described in
this draft and Linux nftables.
6. Security Considerations
The YANG module defined in this memo is designed to be accessed via The YANG module defined in this memo is designed to be accessed via
the NETCONF protocol [RFC6241] [RFC6241]. The lowest NETCONF layer the NETCONF [RFC6241]. The lowest NETCONF layer is the secure
is the secure transport layer and the mandatory-to-implement secure transport layer and the mandatory-to-implement secure transport is
transport is SSH [RFC6242] [RFC6242]. The NETCONF access control SSH [RFC6242]. The NETCONF Access Control Model ( NACM [RFC6536])
model [RFC6536] [RFC6536] provides the means to restrict access for provides the means to restrict access for particular NETCONF users to
particular NETCONF users to a pre-configured subset of all available a pre-configured subset of all available NETCONF protocol operations
NETCONF protocol operations and content. 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 the YANG module which are
writable/creatable/deletable (i.e., config true, which is the writable/creatable/deletable (i.e., config true, which is the
default). These data nodes may be considered sensitive or vulnerable default). These data nodes may be considered sensitive or vulnerable
in some network environments. Write operations (e.g., <edit-config>) in some network environments. Write operations (e.g., <edit-config>)
to these data nodes without proper protection can have a negative to these data nodes without proper protection can have a negative
effect on network operations. effect on network operations.
These are the subtrees and data nodes and their sensitivity/ These are the subtrees and data nodes and their sensitivity/
vulnerability: vulnerability:
/access-lists/acl/access-list-entries: This list specifies all the /access-lists/acl/access-list-entries: This list specifies all the
configured access list entries on the device. Unauthorized write configured access list entries on the device. Unauthorized write
access to this list can allow intruders to access and control the access to this list can allow intruders to access and control the
system. Unauthorized read access to this list can allow intruders to system. Unauthorized read access to this list can allow intruders to
spoof packets with authorized addresses thereby compromising the spoof packets with authorized addresses thereby compromising the
system. system.
7. IANA Considerations 6. IANA Considerations
This document registers a URI in the IETF XML registry [RFC3688] This document registers a URI in the IETF XML registry [RFC3688].
[RFC3688]. Following the format in RFC 3688, the following Following the format in RFC 3688, the following registration is
registration is requested to be made: 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
Registrant Contact: The IESG. Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace. XML: N/A, the requested URI is an XML namespace.
This document registers a YANG module in the YANG Module Names This document registers a YANG module in the YANG Module Names
registry [RFC6020]. registry [RFC6020].
name: ietf-access-control-list namespace: name: ietf-access-control-list namespace:
urn:ietf:params:xml:ns:yang:ietf-access-control-list prefix: ietf-acl urn:ietf:params:xml:ns:yang:ietf-access-control-list prefix: ietf-acl
reference: RFC XXXX reference: RFC XXXX
name: ietf-packet-fields namespace: urn:ietf:params:xml:ns:yang:ietf- name: ietf-packet-fields namespace: urn:ietf:params:xml:ns:yang:ietf-
packet-fields prefix: ietf-packet-fields reference: RFC XXXX packet-fields prefix: ietf-packet-fields reference: RFC XXXX
8. Acknowledgements 7. Acknowledgements
Alex Clemm, Andy Bierman and Lisa Huang started it by sketching out Alex Clemm, Andy Bierman and Lisa Huang started it by sketching out
an initial IETF draft in several past IETF meetings. That draft an initial IETF draft in several past IETF meetings. That draft
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 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
drafts that made the draft went into IETF charter. drafts that made the draft 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 draft separately and Blair each evaluated the YANG model in previous draft separately and
then work together, to created a new ACL draft that can be supported then work together, to created a new ACL draft that can be supported
by different vendors. The new draft removes vendor specific by different vendors. The new draft removes vendor specific
features, and gives examples to allow vendors to extend in their own features, and gives examples to allow vendors to extend in their own
proprietary ACL. The earlier draft was superseded with the new one proprietary ACL. The earlier draft was superseded with the new one
that received more participation from many vendors. that received more participation from many vendors.
Authors would like to thank Jason Sterne, Lada Lhotka, Juergen Authors would like to thank Sonal Agarwal, Jason Sterne, Lada Lhotka,
Schoenwalder for their review of and suggestions to the draft. Juergen Schoenwalder for their review of and suggestions to the
draft.
9. References 8. References
9.1. Normative References 8.1. Normative 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,
<http://www.rfc-editor.org/info/rfc3688>. <http://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,
<http://www.rfc-editor.org/info/rfc6020>. <http://www.rfc-editor.org/info/rfc6020>.
skipping to change at page 19, line 14 skipping to change at page 19, line 44
[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure
Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
<http://www.rfc-editor.org/info/rfc6242>. <http://www.rfc-editor.org/info/rfc6242>.
[RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration
Protocol (NETCONF) Access Control Model", RFC 6536, DOI Protocol (NETCONF) Access Control Model", RFC 6536, DOI
10.17487/RFC6536, March 2012, 10.17487/RFC6536, March 2012,
<http://www.rfc-editor.org/info/rfc6536>. <http://www.rfc-editor.org/info/rfc6536>.
9.2. Informative References 8.2. Informative References
[RFC5101] Claise, B., Ed., "Specification of the IP Flow Information [RFC5101] Claise, B., Ed., "Specification of the IP Flow Information
Export (IPFIX) Protocol for the Exchange of IP Traffic Export (IPFIX) Protocol for the Exchange of IP Traffic
Flow Information", RFC 5101, DOI 10.17487/RFC5101, January Flow Information", RFC 5101, DOI 10.17487/RFC5101, January
2008, <http://www.rfc-editor.org/info/rfc5101>. 2008, <http://www.rfc-editor.org/info/rfc5101>.
Appendix A. Extending ACL model examples Appendix A. Extending ACL model examples
A.1. Example of extending existing model for route filtering A.1. Example of extending existing model for route filtering
skipping to change at page 19, line 38 skipping to change at page 20, line 22
prefixes. Much like ACLs, they include some match criteria and prefixes. Much like ACLs, they include some match criteria and
corresponding match action(s). For that reason, it is very simple to corresponding match action(s). For that reason, it is very simple to
extend existing ACL model with route filtering. The combination of a extend existing ACL model with route filtering. The combination of a
route prefix and prefix length along with the type of match route prefix and prefix length along with the type of match
determines how route filters are evaluated against incoming routes. determines how route filters are evaluated against incoming routes.
Different vendors have different match types and in this model we are Different vendors have different match types and in this model we are
using only ones that are common across all vendors participating in using only ones that are common across all vendors participating in
this draft. As in this example, the base ACL model can be extended this draft. As in this example, the base ACL model can be extended
with company proprietary extensions, described in the next section. with company proprietary extensions, described in the next section.
file "example-ext-route-filter@2016-02-18.yang" module: example-ext-route-filter
augment /ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches:
+--rw (route-prefix)?
+--:(range)
+--rw (ipv4-range)?
| +--:(v4-lower-bound)
| | +--rw v4-lower-bound? inet:ipv4-prefix
| +--:(v4-upper-bound)
| +--rw v4-upper-bound? inet:ipv4-prefix
+--rw (ipv6-range)?
+--:(v6-lower-bound)
| +--rw v6-lower-bound? inet:ipv6-prefix
+--:(v6-upper-bound)
+--rw v6-upper-bound? inet:ipv6-prefix
file "example-ext-route-filter@2016-10-12.yang"
module example-ext-route-filter { module example-ext-route-filter {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:example-ext-route-filter"; namespace "urn:ietf:params:xml:ns:yang:example-ext-route-filter";
prefix example-ext-route-filter; prefix example-ext-route-filter;
import ietf-inet-types { import ietf-inet-types {
prefix "inet"; prefix "inet";
} }
import ietf-access-control-list { import ietf-access-control-list {
prefix "ietf-acl"; prefix "ietf-acl";
} }
organization organization
skipping to change at page 20, line 16 skipping to change at page 21, line 13
"abc@abc.com"; "abc@abc.com";
description " description "
This module describes route filter as a collection of This module describes route filter as a collection of
match prefixes. When specifying a match prefix, you match prefixes. When specifying a match prefix, you
can specify an exact match with a particular route or can specify an exact match with a particular route or
a less precise match. You can configure either a a less precise match. You can configure either a
common action that applies to the entire list or an common action that applies to the entire list or an
action associated with each prefix. action associated with each prefix.
"; ";
revision 2016-02-18 { revision 2016-10-12 {
description description
"Creating Route-Filter extension model based on "Creating Route-Filter extension model based on
ietf-access-control-list model"; ietf-access-control-list model";
reference " "; reference " ";
} }
augment "/ietf-acl:access-lists/ietf-acl:acl/" augment "/ietf-acl:access-lists/ietf-acl:acl/"
+ "ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches"{ + "ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches"{
description " description "
This module augments the matches container in the ietf-acl This module augments the matches container in the ietf-acl
module with route filter specific actions module with route filter specific actions
skipping to change at page 21, line 19 skipping to change at page 22, line 15
"Defines the upper IPv6 prefix/prefix length"; "Defines the upper IPv6 prefix/prefix length";
} }
} }
} }
} }
} }
} }
A.2. A company proprietary module example A.2. A company proprietary module example
Access control list typically does not exist in isolation. Instead,
they are associated with a certain scope in which they are applied,
for example, an interface of a set of interfaces. How to attach an
access control list to an interface (or other system artifact) is
outside the scope of this model, as it depends on the specifics of
the system model that is being applied. However, in general, the
general design pattern will involved adding a data node with a
reference, or set of references, to ACLs that are to be applied to
the interface. For this purpose, the type definition "access-
control-list-ref" can be used.
Module "example-newco-acl" is an example of company proprietary model Module "example-newco-acl" is an example of company proprietary model
that augments "ietf-acl" module. It shows how to use 'augment' with that augments "ietf-acl" module. It shows how to use 'augment' with
an XPath expression to add additional match criteria, action an XPath expression to add additional match criteria, action
criteria, and default actions when no ACE matches found. All these criteria, and default actions when no ACE matches found, as well how
are company proprietary extensions or system feature extensions. to attach an Access Control List to an interface. All these are
company proprietary extensions or system feature extensions.
"example-newco-acl" is just an example and it is expected from "example-newco-acl" is just an example and it is expected from
vendors to create their own proprietary models. vendors to create their own proprietary models.
The following figure is the tree structure of example-newco-acl. In The following figure is the tree structure of example-newco-acl. In
this example, /ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access- this example, /ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-
list-entries/ ietf-acl:ace/ietf-acl:matches are augmented with two list-entries/ ietf-acl:ace/ietf-acl:matches are augmented with two
new choices, protocol-payload-choice and metadata. The protocol- new choices, protocol-payload-choice and metadata. The protocol-
payload-choice uses a grouping with an enumeration of all supported payload-choice uses a grouping with an enumeration of all supported
protocol values. Metadata matches apply to fields associated with protocol values. Metadata matches apply to fields associated with
the packet but not in the packet header such as input interface or the packet but not in the packet header such as input interface or
overall packet length. In other example, /ietf-acl:access-lists/ overall packet length. In other example, /ietf-acl:access-lists/
ietf-acl:acl/ietf-acl:access-list-entries/ ietf-acl:ace/ietf- ietf-acl:acl/ietf-acl:access-list-entries/ ietf-acl:ace/ietf-
acl:actions are augmented with new choice of actions. acl:actions are augmented with new choice of actions.
module: example-newco-acl module: example-newco-acl
augment /ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ augment /ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches:
ietf-acl:ace/ietf-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)?
+--:(interface-name) +--:(interface-name)
+--rw interface-name* [input-interface] +--rw interface-name* [input-interface]
+--rw input-interface if:interface-ref +--rw input-interface ietf-if:interface-ref
augment /ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ augment /ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:actions:
ietf-acl:ace/ietf-acl:actions:
+--rw (action)? +--rw (action)?
+--:(count) +--:(count)
| +--rw count? string | +--rw count? string
+--:(policer) +--:(policer)
| +--rw policer? string | +--rw policer? string
+--:(hiearchical-policer) +--:(hiearchical-policer)
+--rw hierarchitacl-policer? string +--rw hierarchitacl-policer? string
augment /ietf-acl:access-lists/ietf-acl:acl: augment /ietf-acl:access-lists/ietf-acl:acl:
+--rw default-actions +--rw default-actions
+--rw deny? empty +--rw deny? empty
augment /ietf-if:interfaces/ietf-if:interface:
+--rw acl
+--rw acl-name? ietf-acl:access-control-list-ref
+--ro match-counter? yang:counter64
+--rw (direction)?
+--:(in)
| +--rw in? empty
+--:(out)
+--rw out? empty
augment /ietf-acl:access-lists/ietf-acl:acl/ietf-acl:acl-oper-data:
+--ro targets
+--ro (interface)?
+--:(interface-name)
+--ro interface-name* ietf-if:interface-ref
file "newco-acl@2016-07-08.yang" file "newco-acl@2016-10-12.yang"
module example-newco-acl { module example-newco-acl {
yang-version 1.1; yang-version 1.1;
namespace "urn:newco:params:xml:ns:yang:example-newco-acl"; namespace "urn:newco:params:xml:ns:yang:example-newco-acl";
prefix example-newco-acl; prefix example-newco-acl;
import ietf-access-control-list { import ietf-access-control-list {
prefix "ietf-acl"; prefix "ietf-acl";
} }
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix "ietf-if";
} }
import ietf-yang-types {
prefix yang;
}
organization organization
"Newco model group."; "Newco model group.";
contact contact
"abc@newco.com"; "abc@newco.com";
description description
"This YANG module augment IETF ACL Yang."; "This YANG module augment IETF ACL Yang.";
revision 2016-07-08{ revision 2016-10-12{
description description
"Creating NewCo proprietary extensions to ietf-acl model"; "Creating NewCo proprietary extensions to ietf-acl model";
reference reference
"RFC XXXX: Network Access Control List (ACL) "RFC XXXX: Network Access Control List (ACL)
YANG Data Model"; YANG Data Model";
} }
augment "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches" { augment "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches" {
description "Newco proprietary simple filter matches"; description "Newco proprietary simple filter matches";
choice protocol-payload-choice { choice protocol-payload-choice {
skipping to change at page 24, line 32 skipping to change at page 25, line 50
description ""; description "";
} }
} }
} }
grouping metadata { grouping metadata {
description description
"Fields associated with a packet which are not in "Fields associated with a packet which are not in
the header."; the header.";
leaf input-interface { leaf input-interface {
type if:interface-ref { type ietf-if:interface-ref {
require-instance false; require-instance false;
} }
description description
"Packet was received on this interface"; "Packet was received on this interface";
} }
} }
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 {
skipping to change at page 25, line 4 skipping to change at page 26, line 23
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 "Internet Control Message Protocol Version 6"; description "Internet Control Message Protocol Version 6";
} }
enum range { enum range {
description "Range of values"; description "Range of values";
} }
} }
description "(null)"; description "(null)";
} }
} }
}
Draft authors expect that different vendors will provide their own
yang models as in the example above, which is the augmentation of the
base model
A.3. Attaching Access Control List to interfaces
Access control list typically does not exist in isolation. Instead,
they are associated with a certain scope in which they are applied,
for example, an interface of a set of interfaces. How to attach an
access control list to an interface (or other system artifact) is
outside the scope of this model, as it depends on the specifics of
the system model that is being applied. However, in general, the
general design pattern will involved adding a data node with a
reference, or set of references, to ACLs that are to be applied to
the interface. For this purpose, the type definition "access-
control-list-ref" can be used.
This is an example of attaching an Access Control List to an
interface.
import ietf-access-control-list {
prefix "ietf-acl";
}
import ietf-interface {
prefix "ietf-if";
}
import ietf-yang-types {
prefix "yang";
}
import example-newco-acl {
prefix "example-newco";
}
augment "/ietf-if:interfaces/ietf-if:interface" { augment "/ietf-if:interfaces/ietf-if:interface" {
description "Apply ACL to interfaces"; description "Apply ACL to interfaces";
container acl{ container acl{
description "ACL related properties."; description "ACL related properties.";
leaf acl-name { leaf acl-name {
type ietf-acl:acl-ref; type ietf-acl:access-control-list-ref;
mandatory true;
description "Access Control List name."; description "Access Control List name.";
} }
leaf match-counter { leaf match-counter {
type yang:counter64; type yang:counter64;
config false; config false;
description description
"Total match count for Access Control "Total match count for Access Control
List on this interface"; List on this interface";
} }
choice direction { choice direction {
skipping to change at page 26, line 40 skipping to change at page 26, line 51
description description
"Total match count for Access Control "Total match count for Access Control
List on this interface"; List on this interface";
} }
choice direction { choice direction {
leaf in { type empty;} leaf in { type empty;}
leaf out { type empty;} leaf out { type empty;}
} }
} }
} }
augment "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:acl-oper-data" { augment "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:acl-oper-data" {
description description
"This is an example on how to apply acl to a target to collect "This is an example on how to apply acl to a target to collect
operational data"; operational data";
container targets{ container targets{
choice interface{ choice interface{
leaf-list interface-name{ leaf-list interface-name{
type ietf-if:interface-ref; type ietf-if:interface-ref {
require-instance true;
}
description "Access Control List was attached to this interface";
} }
} }
} }
} }
}
A.4. Example to augment model with mixed ACL type Draft authors expect that different vendors will provide their own
yang models as in the example above, which is the augmentation of the
base model
A.3. Example to augment model with mixed ACL type
As vendors (or IETF) add more features to ACL, the model is easily As vendors (or IETF) add more features to ACL, the model is easily
augmented. One of such augmentations can be to add support for mixed augmented. One of such augmentations can be to add support for mixed
type of ACLs, where acl-type-base can be augmented like in example type of ACLs, where acl-type-base can be augmented like in example
below: below:
identity mixed-l3-acl { identity mixed-l3-acl {
base "access-control-list:acl-type-base"; base "access-control-list:acl-type-base";
description "ACL that contains a mix of entries that description "ACL that contains a mix of entries that
primarily match on fields in IPv4 headers and entries primarily match on fields in IPv4 headers and entries
skipping to change at page 27, line 31 skipping to change at page 28, line 5
identity mixed-l2-l3-acl { identity mixed-l2-l3-acl {
base "access-control-list:acl-type-base"; base "access-control-list:acl-type-base";
description "ACL that contains a mix of entries that description "ACL that contains a mix of entries that
primarily match on fields in ethernet headers, entries primarily match on fields in ethernet headers, entries
that primarily match on fields in IPv4 headers, and entries that primarily match on fields in IPv4 headers, and entries
that primarily match on fields in IPv6 headers. Matching on that primarily match on fields in IPv6 headers. Matching on
layer 4 header fields may also exist in the list."; layer 4 header fields may also exist in the list.";
} }
A.4. Linux nftables
As Linux platform is becoming more popular as networking platform,
the Linux data model is changing. Previously ACLs in Linux were
highly protocol specific and different utilities were used (iptables,
ip6tables, arptables, ebtables), so each one had separate data model.
Recently, this has changed and a single utility, nftables, has been
developed. With a single application, it has a single data model for
filewall filters and it follows very similarly to the ietf-access-
control list module proposed in this draft. The nftables support
input and output ACEs and each ACE can be defined with match and
action.
The example in Section 4.3 can be configured using nftable tool as
below.
nft add table ip filter
nft add chain filter input
nft add rule ip filter input ip protocol tcp ip saddr 10.10.10.1/24 drop
The configuration entries added in nftable would be.
table ip filter {
chain input {
ip protocol tcp ip saddr 10.10.10.1/24 drop
}
}
We can see that there are many similarities between Linux nftables
and IETF ACL YANG data models and its extension models. It should be
fairly easy to do translation between ACL YANG model described in
this draft and Linux nftables.
Authors' Addresses Authors' Addresses
Dean Bogdanovic Dean Bogdanovic
Volta Networks Volta Networks
Email: ivandean@gmail.com Email: ivandean@gmail.com
Kiran Agrahara Sreenivasa Kiran Agrahara Sreenivasa
Cisco Systems Cisco Systems
 End of changes. 79 change blocks. 
164 lines changed or deleted 231 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/