draft-ietf-netmod-acl-model-06.txt   draft-ietf-netmod-acl-model-07.txt 
NETMOD WG D. Bogdanovic NETMOD WG D. Bogdanovic
Internet-Draft Internet-Draft
Intended status: Standards Track K. Sreenivasa Intended status: Standards Track K. Sreenivasa
Expires: June 10, 2016 Cisco Systems Expires: September 12, 2016 Cisco Systems
L. Huang L. Huang
Juniper Networks Juniper Networks
D. Blair D. Blair
Cisco Systems Cisco Systems
December 8, 2015 March 11, 2016
Network Access Control List (ACL) YANG Data Model Network Access Control List (ACL) YANG Data Model
draft-ietf-netmod-acl-model-06 draft-ietf-netmod-acl-model-07
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.
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.
skipping to change at page 1, line 36 skipping to change at page 1, line 36
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 June 10, 2016. This Internet-Draft will expire on September 12, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2015 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
skipping to change at page 2, line 18 skipping to change at page 2, line 18
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3 1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3
2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3
3. Design of the ACL Model . . . . . . . . . . . . . . . . . . . 4 3. Design of the ACL Model . . . . . . . . . . . . . . . . . . . 4
3.1. ACL Modules . . . . . . . . . . . . . . . . . . . . . . . 4 3.1. ACL Modules . . . . . . . . . . . . . . . . . . . . . . . 4
4. ACL YANG Models . . . . . . . . . . . . . . . . . . . . . . . 6 4. ACL YANG Models . . . . . . . . . . . . . . . . . . . . . . . 6
4.1. IETF Access Contorl List module . . . . . . . . . . . . . 6 4.1. IETF Access Contorl List module . . . . . . . . . . . . . 6
4.2. IETF-PACKET-FIELDS module . . . . . . . . . . . . . . . . 10 4.2. IETF-PACKET-FIELDS module . . . . . . . . . . . . . . . . 10
4.3. An ACL Example . . . . . . . . . . . . . . . . . . . . . 15 4.3. An ACL Example . . . . . . . . . . . . . . . . . . . . . 15
4.4. Port Range Usage Example . . . . . . . . . . . . . . . . 17 4.4. Port Range Usage Example . . . . . . . . . . . . . . . . 15
5. Linux nftables . . . . . . . . . . . . . . . . . . . . . . . 17 5. Linux nftables . . . . . . . . . . . . . . . . . . . . . . . 16
6. Security Considerations . . . . . . . . . . . . . . . . . . . 18 6. Security Considerations . . . . . . . . . . . . . . . . . . . 17
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 18
9.1. Normative References . . . . . . . . . . . . . . . . . . 19 9.1. Normative References . . . . . . . . . . . . . . . . . . 18
9.2. Informative References . . . . . . . . . . . . . . . . . 20 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. Attaching Access Control List to interfaces . . . . . . . 25 A.3. Attaching Access Control List to interfaces . . . . . . . 24
A.4. Example to augment model with mixed ACL type . . . . . . 27 A.4. Example to augment model with mixed ACL type . . . . . . 26
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26
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 5, line 8 skipping to change at page 5, line 8
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". "ietf-access-control-list" uses groupings in "ietf-packet-fields".
If there is a need to define new "matches" choice, such as IPFIX If there is a need to define new "matches" choice, such as IPFIX
[RFC5101], the container "matches" can be augmented. [RFC5101], the container "matches" can be augmented.
module: ietf-access-control-list module: ietf-access-control-list
+--rw access-lists +--rw access-lists
+--rw acl* [acl-type acl-name] +--rw acl* [acl-type acl-name]
+--ro acl-oper-data
+--rw access-list-entries
| +--rw ace* [rule-name]
| +--rw matches
| | +--rw (ace-type)?
| | | +--:(ace-ip)
| | | | +--rw (ace-ip-version)?
| | | | | +--:(ace-ipv4)
| | | | | | +--rw destination-ipv4-network? inet:ipv4-prefix
| | | | | | +--rw source-ipv4-network? inet:ipv4-prefix
| | | | | +--:(ace-ipv6)
| | | | | +--rw destination-ipv6-network? inet:ipv6-prefix
| | | | | +--rw source-ipv6-network? inet:ipv6-prefix
| | | | | +--rw flow-label? inet:ipv6-flow-label
| | | | +--rw dscp? inet:dscp
| | | | +--rw protocol? uint8
| | | | +--rw source-port-range!
| | | | | +--rw lower-port inet:port-number
| | | | | +--rw upper-port? inet:port-number
| | | | +--rw destination-port-range!
| | | | +--rw lower-port inet:port-number
| | | | +--rw upper-port? inet:port-number
| | | +--:(ace-eth)
| | | +--rw destination-mac-address? yang:mac-address
| | | +--rw destination-mac-address-mask? yang:mac-address
| | | +--rw source-mac-address? yang:mac-address
| | | +--rw source-mac-address-mask? yang:mac-address
| | +--rw input-interface? string
| +--rw actions
| | +--rw (packet-handling)?
| | +--:(deny)
| | | +--rw deny? empty
| | +--:(permit)
| | +--rw permit? empty
| +--ro ace-oper-data
| | +--ro match-counter? yang:counter64
| +--rw rule-name string
+--rw acl-name string +--rw acl-name string
+--rw acl-type acl-type +--rw acl-type acl-type
+--ro acl-oper-data
+--rw access-list-entries
+--rw ace* [rule-name]
+--rw rule-name string
+--rw matches
| +--rw (ace-type)?
| | +--:(ace-ip)
| | | +--rw (ace-ip-version)?
| | | | +--:(ace-ipv4)
| | | | | +--rw destination-ipv4-network? inet:ipv4-prefix
| | | | | +--rw source-ipv4-network? inet:ipv4-prefix
| | | | +--:(ace-ipv6)
| | | | +--rw destination-ipv6-network? inet:ipv6-prefix
| | | | +--rw source-ipv6-network? inet:ipv6-prefix
| | | | +--rw flow-label? inet:ipv6-flow-label
| | | +--rw dscp? inet:dscp
| | | +--rw protocol? uint8
| | | +--rw source-port-range!
| | | | +--rw lower-port inet:port-number
| | | | +--rw upper-port? inet:port-number
| | | +--rw destination-port-range!
| | | +--rw lower-port inet:port-number
| | | +--rw upper-port? inet:port-number
| | +--:(ace-eth)
| | +--rw destination-mac-address? yang:mac-address
| | +--rw destination-mac-address-mask? yang:mac-address
| | +--rw source-mac-address? yang:mac-address
| | +--rw source-mac-address-mask? yang:mac-address
| +--rw input-interface? if:interface-ref
+--rw actions
| +--rw (packet-handling)?
| +--:(deny)
| | +--rw deny? empty
| +--:(permit)
| +--rw permit? empty
+--ro ace-oper-data
+--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 Contorl 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@2015-12-08.yang" <CODE BEGINS>file "ietf-access-control-list@2016-02-18.yang"
module ietf-access-control-list { module ietf-access-control-list {
yang-version 1; 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 WG Chair: Juergen Schoenwaelder
j.schoenwaelder@jacobs-university.de j.schoenwaelder@jacobs-university.de
WG Chair: Tom Nadeau WG Chair: Tom Nadeau
tnadeau@lucidvision.com 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
lyihuang@juniper.net lyihuang@juniper.net
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) 2015 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
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
the RFC itself for full legal notices.";
revision 2015-12-08 {
description
"Base model for Network Access Control List (ACL).";
reference
"RFC XXXX: Network Access Control List (ACL)
YANG Data Model";
}
identity acl-base {
description
"Base Access Control List type for all Access Control List type
identifiers.";
}
identity ipv4-acl {
base acl:acl-base;
description
"ACL that primarily 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-acl does not contain
matches on fields in the ethernet header or the IPv6 header.";
}
identity ipv6-acl {
base acl:acl-base;
description
"ACL that primarily 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-acl does not contain
matches on fields in the ethernet header or the IPv4 header.";
}
identity eth-acl {
base acl:acl-base;
description
"ACL that primarily matches on fields in the ethernet header,
like 10/100/1000baseT or WiFi Access Control List. An acl of
type eth-acl does not contain matches on fields in the IPv4
header, IPv6 header or layer 4 headers.";
}
typedef acl-type {
type identityref {
base acl-base;
}
description
"This type is used to refer to an Access Control List
(ACL) type";
}
typedef access-control-list-ref {
type leafref {
path "/access-lists/acl/acl-name";
}
description
"This type is used by data models that need to reference an
Access Control List";
}
container access-lists {
description
"This is a top level container for Access Control Lists.
It can have one or more Access Control Lists.";
list acl {
key "acl-type acl-name";
description
"An Access Control List(ACL) is an ordered list of
Access List Entries (ACE). Each Access Control Entry has a
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.";
container acl-oper-data {
config false;
description
"Overall Access Control List operational data";
}
container access-list-entries {
description
"The access-list-entries container contains
a list of access-list-entries(ACE).";
list ace {
key "rule-name";
ordered-by user;
description
"List of access list entries(ACE)";
container matches {
description
"Definitions for match criteria for this Access List
Entry.";
choice ace-type {
description
"Type of access list entry.";
case ace-ip { Redistribution and use in source and binary forms, with or
description "IP Access List Entry."; without modification, is permitted pursuant to, and subject
choice ace-ip-version { to the license terms contained in, the Simplified BSD
description License set forth in Section 4.c of the IETF Trust's Legal
"IP version used in this Acess List Entry."; Provisions Relating to IETF Documents
case ace-ipv4 { (http://trustee.ietf.org/license-info).
uses packet-fields:acl-ipv4-header-fields; This version of this YANG module is part of RFC XXXX; see
} the RFC itself for full legal notices.";
case ace-ipv6 { revision 2016-02-18 {
uses packet-fields:acl-ipv6-header-fields; description
} "Base model for Network Access Control List (ACL).";
} reference
uses packet-fields:acl-ip-header-fields; "RFC XXXX: Network Access Control List (ACL)
} YANG Data Model";
case ace-eth { }
description identity acl-base {
"Ethernet Access List entry."; description
uses packet-fields:acl-eth-header-fields; "Base Access Control List type for all Access Control List type
} identifiers.";
} }
uses packet-fields:metadata; identity ipv4-acl {
} base acl:acl-base;
container actions { description
description "ACL that primarily matches on fields from the IPv4 header
"Definitions of action criteria for this Access List (e.g. IPv4 destination address) and layer 4 headers (e.g. TCP
Entry."; destination port). An acl of type ipv4-acl does not contain
choice packet-handling { matches on fields in the ethernet header or the IPv6 header.";
default "deny"; }
description identity ipv6-acl {
"Packet handling action."; base acl:acl-base;
case deny { description
leaf deny { "ACL that primarily matches on fields from the IPv6 header
type empty; (e.g. IPv6 destination address) and layer 4 headers (e.g. TCP
description destination port). An acl of type ipv6-acl does not contain
"Deny action."; matches on fields in the ethernet header or the IPv4 header.";
} }
} identity eth-acl {
case permit { base acl:acl-base;
leaf permit { description
type empty; "ACL that primarily matches on fields in the ethernet header,
description like 10/100/1000baseT or WiFi Access Control List. An acl of
"Permit action."; type eth-acl does not contain matches on fields in the IPv4
} header, IPv6 header or layer 4 headers.";
} }
} typedef acl-type {
} type identityref {
container ace-oper-data { base acl-base;
config false; }
description description
"Operational data for this Access List Entry."; "This type is used to refer to an Access Control List
leaf match-counter { (ACL) type";
type yang:counter64; }
description typedef access-control-list-ref {
"Number of matches for this Access List Entry"; type leafref {
} path "/access-lists/acl/acl-name";
} }
leaf rule-name { description
type string; "This type is used by data models that need to reference an
description Access Control List";
"A unique name identifying this Access List }
Entry(ACE)."; container access-lists {
} description
} "This is a top level container for Access Control Lists.
} It can have one or more Access Control Lists.";
leaf acl-name { list acl {
type string; key "acl-type acl-name";
description description
"The name of access-list. A device MAY restrict the length "An Access Control List(ACL) is an ordered list of
and value of this name, possibly space and special Access List Entries (ACE). Each Access Control Entry has a
characters are not allowed."; list of match criteria and a list of actions.
} Since there are several kinds of Access Control Lists
leaf acl-type { implemented with different attributes for
type acl-type; different vendors, this
description model accommodates customizing Access Control Lists for
"Type of access control list. Indicates the primary intended each kind and for each vendor.";
type of match criteria (e.g. ethernet, IPv4, IPv6, mixed, etc) leaf acl-name {
used in the list instance."; type string;
} 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.";
<CODE ENDS> }
leaf acl-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 acl-oper-data {
config false;
description
"Overall Access Control List operational data";
}
container access-list-entries {
description
"The access-list-entries container contains
a list of access-list-entries(ACE).";
list ace {
key "rule-name";
ordered-by user;
description
"List of access list entries(ACE)";
leaf rule-name {
type string;
description
"A unique name identifying this Access List
Entry(ACE).";
}
container matches {
description
"Definitions for match criteria for this Access List
Entry.";
choice ace-type {
description
"Type of access list entry.";
case ace-ip {
description "IP Access List Entry.";
choice ace-ip-version {
description
"IP version used in this Acess List Entry.";
case ace-ipv4 {
uses packet-fields:acl-ipv4-header-fields;
}
case ace-ipv6 {
uses packet-fields:acl-ipv6-header-fields;
}
}
uses packet-fields:acl-ip-header-fields;
}
case ace-eth {
description
"Ethernet Access List entry.";
uses packet-fields:acl-eth-header-fields;
}
}
uses packet-fields:metadata;
}
container actions {
description
"Definitions of action criteria for this Access List
Entry.";
choice packet-handling {
default "deny";
description
"Packet handling action.";
case deny {
leaf deny {
type empty;
description
"Deny action.";
}
}
case permit {
leaf permit {
type empty;
description
"Permit action.";
}
}
}
}
container ace-oper-data {
config false;
description
"Operational data for this Access List Entry.";
leaf match-counter {
type yang:counter64;
description
"Number of matches for this Access List Entry";
}
}
}
}
}
}
}
<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, transport layer fields in the packet including ethernet, ipv4, ipv6, transport layer
fields and metadata. Since the number of match criteria is very fields and metadata. Since the number of match criteria is very
large, the base draft does not include these directly but references large, the base draft does not include these directly but references
them by "uses" to keep the base module simple. In case more match them by "uses" to keep the base module simple. In case more match
conditions are needed, those can be added by augmenting choices conditions are needed, those can be added by augmenting choices
within container "matches" in ietf-access-control-list.yang model within container "matches" in ietf-access-control-list.yang model
<CODE BEGINS> <CODE BEGINS>file "ietf-packet-fields@2016-02-18.yang"
module ietf-packet-fields { module ietf-packet-fields {
yang-version 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;
} }
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
} }
import ietf-interfaces {
prefix if;
}
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 WG Chair: Juergen Schoenwaelder
j.schoenwaelder@jacobs-university.de j.schoenwaelder@jacobs-university.de
WG Chair: Tom Nadeau WG Chair: Tom Nadeau
tnadeau@lucidvision.com tnadeau@lucidvision.com
Editor: Dean Bogdanovic Editor: Dean Bogdanovic
skipping to change at page 11, line 34 skipping to change at page 11, line 37
kkoushik@cisco.com kkoushik@cisco.com
Editor: Lisa Huang Editor: Lisa Huang
lyihuang@juniper.net lyihuang@juniper.net
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) 2015 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 2015-12-08 { revision 2016-02-18 {
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";
skipping to change at page 12, line 23 skipping to change at page 12, line 26
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 "Upper boundary port value check.";
} }
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
"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 "Upper boundary port value check.";
} }
description description
"Upper boundary for port. If existing, the upper port must "Upper boundary for port. If existing, the upper port must
be greater or equal to lower-port"; be greater or equal to lower-port";
} }
} }
} }
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";
leaf dscp { leaf dscp {
type inet:dscp; type inet:dscp;
description description
"Value of dscp."; "Value of dscp.";
} }
leaf protocol { leaf protocol {
skipping to change at page 14, line 42 skipping to change at page 14, line 47
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.";
} }
grouping metadata { grouping metadata {
description description
"Fields associated with a packet whick are not in "Fields associated with a packet whick are not in
the header."; the header.";
leaf input-interface { leaf input-interface {
type string; type if:interface-ref {
require-instance false;
}
description description
"Packet was received on this interface."; "Packet was received on this interface.";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
4.3. An ACL Example
Requirement: Deny All traffic from 10.10.10.1 bound for host 4.3. An ACL Example
10.10.10.255 from leaving.
In order to achieve the requirement, an name Access Control List is
needed. The acl and aces can be described in CLI as the following:
access-list ip sample-ip-acl Requirement: Deny All traffic from 10.10.10.1/24.
deny tcp host 10.10.10.1 host 10.10.10.255
Here is the example acl configuration xml: 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-oper-data /> <acl-name>sample-ipv4-acl</acl-name>
<acl-type>ipv4-acl</acl-type>
<access-list-entries> <access-list-entries>
<ace> <ace>
<rule-name>rule1</rule-name>
<matches> <matches>
<destination-ipv4-network>
10.10.10.255/24
</destination-ipv4-network>
<source-ipv4-network> <source-ipv4-network>
10.10.10.1/24 10.10.10.1/24
</source-ipv4-network> </source-ipv4-network>
<destination-ipv6-network />
<source-ipv6-network />
<flow-label />
<dscp />
<protocol />
<source-port-range>
<lower-port />
<upper-port />
</source-port-range>
<destination-port-range>
<lower-port />
<upper-port />
</destination-port-range>
<destination-mac-address />
<destination-mac-address-mask />
<source-mac-address />
<source-mac-address-mask />
<input-interface />
</matches> </matches>
<actions> <actions>
<deny /> <deny />
<permit />
</actions> </actions>
<ace-oper-data>
<match-counter />
</ace-oper-data>
<rule-name>rule1<rule-name/>
</ace> </ace>
</access-list-entries> </access-list-entries>
<acl-name>sample-ipv4-acl<acl-name/>
<acl-type>ipv4-acl<acl-type/>
</acl> </acl>
</access-lists> </access-lists>
</data> </data>
The acl and aces can be described in CLI as the following:
access-list ip sample-ip-acl
deny tcp 10.10.10.1/24 any
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:
<source-port-range> <source-port-range>
skipping to change at page 18, line 5 skipping to change at page 16, line 42
the Linux data model is changing. Previously ACLs in Linux were the Linux data model is changing. Previously ACLs in Linux were
highly protocol specific and different utilities were used (iptables, highly protocol specific and different utilities were used (iptables,
ip6tables, arptables, ebtables), so each one had separate data model. ip6tables, arptables, ebtables), so each one had separate data model.
Recently, this has changed and a single utility, nftables, has been Recently, this has changed and a single utility, nftables, has been
developed. With a single application, it has a single data model for developed. With a single application, it has a single data model for
filewall filters and it follows very similarly to the ietf-access- filewall filters and it follows very similarly to the ietf-access-
control list module proposed in this draft. The nftables support control list module proposed in this draft. The nftables support
input and output ACEs and each ACE can be defined with match and input and output ACEs and each ACE can be defined with match and
action. action.
In the example below, it shows nftable configuration that accepts and The example in Section 4.3 can be configured using nftable tool as
count packets. It contains a below.
table ip filter { nft add table ip filter
chain output { nft add chain filter input
type filter hook output priority 0; nft add rule ip filter input ip protocol tcp ip saddr 10.10.10.1/24 drop
counter packets 1 bytes 84 accept
}
}
There are many similarities between Linux nftables and IETF ACL YANG The configuration entries added in nftable would be.
data models. It should be fairly easy to do translation between ACL
YANG model described in this draft and Linux nftables. 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 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 protocol [RFC6241] [RFC6241]. 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] [RFC6242]. The NETCONF access control transport is SSH [RFC6242] [RFC6242]. The NETCONF access control
model [RFC6536] [RFC6536] provides the means to restrict access for model [RFC6536] [RFC6536] provides the means to restrict access for
particular NETCONF users to a pre-configured subset of all available particular NETCONF users to a pre-configured subset of all available
NETCONF protocol operations and content. NETCONF protocol operations and content.
skipping to change at page 19, line 4 skipping to change at page 17, line 50
spoof packets with authorized addresses thereby compromising the spoof packets with authorized addresses thereby compromising the
system. system.
7. IANA Considerations 7. 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 [RFC3688]. Following the format in RFC 3688, the following
registration is requested to be made: 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
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
skipping to change at page 20, line 20 skipping to change at page 19, line 15
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<http://www.rfc-editor.org/info/rfc6241>. <http://www.rfc-editor.org/info/rfc6241>.
[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,
10.17487/RFC6536, March 2012, DOI 10.17487/RFC6536, March 2012,
<http://www.rfc-editor.org/info/rfc6536>. <http://www.rfc-editor.org/info/rfc6536>.
9.2. Informative References 9.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
skipping to change at page 20, line 48 skipping to change at page 19, line 43
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@2015-12-08.yang" file "example-ext-route-filter@2016-02-18.yang"
module example-ext-route-filter { module example-ext-route-filter {
yang-version 1; yang-version 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
"Route model group."; "Route model group.";
contact contact
"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
skipping to change at page 21, line 25 skipping to change at page 20, line 21
"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 2015-12-08 { revision 2016-02-18 {
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 23, line 25 skipping to change at page 22, line 25
+--:(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
file "newco-acl@2015-12-08.yang" file "newco-acl@2016-02-18.yang"
module example-newco-acl { module example-newco-acl {
yang-version 1; yang-version 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";
} }
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 2015-12-08{ revision 2016-02-18{
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 {
description ""; description "";
 End of changes. 45 change blocks. 
332 lines changed or deleted 317 lines changed or added

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