December 2006
Intermediate to advanced
1188 pages
72h 8m
English
You want to know when the router invokes an access-list.
Access-lists can generate log messages. The following example allows all packets to pass, and records them:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#access-list150permit ip any any logRouter1(config)#interfaceRouter1(config-if)#Serial0/1ip access-group150inRouter1(config-if)#exitRouter1(config)#endRouter1#
And in this example, we use the log-input keyword to include additional information about where the packets came from:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#access-list150permit tcp any any log-inputRouter1(config)#access-list150permit ip any anyRouter1(config)#interfaceRouter1(config-if)#Serial0/1ip access-group150inRouter1(config-if)#exitRouter1(config)#endRouter1#
The first example uses the log keyword to record a log message every time the ACL makes a match. Here are some log messages generated by this command:
Feb 6 13:01:19: %SEC-6-IPACCESSLOGRP: list 150 permitted ospf 10.1.1.1 -> 224.0.0.5, 9 packets Feb 6 13:01:19: %SEC-6-IPACCESSLOGDP: list 150 permitted icmp 10.1.1.1 -> 10.1.1.2 (0/0), 4 packets
You can also get a breakdown of how many matches each line in the ACL has recorded with the show access-list command:
Router1#show access-listExtended IP access list 150 permit ip any any log (15 matches) Router1# ...150
Read now
Unlock full access