Switch(config-ext-nacl)#
permit udp any any time-range udp-yes
!
Switch(config-ext-nacl)#
exit
Switch(config)#
interface gigabitethernet2/0/1
Switch(config-if)#
ip access-group strict in
Examples: ACL Logging
Two variations of logging are supported on router ACLs. The
log
keyword sends an informational logging
message to the console about the packet that matches the entry; the
log-input
keyword includes the input
interface in the log entry.
In this example, standard named access list
stan1
denies traffic from 10.1.1.0 0.0.0.255, allows traffic from
all other sources, and includes the
log
keyword.
Switch(config)#
ip access-list standard stan1
Switch(config-std-nacl)#
deny 10.1.1.0 0.0.0.255 log
Switch(config-std-nacl)#
permit any log
Switch(config-std-nacl)#
exit
Switch(config)#
interface gigabitethernet1/0/1
Switch(config-if)#
ip access-group stan1 in
Switch(config-if)#
end
Switch#
show logging
Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns)
Console logging: level debugging, 37 messages logged
Monitor logging: level debugging, 0 messages logged
Buffer logging: level debugging, 37 messages logged
File logging: disabled
Trap logging: level debugging, 39 message lines logged
Log Buffer (4096 bytes):
00:00:48: NTP: authentication delay calculation problems
<output truncated>
00:09:34:%SEC-6-IPACCESSLOGS:list stan1 permitted 0.0.0.0 1 packet
00:09:59:%SEC-6-IPACCESSLOGS:list stan1 denied 10.1.1.15 1 packet
00:10:11:%SEC-6-IPACCESSLOGS:list stan1 permitted 0.0.0.0 1 packet
This example is a named extended access list
ext1
that permits ICMP packets from any source to 10.1.1.0
0.0.0.255 and denies all UDP packets.
Switch(config)#
ip access-list extended ext1
Switch(config-ext-nacl)#
permit icmp any 10.1.1.0 0.0.0.255 log
Switch(config-ext-nacl)#
deny udp any any log
Switch(config-std-nacl)#
exit
Switch(config)#
interface gigabitethernet1/0/2
Switch(config-if)#
ip access-group ext1 in
This is a an example of a log for an extended ACL:
01:24:23:%SEC-6-IPACCESSLOGDP:list ext1 permitted icmp 10.1.1.15 -> 10.1.1.61 (0/0), 1
packet
01:25:14:%SEC-6-IPACCESSLOGDP:list ext1 permitted icmp 10.1.1.15 -> 10.1.1.61 (0/0), 7
packets
01:26:12:%SEC-6-IPACCESSLOGP:list ext1 denied udp 0.0.0.0(0) -> 255.255.255.255(0), 1 packet
01:31:33:%SEC-6-IPACCESSLOGP:list ext1 denied udp 0.0.0.0(0) -> 255.255.255.255(0), 8 packets
Note that all logging entries for IP ACLs start with %SEC-6-IPACCESSLOG with minor variations in format
depending on the kind of ACL and the access entry that has been matched.
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1212
Configuration Examples for ACLs
Summary of Contents for Catalyst 2960 Series
Page 96: ......
Page 196: ......
Page 250: ......
Page 292: ......
Page 488: ......
Page 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Page 590: ......
Page 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Page 620: ......
Page 750: ......
Page 1604: ......
Page 1740: ......
Page 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Page 2106: ......
Page 2118: ......
Page 2164: ......