This document describes ACL and QoS configurations. You can use ACL or other match
criteria to classify traffic in your network, and implement flow control based on traffic
classes. With ACL and QoS, you can well allocate the limited network resources, and
improve network usage. The intended audience includes network planners, field
technical support and servicing engineers, and network administrators working with the
WX series.
The models listed in this document are not applicable to all regions. Please consult your local
sales office for the models applicable to your region.
Support of the H3C WX series access controllers (ACs) for features may vary by AC model. For
more information, see ―Feature Matrix‖ in About the WX Configuration Guides.
The interface types and the number of interfaces vary by AC model.
7
1 ACL configuration
Category
ACL number
IP version
Match criteria
WLAN ACLs
100 to 199
IPv4
Wireless client SSID
Basic ACLs
2000 to 2999
IPv4
Source IPv4 address
IPv6
Source IPv6 address
Advanced
ACLs
3000 to 3999
IPv4
Source/destination IPv4 address,
protocols over IPv4, and other Layer 3
and Layer 4 header fields
IPv6
Source/destination IPv6 address,
protocols over IPv6, and other Layer 3
and Layer 4 header fields
Ethernet
frame header
ACLs
4000 to 4999
IPv4
Layer 2 header fields, such as source
and destination MAC addresses, 802.1p
priority, and link layer protocol type
An access control list (ACL) is a set of rules (or permit or deny statements) for identifying
traffic based on criteria such as the source IP address, destination IP address, and port
number.
ACLs are essentially used for packet filtering. A packet filter drops packets that match a
deny rule and permits packets that match a permit rule. ACLs are also widely used by
many modules, for example, QoS and IP routing, for traffic identification.
NOTE:
Unless otherwise stated, ACLs refer to both IPv4 and IPv6 ACLs throughout this document.
ACL classification
ACLs fall into four categories, as shown in Table 1 .
Table 1 ACL categories
ACL numbering and naming
Each ACL category has a unique range of ACL numbers. When creating an ACL, you
must assign it a number for identification, and in addition, you can also assign the ACL a
8
name for the ease of identification. After creating an ACL with a name, you can neither
ACL category
Depth-first rule sorting procedures
IPv4 basic ACL
1. The rule configured with a VPN instance takes precedence.
2. The rule with more 0s in the source IP address wildcard mask takes
precedence. More 0s means a narrower IP address range.
3. The rule with a smaller rule ID takes precedence.
rename it nor delete its name.
You cannot assign a name for a WLAN ACL.
For a WLAN ACL, the ACL number and name must be globally unique. For an IPv4 basic
or advanced ACLs, its ACL number and name must be unique among all IPv4 ACLs, and
for an IPv6 basic or advanced ACL, among all IPv6 ACLs. You can assign an IPv4 ACL
the same number and name as an IPv6 ACL.
Match order
The rules in an ACL are sorted in certain order. When a packet matches a rule, the
device stops the match process and performs the action defined in the rule. If an ACL
contains overlapping or conflicting rules, the matching result and action to take
depend on the rule order.
Two ACL match orders are available:
config: Sorts ACL rules in ascending order of rule ID. A rule with a lower ID is
matched before a rule with a higher ID. If you use this approach, check rule
content and order carefully.
auto: Sorts ACL rules in depth-first order. Depth-first ordering ensures that any subset
of a rule is always matched before the rule. The depth-first ordering procedure
varies with ACL categories, as shown in Table 2 .
NOTE:
The rule order of WLAN ACLs can only be config.
Table 2 Sorting ACL rules in depth-first order
9
ACL category
Depth-first rule sorting procedures
IPv4 advanced
ACL
1. The rule configured with a VPN instance takes precedence.
2. The rule configured with a specific protocol is prior to a rule with the
protocol type set to IP. IP represents any protocol over IP.
3. The rule with more 0s in the source IP address wildcard mask takes
precedence. More 0s means a narrower IP address range.
4. The rule with more 0s in the destination IP address wildcard mask takes
precedence.
5. The rule with a narrower TCP/UDP service port number range takes
precedence.
6. The rule with a smaller ID takes precedence.
IPv6 basic ACL
1. The rule configured with a longer prefix for the source IP address takes
precedence. A longer prefix means a narrower IP address range.
2. The rule with a smaller ID takes precedence.
IPv6 advanced
ACL
1. The rule configured with a specific protocol is prior to a rule with the
protocol type set to IP. IP represents any protocol over IPv6.
2. The rule configured with a longer prefix for the source IPv6 address has a
higher priority.
3. The rule configured with a longer prefix for the destination IPv6 address
takes precedence.
4. The rule with a narrower TCP/UDP service port number range takes
precedence.
5. The rule with a smaller ID takes precedence.
Ethernet frame
header ACL
1. The rule with more 1s in the source MAC address mask takes precedence.
More 1s means a smaller MAC address.
2. The rule with more 1s in the destination MAC address mask takes
precedence.
3. The rule with a smaller ID takes precedence.
NOTE:
Currently, the AC does not support ACL rules with the VPN instance attribute. A wildcard mask, also called an inverse mask, is a 32-bit binary and represented in dotted
decimal notation. In contrast to a network mask, the 0 bits in a wildcard mask represent ‗do
care‘ bits, while the 1 bits represent 'don‘t care bits.' If the 'do care' bits in an IP address are
identical to the 'do care' bits in an IP address criterion, the IP address matches the criterion. All
'don‘t care' bits are ignored. The 0s and 1s in a wildcard mask can be noncontiguous. For
example, 0.255.0.255 is a valid wildcard mask.
10
ACL rule numbering
ACL rule numbering step
If you do not assign an ID for the rule you are creating, the system automatically assigns
it a rule ID. The rule numbering step sets the increment by which the system
automatically numbers rules. For example, the default ACL rule numbering step is 5. If
you do not assign IDs to rules you are creating, they are numbered 0, 5, 10, 15, and so on.
The wider the numbering step, the more rules you can insert between two rules.
By introducing a gap between rules rather than contiguously numbering rules, you have
the flexibility of inserting rules in an ACL. This feature is important for a config order ACL,
where ACL rules are matched in ascending order of rule ID.
Automatic rule numbering and re-numbering
The ID automatically assigned to an ACL rule takes the nearest higher multiple of the
numbering step to the current highest rule ID, starting with 0.
For example, if the numbering step is 5 (the default), and there are five ACL rules
numbered 0, 5, 9, 10, and 12, the newly defined rule is numbered 15. If the ACL does not
contain any rule, the first rule is numbered 0.
Whenever the step changes, the rules are renumbered, starting from 0. For example, if
there are five rules numbered 5, 10, 13, 15, and 20, changing the step from 5 to 2 causes
the rules to be renumbered 0, 2, 4, 6 and 8.
Implementing time-based ACL rules
You can implement ACL rules based on the time of day by applying a time range to
them. A time-based ACL rule takes effect only in any time periods specified by the time
range.
Two basic types of time range are available:
Periodic time range, which recurs periodically on a day or days of the week. Absolute time range, which represents only a period of time and does not recur.
You may apply a time range to ACL rules before or after you create it. However, the
rules using the time range can take effect only after you define the time range.
11
IPv4 fragments filtering with ACLs
Traditional packet filtering matched only first fragments of IPv4 packets, and allowed all
subsequent non-first fragments to pass through. This mechanism resulted in security risks,
because attackers may fabricate non-first fragments to attack networks.
To avoids the risks, the H3C ACL implementation:
Filters all fragments by default, including non-first fragments. Provides standard and exact match modes for matching ACLs that contain
advanced attributes such as TCP/UDP port number and ICMP type. Standard
match is the default mode. It considers only Layer 3 attributes. Exact match
considers all header attributes defined in IPv4 ACL rules.
ACL configuration task list
IPv4 ACL configuration task list
Complete the following tasks to configure an IPv4 ACL:
Creating a time range (Optional)
The following four tasks are required: (Configure at least one task.)
Configuring a WLAN ACLConfiguring an IPv4 basic ACLConfiguring an IPv4 advanced ACLConfiguring an Ethernet frame header ACLCopying an IPv4 ACL (Optional)
IPv6 ACL configuration task list
Complete the following tasks to configure an IPv6 ACL:
Creating a time range (Optional)
The following two tasks are required: (Configure at least one task.)
Configuring an IPv6 basic ACLConfiguring an IPv6 advanced ACLCopying an IPv6 ACL (Optional)
12
To do…
Use the command…
Remarks
Enter system view
system-view
––
Create a time range
time-rangetime-range-name
{ start-timetoend-timedays
[ from time1 date1 ] [ to
time2 date2 ] | from time1
date1 [ to time2 date2 ] | to
time2 date2 }
Required
By default, no time range
exists.
To do…
Use the command…
Remarks
Enter system view
system-view
––
Create a WLAN ACL and
enter its view
acl numberacl-number
Required
By default, no ACL exists.
WLAN ACLs are numbered in
the range 100 to 199.
Configure a description for
the WLAN ACL
descriptiontext
Optional
By default, a WLAN ACL has
no ACL description.
Set the rule numbering step
stepstep-value
Optional
5 by default
Configuring an ACL
Creating a time range
Follow these steps to create a time range:
You may create time ranges identified with the same name. They are regarded as one
time range whose active period is the result of ORing periodic ones, ORing absolute
ones, and ANDing periodic and absolute ones.
You may create a maximum of 256 uniquely named time ranges, each with 32 periodic
time ranges at most and 12 absolute time ranges at most.
Configuring a WLAN ACL
WLAN ACLs match packets based on SSIDs of wireless clients.