acl_feature_overview_guide
acl_feature_overview_guide
Introduction
This guide describes Access Control Lists (ACLs), and general ACL configuration information. For
detailed command information and examples for ACL commands, see the following chapters in your
product’s Command Reference:
Hardware ACLs are applied directly to interfaces, or are used for Quality of Service (QoS)
classifications. Software ACLs are applied to Routing and Multicasting.
The hardware ACL action send-to-vlan-port is supported from version 5.4.6-2.1 onwards.
Per-VLAN ACLs are supported from version 5.4.6-2.1 onwards (on most switch series - see
"Filtering traffic on VLANs (per-VLAN ACLs)" on page 17 for support details).
Version 5.4.8-0.2 changes the number of rule entries used by per-VLAN ACLs on some switches
- see "Filtering traffic on VLANs (per-VLAN ACLs)" on page 17.
The show access-list counters command is supported from version 5.5.1-2.1 onwards.
You can use ACLs to drop unwanted packets without sending them to the CPU from version
5.5.3-0.1.
Content
Introduction .........................................................................................................................................1
Products and software version that apply to this guide ...............................................................2
Overview .......................................................................................................................................5
ACL rules ......................................................................................................................................5
ACL memory optimization for SBx8100, x220, x320, and FS980M Series.......................................39
Introduction.................................................................................................................................39
How it works and some limitations.............................................................................................39
Monitoring ACL rule use .............................................................................................................43
Overview
An Access Control List is one filter, or a sequence of filters, that are applied to an interface to either
block or pass (or when using QoS, apply priority to) packets that match the filter definitions. ACLs
are used to restrict network access by hosts and devices and to control network traffic.
An ACL contains an ordered list of filters. Each filter specifies either permit or deny and a set of
conditions the packet must satisfy in order to match the filter. The meaning of permit or deny entries
depends on the context in which the ACL is used - either on an inbound or an outbound interface.
When a packet is received on an interface, the switch compares fields in the packet against filters in
the ACL to check whether the packet has permission to be forwarded, based on the filter properties.
The comparison process stops as soon as the first match is found, and then the action of the ACL is
applied. If no entries match, then, for the case of AlliedWare Plus hardware ACLs, the ACL ends in
an implicit 'permit all else' clause. So, the unmatched packets are permitted.
Because filters in an ACL are applied sequentially and their action stops at the first match, it is very
important that you apply the filters in the correct order. For example you might want to pass all traffic
from VLAN 4 except for that arriving from two selected addresses A and B. Setting up a filter that
first passes all traffic from VLAN 4 then denies traffic from addresses A and B will not filter out traffic
from A and B if they are members VLAN 4. To ensure that the traffic from A and B is always blocked
you should first apply the filter to block traffic from A and B, then apply the filter to allow all traffic
from VLAN 4. You can assign sequence numbers to filters. See "ACL filter sequence numbers" on
page 45 for more information.
ACL rules
The source or destination address or the protocol of each packet being filtered are tested against
the filters in the ACL, one condition at a time (for a permit or a deny filter).
If a packet does not match a filter then the packet is checked against the next filter in the ACL.
If a packet and a filter match, the subsequent filters in the ACL are not checked and the packet
is permitted or denied as specified in the matched filter.
The first filter that the packet matches determines whether the packet is permitted or denied.
After the first match, no subsequent filters are considered.
If the ACL denies the address or protocol then the software discards the packet.
Checking stops after the first match, so the order of the filters in the ACL is critical. The same
permit or deny filter specified in a different order could result in a packet being passed in one
situation and denied in another situation.
Multiple ACLs per interface, per protocol (i.e. IPv4 and IPv6), per direction are allowed.
For inbound ACLs, a permit filter continues to process the packet after receiving it on an inbound
interface, and a deny filter discards the packet.
Note: The filtering principles applied to software ACLs (those in the range 1 to 2699) are different to
those applied to hardware ACLs (those in the range 3000 to 4699).
- software ACLs will deny access unless explicitly permitted by an ACL action.
- hardware ACLs will permit access unless explicitly denied by an ACL action.
1 to 99 IP standard ACL1
1
Software ACLs that use either the ranges 1-99, 100-199, 1300-1999, 2000-2699, or are named ACLs
(that use the standard or extended keyword followed by a text string), are used in features such as
SNMP, IGMP and OSPF.
Hardware ACLs
These ACL types are applied directly to an interface, or are used for QoS classifications.
Software ACLs
You can name software ACL types using the standard or extended keyword, followed by a text
string.
In AlliedWare Plus, software ACLs are not used directly for filtering packets that are being forwarded.
Rather, the software ACLs are used more for purposes like defining:
The types of features that make use of software ACLs for these purposes are SNMP, PIM, IGMP,
OSPF, and BGP. Examples of where software ACLs are used include:
Specifying a set of RIP routes to which a particular Administrative Distance should be applied:
Filtering which routes from the OSPF route table should be imported into the main IP route table:
Defining the addresses of management stations that can access a given SNMP community:
Specifying the range of multicast groups for which a router is offering PIM RP candidacy:
an action, such as permit, or deny. See "Actions for hardware ACLs" on page 13
a source MAC address. You can use the format, HHHH.HHHH.HHHH to filter on a specific MAC
address (where H is a hexadecimal number), or you can filter on any source MAC address by
entering the word “any”.
a source MAC mask. This mask determines which portion of the source MAC address header will
be compared with that found in the incoming packets. The mask is configured in the format
HHHH.HHHH.HHHH where each H is a hexadecimal number. In practice each hex number will
normally be either 0 (to represent a match) or F (to represent a don’t care condition). A mask is
not required if the source address is specified as “any”.
a destination MAC address. You can use the format, HHHH.HHHH.HHHH, to filter on a specific
MAC address (where H is a hexadecimal number), or you can filter on any destination MAC
address by entering the word “any”.
a destination MAC mask. This mask determines which portion of the destination MAC address
header will be compared with that found in the incoming packets. The mask is configured in the
format <HHHH.HHHH.HHHH> where each H is a hexadecimal number. In practice each hex
number will normally be either 0 (to represent a match) or F (to represent a don’t care condition).
A mask is not required if the source address is specified as “any”.
Example To permit packets coming from a specific MAC address of 0030.841A.1234 and with any destination
address:
a packet type:
IP: This matches any type of IP packet. A source and destination address must be specified,
although they can be “any”. The source address matches packets coming from specified
networking devices or hosts. The destination address matches packets going to specified
networking devices or hosts.
ICMP: This matches ICMP packets. A source and destination address must be specified,
although they can be “any”. An ICMP type can optionally be specified after the destination
address.
TCP: This matches TCP packets. A source and destination address must be specified,
although they can be “any”. After the source address, a source port can optionally be
specified and after the destination address a destination port can optionally be specified. The
port matching can be done using eq (equal to), gt (greater than), lt (less than), ne (not equal
to), or range (for a range of ports, which requires a start port and an end port).
UDP: This matches UDP packets and has the same options as TCP.
proto: This allows any IP protocol type to be specified (e.g. 89 for OSPF). A source and
destination address must be also specified, although they can be “any”.
For example:
To match (and permit) any type of IP packet containing a destination address of 192.168.1.1:
To match (and permit) an ICMP packet with a source address of 192.168.x.x and an ICMP code
of 4:
To match a TCP packet with a source address of 192.168.x.x, source port of 80 and a destination
port from 100 to 150:
To match (and permit) a UDP packet with a source address of 192.168.30.2/32 and a destination
port of 5062:
Note: An IP address mask can be specified using either of the following notations:
ACLs use reverse masking, also referred to as wildcard masking, to indicate to the switch
whether to check or ignore corresponding IP address bits when comparing the address bits in
an ACL filter to a packet being submitted to the ACL.
Reverse masking for IP address bits specify how the switch treats the corresponding address
bits. A reverse mask is also called an inverted mask because a 1 and 0 mean the opposite of
what they mean in a subnet or a network mask.
IP protocol number, for example 1 for ICMP, 2 for IGMP, 50 for ESP, 89 for OSPF, etc. Or, you can
simply specify “IP”, to match any IP protocol
VLAN ID
VLAN ID
Inner VLAN ID
ICMP type
VLAN ID
VLAN ID
You can find the exact syntax of the commands to create these entries in your switch’s Command
Reference.
There is no restriction on the combinations of filter entry types that can exist together in the same
ACL.
This will put you into Hardware ACL Configuration mode, with the prompt:
awplus(config-ip-hw-acl)#
and so on...
This puts you into IPv6 hardware configuration mode, with the prompt:
awplus(config-ipv6-hw-acl)#
Step 2: Define the filters that comprise the content of the ACL
awplus(config-ipv6-hw-acl)# permit ip 2001:db8::/64 2001:db9::/64
awplus(config-ipv6-hw-acl)# deny ip 2001:db8::/64 any
PARAMETER ACTION
copy-to-cpu Send a copy of the packet to the CPU and forward it as well.
send-to-cpu Send the packet to the CPU and do not forward it. Note that
specifying this action could result in EPSR healthcheck messages
and other control packets being dropped.
send-to-mirror Send the packet to the mirror port so packets are not switched.
copy-to-mirror Send a copy of the packet to the mirror port and forward it as well.
send-to-vlan-port vlan <vid> port <port> Send the packet out the specified port, tagged with the specified
VLAN. This option was introduced in 5.4.6-2.1.
deny-and-not-cpu Drop the packet and make sure that it isn’t sent to the switch’s
CPU. This option was introduced in 5.5.3-0.1 on some switches.
Use it if you want to drop packets that AlliedWare Plus would
normally send to the switch’s CPU. See "Using ACLs to drop
unwanted packets without sending them to the CPU" on page 23
for an example.
Note that on some AlliedWare Plus switches, this action is
unavailable because the action of deny already prevents packets
from going to the CPU.
Similarly, a named hardware ACL can applied to an interface with the commands:
awplus#configure terminal
awplus(config)# access-list 3000 permit ip 192.168.1.0/24 any
awplus(config)# access-list 3001 deny ip 192.168.0.0/24 any
awplus(config)# access-group 3000
awplus(config)# access-group 3001
You can optionally limit this to a single ACL. For example, to display the matches for the ACL named
‘ACL-1’, use the command:
ACL-1
Packet Hits: 17
ACL-2
Packet Hits: 0
ACL-3
Packet Hits: 1
Caution: If you enable this logging, do not use an action of copy-to-cpu or send-to-cpu in any of
the switch’s ACLs. If you do, packets that match those ACLs will also be dropped.
The terminal monitor, by default, as long as you enter the command terminal monitor. and
If you change the severity of the messages to warn, to the buffered log, permanent log, and
external log as well. The external log defines what logs will be sent to external syslog servers.
awplus#configure terminal
awplus(config)#access-list hardware-deny-log [warn|info] [rate <1-1000>]
[burst <1-1000>] [timeout <1-3600>]
Caution: Be careful when changing these settings. If your changes significantly increase the
number of log messages produced, the switch’s CPU may become busy.
In this command:
warn means that the logs have a severity level of ‘warning’ and info means that the logs have a
severity level of ‘info’. The default is info. If you want the messages to go to the permanent log
as well as the terminal, change this to warn.
rate limits the number of log messages produced per hour. The switch will stop creating log
messages if packets are denied at a higher rate than this specified rate. The default is 12 packets
per hour. This means, for example, that if there are 60 denied packets in the first hour, then at
most the first 12 of these packets will be logged. After that, logging will stop unless the rate drops
below 12 an hour. (The actual number of packets logged depends on the number of flows the
dropped packets come from; see the burst parameter).
burst is the maximum initial number of packets to log for a given flow. A flow is a set of packets
with the same source IP address, destination IP address, source port, and destination port. The
default is 5. The burst number reduces by 1 each time a packet in the flow is logged. Then it
increases by 1 again every time the rate drops below the limit set by the rate parameter, up to the
burst number.
timeout is the length of time it takes for a flow record to expire, in seconds. The switch considers
that a flow has expired if it hasn’t received any packets that match that flow for the timeout
number of seconds. The default is 3600 seconds (1 hour). When a flow expires, its burst value is
reset and logging may restart (depending on the current rate of denied packets).
The icmp, proto, tcp and udp parameters can be used for an IPv4 or IPv6 ACL.
Management ACLs
The Management ACLs feature restricts who is allowed remote access to your device using Telnet or
SSH. This Management ACL is a simple security feature that binds an ACL (Access Control List) to
the VTY’s (Virtual Terminal Lines). This will allow or deny IP addresses included in the ACL to create
a connection to your device.
vty access-class
Examples:
vty access-class
Example To allow remote logins from IP 10.50.115.41 only, using a numbered IP standard ACL, use the
commands:
PARAMETER DESCRIPTION
Example To allow remote logins from IP 2001:5a7:1504:e080: :1 only, using a named standard IPv6 AC, use
the commands:
SBx908, SBx8100, x230, x310, x510, x510DP, x510L, IX5, x610, x930, DC2552XS, IE200, IE300
and IE510 Series switches, running software version 5.4.6-2.1 and later
Per-VLAN ACLs enables you to filter traffic as it ingresses VLANs, by attaching ACLs to VLANs. To
do this, first create your ACLs, then apply the ACLs to a VLAN access-map, and then apply the map
to the desired VLANs.
Example
To deny all packets on VLAN 48 and 49, use the following steps:
2. Create an ACL to block packets from any source MAC address to any destination MAC address.
3. Create a VLAN access-map called (for example) ‘deny_all’ and match this ACL
Per-VLAN ACL rules will be applied to all ports on which the VLAN is active. This means they will be
applied to all ports that are access ports in the VLAN, all trunk ports that allow packets tagged for
the VLAN, and all trunk ports whose native VLAN is this VLAN.
Number of rules
Each VLAN ACL uses one ACL rule entry per VLAN it is filtering. For example, the following situation
uses 2 entries:
However, on FS980M, SBx908, and SBx8100 systems, the number of rules used changes for ports
within a VLAN that also have port ACLs or QoS policy-maps attached. On such ports, each VLAN
ACL filter uses an extra entry.
Also, on FS980M, SBx908, SBx8100 systems running version 5.4.7.x.x or earlier, each VLAN ACL
uses one ACL rule entry per VLAN it is filtering, per port it is applied to. On those versions, the
above example would use 6 rule entries.
The maximum number of ACL rules available depends on the switch model and port type. To see the
available number of ACLs, use the show platform classifier statistics utilization brief command.
Rule precedence
SBx908 and On SBx908 and SBx8100 switches, the switch checks packets against ACLs in the following order
SBx8100 on ingress:
switches
Once a packet matches an ACL (either a permit or deny match), the SBx908 or SBx8100 switch
stops checking it against further ACLs.
IE200 On IE200 Series switches, the switch checks packets against ACLs in the following order on ingress:
Series
switches
Once a packet matches an ACL (either a permit or deny match), the IE200 Series switch stops
checking it against further ACLs.
Other On other switches, the switch checks packets against ACLs in the following order on ingress:
switches
On these switches, once an ACL denies a packet, the switch stops checking against further ACLs
and drops the packet. If a port ACL permits the packet, the switch does not check VLAN ACLs. If
either a port ACL or VLAN ACL permits the packet, the switch checks the packet against QoS ACLs.
You can view details of the per-VLAN ACLs by using the following show commands:
Example output from show vlan filter for the access-map named deny_all:
ACL groups
ACL groups allow for smaller configuration files to achieve the same ACL configuration. By
specifying a list of hosts or ports as a group, that group can be used in an ACL instead of having to
specify an ACL for each host/port combination. In some cases, this can be a large saving in
configuration.
ACL groups can be used when adding ACLs for multiple hosts that require the same filtering. For
example, blocking three ports on four hosts requires twelve lines of ACLs. Using host groups and
port groups, only one ACL needs to be entered in the configuration. The hardware entries are not
changed; twelve entries are still used in the ACL table. ACL groups are supported in global ACLs on
platforms that support global ACLs.
Note: ACL groups help you reduce the configuration that needs to be entered, but do not make
more space available in hardware.
1. Define one or more lists of hosts using the acl-group command. These hosts can have masks in
the same way hosts specified in existing ACLs do.
2. Define one or more lists of ports, along with their operation (equal, not equal, greater than, less
than).
Configuration examples
This is an example of how you could configure an ACL where two sources are required to be
blocked on 8 different service ports (10, 20, 30, 40, 50, 60, 70, 80). As can be seen below, the hosts
and ports are repeated a number of times.
ACL groups can be used to prevent repetitive lines in the config, and instead generate this config
internally. The same ACL can be created using ACL groups. A host ACL group and a port ACL group
must be created first. A host ACL group is a set of hosts that will be applied to an ACL. A port ACL
group is a list of service ports that will be applied to an ACL. First, create a host ACL group:
After the host group has been configured, create a port ACL group:
Once we have both a host ACL group and a port ACL group, we can create a new ACL using these
groups:
As can be seen from the example above, new hosts or services ports can be denied using the
existing ACL and ACL groups. Adding a new host to be denied using the existing config would have
required 8 more lines of config. With the new ACL groups, the same can be accomplished using only
one line.
Once your ACL groups are configured, they can be seen in the config:
! Use the access list in the same way it has always been done
interface port1.0.1-1.0.24
access-group myblacklist
This example shows a group of IPv4 hosts and a group of TCP ports. The resulting list is applied to
all interfaces to block these host/port combinations. If extra hosts or ports are added to the groups,
the ACLs in hardware are automatically updated.
Show commands
As ACL groups are simply a more compact way of specifying ACLs, all the standard ACL display
commands will work for ACL groups as well. The ACL groups show in the running config, but can
also be displayed directly with the following commands:
Using ACLs to drop unwanted packets without sending them to the CPU
From version 5.5.3-0.1 onwards, some switches have an action on hardware ACLs to drop packets
and make sure that they aren’t sent to the switch’s CPU. This may be useful if you want to drop
packets that AlliedWare Plus would normally send to the switch’s CPU.
For example, this action may be useful if you have AMF Security and it is registering MAC addresses
because it receives loop detection frames (LDF) from other switches in your network. You can use
this action to prevent AMF Security from seeing the LDF frames. To configure this, do the following
steps on edge devices that have ports with auth-mac enable configured on them.
Step 3: Create a class-map that matches on that ACL and on the Ethernet format for
LDF, which is 8899
awplus(config)# class-map LDF
awplus(config-cmap)# match access-group 4000
awplus(config-cmap)# match eth-format ethii-any protocol 8899
awplus(config-cmap)# exit
The interface ACLs and QoS classifications are implemented by taking the first matching filter and
applying the action defined for that filter. All subsequent matches in the table are then ignored. Thus,
because ACLs are also matched first, if the matching ACL has a permit action, the packet is
forwarded due to that rule's action and any subsequent QoS rules are bypassed.
You can also apply permit rules using QoS. For example, you might want to permit a source IP
address of 192.168.1.x, but block everything else on 192.168.x.x. In this case you could create both
the permit and deny rules using QoS. For more information on these applications see "Actions for
hardware ACLs" on page 13.
QoS ACLs
When using ACLs though QoS, the same classification and action abilities are available, but QoS
has some additional fields that it can match on, see "Expanding ACL match criteria with QoS" on
page 26, and also provides the ability to perform metering, marking, and remarking on packets that
match the filter definitions. The action used by a QoS class-map is determined by the ACL that is
attached to it. If no ACL is attached, it uses the permit action. If an ACL is not required by the class-
map (for example, only matching on the VLAN) and a deny action is required, a MAC ACL should be
added with any for source address and any for destination address.
The following example creates a class-map with will deny all traffic on VLAN 2:
The default class-map matches to all traffic and so cannot have any match or ACL commands
applied to it. The action for this class-map is set via the default-action command and is permit by
default. It can be changed to deny by using the following commands:
Create ACL 3000 to permit all packets from the 192.168.1 subnet:
Create ACL 3001 to deny all packets from the 192.168.0 subnet:
awplus(config-pmap)# exit
Only one ACL can be attached to a class-map, but multiple class-maps can be attached to a policy-
map. Interface ACLs can be attached to the same port as a QoS policy, with the interface ACLs
being matched first as described at the beginning of the section about "Hardware ACLs and QoS
classifications" on page 24.
Config-cmap mode describes the fields that can be matched on. Only one of each type can be
matched, with the exception of tcp-flags (see below for classification). If multiple matches are
specified, they are ANDed together. The following example shows how you can match a packet on
VLAN 2, that has a source IP address of 192.168.x.x and a DSCP of 12:
Step 1: Create ACL 3000 to permit all packets from the 192.168 subnet:
awplus# configure terminal
awplus(config)# access-list 3000 permit ip 192.168.0.0/16 any
Step 2: Apply ACL 3000 to the class-map cmap1, add the matching criteria of VLAN 2
and DSCP 12:
awplus(config)# class-map cmap1
awplus(config-cmap)# match access-group 3000
awplus(config-cmap)# match vlan 2
awplus(config-cmap)# match dscp 12
awplus(config-cmap)# exit
Note that the matching is looking to see whether “any” of the specified flags are set. There is no
checking for whether any of these flags are unset. Therefore the following commands will match on
a packet in any of the following combinations of syn and ack status flags as shown in the following
table:
Unset Set No
Unset Unset No
If you want to drop packets with syn only, but not with ack and syn, the following two class-maps
can be used (note that ACL 4000 is used to apply a drop action as described in "Actions for
hardware ACLs" on page 13):
Create ACL 4000 to deny all packets with any source or destination address:
awplus#configure terminal
awplus(config)#access-list 4000 deny any any
awplus(config)#class-map cmap1
awplus(config-cmap)# match tcp-flags ack syn
awplus(config-cmap)# exit
Create the class-map cmap2 and configure it to match on the TCP flag, syn:
The following table will help you manage your ACL mask:
Protocol Type 2
Ethernet format 2
1
Most classification fields use some of the 16 ‘profile bytes’ that are available to classify incoming
packets. For example, an ACL with both source and destination MAC address fields set will consume
12 of the 16 bytes. However IPv6 source address, and IPv4 source and destination address, will not
consume any bytes, allowing greater freedom in ACL configuration options.
C613-22039-00 REV M Profile limitations on SBx908 and x900 Series switches | Page 29
Access Control Lists (ACLs)
A hardware filter that matches on source MAC address: this adds 6 more bytes to the mask.
A QoS class map that matches on destination IP address and DSCP (1 byte): this adds 1 more
byte to the mask, for the DSCP.
A hardware filter that matches on source IP address and source TCP port: this does not change
the mask, because the switch already matches on source TCP port, and source IP address does
not use any bytes.
A hardware filter that matches on source UDP port: this does not add any length to the mask,
because it shares the same 2 bytes as the source TCP port. However, if you next make a hardware
filter that matches on destination TCP or UDP port, that uses another 2 bytes.
There is no particular number of hardware filters or QoS flow groups that will cause the mask to
reach its 16-byte limit - it could happen after a few filters, or you might be able to create hundreds of
filters without the mask reaching its limit.
To determine whether you will have enough filter length, look at the fields you want to filter,
determine the number of bytes for each field, and sum up the total number of bytes. If that number
is less than 16, there is enough filter length. Don’t forget to count TCP and UDP source port as a
single field, and likewise to count TCP and UDP destination port as a single field.
C613-22039-00 REV M Profile limitations on SBx908 and x900 Series switches | Page 30
Access Control Lists (ACLs)
The maximum number of individual hardware ACLs depends on the hardware type of the port you
apply the ACLs to, and the setting of the platform hwfilter-size command.
On SBx908 and x900 Series switches (but not for the SBx908 GEN2 switch), two hardware types
exist: Hardware Version 1 and Hardware Version 2. The following table shows the hardware
modules and the version to which each belongs:
Baseboard XEM-12Sv2
XEM-12T XEM-12Tv2
XEM-12S XEM-2XP
XEM-1XP XEM-2XS
XEM-2XT
XEM-24T
The following table shows the maximum number of filters for each hardware type and platform hwfilter-size
command setting.
C613-22039-00 REV M Profile limitations on SBx908 and x900 Series switches | Page 31
Access Control Lists (ACLs)
Figure 1: Example output from show platform classifier statistics utilization brief
[Instance 0]
[port1.0.1-port1.0.12]
Number of PCE Entries:
UDB Usage:
Legend of Offset Type) 1:Ether 2:IP 3:TCP/UDP
UDB Set Offset Type Used / Total
------------- 0------8------15 ------------
IPv4_TCP 0000000000000000 0 / 16
IPv4_UDP 0000000000000000 0 / 16
MPLS 0000000000000000 0 / 16
IPv4_Frag 0000000000000000 0 / 16
IPv4 0000000000000000 0 / 16
Ethernet 0000000000000000 0 / 16
IPv6 0000000000000000 0 / 16
...
C613-22039-00 REV M Profile limitations on SBx908 and x900 Series switches | Page 32
Access Control Lists (ACLs)
This section first lists the number of filters and then discusses the protocol components. Then it
gives examples of rule and user-defined byte usage for different ACLs.
SBx81GP24 1536
SBx81GT24 1536
SBx81GT40 1536
SBx81XS16 1536
SBx81CFC960 1536
SBx81XLEM 5120
SBx81GS24a 7168
SBx81XS6 7168
you filter by TCP and UDP port ranges by using the lt, gt, ne, and range parameters of the
access-list command. In this case, the switch might create multiple filters, in order to cover the
specified range of port numbers.
an ACL is neither IPv6 nor non-IPv6 specific, because it only contains Layer 2 protocol
components. In that case, two filters are added to hardware, one for IPv6 and another for non-
IPv6. An example of this is the hardware MAC numbered option in the access-list command,
which only matches on MAC address.
If an ACL’s parameters enable the switch to calculate that a match will be only be seen in an IPv6
packet, then the switch will only create an IPv6 filter in hardware.
Similarly, if an ACL’s parameters enable the switch to calculate that a match will not be seen in
an IPv6 packet, then the switch will only create a non-IPv6 filter.
Protocol components
On SBx8100 Series switches, a filter is comprised of standard and optional protocol components.
The standard protocol components are:
The first byte of the destination IPv6 address (matching on more than the first byte uses user-
defined bytes from the IPv6 L2 UDB set - see below).
At layer 2: IP precedence value, Tag Protocol Identifier (TPID), inner VLAN ID, inner CoS, inner
TPID, and SNAP tagged and untagged packets
For standard protocol components, you are only limited by the total number of filters available.
However, there are restrictions on the number of optional protocol components you can use.
Each optional protocol component consumes bytes from a shared pool of bytes, which are called
user-defined bytes (UDBs). UDBs are combined into “UDB sets”, which apply to either IPv6 traffic or
non-IPv6 traffic. Each UDB set contains a limited number of user-defined bytes - 14 for SBx81XLEM
and 6 for other cards. You must design your ACLs so that they stay within that 6-byte or 14-byte
limit.
Table 7 lists the optional protocol components, the number of bytes used by each protocol
component, and the UDB sets that each protocol component applies to. This table shows, for
example, that filtering on destination IPv6 address uses up to 6 (or 14) bytes from the IPv6 UDB sets
and no bytes from the non-IPv6 UDB sets. Therefore, filtering on destination IPv6 address does not
prevent you from filtering on other protocol components, so long as you choose other protocol
components that only consume bytes from the non-IPv6 UDB sets.
Table 7: The protocol components and the number of bytes they consume
SNAP tagged and untagged 2 bytes for SBx81GS24a & SBx81XS6 Non-IPv6 sets only
packets 3 bytes for all other cards
Table 7: The protocol components and the number of bytes they consume (continued)
Destination IPv6 address Up to the limit of the IPv6 UDB set, IPv6 sets only
therefore up to 6 or 14 bytes depending on
the card.
You can specify the number of UDBs by
specifying the prefix or creating a mask.
E.g., to match on three bytes, set the prefix
length to 24 (3 x 8 bits). This will use the
standard protocol component and two
UDBs.
ICMP packet type 1 byte Non-IPv6 sets only
In reality, the IPv6 and non-IPv6 UDB sets each consist of multiple individual sets, as shown in
Table 8. The names of these individual sets vary depending on the line card; Table 8 shows all
possible names. Having multiple individual sets has no practical effect on the number of protocol
components you can filter on, because all IPv6 UDB sets share a single pool of 6 (or 14) bytes, and
all non-IPv6 UDB sets share a single pool of 6 (or 14) bytes.
IPv6 IPv6
IPv6 L2 IPv6
Non-IPv6 Non-IPv6
IPv4 Non-IPv6
IPv4 Frag Non-IPv6
MPLS Non-IPv6
Ethernet Non-IPv6
User-def Non-IPv6
After you configure ACLs, you can see how many bytes are still available in each UDB set, by using
the show platform classifier statistics utilization brief command. Figure 2 shows an example of
the output for an ACL that is in a QoS class-map that matches on inner VLAN ID. Because it is
impossible to know whether the inner VLAN ID will be seen in an IPv6 packet or a non-IPv6 packet,
two filters have been generated and installed into the hardware to match against IPv6 and non-IPv6
packets. These filters have each consumed 2 bytes from the IPv6 and non-IPv6 UDB sets
respectively.
Figure 2: Example output from show platform classifier statistics utilization brief
Card 1.1:
[Instance 1]
[port1.1.1-port1.1.16] Used / Total
--------------------------------
System 0
MLD Snooping 0
DHCP Snooping 0
Loop Detection 0
EPSR 0
0
ACL 0
QoS 2
RA Guard 0
Total 2 / 1536 (0.13%)
UDB Usage:
Legend of Offset Type) 1:Ether 2:IP 3:TCP/UDP
UDB Set Offset Type Used / Total
------------- 0------8------15 ------------
IPv4 TCP 110000 2 / 6
IPv4 UDP 110000 2 / 6
MPLS 110000 2 / 6
IPv4 Frag 110000 2 / 6
IPv4 110000 2 / 6
Ethernet 110000 2 / 6
User-Def 110000 2 / 6
IPv6 L2 110000 2 / 6
In the above output, the following fields describe the UDB usage:
Table 9: UDB usage information in show platform classifier statistics utilization brief
FIELD MEANING
UDB Set Collections of UDBs that apply to different types of traffic. For debugging purposes, this
command output displays the number of bytes used from each individual UDB set, rather
than the combined IPv6/non-IPv6 sets; see Table 8.
Offset type The offset type describes where in the packet the UDB byte can be extracted from. The
number 1 indicates Layer 2, 2 indicates Layer 3, and 3 indicates Layer 4. See Table 10 to see
which offset type applies for each protocol component.
Used The number of bytes that are currently used in each UDB set.
Total The total number of UDBs available in each UDB set.
If an ACL requires more UDBs than are available, the switch will display the following error:
Note that the UDBs are consumed by the first use of a protocol component in a filter, but using the
same protocol component in further filters does not consume extra UDBs. You can use a protocol
component in additional ACLs without using any extra bytes from any UDB sets.
ACL MATCHES ON THIS AND THIS OPTIONAL AND THEREFORE ADDS AND CONSUMES BYTES IN THESE
STANDARD PROTOCOL PROTOCOL THESE FILTERS IN UDB SETS
COMPONENT COMPONENT HARDWARE
IPv4 source address inner VLAN ID 1 non-IPv6 filter 2 bytes from the non-IPv6 UDB sets
IPv6 source address inner VLAN ID 1 IPv6 filter 2 bytes from the IPv6 UDB sets
MAC address inner VLAN ID 1 IPv6 and 1 non-IPv6 filter 2 bytes from both IPv6 and non-IPv6
none inner VLAN ID 1 IPv6 and 1 non-IPv6 filter 2 bytes from both IPv6 and non-IPv6
IPv6 destination address with /56 prefix length 1 IPv6 filter 1st byte from the standard protocol
component and 6 bytes from the IPv6
UDB sets
Introduction
From software version 5.5.1-1.1 onwards, the SBx8100, x220, x320, and FS980 Series ports can
share some rules to optimize total ACL memory usage.
Previously, ACL rules memory usage was not very efficient on these platforms due to rule
duplication:
Global rules were duplicated for each port that had a per-port rule applied
The same ACL rules were duplicated for each port they were applied to
Now, a global ACL rule occupies a single entry in the device's ACL memory and applies to all ports
within that device. If multiple ports share the same per-port rule list, then the rules within that list are
shared and not duplicated for each port.
awplus(config)#int port1.0.1
awplus(config-if)#access-group 3001
awplus(config-if)#access-group 3002
awplus(config-if)#access-group 3003
awplus(config-if)#int port1.0.2
awplus(config-if)#access-group 3001
awplus(config-if)#access-group 3002
awplus(config-if)#access-group 3003
interface port1.0.1
switchport
switchport mode access
access-group 3001
access-group 3002
access-group 3003
!
interface port1.0.2
switchport
switchport mode access
access-group 3001
access-group 3002
!
C613-22039-00 REV M ACL memory optimization for SBx8100, x220, x320, and FS980M Series | Page 39
Access Control Lists (ACLs)
Policy maps
This feature also applies to policy-maps; if the same policy-map is applied on multiple ports, as long
as the rule list for all the ports is still the same then the acls/class-map rules for that policy-map will
be shared.
Here’s an example where a policy-map is used but rules are not shared:
interface port1.0.1
switchport
switchport mode access
service-policy input pmap1
!
interface port1.0.2
switchport
switchport mode access
service-policy input pmap1
access-group 3002
!
The following table lists the maximum number of filters/rules that can be added per platform.
SBx81GP24 1536
SBx81GT24 1536
SBx81GT40 1536
SBx81GC40 1536
SBx81XS16 1536
SBx81CFC960 1536
SBx81XLEM 5120
SBx81GS24aa 7168
SBx81XS6 7168
x220 512
x320 1536
FS980 496
The maximum number of rules shown in Table 12 above can only be shared if you use a combined
port configuration when attaching the rules, otherwise the maximum is limited to half of the
hardware capacity.
C613-22039-00 REV M ACL memory optimization for SBx8100, x220, x320, and FS980M Series | Page 40
Access Control Lists (ACLs)
For example, on the x220 Series, 512 rules can be shared across all ports if the following
configuration is used:
awplus(config)#int port1.0.1-1.0.28
awplus(config)#access-group 3001
awplus(config)#access-group 3002
...
awplus(config)#access-group 3512
The config file should look like this after attaching the rules to ports:
interface port1.0.1-1.0.28
switchport
switchport mode access
access-group 3001
access-group 3002
...
access-group 3512
!
If the rules to be shared are applied to each port individually or if the ports have other config that is
different (causing the config file to have separate port config) then the maximum number of rules
that can be shared are limited to HALF the maximum hardware limits shown in Table 12 above.
For example on the x220 Series, only up to 256 rules (half the limit) can be shared across two ports
if the following config is used:
awplus(config)#int port1.0.1
awplus(config)#access-group 3001
awplus(config)#access-group 3002
...
awplus(config)#access-group 3256
awplus(config)#int port1.0.2
awplus(config)#access-group 3001
awplus(config)#access-group 3002
...
awplus(config)#access-group 3256
Also up to 256 rules can be shared on the x220 Series if the config file looks like this:
interface port1.0.1
description port1
switchport
switchport mode access
access-group 3001
access-group 3002
...
access-group 3256
!
interface port1.0.2
description port2
switchport
switchport mode access
access-group 3001
access-group 3002
...
access-group 3256
!
If more than half of the HW limit is added using combined port config, the shared rules must also be
deleted using the combined port config.
C613-22039-00 REV M ACL memory optimization for SBx8100, x220, x320, and FS980M Series | Page 41
Access Control Lists (ACLs)
For example in the x220 Series example above, you must remove the rules using the following
config:
awplus(config)#int port1.0.1-1.0.28
awplus(config)#no access-group 3001
awplus(config)#no access-group 3002
.
awplus(config)#no access-group 3512
Timing delays
ACL optimization increases the maximum number of rules that can be attached on the SBx8100,
x220, x320 and FS980 Series. However, when the number of rules approach the limit, it can cause
delays in processing of adding/deleting of ports. We recommend that the shared rules are split
across multiple named ACLs or added as individual ACLs instead of using a single named ACL.
interface port1.3.1-1.3.20
description port1
access-group acl1-250 <<< includes 250 rules
access-group acl2-250
access-group acl3-250
interface port1.3.1-1.3.20
description port1
access-group acl-750 <<< includes 750 rules
C613-22039-00 REV M ACL memory optimization for SBx8100, x220, x320, and FS980M Series | Page 42
Access Control Lists (ACLs)
[Instance 0]
[port1.0.1-port1.0.10]
Usage:
Used / Total
--------------------------------
System 0
DHCP Snooping 2
Loop Detection 0
EPSR 0
CFM 0
G8032 0
Global ACL 2
ACL 2
VACL 0
QoS 0
RA Guard 0
BEFD 0
AMFAPPS 0
Openflow Hybrid 0
Openflow Flow 0
Openflow Default 0
Pre-Ingress 2
Egress:
VLAN Xlate 1
VLAN Isolate 0
VLAN IsolateDef 0
Total 9 / 1536 (0.59%)
C613-22039-00 REV M ACL memory optimization for SBx8100, x220, x320, and FS980M Series | Page 43
Access Control Lists (ACLs)
In the example below, two rules are shared between port1.0.2 and port1.0.3 (acl 3001 and 3000) and
one rule is shared between port1.0.1 and port1.0.2 (acl 3003) but remaining rules on port1.0.1 are
duplicated/not shared:
awplus(config-if)#int port1.0.1
awplus(config-if)#access-group 3000
awplus(config-if)#access-group 3001
awplus(config-if)#access-group 3002
awplus(config-if)#access-group 3003
awplus(config-if)#
awplus(config-if)#int port1.0.2
awplus(config-if)#access-group 3003
awplus(config-if)#access-group 3001
awplus(config-if)#access-group 3000
awplus(config-if)#
awplus(config-if)#int port1.0.3
awplus(config-if)#access-group 3001
awplus(config-if)#access-group 3000
The ability to add sequence numbers to filters simplifies updates through the ability to position a
filter within an ACL. When you add a new filter, you can specify a sequence number to position the
filter in the ACL and you can also remove a current filter in an ACL by specifying a sequence number.
The maximum filter sequence number is 65535. If the sequence number exceeds this maximum,
the command will not be recognized and will show the error message: % Unrecognized command
If you enter a filter without a sequence number, it is assigned a sequence number that is 4 greater
than the last sequence number and is placed at the end of the ACL.
If you enter a filter with a sequence number which matches the sequence number on an existing
filter within the same ACL, then the existing filter is overwritten with the subsequent filter.
ACL sequence numbers determine the order of execution of filters in an ACL. Filters in a ACL with
a lower value sequence number are executed before filters with a higher value.
Output from the show running-config command displays ACL entries without filter sequence
numbers. Output from relevant show commands displays ACL entries with their sequence
numbers.
ACL sequence numbers are re-numbered upon switch restart following a reload command, or
after powering off and powering on the switch. ACL sequence numbers are renumbered starting
from 4 and increment by 4 for each filter. See the sample output in the configuration section that
follows for an illustration of this behavior. No ACL sequence number re-number command is
available to perform this action.
The ACL sequence number feature works with numbered and named standard and extended
IPv4 and IPv6 access lists, plus named hardware IPv4 and IPv6 access lists.
The name of an access list can be designated as a number. Number in named ACLs must not
exist within the range of designated numbered ACLs. (where <1-99> and <1300-1999> are
standard numbered ACLs, <100-199> and <2000-2699> are extended numbered ACLs, <3000-
3699> and <4000-4699> are hardware numbered ACLs).
Note that ACL sequence number support for these ACL commands is optional not required. An ACL
sequence number will be added automatically, starting at 10 and incrementing by 10.
access-list <3000-3699>
access-list <4000-4699>
When using numbered hardware ACLs, the numbered ACLs are all created individually, and applied
to an interface in a series of Access-Group commands. The order in which the ACLs are actioned is
governed by the order in which the Access-Group commands are configured.
But, with named hardware ACLs, the named ACL contains a series of ACL filters within it. This order
in which these filters are actioned is defined by their sequence numbers.
Create ACL 1 and then add a new filter to the access-list to permit all packets from the 192.168.1
subnet:
In the output above, you can see that, even though no sequence number was included in the
command that created the filter entry, the entry has been automatically assigned the sequence
number 4.
In the output above, you can see that, even though no sequence number was included in the
command that created the second filter entry, the entry has been automatically assigned the
sequence number 8.
So, if you add a filter to an ACL without specifying a sequence number the new filter is automatically
assigned a sequence number. Sequence numbers are assigned in multiples of four from the
sequence number of the last filter.
awplus(config)# access-list 1
awplus(config-ip-std-acl)# 6 permit 192.168.3.0 0.0.0.255
awplus(config-ip-std-acl)# end
awplus# show access-list 1
The new filter has precedence over the filter with the sequence number 8.
Note - this approach to adding filters to an ACL is not available for named hardware ACLs.
You can then enter the IPv4 Standard ACL Configuration mode and specify sequence numbers to
reorder the filters, as shown in the next step.
awplus(config)# exit
awplus# copy running-config startup-config
awplus# reload
awplus# show access-list 1
After the device has rebooted, the sequence numbers of the filters in the ACL have been reassigned,
incrementing from 4.
Reverse masking for IP address bits specify how the switch treats the corresponding IP address
bits. A reverse mask is also called an inverted mask because a 1 and 0 mean the opposite of what
they mean in a subnet or a network mask.
C613-22039-00 REV M
NETWORK SMARTER
North America Headquarters | 19800 North Creek Parkway | Suite 100 | Bothell | WA 98011 | USA | T: +1 800 424 4284 | F: +1 425 481 3895
Asia-Pacific Headquarters | 11 Tai Seng Link | Singapore | 534182 | T: +65 6383 3832 | F: +65 6383 3830
EMEA & CSA Operations | Incheonweg 7 | 1437 EK Rozenburg | The Netherlands | T: +31 20 7950020 | F: +31 20 7950021
alliedtelesis.com
© 2023 Allied Telesis, Inc. All rights reserved. Information in this document is subject to change without notice. All company names, logos, and product designs that are trademarks or registered trademarks are the property of their respective owners.