The insert option allows a new rule to be inserted within a IP access list. Consider an IP ACL consisting of rules having precedences 1, 2, 3, 4, 5, and 6. You want to insert a new rule with precedence 4, without overwriting the existing precedence 4 rule. Using the insert option inserts the new rule prior to the existing one. The existing precedence 4 rule‘s precedence changes to 5, and the change cascades down the list of rules within the ACL. That means rule 5 becomes rule 6, and rule 6 becomes rule 7.
Note
NOT using insert when creating a new rule having the same precedence as an existing rule overwrites the existing rule.insert [deny|permit] <PARAMETERS> (log,mark [8021p <0-7>|dscp <0-63>],rule-precedence <1-5000>) {(rule-description <LINE>)}
insert [deny|permit] <PARAMETERS> (log,mark [8021p <0-7>|dscp <0-63>],rule-precedence <1-5000>) {(rule-description <LINE>)}
[deny|permit] | Inserts a deny or a permit rule within an IP ACL |
<PARMETERS> | Provide the match criteria for this deny/permit rule. Packets will be
filtered based on the criteria set here. For more information on the deny rule, see deny (ipv4-acl). For more information on the permit rule, see permit (ipv4-acl). |
log | After specifying the match criteria, specify the action taken for
filtered packets Logs all deny/permit events matching this entry. If a source and/or destination IP address is matched an event is logged. |
mark [8021p <0-7>| dscp <0-63>] | Specifies packets to mark
|
rule-precedence <1-5000> rule-description <LINE> | Assigns a precedence for this deny/permit rule
|
Note
The log option is functional only for router ACL‘s. The log option displays an informational logging message about the packet that matches the entry sent to the console.nx9500-6C8809(config-ip-acl-test)#deny tcp from-vlan 1 any any rule-precedence 1
nx9500-6C8809(config-ip-acl-test)#permit icmp any host 192.168.13.7 1 1 rule-precedence 2
nx9500-6C8809(config-ip-acl-test)#show context ip access-list test deny tcp from-vlan 1 any any rule-precedence 1 permit icmp any host 192.168.13.7 1 1 rule-precedence 2 nx9500-6C8809(config-ip-acl-test)#
In the following example a new rule is inserted between the rules having precedences 1 and 2. The precedence of the existing precedence ‘2‘ rule changes to precedence 3.
nx9500-6C8809(config-ip-acl-test)#insert deny ip any any rule-precedence 2
nx9500-6C8809(config-ip-acl-test)#show context ip access-list test deny tcp from-vlan 1 any any rule-precedence 1 deny ip any any rule-precedence 2 permit icmp any host 192.168.13.7 1 1 rule-precedence 3 nx9500-6C8809(config-ip-acl-test)#
alias |
Creates and configures aliases (network, VLAN, service, etc.) |