ietf-access-control-list

This YANG module defines a component that describes the configuration and monitoring of Access Control Lists (ACLs). The key wo...

  • Version: 2019-03-04

    ietf-access-control-list@2019-03-04


    
      module ietf-access-control-list {
    
        yang-version 1.1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-access-control-list";
    
        prefix acl;
    
        import ietf-yang-types {
          prefix yang;
          reference
            "RFC 6991 - Common YANG Data Types.";
    
    
        }
        import ietf-packet-fields {
          prefix pf;
          reference
            "RFC 8519 - YANG Data Model for Network Access Control
            	   Lists (ACLs).";
    
    
        }
        import ietf-interfaces {
          prefix if;
          reference
            "RFC 8343 - A YANG Data Model for Interface Management.";
    
    
        }
    
        organization
          "IETF NETMOD (Network Modeling) Working Group.";
    
        contact
          "WG Web:  <https://datatracker.ietf.org/wg/netmod/>
    WG List: netmod@ietf.org
    
    Editor: Mahesh Jethanandani
    	mjethanandani@gmail.com
    Editor: Lisa Huang
    	huangyi_99@yahoo.com
    Editor: Sonal Agarwal
    	sagarwal12@gmail.com
    Editor: Dana Blair
    	dana@blairhome.com";
    
        description
          "This YANG module defines a component that describes the
    configuration and monitoring of Access Control Lists (ACLs).
    
    The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
    'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
    'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
    are to be interpreted as described in BCP 14 (RFC 2119)
    (RFC 8174) when, and only when, they appear in all
    capitals, as shown here.
    
    Copyright (c) 2019 IETF Trust and the persons identified as
    the document authors.  All rights reserved.
    
    Redistribution and use in source and binary forms, with or
    without modification, is permitted pursuant to, and subject
    to the license terms contained in, the Simplified BSD
    License set forth in Section 4.c of the IETF Trust's Legal
    Provisions Relating to IETF Documents
    (http://trustee.ietf.org/license-info).
    
    This version of this YANG module is part of RFC 8519; see
    the RFC itself for full legal notices.";
    
        revision "2019-03-04" {
          description "Initial version.";
          reference
            "RFC 8519: YANG Data Model for Network Access Control
            	  Lists (ACLs).";
    
        }
    
    
        identity forwarding-action {
          description
            "Base identity for actions in the forwarding category.";
        }
    
        identity accept {
          base forwarding-action;
          description "Accept the packet.";
        }
    
        identity drop {
          base forwarding-action;
          description
            "Drop packet without sending any ICMP error message.";
        }
    
        identity reject {
          base forwarding-action;
          description
            "Drop the packet and send an ICMP error message to the source.";
        }
    
        identity log-action {
          description
            "Base identity for defining the destination for logging
    actions.";
        }
    
        identity log-syslog {
          base log-action;
          description
            "System log (syslog) the information for the packet.";
        }
    
        identity log-none {
          base log-action;
          description
            "No logging for the packet.";
        }
    
        identity acl-base {
          description
            "Base Access Control List type for all Access Control List type
    identifiers.";
        }
    
        identity ipv4-acl-type {
          base acl:acl-base;
          description
            "An ACL that matches on fields from the IPv4 header
    (e.g., IPv4 destination address) and Layer 4 headers (e.g., TCP
    destination port).  An ACL of type ipv4 does not contain
    matches on fields in the Ethernet header or the IPv6 header.";
        }
    
        identity ipv6-acl-type {
          base acl:acl-base;
          description
            "An ACL that matches on fields from the IPv6 header
    (e.g., IPv6 destination address) and Layer 4 headers (e.g., TCP
    destination port).  An ACL of type ipv6 does not contain
    matches on fields in the Ethernet header or the IPv4 header.";
        }
    
        identity eth-acl-type {
          base acl:acl-base;
          description
            "An ACL that matches on fields in the Ethernet header,
    like 10/100/1000baseT or a Wi-Fi Access Control List.  An ACL
    of type ethernet does not contain matches on fields in the
    IPv4 header, the IPv6 header, or Layer 4 headers.";
        }
    
        identity mixed-eth-ipv4-acl-type {
          base acl:eth-acl-type;acl:ipv4-acl-type;
          description
            "An ACL that contains a mix of entries that match
    on fields in Ethernet headers and in IPv4 headers.
    Matching on Layer 4 header fields may also exist in the
    list.";
        }
    
        identity mixed-eth-ipv6-acl-type {
          base acl:eth-acl-type;acl:ipv6-acl-type;
          description
            "An ACL that contains a mix of entries that match on fields
    in Ethernet headers and in IPv6 headers.  Matching
    on Layer 4 header fields may also exist in the list.";
        }
    
        identity mixed-eth-ipv4-ipv6-acl-type {
          base acl:eth-acl-type;acl:ipv4-acl-type;acl:ipv6-acl-type;
          description
            "An ACL that contains a mix of entries that
    match on fields in Ethernet headers, IPv4 headers, and IPv6
    headers.  Matching on Layer 4 header fields may also exist
    in the list.";
        }
    
        feature match-on-eth {
          description
            "The device can support matching on Ethernet headers.";
        }
    
        feature match-on-ipv4 {
          description
            "The device can support matching on IPv4 headers.";
        }
    
        feature match-on-ipv6 {
          description
            "The device can support matching on IPv6 headers.";
        }
    
        feature match-on-tcp {
          description
            "The device can support matching on TCP headers.";
        }
    
        feature match-on-udp {
          description
            "The device can support matching on UDP headers.";
        }
    
        feature match-on-icmp {
          description
            "The device can support matching on ICMP (v4 and v6) headers.";
        }
    
        feature eth {
          if-feature match-on-eth;
          description
            "Plain Ethernet ACL supported.";
        }
    
        feature ipv4 {
          if-feature match-on-ipv4;
          description
            "Plain IPv4 ACL supported.";
        }
    
        feature ipv6 {
          if-feature match-on-ipv6;
          description
            "Plain IPv6 ACL supported.";
        }
    
        feature mixed-eth-ipv4 {
          if-feature match-on-eth and match-on-ipv4;
          description
            "Ethernet and IPv4 ACL combinations supported.";
        }
    
        feature mixed-eth-ipv6 {
          if-feature match-on-eth and match-on-ipv6;
          description
            "Ethernet and IPv6 ACL combinations supported.";
        }
    
        feature mixed-eth-ipv4-ipv6 {
          if-feature match-on-eth and match-on-ipv4
    and match-on-ipv6;
          description
            "Ethernet, IPv4, and IPv6 ACL combinations supported.";
        }
    
        feature interface-stats {
          description
            "ACL counters are available and reported only per interface.";
        }
    
        feature acl-aggregate-stats {
          description
            "ACL counters are aggregated over all interfaces and reported
    only per ACL entry.";
        }
    
        feature interface-attachment {
          description
            "ACLs are set on interfaces.";
        }
    
        typedef acl-type {
          type identityref {
            base acl-base;
          }
          description
            "This type is used to refer to an ACL type.";
        }
    
        container acls {
          description
            "This is a top-level container for Access Control Lists.
    It can have one or more acl nodes.";
          list acl {
            key "name";
            description
              "An ACL is an ordered list of ACEs.  Each ACE has a
    list of match criteria and a list of actions.
    Since there are several kinds of ACLs implemented
    with different attributes for different vendors,
    this model accommodates customizing ACLs for
    each kind and for each vendor.";
            leaf name {
              type string {
                length "1..64";
              }
              description
                "The name of the access list.  A device MAY further
    restrict the length of this name; space and special
    characters are not allowed.";
            }
    
            leaf type {
              type acl-type;
              description
                "Type of ACL.  Indicates the primary intended
    type of match criteria (e.g., Ethernet, IPv4, IPv6, mixed,
    etc.) used in the list instance.";
            }
    
            container aces {
              description
                "The aces container contains one or more ACE nodes.";
              list ace {
                key "name";
                ordered-by user;
                description "List of ACEs.";
                leaf name {
                  type string {
                    length "1..64";
                  }
                  description
                    "A unique name identifying this ACE.";
                }
    
                container matches {
                  description
                    "The rules in this set determine what fields will be
    matched upon before any action is taken on them.
    The rules are selected based on the feature set
    defined by the server and the acl-type defined.
    If no matches are defined in a particular container,
    then any packet will match that container.  If no
    matches are specified at all in an ACE, then any
    packet will match the ACE.";
                  choice l2 {
                    description
                      "Match Layer 2 headers, for example, Ethernet
    header fields.";
                    container eth {
                      when
                        "derived-from-or-self(/acls/acl/type, 'acl:eth-acl-type')";
                      if-feature match-on-eth;
                      description
                        "Rule set that matches Ethernet headers.";
                      leaf destination-mac-address {
                        type yang:mac-address;
                        description
                          "Destination IEEE 802 Media Access Control (MAC)
    address.";
                      }
    
                      leaf destination-mac-address-mask {
                        type yang:mac-address;
                        description
                          "Destination IEEE 802 MAC address mask.";
                      }
    
                      leaf source-mac-address {
                        type yang:mac-address;
                        description
                          "Source IEEE 802 MAC address.";
                      }
    
                      leaf source-mac-address-mask {
                        type yang:mac-address;
                        description
                          "Source IEEE 802 MAC address mask.";
                      }
    
                      leaf ethertype {
                        type eth:ethertype;
                        description
                          "The Ethernet Type (or Length) value represented
    in the canonical order defined by IEEE 802.
    The canonical representation uses lowercase
    characters.";
                        reference
                          "IEEE 802-2014, Clause 9.2.";
    
                      }
                    }  // container eth
                  }  // choice l2
    
                  choice l3 {
                    description
                      "Choice of either IPv4 or IPv6 headers";
                    container ipv4 {
                      when
                        "derived-from-or-self(/acls/acl/type, 'acl:ipv4-acl-type')";
                      if-feature match-on-ipv4;
                      description
                        "Rule set that matches IPv4 headers.";
                      leaf dscp {
                        type inet:dscp;
                        description
                          "Differentiated Services Code Point.";
                        reference
                          "RFC 2474: Definition of the Differentiated Services
                          	  Field (DS Field) in the IPv4 and IPv6
                          	  Headers.";
    
                      }
    
                      leaf ecn {
                        type uint8 {
                          range "0..3";
                        }
                        description
                          "Explicit Congestion Notification.";
                        reference
                          "RFC 3168: The Addition of Explicit Congestion
                          	  Notification (ECN) to IP.";
    
                      }
    
                      leaf length {
                        type uint16;
                        description
                          "In the IPv4 header field, this field is known as the Total
    Length.  Total Length is the length of the datagram, measured
    in octets, including internet header and data.
    
    In the IPv6 header field, this field is known as the Payload
    Length, which is the length of the IPv6 payload, i.e., the rest
    of the packet following the IPv6 header, in octets.";
                        reference
                          "RFC 791: Internet Protocol
                           RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.";
    
                      }
    
                      leaf ttl {
                        type uint8;
                        description
                          "This field indicates the maximum time the datagram is allowed
    to remain in the internet system.  If this field contains the
    value zero, then the datagram must be dropped.
    
    In IPv6, this field is known as the Hop Limit.";
                        reference
                          "RFC 791: Internet Protocol
                           RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.";
    
                      }
    
                      leaf protocol {
                        type uint8;
                        description
                          "Internet Protocol number.  Refers to the protocol of the
    payload.  In IPv6, this field is known as 'next-header',
    and if extension headers are present, the protocol is
    present in the 'upper-layer' header.";
                        reference
                          "RFC 791: Internet Protocol
                           RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.";
    
                      }
    
                      leaf ihl {
                        type uint8 {
                          range "5..60";
                        }
                        description
                          "In an IPv4 header field, the Internet Header Length (IHL) is
    the length of the internet header in 32-bit words and
    thus points to the beginning of the data.  Note that the
    minimum value for a correct header is 5.";
                      }
    
                      leaf flags {
                        type bits {
                          bit reserved {
                            position 0;
                            description
                              "Reserved.  Must be zero.";
                          }
                          bit fragment {
                            position 1;
                            description
                              "Setting the value to 0 indicates may fragment, while
    setting the value to 1 indicates do not fragment.";
                          }
                          bit more {
                            position 2;
                            description
                              "Setting the value to 0 indicates this is the last fragment,
    and setting the value to 1 indicates more fragments are
    coming.";
                          }
                        }
                        description
                          "Bit definitions for the Flags field in the IPv4 header.";
                      }
    
                      leaf offset {
                        type uint16 {
                          range "20..65535";
                        }
                        description
                          "The fragment offset is measured in units of 8 octets (64 bits).
    The first fragment has offset zero.  The length is 13 bits";
                      }
    
                      leaf identification {
                        type uint16;
                        description
                          "An identifying value assigned by the sender to aid in
    assembling the fragments of a datagram.";
                      }
    
                      choice destination-network {
                        description
                          "Choice of specifying a destination IPv4 address or
    referring to a group of IPv4 destination addresses.";
                        leaf destination-ipv4-network {
                          type inet:ipv4-prefix;
                          description
                            "Destination IPv4 address prefix.";
                        }
                      }  // choice destination-network
    
                      choice source-network {
                        description
                          "Choice of specifying a source IPv4 address or
    referring to a group of IPv4 source addresses.";
                        leaf source-ipv4-network {
                          type inet:ipv4-prefix;
                          description
                            "Source IPv4 address prefix.";
                        }
                      }  // choice source-network
    
                      leaf src-dnsname {
                        type inet:host;
                        description
                          "domain name to be matched against.";
                      }
    
                      leaf dst-dnsname {
                        type inet:host;
                        description
                          "domain name to be matched against.";
                      }
                    }  // container ipv4
                    container ipv6 {
                      when
                        "derived-from-or-self(/acls/acl/type, 'acl:ipv6-acl-type')";
                      if-feature match-on-ipv6;
                      description
                        "Rule set that matches IPv6 headers.";
                      leaf dscp {
                        type inet:dscp;
                        description
                          "Differentiated Services Code Point.";
                        reference
                          "RFC 2474: Definition of the Differentiated Services
                          	  Field (DS Field) in the IPv4 and IPv6
                          	  Headers.";
    
                      }
    
                      leaf ecn {
                        type uint8 {
                          range "0..3";
                        }
                        description
                          "Explicit Congestion Notification.";
                        reference
                          "RFC 3168: The Addition of Explicit Congestion
                          	  Notification (ECN) to IP.";
    
                      }
    
                      leaf length {
                        type uint16;
                        description
                          "In the IPv4 header field, this field is known as the Total
    Length.  Total Length is the length of the datagram, measured
    in octets, including internet header and data.
    
    In the IPv6 header field, this field is known as the Payload
    Length, which is the length of the IPv6 payload, i.e., the rest
    of the packet following the IPv6 header, in octets.";
                        reference
                          "RFC 791: Internet Protocol
                           RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.";
    
                      }
    
                      leaf ttl {
                        type uint8;
                        description
                          "This field indicates the maximum time the datagram is allowed
    to remain in the internet system.  If this field contains the
    value zero, then the datagram must be dropped.
    
    In IPv6, this field is known as the Hop Limit.";
                        reference
                          "RFC 791: Internet Protocol
                           RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.";
    
                      }
    
                      leaf protocol {
                        type uint8;
                        description
                          "Internet Protocol number.  Refers to the protocol of the
    payload.  In IPv6, this field is known as 'next-header',
    and if extension headers are present, the protocol is
    present in the 'upper-layer' header.";
                        reference
                          "RFC 791: Internet Protocol
                           RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.";
    
                      }
    
                      choice destination-network {
                        description
                          "Choice of specifying a destination IPv6 address
    or referring to a group of IPv6 destination
    addresses.";
                        leaf destination-ipv6-network {
                          type inet:ipv6-prefix;
                          description
                            "Destination IPv6 address prefix.";
                        }
                      }  // choice destination-network
    
                      choice source-network {
                        description
                          "Choice of specifying a source IPv6 address or
    referring to a group of IPv6 source addresses.";
                        leaf source-ipv6-network {
                          type inet:ipv6-prefix;
                          description
                            "Source IPv6 address prefix.";
                        }
                      }  // choice source-network
    
                      leaf flow-label {
                        type inet:ipv6-flow-label;
                        description
                          "IPv6 Flow label.";
                      }
    
                      leaf src-dnsname {
                        type inet:host;
                        description
                          "domain name to be matched against.";
                      }
    
                      leaf dst-dnsname {
                        type inet:host;
                        description
                          "domain name to be matched against.";
                      }
                    }  // container ipv6
                  }  // choice l3
    
                  choice l4 {
                    description
                      "Choice of TCP, UDP, or ICMP headers.";
                    container tcp {
                      if-feature match-on-tcp;
                      description
                        "Rule set that matches TCP headers.";
                      leaf sequence-number {
                        type uint32;
                        description
                          "Sequence number that appears in the packet.";
                      }
    
                      leaf acknowledgement-number {
                        type uint32;
                        description
                          "The acknowledgement number that appears in the
    packet.";
                      }
    
                      leaf data-offset {
                        type uint8 {
                          range "5..15";
                        }
                        description
                          "Specifies the size of the TCP header in 32-bit
    words.  The minimum size header is 5 words and
    the maximum is 15 words; thus, this gives a
    minimum size of 20 bytes and a maximum of 60
    bytes, allowing for up to 40 bytes of options
    in the header.";
                      }
    
                      leaf reserved {
                        type uint8;
                        description
                          "Reserved for future use.";
                      }
    
                      leaf flags {
                        type bits {
                          bit cwr {
                            position 1;
                            description
                              "The Congestion Window Reduced (CWR) flag is set
    by the sending host to indicate that it received
    a TCP segment with the ECN-Echo (ECE) flag set
    and had responded in the congestion control
    mechanism.";
                            reference
                              "RFC 3168: The Addition of Explicit Congestion
                              	  Notification (ECN) to IP.";
    
                          }
                          bit ece {
                            position 2;
                            description
                              "ECN-Echo has a dual role, depending on the value
    of the SYN flag.  It indicates the following: if
    the SYN flag is set (1), the TCP peer is ECN
    capable, and if the SYN flag is clear (0), a packet
    with the Congestion Experienced flag set (ECN=11)
    in the IP header was received during normal
    transmission (added to the header by RFC 3168).
    This serves as an indication of network congestion
    (or impending congestion) to the TCP sender.";
                            reference
                              "RFC 3168: The Addition of Explicit Congestion
                              	  Notification (ECN) to IP.";
    
                          }
                          bit urg {
                            position 3;
                            description
                              "Indicates that the Urgent Pointer field is significant.";
                          }
                          bit ack {
                            position 4;
                            description
                              "Indicates that the Acknowledgement field is significant.
    All packets after the initial SYN packet sent by the
    client should have this flag set.";
                          }
                          bit psh {
                            position 5;
                            description
                              "Push function.  Asks to push the buffered data to the
    receiving application.";
                          }
                          bit rst {
                            position 6;
                            description
                              "Reset the connection.";
                          }
                          bit syn {
                            position 7;
                            description
                              "Synchronize sequence numbers.  Only the first packet
    sent from each end should have this flag set.  Some
    other flags and fields change meaning based on this
    flag, and some are only valid for when it is set,
    and others when it is clear.";
                          }
                          bit fin {
                            position 8;
                            description
                              "Last package from the sender.";
                          }
                        }
                        description
                          "Also known as Control Bits.  Contains nine 1-bit flags.";
                        reference
                          "RFC 793: Transmission Control Protocol.";
    
                      }
    
                      leaf window-size {
                        type uint16;
                        units "bytes";
                        description
                          "The size of the receive window, which specifies
    the number of window size units beyond the segment
    identified by the sequence number in the Acknowledgement
    field that the sender of this segment is currently
    willing to receive.";
                      }
    
                      leaf urgent-pointer {
                        type uint16;
                        description
                          "This field is an offset from the sequence number
    indicating the last urgent data byte.";
                      }
    
                      leaf options {
                        type binary {
                          length "1..40";
                        }
                        description
                          "The length of this field is determined by the
    Data Offset field.  Options have up to three
    fields: Option-Kind (1 byte), Option-Length
    (1 byte), and Option-Data (variable).  The Option-Kind
    field indicates the type of option and is the
    only field that is not optional.  Depending on
    what kind of option we are dealing with,
    the next two fields may be set: the Option-Length
    field indicates the total length of the option,
    and the Option-Data field contains the value of
    the option, if applicable.";
                      }
    
                      container source-port {
                        description
                          "Source port definition.";
                        choice source-port {
                          description
                            "Choice of source port definition using
    range/operator or a choice to support future
    'case' statements, such as one enabling a
    group of source ports to be referenced.";
                          case range-or-operator {
                            description
                              "Source port definition from range or
    operator.";
                            choice port-range-or-operator {
                              description
                                "Choice of specifying a port range or a single
    port along with an operator.";
                              case range {
                                leaf lower-port {
                                  type inet:port-number;
                                  must
                                    ". <= ../upper-port" {
                                    error-message
                                      "The lower-port must be less than or equal to
    the upper-port.";
                                  }
                                  mandatory
                                    true;
                                  description
                                    "Lower boundary for a port.";
                                }
    
                                leaf upper-port {
                                  type inet:port-number;
                                  mandatory
                                    true;
                                  description
                                    "Upper boundary for a port.";
                                }
                              }  // case range
    
                              case operator {
                                leaf operator {
                                  type operator;
                                  default "eq";
                                  description
                                    "Operator to be applied on the port below.";
                                }
    
                                leaf port {
                                  type inet:port-number;
                                  mandatory
                                    true;
                                  description
                                    "Port number along with the operator on which to
    match.";
                                }
                              }  // case operator
                            }  // choice port-range-or-operator
                          }  // case range-or-operator
                        }  // choice source-port
                      }  // container source-port
    
                      container destination-port {
                        description
                          "Destination port definition.";
                        choice destination-port {
                          description
                            "Choice of destination port definition using
    range/operator or a choice to support future
    'case' statements, such as one enabling a
    group of destination ports to be referenced.";
                          case range-or-operator {
                            description
                              "Destination port definition from range or
    operator.";
                            choice port-range-or-operator {
                              description
                                "Choice of specifying a port range or a single
    port along with an operator.";
                              case range {
                                leaf lower-port {
                                  type inet:port-number;
                                  must
                                    ". <= ../upper-port" {
                                    error-message
                                      "The lower-port must be less than or equal to
    the upper-port.";
                                  }
                                  mandatory
                                    true;
                                  description
                                    "Lower boundary for a port.";
                                }
    
                                leaf upper-port {
                                  type inet:port-number;
                                  mandatory
                                    true;
                                  description
                                    "Upper boundary for a port.";
                                }
                              }  // case range
    
                              case operator {
                                leaf operator {
                                  type operator;
                                  default "eq";
                                  description
                                    "Operator to be applied on the port below.";
                                }
    
                                leaf port {
                                  type inet:port-number;
                                  mandatory
                                    true;
                                  description
                                    "Port number along with the operator on which to
    match.";
                                }
                              }  // case operator
                            }  // choice port-range-or-operator
                          }  // case range-or-operator
                        }  // choice destination-port
                      }  // container destination-port
    
                      leaf direction-initiated {
                        type direction;
                        description
                          "This node matches based on which direction a
    connection was initiated.  The means by which that
    is determined is discussed in this document.";
                      }
                    }  // container tcp
                    container udp {
                      if-feature match-on-udp;
                      description
                        "Rule set that matches UDP headers.";
                      leaf length {
                        type uint16;
                        description
                          "A field that specifies the length in bytes of
    the UDP header and UDP data.  The minimum
    length is 8 bytes because that is the length of
    the header.  The field size sets a theoretical
    limit of 65,535 bytes (8-byte header plus 65,527
    bytes of data) for a UDP datagram.  However, the
    actual limit for the data length, which is
    imposed by the underlying IPv4 protocol, is
    65,507 bytes (65,535 minus 8-byte UDP header
    minus 20-byte IP header).
    
    In IPv6 jumbograms, it is possible to have
    UDP packets of a size greater than 65,535 bytes.
    RFC 2675 specifies that the Length field is set
    to zero if the length of the UDP header plus
    UDP data is greater than 65,535.";
                      }
    
                      container source-port {
                        description
                          "Source port definition.";
                        choice source-port {
                          description
                            "Choice of source port definition using
    range/operator or a choice to support future
    'case' statements, such as one enabling a
    group of source ports to be referenced.";
                          case range-or-operator {
                            description
                              "Source port definition from range or
    operator.";
                            choice port-range-or-operator {
                              description
                                "Choice of specifying a port range or a single
    port along with an operator.";
                              case range {
                                leaf lower-port {
                                  type inet:port-number;
                                  must
                                    ". <= ../upper-port" {
                                    error-message
                                      "The lower-port must be less than or equal to
    the upper-port.";
                                  }
                                  mandatory
                                    true;
                                  description
                                    "Lower boundary for a port.";
                                }
    
                                leaf upper-port {
                                  type inet:port-number;
                                  mandatory
                                    true;
                                  description
                                    "Upper boundary for a port.";
                                }
                              }  // case range
    
                              case operator {
                                leaf operator {
                                  type operator;
                                  default "eq";
                                  description
                                    "Operator to be applied on the port below.";
                                }
    
                                leaf port {
                                  type inet:port-number;
                                  mandatory
                                    true;
                                  description
                                    "Port number along with the operator on which to
    match.";
                                }
                              }  // case operator
                            }  // choice port-range-or-operator
                          }  // case range-or-operator
                        }  // choice source-port
                      }  // container source-port
    
                      container destination-port {
                        description
                          "Destination port definition.";
                        choice destination-port {
                          description
                            "Choice of destination port definition using
    range/operator or a choice to support future
    'case' statements, such as one enabling a
    group of destination ports to be referenced.";
                          case range-or-operator {
                            description
                              "Destination port definition from range or
    operator.";
                            choice port-range-or-operator {
                              description
                                "Choice of specifying a port range or a single
    port along with an operator.";
                              case range {
                                leaf lower-port {
                                  type inet:port-number;
                                  must
                                    ". <= ../upper-port" {
                                    error-message
                                      "The lower-port must be less than or equal to
    the upper-port.";
                                  }
                                  mandatory
                                    true;
                                  description
                                    "Lower boundary for a port.";
                                }
    
                                leaf upper-port {
                                  type inet:port-number;
                                  mandatory
                                    true;
                                  description
                                    "Upper boundary for a port.";
                                }
                              }  // case range
    
                              case operator {
                                leaf operator {
                                  type operator;
                                  default "eq";
                                  description
                                    "Operator to be applied on the port below.";
                                }
    
                                leaf port {
                                  type inet:port-number;
                                  mandatory
                                    true;
                                  description
                                    "Port number along with the operator on which to
    match.";
                                }
                              }  // case operator
                            }  // choice port-range-or-operator
                          }  // case range-or-operator
                        }  // choice destination-port
                      }  // container destination-port
                    }  // container udp
                    container icmp {
                      if-feature match-on-icmp;
                      description
                        "Rule set that matches ICMP headers.";
                      leaf type {
                        type uint8;
                        description
                          "Also known as control messages.";
                        reference
                          "RFC 792: Internet Control Message Protocol
                           RFC 4443: Internet Control Message Protocol (ICMPv6)
                          	  for Internet Protocol Version 6 (IPv6)
                          	  Specification.";
    
                      }
    
                      leaf code {
                        type uint8;
                        description
                          "ICMP subtype.  Also known as control messages.";
                        reference
                          "RFC 792: Internet Control Message Protocol
                           RFC 4443: Internet Control Message Protocol (ICMPv6)
                          	  for Internet Protocol Version 6 (IPv6)
                          	  Specification.";
    
                      }
    
                      leaf rest-of-header {
                        type binary;
                        description
                          "Unbounded in length, the contents vary based on the
    ICMP type and code.  Also referred to as 'Message Body'
    in ICMPv6.";
                        reference
                          "RFC 792: Internet Control Message Protocol
                           RFC 4443: Internet Control Message Protocol (ICMPv6)
                          	  for Internet Protocol Version 6 (IPv6)
                          	  Specification.";
    
                      }
                    }  // container icmp
                  }  // choice l4
    
                  leaf egress-interface {
                    type if:interface-ref;
                    description
                      "Egress interface.  This should not be used if this ACL
    is attached as an egress ACL (or the value should
    equal the interface to which the ACL is attached).";
                  }
    
                  leaf ingress-interface {
                    type if:interface-ref;
                    description
                      "Ingress interface.  This should not be used if this ACL
    is attached as an ingress ACL (or the value should
    equal the interface to which the ACL is attached).";
                  }
    
                  container mud {
                    description
                      "MUD-specific matches.";
                    leaf manufacturer {
                      type inet:host;
                      description
                        "A domain that is intended to match the authority
    section of the MUD URL.  This node is used to specify
    one or more manufacturers a device should
    be authorized to access.";
                    }
    
                    leaf same-manufacturer {
                      type empty;
                      description
                        "This node matches the authority section of the MUD URL
    of a Thing.  It is intended to grant access to all
    devices with the same authority section.";
                    }
    
                    leaf model {
                      type inet:uri;
                      description
                        "Devices of the specified model type will match if
    they have an identical MUD URL.";
                    }
    
                    leaf local-networks {
                      type empty;
                      description
                        "IP addresses will match this node if they are
    considered local addresses.  A local address may be
    a list of locally defined prefixes and masks
    that indicate a particular administrative scope.";
                    }
    
                    leaf controller {
                      type inet:uri;
                      description
                        "This node names a class that has associated with it
    zero or more IP addresses to match against.  These
    may be scoped to a manufacturer or via a standard
    URN.";
                    }
    
                    leaf my-controller {
                      type empty;
                      description
                        "This node matches one or more network elements that
    have been configured to be the controller for this
    Thing, based on its MUD URL.";
                    }
                  }  // container mud
                }  // container matches
    
                container actions {
                  description
                    "Definition of actions for this ace entry.";
                  leaf forwarding {
                    type identityref {
                      base forwarding-action;
                    }
                    mandatory true;
                    description
                      "Specifies the forwarding action per ace entry.";
                  }
    
                  leaf logging {
                    type identityref {
                      base log-action;
                    }
                    default "log-none";
                    description
                      "Specifies the log action and destination for
    matched packets.  Default value is not to log the
    packet.";
                  }
                }  // container actions
    
                container statistics {
                  if-feature acl-aggregate-stats;
                  config false;
                  description
                    "Statistics gathered across all attachment points for the
    given ACL.";
                  leaf matched-packets {
                    type yang:counter64;
                    config false;
                    description
                      "Count of the number of packets matching the current ACL
    entry.
    
    An implementation should provide this counter on a
    per-interface, per-ACL-entry basis if possible.
    
    If an implementation only supports ACL counters on a per-
    entry basis (i.e., not broken out per interface), then the
    value should be equal to the aggregate count across all
    interfaces.
    
    An implementation that provides counters on a per-entry, per-
    interface basis is not required to also provide an aggregate
    count, e.g., per entry -- the user is expected to be able to
    implement the required aggregation if such a count is
    needed.";
                  }
    
                  leaf matched-octets {
                    type yang:counter64;
                    config false;
                    description
                      "Count of the number of octets (bytes) matching the current
    ACL entry.
    
    An implementation should provide this counter on a
    per-interface, per-ACL-entry basis if possible.
    
    If an implementation only supports ACL counters per entry
    (i.e., not broken out per interface), then the value
    should be equal to the aggregate count across all interfaces.
    
    An implementation that provides counters per entry per
    interface is not required to also provide an aggregate count,
    e.g., per entry -- the user is expected to be able to
    implement the required aggregation if such a count is needed.";
                  }
                }  // container statistics
              }  // list ace
            }  // container aces
          }  // list acl
    
          container attachment-points {
            description
              "Enclosing container for the list of
    attachment points on which ACLs are set.";
            list interface {
              if-feature interface-attachment;
              key "interface-id";
              description
                "List of interfaces on which ACLs are set.";
              leaf interface-id {
                type if:interface-ref;
                description
                  "Reference to the interface id list key.";
              }
    
              container ingress {
                description
                  "The ACLs applied to the ingress interface.";
                container acl-sets {
                  description
                    "Enclosing container for the list of ingress ACLs on the
    interface.";
                  list acl-set {
                    key "name";
                    ordered-by user;
                    description
                      "List of ingress ACLs on the interface.";
                    leaf name {
                      type leafref {
                        path "/acls/acl/name";
                      }
                      description
                        "Reference to the ACL name applied on the ingress.";
                    }
    
                    list ace-statistics {
                      if-feature interface-stats;
                      key "name";
                      config false;
                      description
                        "List of ACEs.";
                      leaf name {
                        type leafref {
                          path "/acls/acl/aces/ace/name";
                        }
                        description
                          "Name of the ace entry.";
                      }
    
                      leaf matched-packets {
                        type yang:counter64;
                        config false;
                        description
                          "Count of the number of packets matching the current ACL
    entry.
    
    An implementation should provide this counter on a
    per-interface, per-ACL-entry basis if possible.
    
    If an implementation only supports ACL counters on a per-
    entry basis (i.e., not broken out per interface), then the
    value should be equal to the aggregate count across all
    interfaces.
    
    An implementation that provides counters on a per-entry, per-
    interface basis is not required to also provide an aggregate
    count, e.g., per entry -- the user is expected to be able to
    implement the required aggregation if such a count is
    needed.";
                      }
    
                      leaf matched-octets {
                        type yang:counter64;
                        config false;
                        description
                          "Count of the number of octets (bytes) matching the current
    ACL entry.
    
    An implementation should provide this counter on a
    per-interface, per-ACL-entry basis if possible.
    
    If an implementation only supports ACL counters per entry
    (i.e., not broken out per interface), then the value
    should be equal to the aggregate count across all interfaces.
    
    An implementation that provides counters per entry per
    interface is not required to also provide an aggregate count,
    e.g., per entry -- the user is expected to be able to
    implement the required aggregation if such a count is needed.";
                      }
                    }  // list ace-statistics
                  }  // list acl-set
                }  // container acl-sets
              }  // container ingress
    
              container egress {
                description
                  "The ACLs applied to the egress interface.";
                container acl-sets {
                  description
                    "Enclosing container for the list of ingress ACLs on the
    interface.";
                  list acl-set {
                    key "name";
                    ordered-by user;
                    description
                      "List of ingress ACLs on the interface.";
                    leaf name {
                      type leafref {
                        path "/acls/acl/name";
                      }
                      description
                        "Reference to the ACL name applied on the ingress.";
                    }
    
                    list ace-statistics {
                      if-feature interface-stats;
                      key "name";
                      config false;
                      description
                        "List of ACEs.";
                      leaf name {
                        type leafref {
                          path "/acls/acl/aces/ace/name";
                        }
                        description
                          "Name of the ace entry.";
                      }
    
                      leaf matched-packets {
                        type yang:counter64;
                        config false;
                        description
                          "Count of the number of packets matching the current ACL
    entry.
    
    An implementation should provide this counter on a
    per-interface, per-ACL-entry basis if possible.
    
    If an implementation only supports ACL counters on a per-
    entry basis (i.e., not broken out per interface), then the
    value should be equal to the aggregate count across all
    interfaces.
    
    An implementation that provides counters on a per-entry, per-
    interface basis is not required to also provide an aggregate
    count, e.g., per entry -- the user is expected to be able to
    implement the required aggregation if such a count is
    needed.";
                      }
    
                      leaf matched-octets {
                        type yang:counter64;
                        config false;
                        description
                          "Count of the number of octets (bytes) matching the current
    ACL entry.
    
    An implementation should provide this counter on a
    per-interface, per-ACL-entry basis if possible.
    
    If an implementation only supports ACL counters per entry
    (i.e., not broken out per interface), then the value
    should be equal to the aggregate count across all interfaces.
    
    An implementation that provides counters per entry per
    interface is not required to also provide an aggregate count,
    e.g., per entry -- the user is expected to be able to
    implement the required aggregation if such a count is needed.";
                      }
                    }  // list ace-statistics
                  }  // list acl-set
                }  // container acl-sets
              }  // container egress
            }  // list interface
          }  // container attachment-points
        }  // container acls
      }  // module ietf-access-control-list
    

© 2023 YumaWorks, Inc. All rights reserved.