What operations can be performed by configuring the dynamic access control list? So how should we perform the operation? The document provides detailed configuration steps with configuration commands and precautions.
This type of ACL is based on lock-and-key. The dynamic acl does not take effect normally and takes effect only when the condition is triggered. For example;
On a vro, I configured the following:
Username netdigedu password 123
Username netdigedu autocommand access-enable host time 5
Line vty 0 4
Login local
Configure a dynamic ACL at the same time:
Access-list 100 permit tcp 192.168.1.1 0.0.0.0 192.168.1.2 0.0.0.0 eq telnet
Access-list 101 dynamic abc timeout 60 permit icmp host 5.5.123.1 host 5.5.12.3
Int e0/0
Ip access-group 100 in
Exit
After the configuration is complete, ping 192.168.1.2 on vro1 1 to get the result of timeout.
When we telnet from vro1 1 to vro2 2, we find the following prompt:
[Connection to 192.168.1.2 closed by foreign host]
When we see this prompt, We can ping vro1 2 on vro1 1.
Line vty 0 4
Autocommand access-enable host timeout 5' set to trigger the dynamic ACL
That is to say, when 192.168.1.1 telnet to 192.168.1.2 and passes verification, the dynamic ACL placed on the e0/0 interface takes effect. At this time, 192.168.1 can be pinged to 192.168.1.2.
For two timeouts, the timeout in access-list indicates the absolute timeout time of the entry, that is, the entry can only exist for 60 minutes, and the timeout in autocommand indicates the idle timeout time, that is to say, if the traffic does not match this entry within 2 minutes, the entry becomes invalid. The default value is forgotten. Thank you!
Let me talk about the host parameter. If the host parameter is added, it is assumed that the dynamic acl is written like this;
Access-list 101 dynamic abc timeout 60 permit icmp 192.168.1.0 0.0.255 host 192.168.1.2
The final generated entry is permit icmp 5.5.123.1 0.0.0.0 host 5.5.12.3, that is, only dynamic entries are generated for a single host that activates the entry. Without the host parameter, an allowed entry is generated for the entire network segment.
In this example, the result of show ip acce is as follows:
R2 # show ip acce
Extended IP address access list 100
10 permit tcp host 192.168.1.1 host 192.168.1.2 eq telnet (807 matches)
20 Dynamic abc permit icmp host 192.168.1.1 host 192.168.1.2
Permit icmp host 192.168.1.1 host 192.168.1.2
We found that the router automatically creates a Dynamic Access Control List entry.
In the complete example above, adding or not adding a host is the same, because the dynamic ACL itself is host.
Note:
1. The entire autocommand command must be complete! Use? No! The error message is not displayed!
2. Only one dynamic access control list can be created in each access control list.