--- 1/draft-ietf-netmod-acl-model-03.txt 2015-10-19 08:16:29.420691217 -0700 +++ 2/draft-ietf-netmod-acl-model-04.txt 2015-10-19 08:16:29.476692582 -0700 @@ -1,23 +1,23 @@ NETMOD WG D. Bogdanovic -Internet-Draft Juniper Networks +Internet-Draft Intended status: Standards Track K. Sreenivasa -Expires: December 27, 2015 Brocade Communications System +Expires: April 19, 2016 Brocade Communications System L. Huang Juniper Networks D. Blair Cisco Systems - June 25, 2015 + October 17, 2015 Network Access Control List (ACL) YANG Data Model - draft-ietf-netmod-acl-model-03 + draft-ietf-netmod-acl-model-04 Abstract This document describes a data model of Access Control List (ACL) basic building blocks. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. @@ -25,21 +25,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on December 27, 2015. + This Internet-Draft will expire on April 19, 2016. Copyright Notice Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -53,33 +53,34 @@ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3 3. Design of the ACL Model . . . . . . . . . . . . . . . . . . . 4 3.1. ACL Modules . . . . . . . . . . . . . . . . . . . . . . . 4 4. ACL YANG Models . . . . . . . . . . . . . . . . . . . . . . . 6 4.1. IETF Access Contorl List module . . . . . . . . . . . . . 6 4.2. IETF-PACKET-FIELDS module . . . . . . . . . . . . . . . . 10 4.3. An ACL Example . . . . . . . . . . . . . . . . . . . . . 15 - 4.4. Port Range Usage Example . . . . . . . . . . . . . . . . 16 + 4.4. Port Range Usage Example . . . . . . . . . . . . . . . . 17 5. Linux nftables . . . . . . . . . . . . . . . . . . . . . . . 17 6. Security Considerations . . . . . . . . . . . . . . . . . . . 18 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 9.1. Normative References . . . . . . . . . . . . . . . . . . 19 - 9.2. Informative References . . . . . . . . . . . . . . . . . 19 + 9.2. Informative References . . . . . . . . . . . . . . . . . 20 Appendix A. Extending ACL model examples . . . . . . . . . . . . 20 A.1. Example of extending existing model for route filtering . 20 A.2. A company proprietary module example . . . . . . . . . . 22 - A.3. Attaching Access Control List to interfaces . . . . . . . 24 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 + A.3. Attaching Access Control List to interfaces . . . . . . . 25 + A.4. Example to augment model with mixed ACL type . . . . . . 27 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27 1. Introduction Access Control List (ACL) is one of the basic elements to configure device forwarding behavior. It is used in many networking concepts such as Policy Based Routing, Firewalls etc. 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 Entry (ACE). @@ -176,42 +177,42 @@ access-control-list", defines generic ACL aspects which are common to all ACLs regardless of their type or vendor. In effect, the module can be viewed as providing a generic ACL "superclass". It imports the second module, "ietf-packet-fields". The match container in "ietf-access-control-list" uses groupings in "ietf-packet-fields". If there is a need to define new "matches" choice, such as IPFIX [RFC5101], the container "matches" can be augmented. module: ietf-access-control-list +--rw access-lists - +--rw acl* [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)? + | | | | +--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 lower-port inet:port-number | | | | | +--rw upper-port? inet:port-number | | | | +--rw destination-port-range - | | | | +--rw lower-port? inet:port-number + | | | | +--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 absolute-time | | +--rw start? yang:date-and-time | | +--rw end? yang:date-and-time @@ -219,61 +220,61 @@ | +--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-type? acl-type + +--rw acl-type acl-type Figure 1 4. ACL YANG Models 4.1. IETF Access Contorl List module "ietf-access-control-list" is the standard top level module for Access lists. The "access-lists" container stores a list of "acl". Each "acl" has information identifying the access list by a name("acl-name") and a list("access-list-entries") of rules associated with the "acl-name". Each of the entries in the list("access-list-entries"), indexed by the string "rule-name", has containers defining "matches" and "actions". The "matches" define criteria used to identify patterns in "ietf-packet-fields". The "actions" define behavior to undertake once a "match" has been identified. - file "ietf-access-control-list@2015-05-03.yang" +file "ietf-access-control-list@2015-10-11.yang" module ietf-access-control-list { yang-version 1; namespace "urn:ietf:params:xml:ns:yang:ietf-access-control-list"; prefix acl; import ietf-yang-types { prefix yang; } import ietf-packet-fields { prefix packet-fields; } organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: http://tools.ietf.org/wg/netmod/ WG List: netmod@ietf.org WG Chair: Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de WG Chair: Tom Nadeau tnadeau@lucidvision.com Editor: Dean Bogdanovic - deanb@juniper.net + ivandean@gmail.com Editor: Kiran Agrahara Sreenivasa kkoushik@brocade.com Editor: Lisa Huang lyihuang@juniper.net Editor: Dana Blair dblair@cisco.com"; description "This YANG module defines a component that describing the configuration of Access Control Lists (ACLs). Copyright (c) 2015 IETF Trust and the persons identified as @@ -292,32 +293,42 @@ "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 ip-acl { + identity ipv4-acl { base acl:acl-base; description - "IP Access Control List is a common name for lists that contain - layer 3 and/or layer 4 match conditions."; + "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 - "Ethernet Access Control List is name for layer 2 Ethernet - technology Access Control List types, like 10/100/1000baseT or - WiFi Access Control List"; + "ACL that primarily matches on fields in the ethernet header. + 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 { @@ -320,28 +331,27 @@ "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-name"; + 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 { @@ -433,26 +442,23 @@ leaf acl-name { 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."; } leaf acl-type { type acl-type; description - "It is recommended to have an Access Control List with - uniform access list entries, all of the same type. When - this type is not explicitly specified, if vendor - implementation permits, the access control entries - in the list can be mixed, - by containing L2, L3 and L4 entries"; + "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."; } } } } 4.2. IETF-PACKET-FIELDS module The packet fields module defines the necessary groups for matching on fields in the packet including ethernet, ipv4, ipv6, transport layer @@ -510,20 +516,21 @@ "Initial version of packet fields used by ietf-access-control-list"; reference "RFC XXXX: Network Access Control List (ACL) YANG Data Model"; } grouping acl-transport-header-fields { description "Transport header fields"; container source-port-range { + presence "Enables setting source port range"; description "Inclusive range representing source ports to be used. When only lower-port is present, it represents a single port."; leaf lower-port { type inet:port-number; mandatory true; description "Lower boundary for port."; } leaf upper-port { @@ -531,20 +538,21 @@ error-message "The upper-port must be greater than or equal to lower-port"; } type inet:port-number; description "Upper boundary for port . If existing, the upper port must be greater or equal to lower-port."; } } container destination-port-range { + presence "Enables setting destination port range"; description "Inclusive range representing destination ports to be used. When only lower-port is present, it represents a single port."; leaf lower-port { type inet:port-number; mandatory true; description "Lower boundary for port."; } leaf upper-port { @@ -689,50 +697,72 @@ 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 deny tcp host 10.10.10.1 host 10.10.10.255 Here is the example acl configuration xml: - - - - - - - + + + - sample-ip-acl + - rule1 10.10.10.255/24 10.10.10.1/24 + + + + + + + + + + + + + + + + + + + + + + + + + + + rule1 + sample-ipv4-acl + ipv4-acl - - - + 4.4. Port Range Usage Example 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 upper-port are included. When only a lower-port presents, it represents a single port. With the follow XML snippet: @@ -848,47 +878,56 @@ drafts that made the draft went into IETF charter. Dean Bogdanovic, Kiran Agrahara Sreenivasa, Lisa Huang, and Dana Blair each evaluated the YANG model in previous draft separately and then work together, to created a new ACL draft that can be supported by different vendors. The new draft removes vendor specific features, and gives examples to allow vendors to extend in their own proprietary ACL. The earlier draft was superseded with the new one that received more participation from many vendors. + Authors would like to thank Jason Sterne, Lada Lhotka, Juergen + Schoenwalder for their review of and suggestions to the draft. + 9. References 9.1. Normative References [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, - January 2004. + DOI 10.17487/RFC3688, January 2004, + . - [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the - Network Configuration Protocol (NETCONF)", RFC 6020, - October 2010. + [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for + the Network Configuration Protocol (NETCONF)", RFC 6020, + DOI 10.17487/RFC6020, October 2010, + . - [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. - Bierman, "Network Configuration Protocol (NETCONF)", RFC - 6241, June 2011. + [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., + and A. Bierman, Ed., "Network Configuration Protocol + (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, + . [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure - Shell (SSH)", RFC 6242, June 2011. + Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, + . [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration - Protocol (NETCONF) Access Control Model", RFC 6536, March - 2012. + Protocol (NETCONF) Access Control Model", RFC 6536, DOI + 10.17487/RFC6536, March 2012, + . 9.2. Informative References - [RFC5101] Claise, B., "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 - Flow Information", RFC 5101, January 2008. + Flow Information", RFC 5101, DOI 10.17487/RFC5101, January + 2008, . Appendix A. Extending ACL model examples A.1. Example of extending existing model for route filtering With proposed modular design, it is easy to extend the model with other features. Those features can be standard features, like route filters. Route filters match on specific IP addresses or ranges of prefixes. Much like ACLs, they include some match criteria and corresponding match action(s). For that reason, it is very simple to @@ -1156,26 +1198,51 @@ operational data"; container targets{ choice interface{ leaf-list interface-name{ type ietf-if:interface-ref; } } } } +A.4. Example to augment model with mixed ACL type + + 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 + type of ACLs, where acl-type-base can be augmented like in example + below: + + identity mixed-l3-acl { + base "access-control-list:acl-type-base"; + description "ACL that contains a mix of entries that + primarily match on fields in IPv4 headers and entries + that primarily match on fields in IPv6 headers. + Matching on layer 4 header fields may also exist in the + list. An acl of type mixed-l3-acl does not contain + matches on fields in the ethernet header."; + } + + identity mixed-l2-l3-acl { + base "access-control-list:acl-type-base"; + description "ACL that contains a mix of entries that + primarily match on fields in ethernet headers, entries + that primarily match on fields in IPv4 headers, and entries + that primarily match on fields in IPv6 headers. Matching on + layer 4 header fields may also exist in the list."; + } + Authors' Addresses Dean Bogdanovic - Juniper Networks - Email: deanb@juniper.net + Email: ivandean@gmail.com Kiran Agrahara Sreenivasa Brocade Communications System Email: kkoushik@brocade.com Lisa Huang Juniper Networks Email: lyihuang@juniper.net