Add a rule for an extended IPv4 ACL
If you already added an extended IPv4 ACL, you can add a rule to the ACL. You can also add an extended IPv4 ACL and a rule together, as one task. The following procedure describes both options.
To add a rule for an existing or new extended IPv4 ACL:
- Open a web browser and log in to the device UI using your login details and device admin password.
The Dashboard page displays.
- Select Security > ACL > IP ACL > IP ACL/Rules.
The IP ACL/Rules page displays.
The IP ACL Configuration section displays the total number of IPv4 ACLs, IPv6 ACLs, and MAC ACLs that are configured on the switch and the maximum number of ACLs that can be configured.
- Click the Add New button.
The Add IP ACL/Rule pop-up window displays.
- Select the Add Rule to existing ACL or Add new ACL and Rule button.
The window adjusts.
- Click the Extended IP ACL button.
- Click the Add button.
The window closes, and the Extended ACL Rule Configuration (100-199) section displays.
- Do one of the following:
- Add a rule to an existing extended IP ACL: From the ACL ID/Name menu, select the ACL.
- Add a rule to a new extended IP ACL:
- From the ACL ID/Name menu, select Add ACL.
The ACL Name field displays.
- In the ACL Name field, type a number in the range from 100 to 199 or a name of up to 31 characters for an extended IP ACL.
- From the ACL ID/Name menu, select Add ACL.
- In the Sequence Number field, type a number in the range from 1 to 2147483647 to identify the rule.
An IP ACL can contain up to 50 rules.
- Select an Action radio button to set the action that must be taken if a packet matches the rule’s criteria, and configure options that are available with your selection:
- Permit: Forwards packets that meet the ACL criteria. You can configure an egress queue and you can let the switch mirror or redirect traffic to a specific interface. See the steps further down in this procedure.
- Deny: Drops packets that meet the ACL criteria. You can enable logging. See the step further down in this procedure.
Note: In the following steps, configure the criteria that you need for the rule. You do not need to configure all criteria. - (Optionally) If you select the Permit Action radio button, select a hardware egress queue ID from the Egress Queue menu.
This queue is used to handle all packets matching this IP ACL rule. The range for the queue ID is from 0 to 6.
- (Optionally) If you select the Deny Action radio button, click the Logging toggle to enable logging for the ACL rule:
- The toggle is gray and positioned to the left: Logging is disabled for this ACL rule. This is the default setting.
- The toggle is purple and positioned to the right: Logging is enabled for this ACL rule (subject to resource availability on the switch).
- (Optionally) If you select the Permit Action radio button, select an Interface radio button to let the switch mirror or redirect traffic to a specific interface:
- Mirror: From the menu, select the egress interface to which the matching traffic stream must be copied, in addition to being forwarded normally by the switch.
A mirror interface and a redirect interface are mutually exclusive.
- Redirect: From the menu, select the egress interface to which the matching traffic stream must be redirected, bypassing any forwarding decision normally performed by the switch.
A redirect interface and a mirror interface are mutually exclusive.
- Mirror: From the menu, select the egress interface to which the matching traffic stream must be copied, in addition to being forwarded normally by the switch.
- From the Match Every menu, select if all packets must match the IP ACL rule:
- False: Not all packets need to match the ACL rule. You can configure other match criteria on the page.
- True: Each packet must match the ACL rule. You cannot configure other match criteria on the page.
If you select True, go to 23.
- From the Protocol Type menu, select a protocol that a packet’s IP protocol must be matched against:
IP, ICMP, IGMP, TCP, UDP, EIGRP, GRE, IPINIP, OSPF, PIM, or Other.
The protocol selection determines the options that are available on the page.
If you select Other, type a protocol number from 0 to 255 in the Other Protocol Type field. Then, continue with 22.
- In the Src (source) section, select to set an individual IP source address and subnet mask or a source IP host address:
You can select the IP Address radio button or the Host radio button:
- IP Address: In the IP Address field, type a source IP address. In the Subnet Mask field, type a source IP mask, type a relevant wildcard mask, or leave the field empty, which means any.
The IP address and subnet mask are compared to a packet’s source IP address and subnet mask.
- Host: In the Host Name field, type a source host name.
The host name (or the IP address associated with the name) is compared to a packet’s source host name (or the IP address associated with the name).
- IP Address: In the IP Address field, type a source IP address. In the Subnet Mask field, type a source IP mask, type a relevant wildcard mask, or leave the field empty, which means any.
- If you select TCP or UDP from the Protocol Type menu, in the Src L4 (source Layer 4) section, select to set an individual port number or a range of port numbers:
You can select the Port radio button or the Range radio button:
- Port: Select one of the following protocols from the menu:
- The source IP TCP port protocols are domain, echo, ftp, ftpdata, www-http, smtp, telnet, pop2, pop3, and bgp. A selected protocol translates into its equivalent port number.
- The source IP UDP port protocols are domain, echo, snmp, ntp, rip, time, who, and tftp. A selected protocol translates into its equivalent port number.
- Select Other to type a port number from 0 to 65535 in the rightmost field. The matching condition is always Equal (see the middle field).
The source port is compared to a packet’s source port.
- Range: Define a range by selecting a protocol from the Start Port menu and a protocol from the End Port menu:
- The source IP TCP port protocols are domain, echo, ftp, ftpdata, www-http, smtp, telnet, pop2, pop3, and bgp. A selected protocol translates into its equivalent port number.
- The source IP UDP port protocols are domain, echo, snmp, ntp, rip, time, who, and tftp. A selected protocol translates into its equivalent port number.
- Select Other to type a port number from 0 to 65535 in the rightmost field.
The source port range is compared to a packet’s source port range.
- Port: Select one of the following protocols from the menu:
- In the Dst (destination) section, select to set an individual IP source address and subnet mask or a destination IP host address:
You can select the IP Address radio button or the Host radio button:
- IP Address: In the IP Address field, type a destination IP address. In the Subnet Mask field, type a destination IP mask, type a relevant wildcard mask, or leave the field empty, which means any.
The IP address and subnet mask are compared to a packet’s destination IP address and subnet mask.
- Host: In the Host Name field, type a destination host name.
The host name (or the IP address associated with the name) is compared to a packet’s destination host name (or the IP address associated with the name).
- IP Address: In the IP Address field, type a destination IP address. In the Subnet Mask field, type a destination IP mask, type a relevant wildcard mask, or leave the field empty, which means any.
- If you select TCP or UDP from the Protocol Type menu, in the Dst L4 (destination Layer 4) section, select to set an individual port number or a range of port numbers:
You can select the Port radio button or the Range radio button:
- Port: Select one of the following protocols from the menu:
- The destination IP TCP port protocols are domain, echo, ftp, ftpdata, www-http, smtp, telnet, pop2, pop3, and bgp. A selected protocol translates into its equivalent port number.
- The destination IP UDP port protocols are domain, echo, snmp, ntp, rip, time, who, and tftp. A selected protocol translates into its equivalent port number.
- Select Other to type a port number from 0 to 65535 in the rightmost field. The matching condition is always Equal (see the middle field).
The destination port is compared to a packet’s destination port.
- Range: Define a range by selecting a protocol from Start Port menu and a protocol from the End Port menu:
- The destination IP TCP port protocols are domain, echo, ftp, ftpdata, www-http, smtp, telnet, pop2, pop3, and bgp. A selected protocol translates into its equivalent port number.
- The destination IP UDP port protocols are domain, echo, snmp, ntp, rip, time, who, and tftp. A selected protocol translates into its equivalent port number.
- Select Other to type a port number from 0 to 65535 in the rightmost field.
The destination port range is compared to a packet’s destination port range.
- Port: Select one of the following protocols from the menu:
- If you select IGMP from the Protocol Type menu, set the IGMP message type.
The range is from 0 to 255. If you leave the field empty, it means any IGMP message type.
The IGMP message type is compared to a packet’s IGMP message type.
- If you select ICMP from the Protocol Type menu, select either the Type or Message radio button:
- If you select the Type radio button, type a code in the left field. To set a range of codes, type a code in the left field and another code in the Code field (the right field).
The range is from 0 to 255. If you leave the field empty, it means any ICMP type.
The ICMP type is compared to a packet’s ICMP type.
- If you select the Message radio button, from the menu, select the type of the ICMP message:
echo, echo-reply, host-redirect, mobile-redirect, net-redirect, net-unreachable, packet-too-big, port-unreachable, source-quench, router-solicitation, router-advertisement, ttl-exceeded, time-exceeded, or unreachable.
Specifying a type of message implies that both the ICMP type and ICMP code are specified. That is, the ICMP message is decoded into the corresponding ICMP type and ICMP code within the ICMP type and compared to a packet’s type of the ICMP message.
- If you select the Type radio button, type a code in the left field. To set a range of codes, type a code in the left field and another code in the Code field (the right field).
- (Optionally) Click the Fragments toggle to allow initial fragments (that is, the fragment bit is asserted) or prevent initial fragments from being used:
- The toggle is gray and positioned to the left: Initial fragments are not allowed. This is the default setting.
- The toggle is purple and positioned to the right: Initial fragments are allowed.
This option is not valid for rules that match L4 information such as a TCP port number, because that information is carried in the initial packet.
- (Optionally) In the Service Type section, select the IP DSCP, IP Precedence, or IP TOS radio button to set a match criterion for the service type field in a packet’s IP header.
IP DSCP, IP precedence, and IP ToS are alternative methods to specify a match criterion for the same service type field in a packet’s IP header. Each method uses a different user notation. After you make a selection, you can set a value.
- IP DSCP: The IP DiffServ Code Point (DSCP) field in a packet is defined as the high-order 6 bits of the service type octet in the IP header. Select a keyword from the IP DSCP menu. If you select Other, type a number from 0 to 63 in the Other IP DSCP field.
- IP Precedence: The IP precedence field in a packet is defined as the high-order three bits of the service type octet in the IP header. From the menu, select a number from 0 to 7.
- IP TOS: The IP ToS field in a packet is defined as all 8 bits of the service type octet in the IP header. You can set two values:
- Left field: The ToS bits value is a hexadecimal number from 0 to ff.
- Right field: The ToS mask value is also a hexadecimal number from 0 to ff. The ToS mask denotes the bit positions in the ToS bits value that are used for comparison against the IP ToS field in a packet.
For example, to check for an IP ToS value for which bit 7 is set (as the most significant value), for which bit 5 is set, and for which bit 1 is cleared, use a ToS bits value of 0xA0 and a ToS mask of 0xFF.
- Click one of the following buttons:
- Save: To save your settings, click the Save button.
The rule is added to the IP ACL.
In the IP ACL/Rule Table, each ACL displays the number of rules currently in place for the IP ACL.
- Clear: To clear the settings so you can specify other settings before you save them, click the Clear button.
- Back: To cancel the settings and return to the initial IP ACL/Rules page with the IP ACL/Rule Table section, click the Back button.
- Save: To save your settings, click the Save button.