module Cisco-IOS-XE-acl { yang-version 1.1; namespace "http://cisco.com/ns/yang/Cisco-IOS-XE-acl"; prefix ios-acl; import cisco-semver { prefix cisco-semver; } import Cisco-IOS-XE-types { prefix ios-types; } import Cisco-IOS-XE-native { prefix ios; } import Cisco-IOS-XE-object-group { prefix ios-og; } import ietf-inet-types { prefix inet; } import Cisco-IOS-XE-features { prefix ios-features; } organization "Cisco Systems, Inc."; contact "Cisco Systems, Inc. Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 Tel: +1 1800 553-NETS E-mail: cs-yang@cisco.com"; description "Cisco XE Native Access Control List (ACL) Yang model. Copyright (c) 2016-2020, 2024 by Cisco Systems, Inc. All rights reserved."; revision 2025-03-01 { description "- Changed remark node from leaf to leaf-list"; cisco-semver:module-version "5.1.0"; } revision 2024-11-01 { description "- Fixed over written issue when extended ACL with ACE and remark on same sequence number is configured - Change mac access-list 'id' type from string to ext-acl-type"; cisco-semver:module-version "5.0.0"; } revision 2024-07-01 { description "- Moving uses ipv4-acl-icmp-match statement - Removing check of icmp protocol - Changed deprecated nodes to obsolete - Src and Dst ports cannot be configured with the ICMP protocol - Adding entry-v2 with ordered-by-user under config-mac-access-list-grouping - Enhance mac access-list mac address modeling to allow capitol letters A-F"; cisco-semver:module-version "4.1.0"; } revision 2024-03-01 { description "- Added when condition for icmp as src and dst not part of it - Added when condition for v6 ACL for service OG"; cisco-semver:module-version "4.0.0"; } revision 2023-11-01 { description "- Support for v6 service OG model - Added Management Traffic Control feature support - Adding object-group as part of protocol list in v6 service OG"; cisco-semver:module-version "3.0.0"; } revision 2023-07-01 { description "- Added support of established keyword in ipv6 role-based access-list - Moving established leaf in role-based ACL specific to TCP"; cisco-semver:module-version "2.5.0"; } revision 2023-03-01 { description "- Update pattern of leaf values"; cisco-semver:module-version "2.4.0"; } revision 2022-11-01 { description "- Update yang-version to 1.1 - Added reflexive ACL support for IPV4"; cisco-semver:module-version "2.3.0"; } revision 2021-07-01 { description "- Deprecated named-rb-acl list for ipv6 role-based access-list. - Update pattern of leaf dynamic. - Added role-base list for ipv6 role-based access-list"; cisco-semver:module-version "2.2.0"; } revision 2021-03-01 { description "- Deprecate ipv4-prefix-case"; cisco-semver:module-version "2.1.0"; } revision 2020-11-01 { description "- Fixed command sequence issue in role based acl for 17.4.1 - Added few port names to acl-port-type - Added support of associating ACL with Geolocation group"; cisco-semver:module-version "2.0.0"; } revision 2020-03-01 { description "- Added support for FQDN group based ACL"; cisco-semver:module-version "1.2.0"; } revision 2019-11-01 { description "-Added access-list limit config -Added multiple port-match for ipv6 ACLs"; cisco-semver:module-version "1.1.0"; } revision 2019-07-01 { description "Establish semantic version baseline"; cisco-semver:module-version "1.0.0"; } revision 2019-01-29 { description "Moved tailf:cli-break-sequence-commands to acl-tcp-common-match"; } revision 2018-12-14 { description "Fixing mac access-list extended model backward compatibility issue"; } revision 2018-12-13 { description "Fixed IPv6 ACL Remark Model"; } revision 2018-11-13 { description "Moved the uses acl-tcp-common-match statement"; } revision 2018-11-01 { description "Update references to object-groups to leafrefs"; } revision 2018-09-05 { description "Added mac access-list extended model"; } revision 2018-08-31 { description "Modify the pattern string of leaf values under container access-list to match (any) keyword "; } revision 2018-06-25 { description "Add multiple ports match"; } revision 2017-08-01 { description "Removed ordered-by-user for acl lists"; } revision 2017-07-31 { description "Restored ipv4 acl name type to union"; } revision 2017-05-26 { description "MAC access list entry key turned into a blob"; } revision 2017-05-17 { description "inet:ipv6-prefix changed to ios-types:ipv6-prefix"; } revision 2017-05-16 { description "Removed access-list data model"; } revision 2017-05-02 { description "MAC access list entry made a list"; } revision 2017-04-25 { description "Updated MAC access list target "; } revision 2017-03-24 { description "Removed when clause"; } typedef acl-port-type { type union { type uint16; type enumeration { enum bgp { value 179; } enum chargen { value 19; } enum daytime { value 13; } enum discard { value 9; } enum domain { value 53; } enum echo { value 7; } enum finger { value 79; } enum ftp { value 21; } enum ftp-data { value 20; } enum gopher { value 70; } enum hostname { value 101; } enum ident { value 113; } enum irc { value 194; } enum klogin { value 543; } enum kshell { value 544; } enum lpd { value 515; } enum msrpc { value 135; } enum nntp { value 119; } enum pim-auto-rp { value 496; } enum pop2 { value 109; } enum pop3 { value 110; } enum smtp { value 25; } enum sunrpc { value 111; } enum tacacs { value 49; } enum talk { value 517; } enum telnet { value 23; } enum time { value 37; } enum uucp { value 540; } enum whois { value 43; } enum www { value 80; } enum biff { value 512; } enum bootpc { value 68; } enum bootps { value 67; } enum dnsix { value 195; } enum isakmp { value 500; } enum mobile-ip { value 434; } enum nameserver { value 42; } enum netbios-dgm { value 138; } enum netbios-ns { value 137; } enum netbios-ss { value 139; } enum non500-isakmp { value 4500; } enum ntp { value 123; } enum rip { value 520; } enum ripv6 { value 521; } enum snmp { value 161; } enum snmptrap { value 162; } enum syslog { value 514; } enum tftp { value 69; } enum who { value 513; } enum xdmcp { value 177; } enum onep-plain { value 15001; } enum onep-tls { value 15002; } enum login; enum exec; enum cmd; } } } grouping access-list-ip-grouping { container ip { description "Any Internet Protocol"; container host { description "A single source host"; list ipv4-or-hostname { key "ipv4-or-hostname"; leaf ipv4-or-hostname { description "Source address"; type inet:host; } container host { description "A single destination host"; list ipv4-or-hostname { key "ipv4-or-hostname"; leaf ipv4-or-hostname { description "Destination address"; type inet:host; } container dscp { description "Match packets with given dscp value"; leaf dscp-val { type ios-types:dscp-type; } } leaf time-range { description "Time-range entry name"; type string; } container tos { description "Match packets with given TOS value"; leaf range { description "Type of service value"; type uint8 { range "0..15"; } } leaf max-reliability { description "Match packets with max reliable TOS (2)"; type empty; } leaf max-throughput { description "Match packets with max throughput TOS (4)"; type empty; } leaf min-delay { description "Match packets with min delay TOS (8)"; type empty; } leaf min-monetary-cost { description "Match packets with min monetary cost TOS (1)"; type empty; } leaf normal { description "Match packets with normal TOS (0)"; type empty; } } } } } } } } grouping ipv4-acl-icmp-match { choice icmp-msg-choice { case icmp-msg-type-code { leaf msg-type { type uint8; } leaf msg-code { type uint8; } } case named-msg-type-case { leaf named-msg-type { type enumeration { enum administratively-prohibited; enum alternate-address; enum conversion-error; enum dod-host-prohibited; enum dod-net-prohibited; enum echo; enum echo-reply; enum general-parameter-problem; enum host-isolated; enum host-precedence-unreachable; enum host-redirect; enum host-tos-redirect; enum host-tos-unreachable; enum host-unknown; enum host-unreachable; enum information-reply; enum information-request; enum mask-reply; enum mask-request; enum mobile-redirect; enum net-redirect; enum net-tos-redirect; enum net-tos-unreachable; enum net-unreachable; enum network-unknown; enum no-room-for-option; enum option-missing; enum packet-too-big; enum parameter-problem; enum port-unreachable; enum precedence-unreachable; enum protocol-unreachable; enum reassembly-timeout; enum redirect; enum router-advertisement; enum router-solicitation; enum source-quench; enum source-route-failed; enum time-exceeded; enum timestamp-reply; enum timestamp-request; enum traceroute; enum ttl-exceeded; enum unreachable; } } } } } grouping ipv6-acl-icmp-match { choice icmp_choice { case msg-type-code { leaf msg-type-case { type uint8; } leaf msg-code { type uint8; } } case named-msg-type-case { leaf named-msg-type { type enumeration { enum beyond-scope; enum destination-unreachable; enum dhaad-reply; enum dhaad-request; enum echo-reply; enum echo-request; enum header; enum hop-limit; enum mld-query; enum mld-reduction; enum mld-report; enum mpd-advertisement; enum mpd-solicitation; enum nd-na; enum nd-ns; enum next-header; enum no-admin; enum no-route; enum packet-too-big; enum parameter-option; enum parameter-problem; enum port-unreachable; enum reassembly-timeout; enum redirect; enum reject-route; enum renum-command; enum renum-result; enum renum-seq-number; enum router-advertisement; enum router-renumbering; enum router-solicitation; enum source-policy; enum time-exceeded; enum unreachable; } } } } } grouping tcp-port-choice-grouping { choice tcp-port-choice { case tcp-port-eq-case { leaf tcp-eq { type ios-types:tcp-port-type; } } case tcp-port-lt-case { leaf tcp-lt { type ios-types:tcp-port-type; } } case tcp-port-gt-case { leaf tcp-gt { type ios-types:tcp-port-type; } } case tcp-port-neq-case { leaf tcp-neq { type ios-types:tcp-port-type; } } case tcp-port-range-case { leaf tcp-range-min { type ios-types:tcp-port-type; } leaf tcp-range-max { type ios-types:tcp-port-type; } } } } grouping udp-port-choice-grouping { choice udp-port-choice { case udp-port-eq-case { leaf udp-eq { type ios-types:udp-port-type; } } case udp-port-lt-case { leaf udp-lt { type ios-types:udp-port-type; } } case udp-port-gt-case { leaf udp-gt { type ios-types:udp-port-type; } } case udp-port-neq-case { leaf udp-neq { type ios-types:udp-port-type; } } case udp-port-range-case { leaf udp-range-min { type ios-types:udp-port-type; } leaf udp-range-max { type ios-types:udp-port-type; } } } } grouping ipv4-acl-tcp-bit-match { leaf plusack { description "Match on ACK set"; type empty; } leaf plusfin { description "Match on FIN set"; type empty; } leaf pluspsh { description "Match on PSH set"; type empty; } leaf plusrst { description "Match on RST set"; type empty; } leaf plussyn { description "Match on SYN set"; type empty; } leaf plusurg { description "Match on URG set"; type empty; } leaf minusack { description "Match on ACK not set"; type empty; } leaf minusfin { description "Match on FIN not set"; type empty; } leaf minuspsh { description "Match on PSH not set"; type empty; } leaf minusrst { description "Match on RST not set"; type empty; } leaf minussyn { description "Match on SYN not set"; type empty; } leaf minusurg { description "Match on URG not set"; type empty; } } grouping ipv4-acl-tcp-match { container match-all { description "Match if all specified flags are present"; uses ipv4-acl-tcp-bit-match; } container match-any { description "Match if any specified flags is present"; uses ipv4-acl-tcp-bit-match; } } grouping acl-tcp-common-match { leaf ack { description "Match on the ACK bit"; type empty; } leaf fin { description "Match on the FIN bit"; type empty; } leaf psh { description "Match on the PSH bit"; type empty; } leaf rst { description "Match on the RST bit"; type empty; } leaf syn { description "Match on the SYN bit"; type empty; } leaf urg { description "Match on the URG bit"; type empty; } leaf established { description "Match established connections"; type empty; } } grouping ipv4-acl-match-common-attribute { leaf dscp { description "Match packets with given dscp value"; type ios-types:dscp-type; } leaf fragments { description "Check non-initial fragments"; type empty; } leaf option { description "Match packets with given IP Options value"; type union { type uint8; type enumeration { enum add-ext; enum any-options; enum com-security; enum dps; enum encode; enum eool; enum ext-ip; enum ext-security; enum finn; enum imitd; enum lsr; enum mtup; enum mtur; enum no-op; enum nsapa; enum record-route; enum router-alert; enum sdb; enum security; enum ssr; enum stream-id; enum timestamp; enum traceroute; enum ump; enum visa; enum zsu; } } } leaf precedence { description "Match packets with given precedence value"; type union { type uint8 { range "0..7"; } type enumeration { enum critical; enum flash; enum flash-override; enum immediate; enum internet; enum network; enum priority; enum routine; } } } leaf time-range { description "Specify a time-range"; type string; } leaf tos { description "Match packets with given TOS value"; type union { type uint8 { range "0..15"; } type enumeration { enum max-reliability; enum max-throughput; enum min-delay; enum min-monetary-cost; enum normal; } } } container ttl { description "Match packets with given TTL value"; choice ttl-choice { case eq-case { leaf eq { description "Match only packets on a given TTL number"; type uint8; } } case gt-case { leaf gt { description "Match only packets on a given TTL number"; type uint8; } } case lt-case { leaf lt { description "Match only packets on a given TTL number"; type uint8; } } case neq-case { leaf neq { description "Match only packets on a given TTL number"; type uint8; } } case range-case { container range { description "Match only packets in the range of TTLs"; leaf value1 { type uint8; } leaf value2 { type uint8; } } } } } leaf log { description "Log matches against this entry"; type empty; } leaf log-input { description "Log matches against this entry, including input interface"; type empty; } } grouping acl-reflect-grouping { leaf reflect { description "ACL name to reflect"; if-feature "ios-features:reflexive-acl"; type string { pattern '[a-zA-Z].*'; } } } grouping ipv4-acl-match-common-attribute-new { leaf log { description "Log matches against this entry"; type empty; } leaf log-input { description "Log matches against this entry, including input interface"; type empty; } } grouping target-choice { choice target-choice { case any { leaf any { description "any MAC address"; type empty; } } case host { leaf host { description "A single host MAC address"; type string; } } case address { leaf mac-address { description "48-bit MAC address"; type string; } leaf mac-address-mask { description "48-bit MAC address"; type string; } } } } grouping ipv6-acl-match-common-attribute { leaf auth { description "Match on authentication header"; type empty; } leaf dest-option { description "Destination Option header (all types)"; type empty; } leaf dscp { description "Match packets with given dscp value"; type ios-types:dscp-type; } leaf flow-label { description "Flow label"; type uint32 { range "0..1048575"; } } leaf fragments { description "Check non-initial fragments"; type empty; } leaf hbh { description "Match on hop-by-hop option"; type empty; } leaf log { description "Log matches against this entry"; type empty; } leaf log-input { description "Log matches against this entry, including input"; type empty; } leaf mobility { description "Mobility header (all types)"; type empty; } leaf mobility-type { description "Mobility header with type"; type ios-types:mobility-type; } leaf routing { description "Routing header (all types)"; type empty; } leaf routing-type { description "Routing header with type"; type uint8; } leaf time-range { description "Specify a time-range"; type string; } } grouping acl-tcp-common-match-new { leaf established { description "Match established connections"; type empty; } } grouping ipv6-acl-match-common-attribute-new { leaf dscp { description "Match packets with given dscp value"; type ios-types:dscp-type-new; } choice log-choice { case log-case { leaf log { description "Log matches against this entry"; type empty; } } case log-input-case { leaf log-input { description "Log matches against this entry, including input"; type empty; } } } } grouping ace-log-grouping { leaf log { description "Log matches against this entry"; type empty; } } grouping ipv4-std-ace-grouping { container std-ace { choice source-choice { case ipv4-prefix-case { leaf ipv4-address-prefix { description "Network address prefix"; type inet:ipv4-address; } leaf ipv4-prefix { description "Network address prefix (OBSOLETE - use ipv4-address-prefix)"; status obsolete; type ios-types:ipv4-host; } leaf mask { description "Wildcard bits"; must '../ios-acl:ipv4-address-prefix' { error-message "Ipv4 address missing"; } type inet:ipv4-address; } } case any-case { leaf any { description "Any source prefix"; type empty; } } case host-case { leaf host-address { description "A single source host"; type inet:ipv4-address; } leaf host { description "A single source host (OBSOLETE - use host-address)"; status obsolete; type ios-types:ipv4-host; } } } uses ace-log-grouping; } } grouping ipv4-acl-src-dst-addr-port-grouping { choice source-choice { case ipv4-prefix-case { leaf ipv4-address { mandatory true; type inet:ipv4-address; } leaf mask { description "Source wildcard bits"; mandatory true; type inet:ipv4-address; } } case any-case { leaf any { description "Any source host"; type empty; } } case host-case { leaf host-address { description "A single source host"; type inet:ipv4-address; } leaf host { description "A single source host(OBSOLETE - use host-address)"; status obsolete; type ios-types:ipv4-host; } } case fqdn-group-case { leaf src-fqdn-group { description "Source FQDN group"; type leafref { path "/ios:native/ios:object-group/ios-og:fqdn/ios-og:name"; } } } case geo-group-case { leaf src-geo-group { description "Source geolocation group name"; type leafref { path "/ios:native/ios:object-group/ios-og:geo/ios-og:name"; } } } case object-group-case { leaf object-group { description "Source network object group"; type leafref { path "/ios:native/ios:object-group/ios-og:network/ios-og:name"; } } } } choice src-port-choice { when "protocol != 'icmp'"; case src-eq-case { leaf src-eq { description "Match only packets on a given port number up to 10 ports"; type acl-port-type; } leaf src-eq-port2 { type acl-port-type; } leaf src-eq-port3 { type acl-port-type; } leaf src-eq-port4 { type acl-port-type; } leaf src-eq-port5 { type acl-port-type; } leaf src-eq-port6 { type acl-port-type; } leaf src-eq-port7 { type acl-port-type; } leaf src-eq-port8 { type acl-port-type; } leaf src-eq-port9 { type acl-port-type; } leaf src-eq-port10 { type acl-port-type; } } case src-gt-case { leaf src-gt { description "Match only packets with a greater port number"; type acl-port-type; } } case src-lt-case { leaf src-lt { description "Match only packets with a lower port number"; type acl-port-type; } } case src-neq-case { leaf src-neq { description "Match only packets not on a given port number up to 10 ports"; type acl-port-type; } leaf src-neq-port2 { type acl-port-type; } leaf src-neq-port3 { type acl-port-type; } leaf src-neq-port4 { type acl-port-type; } leaf src-neq-port5 { type acl-port-type; } leaf src-neq-port6 { type acl-port-type; } leaf src-neq-port7 { type acl-port-type; } leaf src-neq-port8 { type acl-port-type; } leaf src-neq-port9 { type acl-port-type; } leaf src-neq-port10 { type acl-port-type; } } case src-range-case { leaf src-range1 { description "Match only packets in the range of port numbers"; type acl-port-type; } leaf src-range2 { description "Match only packets in the range of port numbers"; type acl-port-type; } } } choice destination-choice { case ipv4-prefix-case { leaf dest-ipv4-address { mandatory true; type inet:ipv4-address; } leaf dest-mask { description "Destination wildcard bits"; mandatory true; type inet:ipv4-address; } } case any-case { leaf dst-any { description "Any destination host"; type empty; } } case host-case { leaf dst-host-address { description "A single destination host"; type inet:ipv4-address; } leaf dst-host { description "A single destination host(OBSOLETE - use dst-host-address)"; status obsolete; type ios-types:ipv4-host; } } case fqdn-group-case { leaf dst-fqdn-group { description "Destination FQDN group"; type leafref { path "/ios:native/ios:object-group/ios-og:fqdn/ios-og:name"; } } } case geo-group-case { leaf dst-geo-group { description "Destination geolocation group name"; type leafref { path "/ios:native/ios:object-group/ios-og:geo/ios-og:name"; } } } case object-group-case { leaf dst-object-group { description "Destination network object group"; type leafref { path "/ios:native/ios:object-group/ios-og:network/ios-og:name"; } } } } choice dst-port-choice { when "protocol != 'icmp'"; case dst-eq-case { leaf dst-eq { description "Match only packets on a given port number up to 10 ports"; type acl-port-type; } leaf dst-eq-port2 { type acl-port-type; } leaf dst-eq-port3 { type acl-port-type; } leaf dst-eq-port4 { type acl-port-type; } leaf dst-eq-port5 { type acl-port-type; } leaf dst-eq-port6 { type acl-port-type; } leaf dst-eq-port7 { type acl-port-type; } leaf dst-eq-port8 { type acl-port-type; } leaf dst-eq-port9 { type acl-port-type; } leaf dst-eq-port10 { type acl-port-type; } } case dst-gt-case { leaf dst-gt { description "Match only packets with a greater port number"; type acl-port-type; } } case dst-lt-case { leaf dst-lt { description "Match only packets with a lower port number"; type acl-port-type; } } case dst-neq-case { leaf dst-neq { description "Match only packets not on a given port number up to 10 ports"; type acl-port-type; } leaf dst-neq-port2 { type acl-port-type; } leaf dst-neq-port3 { type acl-port-type; } leaf dst-neq-port4 { type acl-port-type; } leaf dst-neq-port5 { type acl-port-type; } leaf dst-neq-port6 { type acl-port-type; } leaf dst-neq-port7 { type acl-port-type; } leaf dst-neq-port8 { type acl-port-type; } leaf dst-neq-port9 { type acl-port-type; } leaf dst-neq-port10 { type acl-port-type; } } case dst-range-case { leaf dst-range1 { description "Match only packets in the range of port numbers"; type acl-port-type; } leaf dst-range2 { description "Match only packets in the range of port numbers"; type acl-port-type; } } } } grouping ipv6-acl-src-dst-addr-port-grouping { choice source-choice { case host-case { leaf source-host { type ios-types:ip-host; } } case fqdn-group-case { leaf source-fqdn-group { description "Source FQDN group"; type leafref { path "/ios:native/ios:object-group/ios-og:fqdn/ios-og:name"; } } } case geo-group-case { leaf source-geo-group { description "Source geolocation group name"; type leafref { path "/ios:native/ios:object-group/ios-og:geo/ios-og:name"; } } } case address-case { leaf source-address { type inet:ipv6-address; } leaf source-wildcard-bits { type inet:ipv6-address; } } case prefix-case { leaf source-prefix { type ios-types:ipv6-prefix; } } case object-group-case { leaf source-object-group { description "Source IPv6 network object group"; type leafref { path "/ios:native/ios:object-group/ios-og:v6-network/ios-og:name"; } } } case any-case { leaf any { type empty; } } } choice src-port-choice { case src-eq-case { leaf src-eq { description "Match only packets on a given port number up to 10 ports"; type acl-port-type; } leaf src-eq-port2 { type acl-port-type; } leaf src-eq-port3 { type acl-port-type; } leaf src-eq-port4 { type acl-port-type; } leaf src-eq-port5 { type acl-port-type; } leaf src-eq-port6 { type acl-port-type; } leaf src-eq-port7 { type acl-port-type; } leaf src-eq-port8 { type acl-port-type; } leaf src-eq-port9 { type acl-port-type; } leaf src-eq-port10 { type acl-port-type; } } case src-gt-case { leaf src-gt { description "Match only packets with a greater port number"; type acl-port-type; } } case src-lt-case { leaf src-lt { description "Match only packets with a lower port number"; type acl-port-type; } } case src-neq-case { leaf src-neq { description "Match only packets not on a given port number up to 10 ports"; type acl-port-type; } leaf src-neq-port2 { type acl-port-type; } leaf src-neq-port3 { type acl-port-type; } leaf src-neq-port4 { type acl-port-type; } leaf src-neq-port5 { type acl-port-type; } leaf src-neq-port6 { type acl-port-type; } leaf src-neq-port7 { type acl-port-type; } leaf src-neq-port8 { type acl-port-type; } leaf src-neq-port9 { type acl-port-type; } leaf src-neq-port10 { type acl-port-type; } } case src-range-case { leaf src-range1 { description "Match only packets in the range of port numbers"; type acl-port-type; } leaf src-range2 { description "Match only packets in the range of port numbers"; type acl-port-type; } } } choice destination-choice { case host-case { leaf destination-host { type ios-types:ip-host; } } case fqdn-group-case { leaf destination-fqdn-group { description "Destination FQDN group"; type leafref { path "/ios:native/ios:object-group/ios-og:fqdn/ios-og:name"; } } } case geo-group-case { leaf destination-geo-group { description "Destination geolocation group name"; type leafref { path "/ios:native/ios:object-group/ios-og:geo/ios-og:name"; } } } case address-case { leaf destination-address { type inet:ipv6-address; } leaf destination-wildcard-bits { type inet:ipv6-address; } } case prefix-case { leaf destination-prefix { type ios-types:ipv6-prefix; } } case object-group-case { leaf destination-object-group { description "Destination IPv6 network object group"; type leafref { path "/ios:native/ios:object-group/ios-og:v6-network/ios-og:name"; } } } case any-case { leaf destination-any { type empty; } } } choice dst-port-choice { case dst-eq-case { leaf dst-eq { description "Match only packets on a given port number up to 10 ports"; type acl-port-type; } leaf dst-eq-port2 { type acl-port-type; } leaf dst-eq-port3 { type acl-port-type; } leaf dst-eq-port4 { type acl-port-type; } leaf dst-eq-port5 { type acl-port-type; } leaf dst-eq-port6 { type acl-port-type; } leaf dst-eq-port7 { type acl-port-type; } leaf dst-eq-port8 { type acl-port-type; } leaf dst-eq-port9 { type acl-port-type; } leaf dst-eq-port10 { type acl-port-type; } } case dst-gt-case { leaf dst-gt { description "Match only packets with a greater port number"; type acl-port-type; } } case dst-lt-case { leaf dst-lt { description "Match only packets with a lower port number"; type acl-port-type; } } case dst-neq-case { leaf dst-neq { description "Match only packets not on a given port number up to 10 ports"; type acl-port-type; } leaf dst-neq-port2 { type acl-port-type; } leaf dst-neq-port3 { type acl-port-type; } leaf dst-neq-port4 { type acl-port-type; } leaf dst-neq-port5 { type acl-port-type; } leaf dst-neq-port6 { type acl-port-type; } leaf dst-neq-port7 { type acl-port-type; } leaf dst-neq-port8 { type acl-port-type; } leaf dst-neq-port9 { type acl-port-type; } leaf dst-neq-port10 { type acl-port-type; } } case dst-range-case { leaf dst-range1 { description "Match only packets in the range of port numbers"; type acl-port-type; } leaf dst-range2 { description "Match only packets in the range of port numbers"; type acl-port-type; } } } } grouping udp-src-multi-port-grouping { leaf udp-src-port-operator { type enumeration { enum eq; enum gt; enum lt; enum neq; enum range; } } leaf udp-src-port-1 { description "Match only packets on a given port number up to 10 ports"; type ios-types:udp-port-type; } leaf udp-src-port-2 { type ios-types:udp-port-type; } leaf udp-src-port-3 { type ios-types:udp-port-type; } leaf udp-src-port-4 { type ios-types:udp-port-type; } leaf udp-src-port-5 { type ios-types:udp-port-type; } leaf udp-src-port-6 { type ios-types:udp-port-type; } leaf udp-src-port-7 { type ios-types:udp-port-type; } leaf udp-src-port-8 { type ios-types:udp-port-type; } leaf udp-src-port-9 { type ios-types:udp-port-type; } leaf udp-src-port-10 { type ios-types:udp-port-type; } } grouping udp-dst-multi-port-grouping { leaf udp-dst-port-operator { type enumeration { enum eq; enum gt; enum lt; enum neq; enum range; } } leaf udp-dst-port-1 { description "Match only packets on a given port number up to 10 ports"; type ios-types:udp-port-type; } leaf udp-dst-port-2 { type ios-types:udp-port-type; } leaf udp-dst-port-3 { type ios-types:udp-port-type; } leaf udp-dst-port-4 { type ios-types:udp-port-type; } leaf udp-dst-port-5 { type ios-types:udp-port-type; } leaf udp-dst-port-6 { type ios-types:udp-port-type; } leaf udp-dst-port-7 { type ios-types:udp-port-type; } leaf udp-dst-port-8 { type ios-types:udp-port-type; } leaf udp-dst-port-9 { type ios-types:udp-port-type; } leaf udp-dst-port-10 { type ios-types:udp-port-type; } } grouping tcp-src-multi-port-grouping { leaf tcp-src-port-operator { type enumeration { enum eq; enum gt; enum lt; enum neq; enum range; } } leaf tcp-src-port-1 { description "Match only packets on a given port number up to 10 ports"; type ios-types:tcp-port-type; } leaf tcp-src-port-2 { type ios-types:tcp-port-type; } leaf tcp-src-port-3 { type ios-types:tcp-port-type; } leaf tcp-src-port-4 { type ios-types:tcp-port-type; } leaf tcp-src-port-5 { type ios-types:tcp-port-type; } leaf tcp-src-port-6 { type ios-types:tcp-port-type; } leaf tcp-src-port-7 { type ios-types:tcp-port-type; } leaf tcp-src-port-8 { type ios-types:tcp-port-type; } leaf tcp-src-port-9 { type ios-types:tcp-port-type; } leaf tcp-src-port-10 { type ios-types:tcp-port-type; } } grouping tcp-dst-multi-port-grouping { leaf tcp-dst-port-operator { type enumeration { enum eq; enum gt; enum lt; enum neq; enum range; } } leaf tcp-dst-port-1 { description "Match only packets on a given port number up to 10 ports"; type ios-types:tcp-port-type; } leaf tcp-dst-port-2 { type ios-types:tcp-port-type; } leaf tcp-dst-port-3 { type ios-types:tcp-port-type; } leaf tcp-dst-port-4 { type ios-types:tcp-port-type; } leaf tcp-dst-port-5 { type ios-types:tcp-port-type; } leaf tcp-dst-port-6 { type ios-types:tcp-port-type; } leaf tcp-dst-port-7 { type ios-types:tcp-port-type; } leaf tcp-dst-port-8 { type ios-types:tcp-port-type; } leaf tcp-dst-port-9 { type ios-types:tcp-port-type; } leaf tcp-dst-port-10 { type ios-types:tcp-port-type; } } grouping ipv4-acl-src-addr-port-grouping { choice source-choice { case host-case { leaf source-host { status obsolete; type ios-types:ip-host; } } case address-case { leaf source-address { status obsolete; type inet:ipv6-address; } leaf source-wildcard-bits { status obsolete; type inet:ipv6-address; } } case prefix-case { leaf source-prefix { status obsolete; type ios-types:ipv6-prefix; } } case any-case { leaf any { status obsolete; type empty; } } } choice src-port-choice { case src-eq-case { leaf src-eq { description "Match only packets on a given port number"; type acl-port-type; } } case src-gt-case { leaf src-gt { description "Match only packets with a greater port number"; type acl-port-type; } } case src-lt-case { leaf src-lt { description "Match only packets with a lower port number"; type acl-port-type; } } case src-neq-case { leaf src-neq { description "Match only packets not on a given port number"; type acl-port-type; } } case src-range-case { leaf src-range1 { description "Match only packets in the range of port numbers"; type acl-port-type; } leaf src-range2 { description "Match only packets in the range of port numbers"; type acl-port-type; } } } } grouping ipv4-acl-dst-addr-port-grouping { choice destination-choice { case host-case { leaf destination-host { status obsolete; type ios-types:ip-host; } } case address-case { leaf destination-address { status obsolete; type inet:ipv6-address; } leaf destination-wildcard-bits { status obsolete; type inet:ipv6-address; } } case prefix-case { leaf destination-prefix { status obsolete; type ios-types:ipv6-prefix; } } case any-case { leaf destination-any { status obsolete; type empty; } } } choice dst-port-choice { case dst-eq-case { leaf dst-eq { description "Match only packets on a given port number"; type acl-port-type; } } case dst-gt-case { leaf dst-gt { description "Match only packets with a greater port number"; type acl-port-type; } } case dst-lt-case { leaf dst-lt { description "Match only packets with a lower port number"; type acl-port-type; } } case dst-neq-case { leaf dst-neq { description "Match only packets not on a given port number"; type acl-port-type; } } case dst-range-case { leaf dst-range1 { description "Match only packets in the range of port numbers"; type acl-port-type; } leaf dst-range2 { description "Match only packets in the range of port numbers"; type acl-port-type; } } } } grouping ipv4-fqdn-address-choice-grouping { choice address-choice { case ipv4-prefix-case { leaf ipv4-address { description "Host ipv4 address"; type inet:ipv4-address; } leaf mask { description "Host ipv4 mask"; type inet:ipv4-address; } } case any-case { leaf any { description "Any host"; type empty; } } case host-case { container host { choice host-case { case host-case { leaf host-address { description "A single host"; type inet:ipv4-address; } } case dynamic-case { leaf dynamic { description "FQDN of a single host"; type string { pattern '(([a-zA-Z0-9-]|[*])*\.)*([a-zA-Z0-9-]*).([a-zA-Z0-9-]*)'; } } } } } } } } grouping ipv6-fqdn-address-choice-grouping { choice address-choice { case address-case { leaf address { description "IPv6 Address"; type inet:ipv6-address; } leaf wildcard-bits { description "IPv6 wildcard-bits"; type inet:ipv6-address; } } case prefix-case { leaf address-prefix { description "IPv6 prefix"; type ios-types:ipv6-prefix; } } case any-case { leaf any { description "Any host"; type empty; } } case host-case { container host { choice host-case { case host-case { leaf host-address { description "A single host"; type inet:ipv6-address; } } case dynamic-case { leaf dynamic { description "Dynamically resolved FQDN"; type string { pattern '(([a-zA-Z0-9-]|[*])*\.)*([a-zA-Z0-9-]*).([a-zA-Z0-9-]*)'; } } } } } } } } grouping acl-role-src-dst-grouping { container src { description "Source port conditions"; uses ipv4-acl-src-addr-port-grouping; container dst { status obsolete; description "Destination port conditions"; uses ipv4-acl-dst-addr-port-grouping-deprecated; } } container dst { description "Destination port conditions"; uses ipv4-acl-dst-addr-port-grouping; } } grouping acl-remarks-grouping { leaf-list remarks { description "Access list entry comment"; type string { length "1..100"; } } leaf remark { status deprecated; description "Access list entry comment (DEPRECATED - use remarks instead)"; type string { length "1..100"; } } } grouping acl-remark-grouping { leaf remark { description "Access list entry comment"; type string { length "1..100"; } } } grouping acl-evaluate-grouping { leaf evaluate { description "Access list to evaluate"; if-feature "ios-features:reflexive-acl"; type string { pattern '[a-zA-Z].*'; } } } grouping ipv6-acl-grouping { list access-list-seq-rule { key "sequence"; leaf sequence { description "Sequence number for this entry"; type uint64 { range "1..4294967294"; } } choice ace-rule-remark-choice { case ace-rule-case { container ace-rule { leaf action { type enumeration { enum deny; enum permit; } } leaf protocol { type union { type uint8 { range "0..255"; } type enumeration { enum ahp; enum esp; enum hbh; enum icmp; enum ipv6; enum pcp; enum sctp; enum tcp; enum udp; enum object-group; } } } leaf object-group { description "Service object group name"; when "../protocol = 'object-group'"; type leafref { path "/ios:native/ios:object-group/ios-og:v6-service/ios-og:name"; } } uses ipv6-acl-src-dst-addr-port-grouping; uses acl-tcp-common-match; uses ipv6-acl-match-common-attribute; uses ipv6-acl-icmp-match; } } case remark-case { uses acl-remark-grouping; } } } } grouping ipv6-fqdn-acl-grouping { list access-list-seq-rule { key "sequence"; leaf sequence { description "Sequence number for this entry"; type uint64 { range "1..32767"; } } choice ace-rule-remark-choice { case ace-rule-case { container ace-rule { leaf action { description "Forward or reject matching packets"; type enumeration { enum deny; enum permit; } } choice protocol-choice { case icmp-case { leaf icmp { description "ICMP v6 protocol"; type empty; } container icmp-src-address { description "Source IPv6 address"; uses ipv6-fqdn-address-choice-grouping; } container icmp-dst-address { description "Destination IPv6 address"; uses ipv6-fqdn-address-choice-grouping; } } case other-protocol-case { leaf other-protocol { description "Other protocols"; type union { type uint8 { range "1..5|7..16|18..49|52..57|59..107|109..131|133..255"; } type enumeration { enum ahp; enum esp; enum hbh; enum ipv6; enum pcp; } } } container src-address { description "Source IPv6 address"; uses ipv6-fqdn-address-choice-grouping; } container dst-address { description "Destination IPv6 address"; uses ipv6-fqdn-address-choice-grouping; } } case udp-case { leaf udp { description "UDP protocol"; type empty; } container udp-src-address { description "Source IPv6 address"; uses ipv6-fqdn-address-choice-grouping; } container udp-src-port { description "Source UDP Port"; uses udp-port-choice-grouping; } container udp-dst-address { description "Destination IPv6 address"; uses ipv6-fqdn-address-choice-grouping; } container udp-dst-port { description "Source UDP Port"; uses udp-port-choice-grouping; } } case sctp-case { leaf sctp { description "SCTP protocol"; type empty; } container sctp-src-address { description "Source IPv6 address"; uses ipv6-fqdn-address-choice-grouping; } container sctp-dst-address { description "Destination IPv6 address"; uses ipv6-fqdn-address-choice-grouping; } } case tcp-case { leaf tcp { description "TCP protocol"; type empty; } container tcp-src-address { description "Source IPv6 address"; uses ipv6-fqdn-address-choice-grouping; } container tcp-src-port { description "Source TCP Port"; uses tcp-port-choice-grouping; } container tcp-dst-address { description "Destination IPv6 address"; uses ipv6-fqdn-address-choice-grouping; } container tcp-dst-port { description "Destination TCP Port"; uses tcp-port-choice-grouping; } } } uses ipv6-acl-match-common-attribute-new; } } case remark-case { uses acl-remark-grouping; } } } } grouping ipv6-role-acl-grouping { list access-list-seq-rule { key "sequence"; leaf sequence { description "Sequence number for this entry"; type uint64 { range "1..4294967294"; } } choice ace-rule-remark-choice { case ace-rule-case { container ace-rule { leaf action { type enumeration { enum deny; enum permit; } } choice protocol-choice { case tcp-case { leaf tcp { type empty; } container tcp-src { uses tcp-port-choice-grouping; } container tcp-dst { uses tcp-port-choice-grouping; } uses acl-tcp-common-match-new { refine "established"; } } case sctp-case { leaf sctp { type empty; } } case udp-case { leaf udp { type empty; } container udp-src { uses udp-port-choice-grouping; } container udp-dst { uses udp-port-choice-grouping; } } case icmp-case { leaf icmp { type empty; } } case other-protocol-case { leaf other-protocol { type union { type uint8 { range "1..5|7..16|18..49|52..57|59..107|109..131|133..255"; } type enumeration { enum ahp; enum esp; enum hbh; enum ipv6; enum pcp; } } } } } uses ipv6-acl-match-common-attribute-new; } } case remark-case { uses acl-remark-grouping; } } } } grouping ipv4-std-acl-grouping { list access-list-seq-rule { key "sequence"; leaf sequence { type uint64 { range "1..2147483647"; } } choice deny-permit { container deny { description "Specify packets to reject"; uses ipv4-std-ace-grouping; } container permit { description "Specify packets to forward"; uses ipv4-std-ace-grouping; } } uses acl-remark-grouping; } } grouping ipv4-ext-acl-grouping { list access-list-seq-rule { key "sequence"; leaf sequence { type uint64 { range "1..2147483647"; } } uses acl-remarks-grouping; container ace-rule { leaf action { type enumeration { enum deny; enum permit; } } leaf protocol { type union { type uint8 { range "0..255"; } type enumeration { enum ahp; enum eigrp; enum esp; enum gre; enum icmp; enum igmp; enum ip; enum ipinip; enum nos; enum object-group; enum ospf; enum pcp; enum pim; enum tcp; enum udp; } } } leaf object-group-str { description "Service object group name"; type leafref { path "/ios:native/ios:object-group/ios-og:service/ios-og:name"; } } uses ipv4-acl-src-dst-addr-port-grouping; uses acl-tcp-common-match; uses ipv4-acl-icmp-match; uses ipv4-acl-match-common-attribute; uses ipv4-acl-tcp-match; uses acl-reflect-grouping; } uses acl-evaluate-grouping; } } grouping ipv4-fqdn-acl-grouping { list access-list-seq-rule { key "sequence"; leaf sequence { description "Sequence number for this entry"; type uint64 { range "1..32767"; } } container ace-rule { leaf action { description "Specifying packets to forward/reject"; type enumeration { enum deny; enum permit; } } choice protocol-choice { case icmp-case { leaf icmp { description "ICMP protocol"; type empty; } container icmp-src-address { uses ipv4-fqdn-address-choice-grouping; } container icmp-dst-address { uses ipv4-fqdn-address-choice-grouping; } } case igmp-case { leaf igmp { description "IGMP protocol"; type empty; } container igmp-src-address { uses ipv4-fqdn-address-choice-grouping; } container igmp-dst-address { uses ipv4-fqdn-address-choice-grouping; } } case other-protocol-case { leaf other-protocol { description "other protocols"; type union { type uint8 { range "0|3|5|7..16|18..46|48|49|52..87|90..93|95..102|104..107|109..255"; } type enumeration { enum ipinip { value 4; } enum gre { value 47; } enum esp { value 50; } enum ahp { value 51; } enum eigrp { value 88; } enum ospf { value 89; } enum nos { value 94; } enum pim { value 103; } enum pcp { value 108; } enum ip { value 256; } } } } container src-address { uses ipv4-fqdn-address-choice-grouping; } container dst-address { uses ipv4-fqdn-address-choice-grouping; } } case udp-case { leaf udp { description "UDP protocol"; type empty; } container udp-src-address { uses ipv4-fqdn-address-choice-grouping; } uses udp-src-multi-port-grouping; container udp-dst-address { uses ipv4-fqdn-address-choice-grouping; } uses udp-dst-multi-port-grouping; } case tcp-case { leaf tcp { description "TCP protocol"; type empty; } container tcp-src-address { uses ipv4-fqdn-address-choice-grouping; } uses tcp-src-multi-port-grouping; container tcp-dst-address { uses ipv4-fqdn-address-choice-grouping; } uses tcp-dst-multi-port-grouping; } } uses ipv4-acl-match-common-attribute-new; } uses acl-remark-grouping; } } grouping ipv4-role-acl-grouping { list access-list-seq-rule { key "sequence"; leaf sequence { description "Sequence number for this entry"; type uint64 { range "1..2147483647"; } } container ace-rule { leaf action { type enumeration { enum deny; enum permit; } } leaf protocol { type union { type uint8 { range "0..255"; } type enumeration { enum ahp; enum eigrp; enum esp; enum gre; enum icmp; enum igmp; enum ip; enum ipinip; enum nos; enum object-group; enum ospf; enum pcp; enum pim; enum tcp; enum udp; } } } leaf object-group-str { status obsolete; description "Service object group name"; type leafref { path "/ios:native/ios:object-group/ios-og:service/ios-og:name"; } } uses ipv4-acl-icmp-match; uses acl-role-src-dst-grouping; uses acl-tcp-common-match; uses ipv4-acl-tcp-match; uses ipv4-acl-match-common-attribute; } uses acl-remark-grouping; } } grouping config-ipv4-acl-grouping { list standard { description "Standard Access List"; key "name"; leaf name { type ios-types:std-acl-type; } uses ipv4-std-acl-grouping; container default { description "Set a command to its defaults"; uses ipv4-std-acl-grouping; } } list role-based { description "Role-based Access List"; key "name"; leaf name { type string; } uses ipv4-role-acl-grouping; container default { description "Set a command to its defaults"; uses ipv4-role-acl-grouping; } } list extended { description "Extended Access List"; key "name"; leaf name { type ios-types:ext-acl-type; } uses ipv4-ext-acl-grouping; container default { description "Set a command to its defaults"; uses ipv4-ext-acl-grouping; } } list fqdn { description "FQDN Access List"; if-feature "ios-features:fqdn-acl"; key "name"; leaf name { type string { length "1..200"; pattern '[a-zA-Z].*'; } } uses ipv4-fqdn-acl-grouping; } container helper { description "Access List acts on helper-address"; leaf egress { description "Outbound"; type empty; } leaf check { description "Enable filtering on helper-address destined"; type empty; } } container log-update { description "Control access list log updates"; leaf threshold { description "Set access-list logging threshold"; type uint64 { range "0..2147483647"; } } } container logging { description "Control access list logging"; leaf hash-generation { description "Enable syslog hash code generation"; type empty; } leaf interval { description "Set access list logging interval"; type uint64 { range "0..2147483647"; } } } leaf match-local-traffic { description "Enable ACL matching for locally generated traffic"; type empty; } leaf persistent { description "enable persistency across reload"; type empty; } container resequence { description "Resequence Access List"; leaf numbers { type union { type ios-types:std-acl-type; type ios-types:ext-acl-type; } } leaf start-seq-no { type uint64 { range "1..2147483647"; } } leaf step-seq-no { type uint64 { range "1..2147483647"; } } } } grouping config-mgmt-traffic-grouping { container mgmt-traffic { description "IOS mgmt-traffic control ipv4"; container control { container ipv4 { presence "true"; leaf address { description "ipv4 address"; type inet:ipv4-address; } leaf-list protocol { description "List of protocols"; type enumeration { enum http; enum https; enum netconf; enum scp; enum snmp; enum ssh; enum telnet; } } leaf-list interface { description "List of interface"; must '/ios:native/ios:interface/*[concat(local-name(), ios:name) = current()]'; type string; } } } } } grouping config-ipv4-reflexive-grouping { leaf timeout { description "Timeout value"; type uint64 { range "30..2147483"; } default "300"; } } grouping config-ipv6-acl-grouping { list named-acl { key "name"; leaf name { type string; } uses ipv6-acl-grouping; container default { status obsolete; description "Set a command to its defaults"; uses ipv6-acl-grouping-deprecated; } } list role-based { key "name"; leaf name { type string; } uses ipv6-role-acl-grouping; } list named-rb-acl { status obsolete; key "name"; leaf name { status obsolete; type string; } leaf role-based { status obsolete; description "Role-based Access List"; type empty; } uses ipv6-acl-grouping-deprecated; container default { status obsolete; description "Set a command to its defaults"; uses ipv6-acl-grouping-deprecated; } } list fqdn { description "FQDN Access List"; if-feature "ios-features:fqdn-acl"; key "name"; leaf name { description "IPv6 FQDN ACL name"; type string { length "1..200"; pattern '[a-zA-Z].*'; } } uses ipv6-fqdn-acl-grouping; } container log-update { description "Control access list log updates"; leaf threshold { description "Set access-list logging threshold"; type uint64 { range "0..2147483647"; } } } leaf match-local-traffic { description "Match locally-generated traffic"; type empty; } } grouping config-access-list-grouping { list access-list-standard-range { key "listnumber"; leaf listnumber { type uint16 { range "1..99"; } } list std-access-list-rule { key "rule"; leaf rule { type string; } } container permit { description "Specify packets to forward"; list ipv4-or-hostname { key "ipv4-or-hostname"; leaf ipv4-or-hostname { description "Address to match"; type inet:host; } leaf wildcard { description "Wildcard bits"; type inet:ipv4-address; } leaf log { description "Log matches against this entry"; type empty; } } } } list access-list-extended-range { key "listnumber"; leaf listnumber { type uint16 { range "100..199"; } } list ext-access-list-rule { key "rule"; leaf rule { type string; } } } container hardware { container capture { leaf mode { type enumeration { enum vlan; } } } } list access-list-expanded-range { key "IP-extended-range"; leaf IP-extended-range { description "IP extended access list (expanded range)"; type uint16 { range "2000..2699"; } } container permit { description "Specify packets to forward"; uses access-list-ip-grouping; } container deny { description "Specify packets to reject"; uses access-list-ip-grouping; } } } grouping access-mac-any-cos-vlan-grouping { list cos { key "cos-value"; leaf cos-value { description "CoS value"; type uint16 { range "0..7"; } } list vlan { key "vlan-value"; leaf vlan-value { description "Vlan Id"; type uint16 { range "1..4095"; } } } } list vlan { key "vlan-value"; leaf vlan-value { description "Vlan Id"; type uint16 { range "1..4095"; } } } } grouping access-mac-protocol-options-grouping { list EtherType { description "EtherType"; key "EtherType-options"; leaf EtherType-options { type enumeration { enum aarp; enum amber; enum appletalk; enum dec-spanning; enum decnet-iv; enum diagnostic; enum dsm; enum etype-6000; enum etype-8042; enum lat; enum lavc-sca; enum mop-console; enum mop-dump; enum msdos; enum mumps; enum netbios; enum vines-echo; enum vines-ip; } } uses access-mac-any-cos-vlan-grouping; } list protocol-family { description "An Ethernet protocol family"; key "protocol-family-options"; leaf protocol-family-options { description "An Ethernet protocol family options"; type enumeration { enum appletalk; enum arp-non-ipv4; enum decnet; enum ipv6; enum ipx; enum rarp-ipv4; enum rarp-non-ipv4; enum vines; enum xns; } } uses access-mac-any-cos-vlan-grouping; } list arbitrary-ethertype { key "ethertype ethertype-mask"; leaf ethertype { description "An arbitrary EtherType in decimal or hex"; type uint64 { range "0..65535"; } } leaf ethertype-mask { description "An arbitrary EtherType mask in decimal or hex"; type uint64 { range "0..65535"; } } uses access-mac-any-cos-vlan-grouping; } list lsap { key "lsap lsap-mask"; leaf lsap { description "LSAP value"; type uint64 { range "0..65535"; } } leaf lsap-mask { description "LSAP mask in decimal, hex, or octal"; type uint64 { range "0..65535"; } } uses access-mac-any-cos-vlan-grouping; } uses access-mac-any-cos-vlan-grouping; } grouping source-mac-address-grouping { leaf source-mac-address { description "48-bit source MAC address"; type string { pattern '([0-9a-fA-F]{4}[.][0-9a-fA-F]{4}[.][0-9a-fA-F]{4})'; } } leaf source-mac-address-mask { description "48-bit source MAC address mask"; type string { pattern '([0-9a-fA-F]{4}[.][0-9a-fA-F]{4}[.][0-9a-fA-F]{4})'; } } } grouping source-mac-address-options-grouping { list mac-address { key "source-mac-address source-mac-address-mask"; uses source-mac-address-grouping; uses access-mac-protocol-options-grouping; } } grouping source-mac-host-options-grouping { container host { list mac-address { key "source-mac-address"; leaf source-mac-address { description "48-bit source MAC address"; type string { pattern '([0-9a-fA-F]{4}[.][0-9a-fA-F]{4}[.][0-9a-fA-F]{4})'; } } uses access-mac-protocol-options-grouping; } } } grouping access-any-grouping { container any { description "any source MAC address"; uses source-mac-address-options-grouping; container any { presence "true"; description "any destination MAC address"; uses access-mac-protocol-options-grouping; } uses source-mac-host-options-grouping; } } grouping access-mac-grouping { list mac-address { key "source-mac-address source-mac-address-mask"; uses source-mac-address-grouping; list mac-address { key "source-mac-address source-mac-address-mask"; uses source-mac-address-grouping; uses access-mac-protocol-options-grouping; } container any { presence "true"; uses access-mac-protocol-options-grouping; } uses source-mac-host-options-grouping; } } grouping access-host-grouping { container host { list mac-address { key "source-mac-address"; leaf source-mac-address { description "48-bit source MAC address"; type string { pattern '([0-9a-fA-F]{4}[.][0-9a-fA-F]{4}[.][0-9a-fA-F]{4})'; } } uses source-mac-address-options-grouping; container any { presence "true"; uses access-mac-protocol-options-grouping; } uses source-mac-host-options-grouping; } } } grouping config-mac-access-list-grouping { container access-list { description "Named access-list"; list extended { description "Extended Access List"; key "id"; leaf id { type ios-types:ext-acl-type; } list entry-v2 { ordered-by user; key "action values"; leaf action { type enumeration { enum deny; enum permit; } } leaf values { type string { pattern '(any|(([0-9a-fA-F]{4}[.][0-9a-fA-F]{4}[.][0-9a-fA-F]{4}|host) [0-9a-fA-F]{4}[.][0-9a-fA-F]{4}[.][0-9a-fA-F]{4})) (any|(([0-9a-fA-F]{4}[.][0-9a-fA-F]{4}[.][0-9a-fA-F]{4}|host) [0-9a-fA-F]{4}[.][0-9a-fA-F]{4}[.][0-9a-fA-F]{4}))( (0[xX]0|0[xX][1-9a-fA-F][0-9a-fA-F]{0,3}) (0[xX]0|0[xX][1-9a-fA-F][0-9a-fA-F]{0,3}))?'; } } } list entry { status deprecated; key "action values"; leaf action { status deprecated; type enumeration { enum deny; enum permit; } } leaf values { status deprecated; type string { pattern '(any|(([0-9a-f]{4}[.][0-9a-f]{4}[.][0-9a-f]{4}|host) [0-9a-f]{4}[.][0-9a-f]{4}[.][0-9a-f]{4})) (any|(([0-9a-f]{4}[.][0-9a-f]{4}[.][0-9a-f]{4}|host) [0-9a-f]{4}[.][0-9a-f]{4}[.][0-9a-f]{4}))( (0x0|0x[1-9A-F][0-9A-F]{0,3}) (0x0|0x[1-9A-F][0-9A-F]{0,3}))?'; } } } } } } grouping config-access-list-limit-grouping { container access-list { description "the max configurable acl limit"; leaf acl-limit { description "Max ACL Limit"; type uint64 { range "1..65535"; } } } } grouping ipv4-acl-dst-addr-port-grouping-deprecated { choice destination-choice { case host-case { leaf destination-host { status obsolete; type ios-types:ip-host; } } case address-case { leaf destination-address { status obsolete; type inet:ipv6-address; } leaf destination-wildcard-bits { status obsolete; type inet:ipv6-address; } } case prefix-case { leaf destination-prefix { status obsolete; type ios-types:ipv6-prefix; } } case any-case { leaf destination-any { status obsolete; type empty; } } } choice dst-port-choice { case dst-eq-case { leaf dst-eq { status obsolete; description "Match only packets on a given port number"; type acl-port-type; } } case dst-gt-case { leaf dst-gt { status obsolete; description "Match only packets with a greater port number"; type acl-port-type; } } case dst-lt-case { leaf dst-lt { status obsolete; description "Match only packets with a lower port number"; type acl-port-type; } } case dst-neq-case { leaf dst-neq { status obsolete; description "Match only packets not on a given port number"; type acl-port-type; } } case dst-range-case { leaf dst-range1 { status obsolete; description "Match only packets in the range of port numbers"; type acl-port-type; } leaf dst-range2 { status obsolete; description "Match only packets in the range of port numbers"; type acl-port-type; } } } } grouping ipv6-acl-grouping-deprecated { list access-list-seq-rule { status obsolete; key "sequence"; leaf sequence { status obsolete; description "Sequence number for this entry"; type uint64 { range "1..4294967294"; } } choice ace-rule-remark-choice { case ace-rule-case { container ace-rule { status obsolete; leaf action { status obsolete; type enumeration { enum deny; enum permit; } } leaf protocol { status obsolete; type union { type uint8 { range "0..255"; } type enumeration { enum ahp; enum esp; enum hbh; enum icmp; enum ipv6; enum pcp; enum sctp; enum tcp; enum udp; } } } uses ipv6-acl-src-dst-addr-port-grouping-deprecated; uses acl-tcp-common-match-deprecated; uses ipv6-acl-match-common-attribute-deprecated; uses ipv6-acl-icmp-match-deprecated; } } case remark-case { uses acl-remark-grouping-deprecated; } } } } grouping ipv6-acl-src-dst-addr-port-grouping-deprecated { choice source-choice { case host-case { leaf source-host { status obsolete; type ios-types:ip-host; } } case fqdn-group-case { leaf source-fqdn-group { status obsolete; description "Source FQDN group"; type leafref { path "/ios:native/ios:object-group/ios-og:fqdn/ios-og:name"; } } } case geo-group-case { leaf source-geo-group { status obsolete; description "Source geolocation group name"; type leafref { path "/ios:native/ios:object-group/ios-og:geo/ios-og:name"; } } } case address-case { leaf source-address { status obsolete; type inet:ipv6-address; } leaf source-wildcard-bits { status obsolete; type inet:ipv6-address; } } case prefix-case { leaf source-prefix { status obsolete; type ios-types:ipv6-prefix; } } case object-group-case { leaf source-object-group { status obsolete; description "Source IPv6 network object group"; type leafref { path "/ios:native/ios:object-group/ios-og:v6-network/ios-og:name"; } } } case any-case { leaf any { status obsolete; type empty; } } } choice src-port-choice { case src-eq-case { leaf src-eq { status obsolete; description "Match only packets on a given port number up to 10 ports"; type acl-port-type; } leaf src-eq-port2 { status obsolete; type acl-port-type; } leaf src-eq-port3 { status obsolete; type acl-port-type; } leaf src-eq-port4 { status obsolete; type acl-port-type; } leaf src-eq-port5 { status obsolete; type acl-port-type; } leaf src-eq-port6 { status obsolete; type acl-port-type; } leaf src-eq-port7 { status obsolete; type acl-port-type; } leaf src-eq-port8 { status obsolete; type acl-port-type; } leaf src-eq-port9 { status obsolete; type acl-port-type; } leaf src-eq-port10 { status obsolete; type acl-port-type; } } case src-gt-case { leaf src-gt { status obsolete; description "Match only packets with a greater port number"; type acl-port-type; } } case src-lt-case { leaf src-lt { status obsolete; description "Match only packets with a lower port number"; type acl-port-type; } } case src-neq-case { leaf src-neq { status obsolete; description "Match only packets not on a given port number up to 10 ports"; type acl-port-type; } leaf src-neq-port2 { status obsolete; type acl-port-type; } leaf src-neq-port3 { status obsolete; type acl-port-type; } leaf src-neq-port4 { status obsolete; type acl-port-type; } leaf src-neq-port5 { status obsolete; type acl-port-type; } leaf src-neq-port6 { status obsolete; type acl-port-type; } leaf src-neq-port7 { status obsolete; type acl-port-type; } leaf src-neq-port8 { status obsolete; type acl-port-type; } leaf src-neq-port9 { status obsolete; type acl-port-type; } leaf src-neq-port10 { status obsolete; type acl-port-type; } } case src-range-case { leaf src-range1 { status obsolete; description "Match only packets in the range of port numbers"; type acl-port-type; } leaf src-range2 { status obsolete; description "Match only packets in the range of port numbers"; type acl-port-type; } } } choice destination-choice { case host-case { leaf destination-host { status obsolete; type ios-types:ip-host; } } case fqdn-group-case { leaf destination-fqdn-group { status obsolete; description "Destination FQDN group"; type leafref { path "/ios:native/ios:object-group/ios-og:fqdn/ios-og:name"; } } } case geo-group-case { leaf destination-geo-group { status obsolete; description "Destination geolocation group name"; type leafref { path "/ios:native/ios:object-group/ios-og:geo/ios-og:name"; } } } case address-case { leaf destination-address { status obsolete; type inet:ipv6-address; } leaf destination-wildcard-bits { status obsolete; type inet:ipv6-address; } } case prefix-case { leaf destination-prefix { status obsolete; type ios-types:ipv6-prefix; } } case object-group-case { leaf destination-object-group { status obsolete; description "Destination IPv6 network object group"; type leafref { path "/ios:native/ios:object-group/ios-og:v6-network/ios-og:name"; } } } case any-case { leaf destination-any { status obsolete; type empty; } } } choice dst-port-choice { case dst-eq-case { leaf dst-eq { status obsolete; description "Match only packets on a given port number up to 10 ports"; type acl-port-type; } leaf dst-eq-port2 { status obsolete; type acl-port-type; } leaf dst-eq-port3 { status obsolete; type acl-port-type; } leaf dst-eq-port4 { status obsolete; type acl-port-type; } leaf dst-eq-port5 { status obsolete; type acl-port-type; } leaf dst-eq-port6 { status obsolete; type acl-port-type; } leaf dst-eq-port7 { status obsolete; type acl-port-type; } leaf dst-eq-port8 { status obsolete; type acl-port-type; } leaf dst-eq-port9 { status obsolete; type acl-port-type; } leaf dst-eq-port10 { status obsolete; type acl-port-type; } } case dst-gt-case { leaf dst-gt { status obsolete; description "Match only packets with a greater port number"; type acl-port-type; } } case dst-lt-case { leaf dst-lt { status obsolete; description "Match only packets with a lower port number"; type acl-port-type; } } case dst-neq-case { leaf dst-neq { status obsolete; description "Match only packets not on a given port number up to 10 ports"; type acl-port-type; } leaf dst-neq-port2 { status obsolete; type acl-port-type; } leaf dst-neq-port3 { status obsolete; type acl-port-type; } leaf dst-neq-port4 { status obsolete; type acl-port-type; } leaf dst-neq-port5 { status obsolete; type acl-port-type; } leaf dst-neq-port6 { status obsolete; type acl-port-type; } leaf dst-neq-port7 { status obsolete; type acl-port-type; } leaf dst-neq-port8 { status obsolete; type acl-port-type; } leaf dst-neq-port9 { status obsolete; type acl-port-type; } leaf dst-neq-port10 { status obsolete; type acl-port-type; } } case dst-range-case { leaf dst-range1 { status obsolete; description "Match only packets in the range of port numbers"; type acl-port-type; } leaf dst-range2 { status obsolete; description "Match only packets in the range of port numbers"; type acl-port-type; } } } } grouping acl-tcp-common-match-deprecated { leaf ack { status obsolete; description "Match on the ACK bit"; type empty; } leaf fin { status obsolete; description "Match on the FIN bit"; type empty; } leaf psh { status obsolete; description "Match on the PSH bit"; type empty; } leaf rst { status obsolete; description "Match on the RST bit"; type empty; } leaf syn { status obsolete; description "Match on the SYN bit"; type empty; } leaf urg { status obsolete; description "Match on the URG bit"; type empty; } leaf established { status obsolete; description "Match established connections"; type empty; } } grouping ipv6-acl-icmp-match-deprecated { choice icmp_choice { case msg-type-code { leaf msg-type-case { status obsolete; type uint8; } leaf msg-code { status obsolete; type uint8; } } case named-msg-type-case { leaf named-msg-type { status obsolete; type enumeration { enum beyond-scope; enum destination-unreachable; enum dhaad-reply; enum dhaad-request; enum echo-reply; enum echo-request; enum header; enum hop-limit; enum mld-query; enum mld-reduction; enum mld-report; enum mpd-advertisement; enum mpd-solicitation; enum nd-na; enum nd-ns; enum next-header; enum no-admin; enum no-route; enum packet-too-big; enum parameter-option; enum parameter-problem; enum port-unreachable; enum reassembly-timeout; enum redirect; enum reject-route; enum renum-command; enum renum-result; enum renum-seq-number; enum router-advertisement; enum router-renumbering; enum router-solicitation; enum source-policy; enum time-exceeded; enum unreachable; } } } } } grouping ipv6-acl-match-common-attribute-deprecated { leaf auth { status obsolete; description "Match on authentication header"; type empty; } leaf dest-option { status obsolete; description "Destination Option header (all types)"; type empty; } leaf dscp { status obsolete; description "Match packets with given dscp value"; type ios-types:dscp-type; } leaf flow-label { status obsolete; description "Flow label"; type uint32 { range "0..1048575"; } } leaf fragments { status obsolete; description "Check non-initial fragments"; type empty; } leaf hbh { status obsolete; description "Match on hop-by-hop option"; type empty; } leaf log { status obsolete; description "Log matches against this entry"; type empty; } leaf log-input { status obsolete; description "Log matches against this entry, including input"; type empty; } leaf mobility { status obsolete; description "Mobility header (all types)"; type empty; } leaf mobility-type { status obsolete; description "Mobility header with type"; type ios-types:mobility-type; } leaf routing { status obsolete; description "Routing header (all types)"; type empty; } leaf routing-type { status obsolete; description "Routing header with type"; type uint8; } leaf time-range { status obsolete; description "Specify a time-range"; type string; } } grouping acl-remark-grouping-deprecated { leaf remark { status obsolete; description "Access list entry comment"; type string { length "1..100"; } } } augment "/ios:native/ios:mac" { uses config-mac-access-list-grouping; } augment "/ios:native/ios:ip/ios:access-list" { uses config-ipv4-acl-grouping; } augment "/ios:native/ios:ip/ios:reflexive-list" { uses config-ipv4-reflexive-grouping; } augment "/ios:native" { uses config-mgmt-traffic-grouping { if-feature "ios-features:mtc-acl"; } } augment "/ios:native/ios:ipv6/ios:access-list" { uses config-ipv6-acl-grouping; } augment "/ios:native" { uses config-access-list-limit-grouping; } }