Use this command to create a deny access list rule entry.
protocol-num | Specifies an IPv4 protocol for which to deny access. Valid values are protocol numbers from 0 - 255. |
ip | Specifies any IPv4 protocol (0 - 255) |
esp | Specifies the Encapsulation Security Payload protocol |
gre | Specifies the Generic Router Encapsulation protocol |
tcp | Specifies the Transmission Control Protocol |
udp | Specifies the User Datagram Protocol |
icmp | Specifies the IP Internet Control Message Protocol |
source | Specifies the IPv4 address of the network or host from which the packet is sent. |
source-wildcard | Specifies the bits to ignore in the source address. |
destination | Specifies the IPv4 address of the network or host to which the packet will be sent. |
destination-wildcard | Specifies the bits to ignore in the destination address. |
any | Specifies that any source or destination (extended access list only) address applies to this rule entry. |
host ip-address | Specifies a specific host address that will be applied to this rule entry. |
msg icmp-msg | (Optional) Specifies a single ICMP message type by entering a keyword. Supported message type keywords are provided in ICMP Message Types. |
eq | neq | gt | lt {source-port | dest-port} | (Optional) Specifies that a source or destination port is permitted. The meaning of the keywords are:
|
range start-port end-port | (Optional) Specifies a range of source or destination ports permitted. |
established | (Optional) Specifies that only established TCP connections are permitted. A match is made if ACK or RST bits are set. |
dscp code | (Optional) Specifies a DiffServe Code Point (DSCP) value to match against this packet‘s DSCP code. Valid values are 0 - 63, or one of the following keywords:
|
precedence value | (Optional) Specifies an IP Precedence value. Valid values are 0 - 7, or in order from high to low: critical, flash, flash-override, immediate, internet, network, priority, routine. |
tos value | (Optional) Specifies a Type of Service (ToS) value. Valid values are 0 - 15, or max-reliability, max-throughput, min-delay, min-monetary-cost, normal. |
log | log-verbose | (Optional) Enables syslog or verbose syslog messaging for an ACL rule hit. |
Configuration command, standard or extended access list configuration.
Entering any IPv4 protocol number will configure the deny entry for the specified protocol, but will limit configurable parameters to the list in the protocol-num syntax. Specifying the tcp, udp, or icmp keywords will provide the extended parameter set listed in the syntax for these keywords.
Access list logging is throttled to 1 log message per second. If there are multiple access list rules with logging enabled (log or log-verbose), and more then one frame is transmitted per second that can hit those rules, only the first frame will generate a message. Logging is sampling and does not report every time that a rule with logging enabled is hit.
Source and destination wildcard masks are inverted. That is, they specify the “don't care” bits as 1.
The any option is short hand for 0.0.0.0 255.255.255.255.
This example enters configuration mode for standard access list 2 and configures a deny entry for source address 10.0.0.1 with a source wildcard of 0.0.255.255:
System(rw-config)->ip access-list standard 2 System(rw-cfg-std-acl)->deny 10.0.0.1 0.0.255.255 System(rw-cfg-std-acl)->
This example enters configuration mode for extended access list 120 and configures a deny entry for the IP protocol with a source address 20.0.0.1 and source wildcard of 0.0.255.255 and a destination address of any and destination wildcard of 0.0.0.255:
System(rw-config)->ip access-list extended 120 System(rw-cfg-ext-acl)->deny ip 20.0.0.1 0.0.255.255 any 0.0.0.255 System(rw-cfg-ext-acl)->