Command Line Interface4-864Access Control List CommandsAccess Control Lists (ACL) provide packet filtering for IP frames (based on address,protocol, Layer 4 protocol port number or TCP control code) or any frames (basedon MAC address or Ethernet type). To filter packets, first create an access list, addthe required rules, specify a mask to modify the precedence in which the rules arechecked, and then bind the list to a specific port.Access Control ListsAn ACL is a sequential list of permit or deny conditions that apply to IP addresses,MAC addresses, or other more specific criteria. This switch tests ingress or egresspackets against the conditions in an ACL one by one. A packet will be accepted assoon as it matches a permit rule, or dropped as soon as it matches a deny rule. If norules match for a list of all permit rules, the packet is dropped; and if no rules matchfor a list of all deny rules, the packet is accepted.There are three filtering modes:• Standard IP ACL mode (STD-ACL) filters packets based on the source IP address.• Extended IP ACL mode (EXT-ACL) filters packets based on source or destinationIP address, as well as protocol type and protocol port number. If the TCP protocolis specified, then you can also filter packets based on the TCP control code.• MAC ACL mode (MAC-ACL) filters packets based on the source or destinationMAC address and the Ethernet frame type (RFC 1060).The following restrictions apply to ACLs:• This switch supports ACLs for both ingress and egress filtering. However, you canonly bind one IP ACL and one MAC ACL to any port for ingress filtering, and oneIP ACL and one MAC ACL to any port for egress filtering. In other words, only fourACLs can be bound to an interface – Ingress IP ACL, Egress IP ACL, Ingress MACACL and Egress MAC ACL.• When an ACL is bound to an interface as an egress filter, all entries in the ACLmust be deny rules. Otherwise, the bind operation will fail.• Each ACL can have up to 32 rules.• The maximum number of ACLs is also 32.• However, due to resource restrictions, the average number of rules bound theports should not exceed 20.• You must configure a mask for an ACL rule before you can bind it to a port or setthe queue or frame priorities associated with the rule.• The switch does not support the explicit “deny any any” rule for the egress IP ACLor the egress MAC ACLs. If these rules are included in ACL, and you attempt tobind the ACL to an interface for egress checking, the bind operation will fail.• Egress MAC ACLs only work for destination-mac-known packets, not for multicast,broadcast, or destination-mac-unknown packets.The order in which active ACLs are checked is as follows:1. User-defined rules in the Egress MAC ACL for egress ports.2. User-defined rules in the Egress IP ACL for egress ports.