0% found this document useful (0 votes)
33 views135 pages

01-05 Class-Based QoS Configuration

This document provides a comprehensive guide for configuring class-based Quality of Service (QoS) on the HUAWEI NE40E-M2 Series Universal Service Router. It covers traffic classification techniques, priority mapping for various packet types, and includes configuration examples and licensing requirements. The guide emphasizes the importance of traffic behaviors and the impact of specific configurations on network performance.

Uploaded by

Mohsen Goodarzi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views135 pages

01-05 Class-Based QoS Configuration

This document provides a comprehensive guide for configuring class-based Quality of Service (QoS) on the HUAWEI NE40E-M2 Series Universal Service Router. It covers traffic classification techniques, priority mapping for various packet types, and includes configuration examples and licensing requirements. The guide emphasizes the importance of traffic behaviors and the impact of specific configurations on network performance.

Uploaded by

Mohsen Goodarzi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 135

HUAWEI NE40E-M2 Series Universal Service Router

Configuration Guide - QoS 5 Class-based QoS Configuration

5 Class-based QoS Configuration

About This Chapter

This chapter describes the configuration of traffic policy based on complex traffic
classification as well as the priority mapping in simple traffic classification. In
addition, this chapter also provides configuration examples.

5.1 Overview of Class-based QoS


5.2 Class-based QoS Licensing Requirements and Configuration Precautions
5.3 Configuring MF Classification-based Traffic Policies for IP Packets
This section describes how to configure MF classification-based traffic policies for
IP packets.
5.4 Configuring Priority Mappings for IP Packets
This section describes how to configure priority mappings for IP packets and the
application environment of this function.
5.5 Configuring CTC-based Traffic Policies for VLAN Packets
This section describes how to configure CTC-based traffic policies for VLAN
packets.
5.6 Configuring Priority Mappings for VLAN Packets
This section describes how to configure priority mappings for VLAN packets and
the application environment of this function.
5.7 Configuring Priority Mappings for MPLS Packets
This section describes how to configure priority mappings for MPLS packets and
the application environment of this function.
5.8 Configuring User Priority Mapping in a Domain
You need to configure the mappings among the user priority, CoS, and color to
implement QoS on packets in a domain.
5.9 Configuring MF Classification for VXLAN Packets
This section describes how to configure MF classification for VXLAN packets.
5.10 (Optional) Configuring the DSCP of Protocol Packets
You can set the Differentiated Services Code Point (DSCP) values of management
or control protocol packets sent by the local device, and enable protocol packets

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 54


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

to enter the specified internal priority queue and obtain corresponding colors
based on the DSCP values.
5.11 Maintaining Class-based QoS Configuration
This section describes how to clear statistics of traffic policies.
5.12 Configuration Examples for Class-based QoS
This section provides typical examples for configuring class-based QoS.

5.1 Overview of Class-based QoS


Traffic Classifiers
Traffic classification technology allows a device to classify packets that enter a
DiffServ domain in order for the device to identify the packet service type and to
apply any appropriate action upon the packet.

Traffic Classification Techniques


Packets can be classified based on QoS priorities (for details, see sectionQoS
Priority Fields), or packet information such as the source IP address, destination IP
address, MAC address, IP protocol, and port number, or specifications in an SLA.
Therefore, traffic classification can be classified as behavior aggregate
classification or multi-field classification. For details, see section BA Classification
and MF Classification.

After packets are classified at the DiffServ domain edge, internal nodes provide
differentiated services for classified packets. A downstream node can accept and
continue the upstream classification or classify packets based on its own criteria.

Traffic Behaviors
A traffic classifier is configured to provide differentiated services and must be
associated with a certain traffic control or resource allocation behavior, which is
called a traffic behavior.

The following table describes traffic behaviors that can be implemented


individually or jointly for classified packets on a NE40E.

Traffic Behavior Description

Markin External Sets or modifies the priority of packets to relay QoS


g/Re- marking information to the next device.
markin
g Internal Sets the class of service (CoS) and drop precedence of
marking packets for internal processing on a device so that
packets can be placed directly in specific queues.
Setting the drop precedence of packets is also called
coloring packets. When traffic congestion occurs,
packets in the same queue are provided with
differentiated buffer services based on colors.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 55


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Traffic Behavior Description

Traffic policing Restricts the traffic rate to a specific value. When traffic
exceeds the specified rate, excess traffic is dropped.

Congestion Places packets in queues for buffering. When traffic


management congestion occurs, the device determines the forwarding
order based on a specific scheduling algorithm and
performs traffic shaping for outgoing traffic to meet
users' requirements on the network performance.

Congestion avoidance Monitors network resources. When network congestion


intensifies, the device drops packets to prevent
overloading the network.

Packet filtering Functions as the basic traffic control method. The


device determines whether to drop or forward packets
based on traffic classification results.

Policy-based routing Determines whether packets will be dropped or


(also called forwarded based on the following policies:
redirection) ● Drop PBR states that a specific IP address must be
matched against the forwarding table. If an
outbound interface is matched, packets are
forwarded; otherwise, packets are dropped.
● Forward PBR states that a specific IP address must be
matched against the forwarding table. If an
outbound interface is matched, packets are
forwarded; otherwise, packets are forwarded based
on the destination IP addresses.

Load balancing Load balancing is configured to be session-by-session or


packet-by-packet.
Load balancing applies only to packets that have
multiple forwarding paths available. There are two
possible scenarios:
● Multiple forwarding entries exist.
● Only one forwarding entry exists, but a trunk
interface that has multiple member interfaces
functions as the outbound interface in the
forwarding entry.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 56


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Traffic Behavior Description

Packet fragmentation Modifies the Don't Fragment (DF) field of packets.


NOTE
Some packets sent from user terminals are 1500 bytes long.
PCs generally set the DF value to 1 in the packets. When
packets traverse network devices at various layers, such as the
access, aggregation, or core network layer, additional
information is added so that the packet length will exceed the
maximum transmission unit (MTU) of 1500 bytes. If such a
packet carries the DF value of 1 in the header, the packet will
be dropped. A DF value of 1 specifies that a datagram not be
fragmented in transit. To prevent such packet loss and to keep
users unaware of any change, the device involved is allowed to
set the DF field in an IP header.

Flow mirroring Allows a device to copy an original packet from a


mirrored port and to send the copy to the observing
port.

Flow sampling Collects information about specific data flow, such as


timestamps, source address, destination address, source
port number, destination port number, ToS value,
protocol number, packet length, and inbound interface
information, to monitor specific users.

Modifying the TTL Modifies the Time To Live (TTL) value of IP packet
value headers.

What Is BA Classification
Behavior Aggregate (BA) classification allows the device to classify packets based
on related values as follows:
● DSCP value of IPv4 packets
● TC value of IPv6 packets
● EXP value of MPLS packets
● 802.1p value of VLAN packets
It is used to simply identify the traffic that has the specific priority or class of
service (CoS) for mapping between external and internal priorities.
BA classification confirms that the priority of incoming packets on a device is
trusted and mapped to the service-class and color based on a priority mapping
table. The service-class and color of outgoing packets are then mapped back to
the priority. For details about priority mapping, see section QoS Priority Mapping.
To configure BA classification on a NE40E, configure a DiffServ (DS) domain,
define a priority mapping table for the DS domain, and bind the DS domain to a
trusted interface.
BA classification applies to the DS internal nodes.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 57


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Multi-Field Classification
As networks rapidly develop, services on the Internet become increasingly
diversified. Various services share limited network resources, especially when
multiple services use port number 80. Because of this increasing demand, network
devices are required to possess a high degree of sensitivity for services, including
an in-depth parsing of packets and a comprehensive understanding of any packet
field at any layer. This level of sensitivity rises far beyond what behavior aggregate
(BA) classification can offer. Multi-field (MF) classification can be deployed to
help address this sensitivity deficit.
MF classification allows a device to elaborately classify packets based on certain
conditions, such as 5-tuple (source IP address, source port number, protocol
number, destination address, and destination port number). To simplify
configurations and facilitate batch modification, MF classification commands are
designed based on a template. For details, see section QoS Policies Based on MF
Classification.

5.2 Class-based QoS Licensing Requirements and


Configuration Precautions
Licensing Requirements
For details, see "Licensing Requirements" in Feature Description.

Configuration Precautions--M2H
Restrictions Guidelines Impact

● ACL sampling does ● When ACL sampling is ● ACL sampling does


not support traffic configured, configure not support traffic
policies in shared the traffic policy to policies in shared
mode. Sampling can work in unshared mode. Sampling can
be configured in the mode. be configured in the
traffic policy using ● When ACL sampling is traffic policy using
commands but does configured, apply the commands but does
not take effect. traffic policy to not take effect.
● ACL sampling is common sub- ● ACL sampling is
supported only on interfaces. supported only on
common sub- common sub-
interfaces. It can be interfaces. It can be
configured on sub- configured on sub-
interfaces using interfaces using
commands but does commands but does
not take effect. not take effect.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 58


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

1, When a traffic policy 1, Do not configure 1, When a traffic policy


is applied to a remote AP sampling in the traffic is applied to a remote AP
or Eth-Trunk AP behavior in a traffic or Eth-Trunk AP
interface, sampling can policy applied to a interface, sampling can
be configured in the remote AP or Eth-Trunk be configured in the
traffic policy using AP interface. traffic policy using
commands but does not commands but does not
take effect. take effect.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 59


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

1. For incoming traffic on None If QPPB, BGP FlowSpec,


the VLANIF interface: interface ACL, and global
No matter whether ACL are all configured,
QPPB is enabled or not, they may not take effect
if both the inbound at the same time. For
VLANIF interface and its details about the priority
inbound member and validity, see the
interface are configured Restriction Description.
with traffic policies, the
traffic classification rules
configured on its
inbound member
interface do not take
effect. The traffic is
matched against the BGP
FlowSpec policy, global
traffic policy (ACL),
traffic policy on the
VLANIF interface, and
inbound QPPB policy in
sequence. If the actions
of two policies are the
same, the action in the
latter policy takes effect.
If the actions of policies
are different, all these
actions take effect.
2. For outgoing traffic on
the VLANIF interface:
(1) If inbound QPPB is
enabled, if both the
outbound VLANIF
interface and inbound
interface on the device
are configured with
traffic policies, the traffic
classification rules
configured on the
inbound interface on the
device do not take effect.
The traffic is matched
against the BGP
FlowSpec policy, global
traffic policy (ACL),
traffic policy on the
VLANIF interface, and
inbound QPPB policy in
sequence. If the actions
of two policies are the
same, the action in the

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 60


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

latter policy takes effect.


If the actions of policies
are different, all these
actions take effect.
(2) If inbound QPPB is
not enabled and both
the outbound VLANIF
interface and inbound
interface on the device
are configured with
traffic policies, both
traffic policies take
effect. The traffic is
matched against the BGP
FlowSpec policy, global
traffic policy (ACL),
traffic policy on the
inbound interface, traffic
policy on the VLANIF
interface, and inbound
QPPB policy in sequence.
If the actions of two
policies are the same,
the action in the latter
policy takes effect. If the
actions of policies are
different, all these
actions take effect.

After ARP-MAC None After ARP-MAC


association is disabled, association is disabled,
the outbound multi-field the outbound multi-field
classification function on classification function on
the VLANIF interface the VLANIF interface
becomes invalid (ARP- becomes invalid
MAC association is
enabled by default.).

A shared MF None A shared MF


classification policy classification policy
cannot be bound to the cannot be bound to the
BAS view. BAS view.

An MF classification None An MF classification


policy in the BAS view is policy in the BAS view is
mutually exclusive with mutually exclusive with
that in the BAS interface that in the BAS interface
view. view.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 61


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

When BRAS PUPP is None When BRAS PUPP is


configured, if the policy configured, if the policy
rule content contains rule content contains
any of the following any of the following
types, the rule processing types, the rule processing
method is as follows: method is as follows:
● When the rule ● When the rule
content contains the content contains the
IPv4 TTL field, VPN- IPv4 TTL field, VPN-
instance, or IPv6 instance, or IPv6
fragment, commands fragment, commands
can be configured, can be configured,
but the entire rule but the entire rule
does not take effect. does not take effect.
● When the rule ● When the rule
content contains the content contains the
IPv6 TOS or IPv6 TCP- IPv6 TOS or IPv6 TCP-
Flag, commands can Flag, commands can
be configured. This be configured. The
field does not take rule can be matched
effect, but the fields regardless of the
of the other types value of the field in
take effect. the packet.

The BRAS PUPP feature None The BRAS PUPP feature


allows the actions other allows the actions other
than permit/deny/ than permit/deny/
remark/match remark/match
termination to be termination to be
configured in the policy, configured in the policy,
but such actions do not but such actions do not
take effect. take effect.

When BRAS PUPP is None Non-advanced IPv4 and


configured, only IPv6 rules can be
advanced IPv4 and IPv6 configured but do not
rules in the policy take take effect.
effect.

The BRAS PUPP feature None The BRAS PUPP feature


allows classifiers in AND allows classifiers in AND
mode to be configured in mode to be configured in
the policy, but the the policy, but the
classifiers in AND mode classifiers in AND mode
do not take effect. do not take effect.

CAR in color-aware When configuring CAR CAR in color-aware


mode is not supported on an IPv6 GRE tunnel mode is not supported
on an IPv6 GRE tunnel interface, do not specify on an IPv6 GRE tunnel
interface. the color-aware mode. interface.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 62


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

Only MF classification in When configuring MF If link-layer or all-layer is


ip-layer mode (default classification on an IPv6 specified for MF
mode) is supported on GRE tunnel interface, do classification on IPv6
an IPv6 GRE tunnel not specify layer GRE tunnel interfaces,
interface. information, or use ip- Layer 2 rules cannot be
layer when specifying matched. If mpls-layer is
layer information. specified, MPLS rules
cannot be matched.

MIBs and NMS do not None Failed to query and clear


support level-2 ACL sub- the statistics about sub-
policy statistics query policies that MIB and the
and clearing. NMS do not support.

The traffic-policy None The traffic-policy


match-mpls-layer match-mpls-layer
{mpls-push | mpls-pop} {mpls-push | mpls-pop}
* command has the * command is mutually
following mutually exclusive with the
exclusive relationships: following commands:
The traffic-policy ● traffic-policy match-
match-mpls-layer mpls- ip-layer {mpls-push |
pop mpls-push and mpls-pop}
traffic-policy match-ip- ● traffic-policy match-
layer {mpls-push | rule packet-type
mpls-pop} commands
are mutually exclusive.
The traffic-policy
match-mpls-layer mpls-
pop mpls-push and
traffic-policy match-
rule packet-type
commands are mutually
exclusive.

The outbound multi-field None The outbound multi-field


classification function on classification function on
a VLANIF interface does a VLANIF interface does
not support IPv6 rules. not support IPv6 rules.

A shared MF None A shared MF


classification policy classification policy
cannot be authorized to cannot be authorized to
users through an RADIUS users through an RADIUS
server. server.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 63


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

Hierarchical CAR and Configuring only one of Hierarchical CAR and


QPPB Policy CAR are hierarchical CAR and QPPB Policy CAR are
mutually exclusive. If CAR in ar QPPB Policy on mutually exclusive. If
both functions are one interface is both functions are
configured on the same recommended. configured on the same
interface, QPPB Policy interface, QPPB Policy
CAR takes effect, and CAR takes effect, and
only second-level ACL in only second-level ACL in
hierarchical CAR takes hierarchical CAR takes
effect. First-level ACL effect. First-level ACL
CAR does not take effect. CAR does not take effect.
However, if hierarchical However, if hierarchical
CAR is enabled and MF CAR is enabled and MF
classification contains classification contains
only level-1 CAR, both only level-1 CAR, both
QPPB Policy CAR and QPPB Policy CAR and
hierarchical CAR take hierarchical CAR take
effect. effect.
● When hierarchical
CAR and QPPB policy
CAR are both
configured on an
interface and level-2
CAR is configured for
hierarchical CAR,
QPPB policy CAR
takes effect, and only
CAR for the second-
level ACL takes effect.
First-level ACL CAR
does not take effect.
● When hierarchical
CAR and QPPB policy
CAR are configured
on an interface and
one CAR (CAR is
configured in a parent
or child policy) is
configured for
hierarchical CAR,
QPPB policy CAR
takes effect, and the
one CAR for
hierarchical CAR also
takes effect.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 64


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

When rate limiting based Do not configure CAR When rate limiting based
on Layer 3 packets is based on the packet rate on Layer 3 packets is
configured in a traffic or CAR based on packet configured in a traffic
policy, CAR based on the length compensation in policy, CAR based on the
packet rate or CAR based a traffic policy when rate packet rate or CAR based
on packet length limiting based on Layer 3 on packet length
compensation cannot be packets is required. compensation cannot be
configured. Otherwise, configured. Otherwise,
rate limiting based on rate limiting based on
Layer 3 packets does not Layer 3 packets does not
take effect. take effect.

When address pool-, port NA When address pool-, port


pool-, or port range- pool-, or port range-
based rules are based rules are
configured in a traffic configured in a traffic
policy, if the number of policy, if the number of
addresses or ports in the addresses or ports in the
pool decreases or the pool decreases or the
port range is shortened, port range is shortened,
the rules with lower the rules with lower
priorities become invalid priorities become invalid
temporarily. The number temporarily.
of rules that become
temporarily invalid is
determined by the
number of deleted rules.

In the scenario where None The traffic policy


traffic enters an SRv6 becomes invalid.
tunnel/VXLAN tunnel/
MPLS LDP LSP, a traffic
policy is applied to an
inbound interface of the
tunnel/LSP's egress. If an
ACL rule for matching
the tunnel header is
configured in the traffic
policy, the traffic policy
can take effect on the
traffic received on the
egress. After a QPPB
policy is configured on
the inbound interface,
the traffic policy cannot
match the tunnel header.
As a result, the traffic
policy becomes invalid.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 65


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

For a Layer 3 private line To apply a traffic policy The traffic policy
user, if a UCL rule for that contains an ACL becomes invalid.
matching the source and rule for matching the
destination IP addresses source and destination IP
is configured in the addresses to the Layer 3
traffic policy applied in private line user's
the system view, the UCL network-to-network
rule becomes invalid traffic, configure the
when an EDSG service traffic policy in the
policy is applied to the interface view.
user.

1. VLANs may not be None The port vlan-stacking


specified in the traffic- command is configured
policy command on on an interface. The
VLAN stacking interfaces, traffic-policy command is
but must be specified on configured on the
other Layer 2 interfaces. interface, and no VLANs
2. The traffic-policy are specified. The traffic
command is configured policy takes effect only
on a VLAN stacking on the traffic without
interface. After the VLAN VLAN information. When
stacking configuration is the port vlan-stacking
deleted, the traffic-policy command is deleted
command takes effect as from the interface or the
follows: port default vlan or port
trunk allow-pass vlan
(1) The traffic-policy command is configured
command with VLANs on the interface, the
specified takes effect on system does not check
the packets with the whether VLANs are
specified VLANs. specified in the traffic-
(2) The traffic-policy policy command.
command with no
VLANs specified takes
effect on the packets
without VLAN
information.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 66


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

1. VLANs may not be None The port vlan-stacking


specified in a behavior command is configured
aggregate classification on an interface. Behavior
configuration on a VLAN aggregate classification
stacking interface, but is configured on the
must be specified on interface, and no VLANs
other Layer 2 interfaces. are specified. The
2. Behavior aggregate behavior aggregate
classification is classification
configured on a VLAN configuration takes
stacking interface. After effect only on the traffic
the VLAN stacking without VLAN
interface configuration is information. When the
deleted, the behavior port vlan-stacking
aggregate classification command is deleted
configuration takes from the interface or the
effect as follows: port default vlan or port
trunk allow-pass vlan
(1) The behavior command is configured
aggregate classification on the interface, the
configuration with system does not check
VLANs specified takes whether VLANs are
effect on the packets specified in the behavior
with the specified VLANs. aggregate classification
(2) The behavior configuration.
aggregate classification
configuration with no
VLANs specified takes
effect on the packets
without VLAN
information.
If the trust upstream
(inbound or outbound
may or may not be
specified), or qos phb
enable default command
is configured on an
interface, behavior
aggregate classification
is configured.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 67


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

When a traffic policy is None The number of packets


applied to the outbound matching the VLANIF/
direction of a VLANIF/ VBDIF interface's traffic
VBDIF interface, the policy and CAR is
traffic policy takes effect inaccurate.
on the board where the
inbound interface of
traffic resides.
(1) If a traffic policy is
configured on the
inbound interface and
the traffic behavior is
discard, the traffic does
not match the traffic
policy of the VLANIF/
VBDIF interface.
(2) If a traffic policy is
applied to the inbound
interface and the traffic
behavior is CAR, and a
traffic policy is applied to
the outbound direction
of the VLANIF/VBDIF
interface and the traffic
behavior is CAR, the
VLANIF/VBDIF interface's
CAR and the inbound
interface's CAR are
performed for the traffic
in sequence. In this case,
the number of packets
matching the traffic
policy of the VLANIF/
VBDIF interface is the
number of matching
packets before the
inbound interface's CAR
is performed.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 68


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

A device functions as the Configure rules to The number of packets


ingress of a VXLAN distinguish well-known that travel the device
tunnel. When the well- VXLAN port numbers through the VXLAN
known VXLAN port from non-well-known tunnel and match the
number is not explicitly VXLAN port numbers, global ACL rule is
specified in a global ACL place them in different doubled.
rule for upstream traffic, traffic classifiers, and
the number of packets associate traffic
that travel the device behaviors with the traffic
through the VXLAN classifiers. This
tunnel and match the workaround doubles the
global ACL rule is configuration workload
doubled. and hardware TCAM
resource usage.

After MF classification is None After MF classification is


applied to an interface, applied to an interface,
the user type can be the user type cannot be
configured only as Layer configured as other users
3 leased line users. except Layer 3 leased
line users.

Configuration Precautions--M2K
Restrictions Guidelines Impact

● ACL sampling does ● When ACL sampling is ● ACL sampling does


not support traffic configured, configure not support traffic
policies in shared the traffic policy to policies in shared
mode. Sampling can work in unshared mode. Sampling can
be configured in the mode. be configured in the
traffic policy using ● When ACL sampling is traffic policy using
commands but does configured, apply the commands but does
not take effect. traffic policy to not take effect.
● ACL sampling is common sub- ● ACL sampling is
supported only on interfaces. supported only on
common sub- common sub-
interfaces. It can be interfaces. It can be
configured on sub- configured on sub-
interfaces using interfaces using
commands but does commands but does
not take effect. not take effect.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 69


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

1, When a traffic policy 1, Do not configure 1, When a traffic policy


is applied to a remote AP sampling in the traffic is applied to a remote AP
or Eth-Trunk AP behavior in a traffic or Eth-Trunk AP
interface, sampling can policy applied to a interface, sampling can
be configured in the remote AP or Eth-Trunk be configured in the
traffic policy using AP interface. traffic policy using
commands but does not commands but does not
take effect. take effect.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 70


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

1. For incoming traffic on None If QPPB, BGP FlowSpec,


the VLANIF interface: interface ACL, and global
No matter whether ACL are all configured,
QPPB is enabled or not, they may not take effect
if both the inbound at the same time. For
VLANIF interface and its details about the priority
inbound member and validity, see the
interface are configured Restriction Description.
with traffic policies, the
traffic classification rules
configured on its
inbound member
interface do not take
effect. The traffic is
matched against the BGP
FlowSpec policy, global
traffic policy (ACL),
traffic policy on the
VLANIF interface, and
inbound QPPB policy in
sequence. If the actions
of two policies are the
same, the action in the
latter policy takes effect.
If the actions of policies
are different, all these
actions take effect.
2. For outgoing traffic on
the VLANIF interface:
(1) If inbound QPPB is
enabled, if both the
outbound VLANIF
interface and inbound
interface on the device
are configured with
traffic policies, the traffic
classification rules
configured on the
inbound interface on the
device do not take effect.
The traffic is matched
against the BGP
FlowSpec policy, global
traffic policy (ACL),
traffic policy on the
VLANIF interface, and
inbound QPPB policy in
sequence. If the actions
of two policies are the
same, the action in the

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 71


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

latter policy takes effect.


If the actions of policies
are different, all these
actions take effect.
(2) If inbound QPPB is
not enabled and both
the outbound VLANIF
interface and inbound
interface on the device
are configured with
traffic policies, both
traffic policies take
effect. The traffic is
matched against the BGP
FlowSpec policy, global
traffic policy (ACL),
traffic policy on the
inbound interface, traffic
policy on the VLANIF
interface, and inbound
QPPB policy in sequence.
If the actions of two
policies are the same,
the action in the latter
policy takes effect. If the
actions of policies are
different, all these
actions take effect.

After ARP-MAC None After ARP-MAC


association is disabled, association is disabled,
the outbound multi-field the outbound multi-field
classification function on classification function on
the VLANIF interface the VLANIF interface
becomes invalid (ARP- becomes invalid
MAC association is
enabled by default.).

A shared MF None A shared MF


classification policy classification policy
cannot be bound to the cannot be bound to the
BAS view. BAS view.

An MF classification None An MF classification


policy in the BAS view is policy in the BAS view is
mutually exclusive with mutually exclusive with
that in the BAS interface that in the BAS interface
view. view.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 72


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

When BRAS PUPP is None When BRAS PUPP is


configured, if the policy configured, if the policy
rule content contains rule content contains
any of the following any of the following
types, the rule processing types, the rule processing
method is as follows: method is as follows:
● When the rule ● When the rule
content contains the content contains the
IPv4 TTL field, VPN- IPv4 TTL field, VPN-
instance, or IPv6 instance, or IPv6
fragment, commands fragment, commands
can be configured, can be configured,
but the entire rule but the entire rule
does not take effect. does not take effect.
● When the rule ● When the rule
content contains the content contains the
IPv6 TOS or IPv6 TCP- IPv6 TOS or IPv6 TCP-
Flag, commands can Flag, commands can
be configured. This be configured. The
field does not take rule can be matched
effect, but the fields regardless of the
of the other types value of the field in
take effect. the packet.

The BRAS PUPP feature None The BRAS PUPP feature


allows the actions other allows the actions other
than permit/deny/ than permit/deny/
remark/match remark/match
termination to be termination to be
configured in the policy, configured in the policy,
but such actions do not but such actions do not
take effect. take effect.

When BRAS PUPP is None Non-advanced IPv4 and


configured, only IPv6 rules can be
advanced IPv4 and IPv6 configured but do not
rules in the policy take take effect.
effect.

The BRAS PUPP feature None The BRAS PUPP feature


allows classifiers in AND allows classifiers in AND
mode to be configured in mode to be configured in
the policy, but the the policy, but the
classifiers in AND mode classifiers in AND mode
do not take effect. do not take effect.

CAR in color-aware When configuring CAR CAR in color-aware


mode is not supported on an IPv6 GRE tunnel mode is not supported
on an IPv6 GRE tunnel interface, do not specify on an IPv6 GRE tunnel
interface. the color-aware mode. interface.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 73


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

Only MF classification in When configuring MF If link-layer or all-layer is


ip-layer mode (default classification on an IPv6 specified for MF
mode) is supported on GRE tunnel interface, do classification on IPv6
an IPv6 GRE tunnel not specify layer GRE tunnel interfaces,
interface. information, or use ip- Layer 2 rules cannot be
layer when specifying matched. If mpls-layer is
layer information. specified, MPLS rules
cannot be matched.

MIBs and NMS do not None Failed to query and clear


support level-2 ACL sub- the statistics about sub-
policy statistics query policies that MIB and the
and clearing. NMS do not support.

The traffic-policy None The traffic-policy


match-mpls-layer match-mpls-layer
{mpls-push | mpls-pop} {mpls-push | mpls-pop}
* command has the * command is mutually
following mutually exclusive with the
exclusive relationships: following commands:
The traffic-policy ● traffic-policy match-
match-mpls-layer mpls- ip-layer {mpls-push |
pop mpls-push and mpls-pop}
traffic-policy match-ip- ● traffic-policy match-
layer {mpls-push | rule packet-type
mpls-pop} commands
are mutually exclusive.
The traffic-policy
match-mpls-layer mpls-
pop mpls-push and
traffic-policy match-
rule packet-type
commands are mutually
exclusive.

The outbound multi-field None The outbound multi-field


classification function on classification function on
a VLANIF interface does a VLANIF interface does
not support IPv6 rules. not support IPv6 rules.

A shared MF None A shared MF


classification policy classification policy
cannot be authorized to cannot be authorized to
users through an RADIUS users through an RADIUS
server. server.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 74


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

Hierarchical CAR and Configuring only one of Hierarchical CAR and


QPPB Policy CAR are hierarchical CAR and QPPB Policy CAR are
mutually exclusive. If CAR in ar QPPB Policy on mutually exclusive. If
both functions are one interface is both functions are
configured on the same recommended. configured on the same
interface, QPPB Policy interface, QPPB Policy
CAR takes effect, and CAR takes effect, and
only second-level ACL in only second-level ACL in
hierarchical CAR takes hierarchical CAR takes
effect. First-level ACL effect. First-level ACL
CAR does not take effect. CAR does not take effect.
However, if hierarchical However, if hierarchical
CAR is enabled and MF CAR is enabled and MF
classification contains classification contains
only level-1 CAR, both only level-1 CAR, both
QPPB Policy CAR and QPPB Policy CAR and
hierarchical CAR take hierarchical CAR take
effect. effect.
● When hierarchical
CAR and QPPB policy
CAR are both
configured on an
interface and level-2
CAR is configured for
hierarchical CAR,
QPPB policy CAR
takes effect, and only
CAR for the second-
level ACL takes effect.
First-level ACL CAR
does not take effect.
● When hierarchical
CAR and QPPB policy
CAR are configured
on an interface and
one CAR (CAR is
configured in a parent
or child policy) is
configured for
hierarchical CAR,
QPPB policy CAR
takes effect, and the
one CAR for
hierarchical CAR also
takes effect.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 75


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

When rate limiting based Do not configure CAR When rate limiting based
on Layer 3 packets is based on the packet rate on Layer 3 packets is
configured in a traffic or CAR based on packet configured in a traffic
policy, CAR based on the length compensation in policy, CAR based on the
packet rate or CAR based a traffic policy when rate packet rate or CAR based
on packet length limiting based on Layer 3 on packet length
compensation cannot be packets is required. compensation cannot be
configured. Otherwise, configured. Otherwise,
rate limiting based on rate limiting based on
Layer 3 packets does not Layer 3 packets does not
take effect. take effect.

When address pool-, port NA When address pool-, port


pool-, or port range- pool-, or port range-
based rules are based rules are
configured in a traffic configured in a traffic
policy, if the number of policy, if the number of
addresses or ports in the addresses or ports in the
pool decreases or the pool decreases or the
port range is shortened, port range is shortened,
the rules with lower the rules with lower
priorities become invalid priorities become invalid
temporarily. The number temporarily.
of rules that become
temporarily invalid is
determined by the
number of deleted rules.

In the scenario where None The traffic policy


traffic enters an SRv6 becomes invalid.
tunnel/VXLAN tunnel/
MPLS LDP LSP, a traffic
policy is applied to an
inbound interface of the
tunnel/LSP's egress. If an
ACL rule for matching
the tunnel header is
configured in the traffic
policy, the traffic policy
can take effect on the
traffic received on the
egress. After a QPPB
policy is configured on
the inbound interface,
the traffic policy cannot
match the tunnel header.
As a result, the traffic
policy becomes invalid.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 76


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

For a Layer 3 private line To apply a traffic policy The traffic policy
user, if a UCL rule for that contains an ACL becomes invalid.
matching the source and rule for matching the
destination IP addresses source and destination IP
is configured in the addresses to the Layer 3
traffic policy applied in private line user's
the system view, the UCL network-to-network
rule becomes invalid traffic, configure the
when an EDSG service traffic policy in the
policy is applied to the interface view.
user.

1. VLANs may not be None The port vlan-stacking


specified in the traffic- command is configured
policy command on on an interface. The
VLAN stacking interfaces, traffic-policy command is
but must be specified on configured on the
other Layer 2 interfaces. interface, and no VLANs
2. The traffic-policy are specified. The traffic
command is configured policy takes effect only
on a VLAN stacking on the traffic without
interface. After the VLAN VLAN information. When
stacking configuration is the port vlan-stacking
deleted, the traffic-policy command is deleted
command takes effect as from the interface or the
follows: port default vlan or port
trunk allow-pass vlan
(1) The traffic-policy command is configured
command with VLANs on the interface, the
specified takes effect on system does not check
the packets with the whether VLANs are
specified VLANs. specified in the traffic-
(2) The traffic-policy policy command.
command with no
VLANs specified takes
effect on the packets
without VLAN
information.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 77


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

1. VLANs may not be None The port vlan-stacking


specified in a behavior command is configured
aggregate classification on an interface. Behavior
configuration on a VLAN aggregate classification
stacking interface, but is configured on the
must be specified on interface, and no VLANs
other Layer 2 interfaces. are specified. The
2. Behavior aggregate behavior aggregate
classification is classification
configured on a VLAN configuration takes
stacking interface. After effect only on the traffic
the VLAN stacking without VLAN
interface configuration is information. When the
deleted, the behavior port vlan-stacking
aggregate classification command is deleted
configuration takes from the interface or the
effect as follows: port default vlan or port
trunk allow-pass vlan
(1) The behavior command is configured
aggregate classification on the interface, the
configuration with system does not check
VLANs specified takes whether VLANs are
effect on the packets specified in the behavior
with the specified VLANs. aggregate classification
(2) The behavior configuration.
aggregate classification
configuration with no
VLANs specified takes
effect on the packets
without VLAN
information.
If the trust upstream
(inbound or outbound
may or may not be
specified), or qos phb
enable default command
is configured on an
interface, behavior
aggregate classification
is configured.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 78


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

When a traffic policy is None The number of packets


applied to the outbound matching the VLANIF/
direction of a VLANIF/ VBDIF interface's traffic
VBDIF interface, the policy and CAR is
traffic policy takes effect inaccurate.
on the board where the
inbound interface of
traffic resides.
(1) If a traffic policy is
configured on the
inbound interface and
the traffic behavior is
discard, the traffic does
not match the traffic
policy of the VLANIF/
VBDIF interface.
(2) If a traffic policy is
applied to the inbound
interface and the traffic
behavior is CAR, and a
traffic policy is applied to
the outbound direction
of the VLANIF/VBDIF
interface and the traffic
behavior is CAR, the
VLANIF/VBDIF interface's
CAR and the inbound
interface's CAR are
performed for the traffic
in sequence. In this case,
the number of packets
matching the traffic
policy of the VLANIF/
VBDIF interface is the
number of matching
packets before the
inbound interface's CAR
is performed.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 79


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

A device functions as the Configure rules to The number of packets


ingress of a VXLAN distinguish well-known that travel the device
tunnel. When the well- VXLAN port numbers through the VXLAN
known VXLAN port from non-well-known tunnel and match the
number is not explicitly VXLAN port numbers, global ACL rule is
specified in a global ACL place them in different doubled.
rule for upstream traffic, traffic classifiers, and
the number of packets associate traffic
that travel the device behaviors with the traffic
through the VXLAN classifiers. This
tunnel and match the workaround doubles the
global ACL rule is configuration workload
doubled. and hardware TCAM
resource usage.

After MF classification is None After MF classification is


applied to an interface, applied to an interface,
the user type can be the user type cannot be
configured only as Layer configured as other users
3 leased line users. except Layer 3 leased
line users.

Configuration Precautions--M2K-B
Restrictions Guidelines Impact

● ACL sampling does ● When ACL sampling is ● ACL sampling does


not support traffic configured, configure not support traffic
policies in shared the traffic policy to policies in shared
mode. Sampling can work in unshared mode. Sampling can
be configured in the mode. be configured in the
traffic policy using ● When ACL sampling is traffic policy using
commands but does configured, apply the commands but does
not take effect. traffic policy to not take effect.
● ACL sampling is common sub- ● ACL sampling is
supported only on interfaces. supported only on
common sub- common sub-
interfaces. It can be interfaces. It can be
configured on sub- configured on sub-
interfaces using interfaces using
commands but does commands but does
not take effect. not take effect.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 80


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

1, When a traffic policy 1, Do not configure 1, When a traffic policy


is applied to a remote AP sampling in the traffic is applied to a remote AP
or Eth-Trunk AP behavior in a traffic or Eth-Trunk AP
interface, sampling can policy applied to a interface, sampling can
be configured in the remote AP or Eth-Trunk be configured in the
traffic policy using AP interface. traffic policy using
commands but does not commands but does not
take effect. take effect.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 81


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

1. For incoming traffic on None If QPPB, BGP FlowSpec,


the VLANIF interface: interface ACL, and global
No matter whether ACL are all configured,
QPPB is enabled or not, they may not take effect
if both the inbound at the same time. For
VLANIF interface and its details about the priority
inbound member and validity, see the
interface are configured Restriction Description.
with traffic policies, the
traffic classification rules
configured on its
inbound member
interface do not take
effect. The traffic is
matched against the BGP
FlowSpec policy, global
traffic policy (ACL),
traffic policy on the
VLANIF interface, and
inbound QPPB policy in
sequence. If the actions
of two policies are the
same, the action in the
latter policy takes effect.
If the actions of policies
are different, all these
actions take effect.
2. For outgoing traffic on
the VLANIF interface:
(1) If inbound QPPB is
enabled, if both the
outbound VLANIF
interface and inbound
interface on the device
are configured with
traffic policies, the traffic
classification rules
configured on the
inbound interface on the
device do not take effect.
The traffic is matched
against the BGP
FlowSpec policy, global
traffic policy (ACL),
traffic policy on the
VLANIF interface, and
inbound QPPB policy in
sequence. If the actions
of two policies are the
same, the action in the

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 82


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

latter policy takes effect.


If the actions of policies
are different, all these
actions take effect.
(2) If inbound QPPB is
not enabled and both
the outbound VLANIF
interface and inbound
interface on the device
are configured with
traffic policies, both
traffic policies take
effect. The traffic is
matched against the BGP
FlowSpec policy, global
traffic policy (ACL),
traffic policy on the
inbound interface, traffic
policy on the VLANIF
interface, and inbound
QPPB policy in sequence.
If the actions of two
policies are the same,
the action in the latter
policy takes effect. If the
actions of policies are
different, all these
actions take effect.

After ARP-MAC None After ARP-MAC


association is disabled, association is disabled,
the outbound multi-field the outbound multi-field
classification function on classification function on
the VLANIF interface the VLANIF interface
becomes invalid (ARP- becomes invalid
MAC association is
enabled by default.).

A shared MF None A shared MF


classification policy classification policy
cannot be bound to the cannot be bound to the
BAS view. BAS view.

An MF classification None An MF classification


policy in the BAS view is policy in the BAS view is
mutually exclusive with mutually exclusive with
that in the BAS interface that in the BAS interface
view. view.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 83


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

When BRAS PUPP is None When BRAS PUPP is


configured, if the policy configured, if the policy
rule content contains rule content contains
any of the following any of the following
types, the rule processing types, the rule processing
method is as follows: method is as follows:
● When the rule ● When the rule
content contains the content contains the
IPv4 TTL field, VPN- IPv4 TTL field, VPN-
instance, or IPv6 instance, or IPv6
fragment, commands fragment, commands
can be configured, can be configured,
but the entire rule but the entire rule
does not take effect. does not take effect.
● When the rule ● When the rule
content contains the content contains the
IPv6 TOS or IPv6 TCP- IPv6 TOS or IPv6 TCP-
Flag, commands can Flag, commands can
be configured. This be configured. The
field does not take rule can be matched
effect, but the fields regardless of the
of the other types value of the field in
take effect. the packet.

The BRAS PUPP feature None The BRAS PUPP feature


allows the actions other allows the actions other
than permit/deny/ than permit/deny/
remark/match remark/match
termination to be termination to be
configured in the policy, configured in the policy,
but such actions do not but such actions do not
take effect. take effect.

When BRAS PUPP is None Non-advanced IPv4 and


configured, only IPv6 rules can be
advanced IPv4 and IPv6 configured but do not
rules in the policy take take effect.
effect.

The BRAS PUPP feature None The BRAS PUPP feature


allows classifiers in AND allows classifiers in AND
mode to be configured in mode to be configured in
the policy, but the the policy, but the
classifiers in AND mode classifiers in AND mode
do not take effect. do not take effect.

CAR in color-aware When configuring CAR CAR in color-aware


mode is not supported on an IPv6 GRE tunnel mode is not supported
on an IPv6 GRE tunnel interface, do not specify on an IPv6 GRE tunnel
interface. the color-aware mode. interface.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 84


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

Only MF classification in When configuring MF If link-layer or all-layer is


ip-layer mode (default classification on an IPv6 specified for MF
mode) is supported on GRE tunnel interface, do classification on IPv6
an IPv6 GRE tunnel not specify layer GRE tunnel interfaces,
interface. information, or use ip- Layer 2 rules cannot be
layer when specifying matched. If mpls-layer is
layer information. specified, MPLS rules
cannot be matched.

MIBs and NMS do not None Failed to query and clear


support level-2 ACL sub- the statistics about sub-
policy statistics query policies that MIB and the
and clearing. NMS do not support.

The traffic-policy None The traffic-policy


match-mpls-layer match-mpls-layer
{mpls-push | mpls-pop} {mpls-push | mpls-pop}
* command has the * command is mutually
following mutually exclusive with the
exclusive relationships: following commands:
The traffic-policy ● traffic-policy match-
match-mpls-layer mpls- ip-layer {mpls-push |
pop mpls-push and mpls-pop}
traffic-policy match-ip- ● traffic-policy match-
layer {mpls-push | rule packet-type
mpls-pop} commands
are mutually exclusive.
The traffic-policy
match-mpls-layer mpls-
pop mpls-push and
traffic-policy match-
rule packet-type
commands are mutually
exclusive.

The outbound multi-field None The outbound multi-field


classification function on classification function on
a VLANIF interface does a VLANIF interface does
not support IPv6 rules. not support IPv6 rules.

A shared MF None A shared MF


classification policy classification policy
cannot be authorized to cannot be authorized to
users through an RADIUS users through an RADIUS
server. server.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 85


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

Hierarchical CAR and Configuring only one of Hierarchical CAR and


QPPB Policy CAR are hierarchical CAR and QPPB Policy CAR are
mutually exclusive. If CAR in ar QPPB Policy on mutually exclusive. If
both functions are one interface is both functions are
configured on the same recommended. configured on the same
interface, QPPB Policy interface, QPPB Policy
CAR takes effect, and CAR takes effect, and
only second-level ACL in only second-level ACL in
hierarchical CAR takes hierarchical CAR takes
effect. First-level ACL effect. First-level ACL
CAR does not take effect. CAR does not take effect.
However, if hierarchical However, if hierarchical
CAR is enabled and MF CAR is enabled and MF
classification contains classification contains
only level-1 CAR, both only level-1 CAR, both
QPPB Policy CAR and QPPB Policy CAR and
hierarchical CAR take hierarchical CAR take
effect. effect.
● When hierarchical
CAR and QPPB policy
CAR are both
configured on an
interface and level-2
CAR is configured for
hierarchical CAR,
QPPB policy CAR
takes effect, and only
CAR for the second-
level ACL takes effect.
First-level ACL CAR
does not take effect.
● When hierarchical
CAR and QPPB policy
CAR are configured
on an interface and
one CAR (CAR is
configured in a parent
or child policy) is
configured for
hierarchical CAR,
QPPB policy CAR
takes effect, and the
one CAR for
hierarchical CAR also
takes effect.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 86


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

When rate limiting based Do not configure CAR When rate limiting based
on Layer 3 packets is based on the packet rate on Layer 3 packets is
configured in a traffic or CAR based on packet configured in a traffic
policy, CAR based on the length compensation in policy, CAR based on the
packet rate or CAR based a traffic policy when rate packet rate or CAR based
on packet length limiting based on Layer 3 on packet length
compensation cannot be packets is required. compensation cannot be
configured. Otherwise, configured. Otherwise,
rate limiting based on rate limiting based on
Layer 3 packets does not Layer 3 packets does not
take effect. take effect.

When address pool-, port NA When address pool-, port


pool-, or port range- pool-, or port range-
based rules are based rules are
configured in a traffic configured in a traffic
policy, if the number of policy, if the number of
addresses or ports in the addresses or ports in the
pool decreases or the pool decreases or the
port range is shortened, port range is shortened,
the rules with lower the rules with lower
priorities become invalid priorities become invalid
temporarily. The number temporarily.
of rules that become
temporarily invalid is
determined by the
number of deleted rules.

In the scenario where None The traffic policy


traffic enters an SRv6 becomes invalid.
tunnel/VXLAN tunnel/
MPLS LDP LSP, a traffic
policy is applied to an
inbound interface of the
tunnel/LSP's egress. If an
ACL rule for matching
the tunnel header is
configured in the traffic
policy, the traffic policy
can take effect on the
traffic received on the
egress. After a QPPB
policy is configured on
the inbound interface,
the traffic policy cannot
match the tunnel header.
As a result, the traffic
policy becomes invalid.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 87


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

For a Layer 3 private line To apply a traffic policy The traffic policy
user, if a UCL rule for that contains an ACL becomes invalid.
matching the source and rule for matching the
destination IP addresses source and destination IP
is configured in the addresses to the Layer 3
traffic policy applied in private line user's
the system view, the UCL network-to-network
rule becomes invalid traffic, configure the
when an EDSG service traffic policy in the
policy is applied to the interface view.
user.

1. VLANs may not be None The port vlan-stacking


specified in the traffic- command is configured
policy command on on an interface. The
VLAN stacking interfaces, traffic-policy command is
but must be specified on configured on the
other Layer 2 interfaces. interface, and no VLANs
2. The traffic-policy are specified. The traffic
command is configured policy takes effect only
on a VLAN stacking on the traffic without
interface. After the VLAN VLAN information. When
stacking configuration is the port vlan-stacking
deleted, the traffic-policy command is deleted
command takes effect as from the interface or the
follows: port default vlan or port
trunk allow-pass vlan
(1) The traffic-policy command is configured
command with VLANs on the interface, the
specified takes effect on system does not check
the packets with the whether VLANs are
specified VLANs. specified in the traffic-
(2) The traffic-policy policy command.
command with no
VLANs specified takes
effect on the packets
without VLAN
information.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 88


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

1. VLANs may not be None The port vlan-stacking


specified in a behavior command is configured
aggregate classification on an interface. Behavior
configuration on a VLAN aggregate classification
stacking interface, but is configured on the
must be specified on interface, and no VLANs
other Layer 2 interfaces. are specified. The
2. Behavior aggregate behavior aggregate
classification is classification
configured on a VLAN configuration takes
stacking interface. After effect only on the traffic
the VLAN stacking without VLAN
interface configuration is information. When the
deleted, the behavior port vlan-stacking
aggregate classification command is deleted
configuration takes from the interface or the
effect as follows: port default vlan or port
trunk allow-pass vlan
(1) The behavior command is configured
aggregate classification on the interface, the
configuration with system does not check
VLANs specified takes whether VLANs are
effect on the packets specified in the behavior
with the specified VLANs. aggregate classification
(2) The behavior configuration.
aggregate classification
configuration with no
VLANs specified takes
effect on the packets
without VLAN
information.
If the trust upstream
(inbound or outbound
may or may not be
specified), or qos phb
enable default command
is configured on an
interface, behavior
aggregate classification
is configured.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 89


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

When a traffic policy is None The number of packets


applied to the outbound matching the VLANIF/
direction of a VLANIF/ VBDIF interface's traffic
VBDIF interface, the policy and CAR is
traffic policy takes effect inaccurate.
on the board where the
inbound interface of
traffic resides.
(1) If a traffic policy is
configured on the
inbound interface and
the traffic behavior is
discard, the traffic does
not match the traffic
policy of the VLANIF/
VBDIF interface.
(2) If a traffic policy is
applied to the inbound
interface and the traffic
behavior is CAR, and a
traffic policy is applied to
the outbound direction
of the VLANIF/VBDIF
interface and the traffic
behavior is CAR, the
VLANIF/VBDIF interface's
CAR and the inbound
interface's CAR are
performed for the traffic
in sequence. In this case,
the number of packets
matching the traffic
policy of the VLANIF/
VBDIF interface is the
number of matching
packets before the
inbound interface's CAR
is performed.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 90


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Restrictions Guidelines Impact

A device functions as the Configure rules to The number of packets


ingress of a VXLAN distinguish well-known that travel the device
tunnel. When the well- VXLAN port numbers through the VXLAN
known VXLAN port from non-well-known tunnel and match the
number is not explicitly VXLAN port numbers, global ACL rule is
specified in a global ACL place them in different doubled.
rule for upstream traffic, traffic classifiers, and
the number of packets associate traffic
that travel the device behaviors with the traffic
through the VXLAN classifiers. This
tunnel and match the workaround doubles the
global ACL rule is configuration workload
doubled. and hardware TCAM
resource usage.

After MF classification is None After MF classification is


applied to an interface, applied to an interface,
the user type can be the user type cannot be
configured only as Layer configured as other users
3 leased line users. except Layer 3 leased
line users.

5.3 Configuring MF Classification-based Traffic Policies


for IP Packets
This section describes how to configure MF classification-based traffic policies for
IP packets.

Context
As networks rapidly develop and services become increasingly diversified, multiple
service flows share the same network resource. In some scenarios, incoming or
ongoing traffic on a network needs to be classified. For example, voice, video, and
data services must be allocated different bandwidths because they have different
requirements on delay. Traffic from different users must be distinguished and
allocated different bandwidths and priorities. BA classification-based traffic
policies fail to meet such requirements.
MF classification-based traffic policies for IP packets provide differentiated services
according to parameters such as the DSCP value, protocol type, IP address, and
port number in packets, which can meet the requirements of different services on
bandwidth and delay.
Typically, MF classification-based traffic policies are configured on routers at the
network edge, and BA classification-based traffic policies are configured on core
routers.

This service is in conflict with Flow Influence.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 91


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Pre-configuration Tasks
Before configuring MF classification-based traffic policies for IP packets, you need
to complete the following tasks:

● Configure the physical parameters of interfaces.


● Configure the link layer attributes of interfaces.
● Configure IP addresses for interfaces.
● Enable the routing protocol for communication between devices at the
network layer.

5.3.1 Defining a Traffic Classifier


You need to configure a traffic classifier before configuring class-based QoS. The
traffic classifier can be configured based on the ACL rule, IP precedence, MAC
address, protocol address, and so on.

Procedure
● Define a traffic classifier based on Layer 3 or Layer 4 information
a. Run system-view

The system view is displayed.


b. Run traffic classifier classifier-name [ operator { and | or } ]

A traffic classifier is defined, and the traffic classifier view is displayed.


c. Choose the required matching rule as required:

▪ To define a matching rule to classify traffic based on the ACL


number, run the if-match [ ipv6 ] acl { acl-number | name acl-
name } command.

▪ To define a matching rule to classify traffic based on the DSCP value,


run the if-match [ ipv6 ] dscp dscp-value command.

▪ To define a matching rule to classify traffic based on the IPv4 TCP


flag value, run the if-match tcp syn-flag { tcpflag-value [ mask
tcpflag-mask ] | bit-match { established | fin | syn | rst | psh | ack |
urg | ece | cwr | ns } } command.

▪ To define a matching rule to classify traffic based on the IPv6 TCP


flag value, run the if-match ipv6 tcp syn-flag { tcpflag-value [ mask
tcpflag-mask ] | bit-match { established | fin | syn | rst | psh | ack |
urg } } command.

▪ To define a matching rule to classify traffic based on the precedence


of an IP packet, run the if-match [ ipv6 ] ip-precedence ip-
precedence command.

▪ To define a matching rule to classify traffic based on the MPLS EXP


value, run the if-match mpls-exp exp-value command.

▪ To define a matching rule to match all packets, run the if-match


[ ipv6 ] any command.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 92


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

▪ To define a matching rule to classify traffic based on the value of the


next IPv6 header, run the if-match ipv6 next-header command.

▪ To define a matching rule to classify traffic based on the source IPv6


address, run the if-match ipv6 source-address ipv6-address prefix-
length command.

▪ To define a matching rule to classify traffic based on a destination


IPv6 address, run the if-match ipv6 destination-address ipv6-
address prefix-length command.

▪ To define a matching rule to classify traffic based on the source or


destination QoS policy ID, run the if-match qos-local-id qos-local-id
command.

▪ To define a matching rule to classify traffic based on the source and


destination QoS policy IDs, run the if-match qos-local-id source
source-qos-local-id destination destination-qos-local-id command.

▪ To define a matching rule to classify traffic based on the IPv6 QoS


policy ID, run the if-match ipv6 qos-local-id qos-local-id command.

For IPv6 packets, you need to specify the keyword ipv6 when defining a
matching rule in Step 3. A matching rule defined to match packets based on the
source or destination addresses applies to IPv6 packets, but not IPv4 packets.
You can define different ACL rules as required, including the protocol type, source
address, destination address, and ToS in packets. The if-match acl command
filters packets according to the ACL rules defined in the rule command. The
system then performs the corresponding traffic behavior for the matching
packets.

If multiple matching rules are defined in a traffic classifier, you can set
the logical relationship between the matching rules by specifying the
parameter operator in Step 2.

▪ and: A packet belongs to the classifier only when it matches all the
rules.

▪ or: A packet belongs to the classifier when it matches any one of the
rules.
d. Run commit

The configuration is committed.


● Define a traffic classifier based on Layer 2 information
a. Run system-view

The system view is displayed.


b. Run traffic classifier classifier-name [ operator { and | or } ]

A traffic classifier is configured, and the traffic classifier view is displayed.


c. Define matching rules on the Router as required.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 93


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

▪ To define a matching rule to classify traffic based on the ACL


number, run the if-match [ ipv6 ] acl { acl-number | name acl-
name } command.

▪ To define a matching rule to classify traffic based on the 802.1p


priority of VLAN packets, run the if-match 8021p 8021p-value
command.

▪ To define a matching rule to classify traffic based on the COS , run


the if-match service-class service-class-value command.

▪ To define a matching rule to classify traffic based on the source MAC


address, run the if-match source-mac mac-address command.

▪ To define a matching rule to classify traffic based on the destination


MAC address, run the if-match destination-mac mac-address
command.

If multiple matching rules are defined for the same traffic classifier, you
can set their logical relationships by specifying the parameter operator in
Step 2. For details, see the previous section.

If multiple traffic classifiers are configured in one traffic policy, the traffic
behaviors corresponding to these traffic classifiers are implemented in
different orders.

▪ When multiple traffic classifiers match different fields of an IP


packet, the traffic behavior of the traffic classifier that is first bound
to a traffic policy is preferentially implemented.
For example, as shown in Table 5-1, Policy 1 defines two traffic
classifiers and their corresponding traffic behaviors in sequence. If a
packet matches both of the traffic classifiers, behavior 1 is performed
on the packet, and the 802.1p value of the packet is re-marked as 1.

Table 5-1 Traffic classifiers and behaviors defined in Policy 1

Traffic Traffic
Classifier Matching Rule Behavior Traffic Action

Classifier 1 Matching the Behavior 1 Re-marking the


destination MAC 802.1p value as
address 1

Classifier 3 Matching the Behavior 3 Re-marking the


source MAC 802.1p value as
address 3

▪ When multiple traffic classifiers match the same field of an IP


packet, the traffic behavior corresponding to the specific traffic
classifier is implemented for the packet.
For example, as shown in Table 5-2, three traffic classifiers and their
corresponding traffic behaviors are associated with Policy 2 in
sequence. If the destination MAC address of a packet is 2-2-2,

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 94


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

behavior 2 is performed on the packet, and the 802.1p value of the


packet is re-marked as 2.

Table 5-2 Traffic classifiers and behaviors defined in Policy 2

Traffic Traffic
Classifier Matching Rule Behavior Traffic Action

Classifier 1 Matching the Behavior 1 Re-marking the


destination MAC 802.1p value as
address 1-1-1 1

Classifier 2 Matching the Behavior 2 Re-marking the


destination MAC 802.1p value as
address 2-2-2 2

Classifier 3 Matching the Behavior 3 Re-marking the


destination MAC 802.1p value as
address 3-3-3 3

d. Run commit

The configuration is committed.

----End

5.3.2 Defining a Traffic Behavior and Configuring Actions


This section describes the traffic behaviors supported by the NE40E and how to
configure actions for a traffic behavior.

Context
The NE40E supports various types of traffic behaviors. You can choose one or
more traffic behaviors as required.

Procedure
● Configure packet filtering actions.

Perform the following steps on the Router:

a. Run system-view

The system view is displayed.


b. Run traffic behavior behavior–name

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Run permit or deny

Packets are allowed or forbidden to pass.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 95


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

If both the if-match any and deny parameters are configured in an MF


classification rule, the device discards all packets, including protocol packets, that
flow through an interface. Therefore, exercise caution when configuring both the
if-match any and deny parameters in a traffic classification rule.
If the permit or deny action is configured in both the rule command and the
traffic behavior view, only the packets that are permitted by the rule command
are processed according to the configured traffic behavior. If the deny action is
configured in either the rule command or the traffic behavior view, all the
matched packets are discarded.
d. Run commit

The configuration is committed.


● Configure traffic policing actions.

Perform the following steps on the Router:

a. Run system-view

The system view is displayed.


b. Run traffic behavior behavior–name

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Run car { cir cir-value [ pir pir-value ] } [ cbs cbs-value [ pbs pbs-
value ] ] [ adjust adjust-value ] [ green { discard | pass [ remark dscp
dscp | service-class class color color ] } | yellow { discard | pass
[ remark dscp dscp | service-class class color color ] } | red { discard |
pass [ remark dscp dscp | service-class class color color ] } ] *
[ summary ] [ color-aware ] [ limit-type pps ]

A traffic policing action is configured.After you configure a traffic policing


action for a traffic policy, the traffic policy can be applied to both
incoming and outgoing traffic on an interface.

The original qos car command that is configured on an interface will be


affected after a traffic policy configured with a traffic policing action is
applied to the interface.

If this command is run more than once, the last configuration overrides
the previous one.

If the CoS of a packet is re-marked as EF, BE, CS6, or CS7, the packet can be re-
marked only green.
d. Run user-queue cir cir-value [ [ pir pir-value ] | [ flow-queue flow-
queue-name ] | [ flow-mapping mapping-name ] | [ user-group-queue
group-name ] | [ service-template service-template-name ] ]*

Class-based HQoS scheduling is specified as the traffic behavior.

The outgoing traffic supports class-based HQoS scheduling only when the
traffic policy works in unshared mode and is applied to an ETM subcard.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 96


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

The user-queue and car commands are mutually exclusive in the same traffic
behavior.
e. (Optional) Run flow-car cir cir-value [ pir pir-value ] [ cbs cbs-value
[ pbs pbs-value ] ] identifier { source-ip | destination-ip }
Flow CAR is implemented for flows with the source or destination IP
addresses residing on the specified network segment.
f. Run commit
The configuration is committed.
● Configure suppression for broadcast, multicast, and unknown unicast packets.
Perform the following steps on the Router:
a. Run system-view
The system view is displayed.
b. Run traffic behavior behavior–name
A traffic behavior is configured, and the traffic behavior view is displayed.
c. Run broadcast-suppression cir cir-value [ cbs cbs-value ] [ green
{ discard | pass [ service-class class color { green | yellow | red } ] } |
red { discard | pass [ service-class class color { green | yellow |
red } ] } ] *
The rate at which broadcast packets are transmitted is restricted.
d. Run multicast-suppression cir cir-value [ cbs cbs-value ] [ green
{ discard | pass [ service-class class color { green | yellow | red } ] } |
red { discard | pass [ service-class class color { green | yellow |
red } ] } ] *
The rate at which multicast packets are transmitted is restricted.
e. Run unknown-unicast-suppression cir cir-value [ cbs cbs-value ] [ green
{ discard | pass [ service-class class color { green | yellow | red } ] } |
red { discard | pass [ service-class class color { green | yellow |
red } ] } ] *
The rate at which unknown unicast packets are transmitted is restricted.
The configured traffic behavior can be applied to the incoming or outgoing
traffic on an interface.
After traffic suppression is applied to an interface, the packets matching the
rules are processed based on the traffic behavior, and the packets not
matching the rules are forwarded.
● Configure forced traffic classification.
Perform the following steps on the Router:
a. Run system-view
The system view is displayed.
b. Run traffic behavior behavior–name

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 97


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Run service-class service-class color color
Packets with a certain CoS are colored.
d. (Optional) Runservice-class service-class color color track { master |
slave } bfd-session session-name bfd-session-name
The function of marking matching packets' CoS and color based on the
status of the specified BFD session is configured.
e. Run commit
The configuration is committed.
● Set the packet precedence.
Perform the following steps on the Router:
a. Run system-view
The system view is displayed.
b. Run traffic behavior behavior–name
A traffic behavior is configured, and the traffic behavior view is displayed.
c. Configure the Router as follows:

▪ To re-mark the precedence of IP packets, run the remark ip-


precedence ip-precedence command.

▪ To re-mark the DSCP value of IP packets, run the remark [ ipv6 ]


dscp dscp-value command.

▪ To re-mark the precedence of VLAN packets, run the remark 8021p


8021p-value command.
▪ To re-mark the ToS value of IP packets, run the remark tos remark
tos command.
▪ To re-mark the DF value of IP packets, run the remark ip-df
command.

▪ To re-mark the TTL value of IP packets, run the remark ttl ttl-value
command.

To re-mark the DSCP value of IPv6 packets, run the remark ipv6 dscp dscp-value
command.
d. Run commit
The configuration is committed.
● Set packet forwarding actions.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 98


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

NOTICE

● Redirecting of packets to the public network LSP applies only to the ingress
node of an MPLS network, instead of other nodes such as transit and
egress nodes.
● Redirecting of packets to the public network LSP can be configured only
for single-tagged MPLS packets.

Perform the following steps on the Router:

a. Run system-view

The system view is displayed.


b. Run traffic behavior behavior-name

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Configure the Router as follows:

▪ To directly forward packets without redirecting them, run the permit


command in the traffic behavior view.

▪ To directly drop packets without redirecting them, run the deny


command in the traffic behavior view.
The deny action is mutually exclusive with other traffic actions.
Traffic that is configured with the deny action cannot be further
processed unless the traffic is configured with the permit action.

▪ To configure the IPv4 address and outbound interface, VPN instance,


and NQA instance on a single next hop for redirecting IPv4 packets,
run the following commands:
○ redirect ip-nexthop ip-address interface interface-type
interface-number [ route-forward ] [ pri-type common ]
○ redirect ip-nexthop ip-address nqa nqa-test-administer-name
name-of-nqa-test-instance [ routing-filter { default-routing |
blackhole-routing } * ] [ pri-type common ] [ public-
network ]
○ redirect ip-nexthop ip-address vpn vpn-instance-name [ nqa
nqa-test-administer-name name-of-nqa-test-instance ]
[ routing-filter { default-routing | blackhole-routing } * ]
[ pri-type common ]

▪ To configure the IPv4 addresses and outbound interfaces, VPN


instances, and NQA instances on multiple next hops for redirecting
IPv4 packets, run the following commands:
○ redirect ipv4-multinhp { nhp ip-address interface interface-
type interface-number } &<2-16> [ loadbalance [ sip-hash ] ]
[ route-forward ] [ pri-type common ]
○ redirect ipv4-multinhp { nhp ip-address nqa nqa-test-
administer-name name-of-nqa-test-instance } &<2-16>
[ routing-filter { default-routing | blackhole-routing } * ]
[ pri-type common ]

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 99


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

○ redirect ipv4-multinhp { nhp ip-address vpn vpn-instance-


name [ nqa nqa-test-administer-name name-of-nqa-test-
instance ] } &<2-16> [ routing-filter { default-routing |
blackhole-routing } * ] [ pri-type common ] [ non-revertive ]

▪ To configure the IPv6 address and outbound interface, VPN instance,


and NQA instance on a single next hop for redirecting IPv6 packets,
run the following commands:
○ redirect ipv6-nexthop ip-address interface interface-type
interface-number [ route-forward ] [ pri-type common ]
○ redirect ipv6-nexthop ip-address nqa nqa-test-administer-name
name-of-nqa-test-instance [ routing-filter { default-routing |
blackhole-routing } * ] [ pri-type common ]
○ redirect ipv6-nexthop ip-address vpn vpn-instance-name [ nqa
nqa-test-administer-name name-of-nqa-test-instance ]
[ routing-filter { default-routing | blackhole-routing } * ]
[ pri-type common ]

▪ To configure the IPv6 addresses and outbound interfaces, VPN


instances, and NQA instances on multiple next hops for redirecting
IPv6 packets, run the following commands:
○ redirect ipv6-multinhp { nhp ip-address interface interface-
type interface-number } &<2-16> [ loadbalance [ sip-hash ] ]
[ route-forward ] [ pri-type common ]
○ redirect ipv6-multinhp { nhp ip-address nqa nqa-test-
administer-name name-of-nqa-test-instance } &<2-16>
[ routing-filter { default-routing | blackhole-routing } * ]
[ pri-type common ]
○ redirect ipv6-multinhp { nhp ip-address vpn vpn-instance-
name [ nqa nqa-test-administer-name name-of-nqa-test-
instance ] } &<2-16> [ routing-filter { default-routing |
blackhole-routing } * ] [ pri-type common ]

▪ In a scenario in which a forward PBR policy redirects packets to a


single next hop whose IP address matches a default route or a black-
hole route, if you want packets to be forwarded based on the
destination IP address, run either of the following commands:
○ redirect ip-nexthop ip-address [ routing-filter { default-
routing | blackhole-routing } * ] [ pri-type common ] [ public-
network ]
○ redirect ipv6-nexthop ip-address [ routing-filter { default-
routing | blackhole-routing } * ] [ pri-type common ]

▪ In a scenario in which a forward PBR policy redirects packets to


multiple next hops whose IP addresses match default or black-hole
routes, if you want packets to be forwarded based on the destination
IP address, run either of the following commands:
○ redirect ipv4-multinhp { nhp ip-address } &<2-16> [ routing-
filter { default-routing | blackhole-routing } * ] [ pri-type
common ]

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 100


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

○ redirect ipv6-multinhp { nhp ip-address } &<2-16> [ routing-


filter { default-routing | blackhole-routing } * ] [ pri-type
common ]

▪ To redirect IPv4 or IPv6 packets to be forwarded using private


network routes to public network routes' outbound interfaces, run
the redirect { ip | ipv6 } public-network command.

▪ To redirect IP packets to the public network LSP, run the redirect lsp
public [ dest-ipv4-address | interface interface-type interface-
number [.subinterface-number] | secondary ] command.

▪ To redirect packets to a specified VPN group, run the redirect vpn-


group vpn-group-name command.

▪ To redirect packets to a specified VSI, run the redirect vsi vsi-name.

▪ To redirect IPv4 packets to a specified outbound interface, run the


redirect to interface { interface-name | interface-type interface-
number } [ route-forward ] command.

▪ To redirect IPv6 packets to a specified outbound interface, run the


redirect ipv6 to interface { interface-name | interface-type
interface-number } [ route-forward ] command.

▪ To configure the next hop of the packets to be sent to the CPU


according to limits of idle web users, run the redirect-cpu http-
redirect-chasten command.
In VS mode, this command is supported only by the admin VS.

▪ To redirect packets to a specified tunnel, run the redirect interface


tunnel tunnelname command.

▪ To redirect public-network IPv4 packets to an SRv6 TE Policy, run the


redirect srv6-te policy endpoint color { sid | vpnsid } sid-ip.

When the redirection policy in the traffic behavior is a discard PBR policy, the IP
address and outbound interface of the next hop must be specified. When the
redirection policy in the traffic behavior is a forward PBR policy, the IP address of
the next hop must be specified.
In IPv6 application, the IP address of the next hop specified for a discard PBR
policy must be an IPv6 link-local address or an IPv6 unicast address; the IP
address of the next hop specified for a forward PBR policy can be only an IPv6
unicast address.
d. Run commit
The configuration is committed.
● Configure a load balancing mode for packets.
Perform the following steps on the Router:
a. Run system-view
The system view is displayed.
b. Run traffic behavior behavior-name

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 101


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Run load-balance { flow [ l2 | l3 ] | packet }
A load balancing mode is set for packets.
d. Run commit
The configuration is committed.
● Configure a policy for redirection.
ACL rules are generally used for redirection in traffic behavior. However, the
specifications of ACL rules are limited. When ACL rules defined for MF
classification do not meet the live network requirements, you can redirect the
traffic behavior to a configured traffic policy to implement cascaded MF
classification.
Perform the following steps on the Router:
a. Run system-view
The system view is displayed.
b. Run traffic behavior behavior–name
A traffic behavior is configured, and the traffic behavior view is displayed.
c. Run traffic-policy policy-name
The traffic behavior is redirected to the traffic policy.

▪ Cascading a traffic policy over another will cause the device


forwarding performance to deteriorate.

▪ When the traffic on an interface matches the cascaded traffic policy:


○ The traffic is forwarded based on the traffic behavior in the
cascaded traffic policy.
○ If the traffic behaviors in the two traffic policies are different,
they can be individually implemented.
○ If the traffic behaviors in the two traffic policies are the same,
the specific behavior configuration in the cascaded traffic policy
takes effect.

▪ On an interface, only one traffic policy can be applied to outgoing or


incoming packets. If the traffic policy cascades over another traffic
policy and is applied to an interface, both traffic policies take effect
on the direction-specific interface.

▪ The parameters specified for a traffic policy, such as inbound,


outbound, link-layer, mpls-layer, and all-layer, are inherited by the
cascaded traffic policy.

▪ When the traffic behaviors for two-level ACLs are service-class,


level-1 service-class preferentially takes effect. However, if level 1
service-class carries no-remark, level-2 service-class preferentially
takes effect.
d. (Optional) Run hierarchical-car enable
Hierarchical CAR is enabled in a cascaded traffic policy.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 102


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

When a traffic policy is configured in a traffic behavior, CAR can also be


configured in the traffic policy to implement hierarchical CAR.
e. Run commit

The configuration is committed.


● Enable NetStream sampling.

To charge the subscribers or collect traffic statistics based on traffic classifiers,


you can configure the corresponding traffic classifier and run the following
commands to enable NetStream sampling:

Perform the following steps on the Router.

a. Run system-view

The system view is displayed.


b. Run traffic behavior behavior-name

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Run { ip | ipv6 } netstream sampler { fix-packets packet-interval | fix-
time time-interval | random-packets packet-interval }

NetStream sampling is enabled.

Traffic sampling using a share-mode traffic policy is not supported.


d. (Optional) Run ip netstream sampler except deny-action

NetStream is not applied to traffic matching the ACL rule or traffic


behavior that contains deny.
e. Run commit

The configuration is committed.


● Increase the priority of traffic behavior.

If both BGP flow specification and MF classification are configured on a


device, you can run the increase-priority command to allow the traffic
behavior configured in MF classification to preferentially take effect.

Perform the following steps on the Router:

a. Run system-view

The system view is displayed.


b. Run traffic behavior behavior-name

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Run increase-priority

The priority of the traffic behavior is increased.


d. Run commit

The configuration is committed.

----End

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 103


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

5.3.3 (Optional) Enabling the IPv6 QoS Local ID Matching


Mode
If a matching rule based on the IPv6 QoS policy ID is defined, the rule can take
effect only after the IPv6 QoS local ID matching mode is enabled.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run traffic policy policy-name

A traffic policy is configured, and the traffic policy view is displayed.

Step 3 Run match-type ipv6 qos-local-id enable

The IPv6 QoS local ID matching mode is enabled.

Step 4 Run commit

The configuration is committed.

----End

5.3.4 Defining a Policy and Specifying a Behavior for a


Classifier in the Policy
After traffic classifiers and traffic behaviors are defined, a traffic policy needs to be
configured to associate the traffic classifiers with the traffic behaviors.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run traffic policy policy-name

A traffic policy is configured, and the traffic policy view is displayed.

Step 3 Run classifier classifier-name behavior behavior-name [ precedence precedence-


value ]
A traffic behavior is specified for the specified traffic classifier in the traffic policy
and the precedence of the traffic policy is also specified.

Step 4 (Option) Run step step-value

The step between policies is specified.

Step 5 Run commit

The configuration is committed.

----End

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 104


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

5.3.5 Applying a Traffic Policy


A class-based policy does not take effect unless it is applied to an interface.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Perform the following operations based on the interfaces on which a traffic policy
is used:
● Apply an MF classification-based traffic policy to a Layer 3 interface.
a. To enter the Layer 3 interface view, run the interface interface-type
interface-number command.
b. (Optional) To apply an MF classification-based traffic policy to incoming
traffic based on the source and destination QoS policy IDs, run the qppb-
policy qos-local-id both inbound command.

The if-match qos-local-id source source-qos-local-id destination destination-


qos-local-id command must be run prior to the qppb-policy qos-local-id both
inbound command. For details, see section defining a traffic classifier.
c. To apply a traffic policy to the Layer 3 interface, run the traffic-policy
policy-name { inbound | outbound } [ all-layer | link-layer | mpls-
layer ] command.

If link-layer is configured, the Router performs MF classification based on Layer 2


information of packets.
If mpls-layer is configured, the Router performs MF classification based on MPLS
packet header information.
If all-layer is configured, the Router first performs MF classification based on Layer 2
information of packets. If packets do not match any rule based on Layer 2
information, the performs MF classification based on Layer 3 information of packets.
● Apply an MF classification-based traffic policy to a Layer 2 interface, with a
VLAN ID range specified.
a. To enter the Layer 3 interface view, run the interface interface-type
interface-number command.
b. To change the interface mode from Layer 3 to Layer 2, run the
portswitch command.
c. To add the Layer 2 interface to a specific VLAN in tagged mode, run the
port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
command.
d. To apply a traffic policy to the Layer 2 interface, run the traffic-policy
policy-name { inbound | outbound } vlan { vlan-id1 [ to vlan-id2 ] | all }
[ all-layer | link-layer | mpls-layer ] command.
● Apply an MF classification-based traffic policy to an EVC Layer 2 sub-
interface, with the bandwidth allocation mode specified.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 105


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

a. To enter the EVC Layer 2 sub-interface view, run the interface interface-
type interface-number.subnum mode l2 command.
b. To apply a traffic policy to the EVC Layer 2 sub-interface, run the traffic-
policy policy-name { inbound | outbound } identifier { none | vid | ce-
vid | vid-ce-vid } [ all-layer | link-layer | mpls-layer ] command.

The bandwidth allocation mode specified using the identifier parameter must be
the same as the one configured on the EVC Layer 2 sub-interface.
● Apply an MF classification-based traffic policy to a QinQ VLAN tag
termination sub-interface, with the PVLAN ID and CVLAN ID ranges specified.
a. To enter the sub-interface view, run the interface interface-type
interface-number.subinterface-number command.
b. To set a VLAN ID range for the sub-interface and configure the sub-
interface to remove the tags from double-tagged packets, run the
encapsulation qinq-termination [ local-switch | rt-protocol ]
command.
c. To configure the sub-interface as a QinQ VLAN tag termination sub-
interface, run the qinq termination pe-vid pe-vid [ to high-pe-vid ] ce-
vid ce-vid [ to high-ce-vid ] [ vlan-group group-id ] command.
d. To apply a traffic policy to the QinQ VLAN tag termination sub-interface,
run the traffic-policy policy-name { inbound | outbound } pe-vid pe-vid
ce-vid ce-vid1 [ to ce-vid2 ] [ all-layer | link-layer | mpls-layer ]
command.
● Apply an MF traffic classification-based traffic policy to a VBDIF interface.
a. To create a bridge domain (BD), run the bridge-domain bd-id command.
b. To create a VBDIF interface and enter the VBDIF interface view, run the
interface vbdif bd-id command.
c. To apply a traffic policy to the VBDIF interface, run the traffic-policy
policy-name { inbound | outbound } command.

If traffic received by a VBDIF interface or VLANIF interface view comes from multiple
interfaces that reside on different forwarding modules and the policy CAR is applied,
the limited bandwidth of each forwarding module is the configured limited bandwidth,
and the actual valid limited bandwidth of the VBDIF interface or VLANIF interface
view is the sum of the bandwidth of each forwarding module.
● (Optional) Apply an MF classification-based traffic policy to a VPN instance.
a. To enter the VPN instance view, run the ip vpn-instance vpn-instance-
name command.
b. To apply a traffic policy to the VPN instance, run the traffic-policy policy-
name network inbound command.
● (Optional) Apply an MF classification-based traffic policy to a VSI.
a. To enter the VSI view, run the vsi vsi-name command.
b. Perform either of the following operations as required:

▪ Run the traffic-policy policy-name network inbound link-layer


command to apply a network-side traffic policy to the VSI.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 106


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

▪ Run the traffic-policypolicy-name ac-mode { inbound | outbound }


[ link-layer | all-layer ] command to apply a user-side traffic policy
to the VSI.
● (Optional) Apply an MF classification-based traffic policy to an EVPN.
a. To enter the EVPN view, run the evpn vpn-instance vpn-instance-name
bd-mode command.
b. To apply a traffic policy to the EVPN, run the traffic-policy policy-name
network inbound link-layer command.
Step 3 (Optional) Run qos traffic-car member-link-scheduler distribute
When CAR is configured on a trunk interface, the sum of all the member
interfaces' bandwidth complies with the CAR settings.
Step 4 Run commit
The configuration is committed.

----End

5.3.6 (Optional) Enabling Statistics Collection of a Traffic


Policy
The function to collect statistics of a traffic policy needs to be enabled in prior to
viewing statistics of this traffic policy.

Context
Do as follows on the Router:

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run traffic policy policy-name
A traffic policy is configured, and th traffic policy view is displayed.
Step 3 Run statistics enable
The function to collect statistics of the traffic policy is enabled.
Step 4 Run share-mode
The shared mode is specified for the traffic policy.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 107


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Step 3 is optional. To save memory resources, the function to collect statistics of a traffic
policy is disabled by default. When users need to view statistics about a traffic policy, run
the statistics enable command to enable this function.
Step 4 is optional. The default attribute of a traffic policy is shared.
● After a traffic policy is applied to an interface, you cannot change the mode of the
traffic policy, regardless of the shared or unshared mode. Before changing the mode of
a traffic policy, you must disable the traffic policy on the interface.
● If a shared traffic policy is applied to different interfaces, this shared traffic policy
collects statistics on the traffic of all the interfaces as a whole. That is, the shared
traffic policy does not collect statistics on the traffic of interfaces individually.
● If an unshared traffic policy is applied to different interfaces, this unshared traffic
policy collects statistics on the traffic of the interfaces individually.
● A traffic policy collects statistics on incoming traffic and outgoing traffic individually,
whether its attribute is shared or unshared.

Step 5 Run commit


The configuration is committed.

----End

5.3.7 (Optional) Enabling the Logging of the First Packet that


Matches an ACL Rule
When packets match an ACL, information about the first matching packet can be
logged, including the name of the inbound/outbound interface, source IP address,
destination IP address, protocol number, source port number, destination port
number, time when the first packet is received (millisecond-level), and number of
packets within a specified period.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run traffic behavior behavior–name
A traffic behavior is configured and the traffic behavior view is displayed.
Step 3 Run log first-packet
The function to log the first packet that matches an ACL rule is enabled.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 108


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

● The log first-packet command supports logging only for IP packets. MPLS/L2/UCL rules
are not supported.
● If queue congestion occurs, the first packet recording time is inaccurate.
● The shared traffic policy does not support the log first-packet command.
● If a traffic policy is applied to Layer 2 interfaces ,EVC, VE or global VE, the traffic
behavior in the traffic policy cannot be set to log first-packet.
● If the global ACL, global UCL, VPN ACL, or VXLAN multi-field classification has been
configured on the device, log first-packet cannot be configured.
● If a traffic policy has been applied to a vBDIF or GRE tunnel interface, log first-packet
cannot be configured.
● In the same traffic behavior, the log first-packet command is mutually exclusive with
the ip netstream sampler command.

Step 4 Run quit


The system view is displayed.
Step 5 (Optional) Run traffic-behavior log { entries number-of-entries | interval
interval-time } *
The maximum number of flows and the interval for collecting packet statistics
recorded by the log first-packet action are configured.
In VS mode, this command is supported only by the admin VS.
Step 6 Run commit
The configuration is committed.

----End

5.3.8 Verifying the Configuration of MF Classification-based


Traffic Policies for IP Packets
After class-based QoS is successfully configured, you can view the traffic
classifiers, traffic behaviors, binding between traffic classifiers and behaviors in a
specified traffic policy, and the configurations and running status of traffic policies
and queues.

Procedure
● Run the display interface [ interface-type [ interface-number ] ] command to
check information about the traffic on the interface.
● Run the display traffic behavior { system-defined | user-defined }
[ behavior-name ] command to check information about the configured
traffic behaviors.
● Run the display traffic classifier { system-defined | user-defined }
[ classifier-name ] command to check information about the configured
traffic classifiers.
● Run the display traffic policy { system-defined | user-defined } [ policy-
name [ classifier classifier-name ] ] command to check information about
the association between all or the specified traffic classifiers and traffic
behaviors in traffic policies.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 109


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

● Run the display traffic policy statistics interface interface-type interface-


number [ .sub-interface ] { inbound | outbound } [ verbose { classifier-
based [ class class-name ] | rule-based [ class class-name ] [ filter ] } ]
command to check traffic statistics about the traffic policies configured on an
interface.
● Run the display flow-car statistics { source-ip | destination-ip } [ ip-
address ] slot slot-id { inbound | outbound } command to check flow CAR
statistics about direction-specific traffic in a specified slot based on the source
or destination IP address.
● Run the display traffic policy_vpn-instance brief command to check the
binding between VPN instances and traffic policies.

----End

5.4 Configuring Priority Mappings for IP Packets


This section describes how to configure priority mappings for IP packets and the
application environment of this function.

Context
Traffic policy based on BA classification is used to map the precedence of traffic
on one type of network to another type. That is, to transmit the traffic in the
other network according to the original precedence.

When the NE40E serves as the border router for different networks, the original
external priorities (DSCP values) in the IP packets that go into the NE40E are all
mapped to the internal priorities of the router represented by service classes of
DiffServ and colors. When the NE40E sends out the packet, the internal priority is
mapped back to the external priority.

BA classification is usually implemented on the core devices of the network. It can


be implemented on both physical and logical interfaces. If implemented on the
logical interface, BA classification can limit traffic congestion on member ports of
the logical interface and restrict the precedence of packets on the logical interface.

A Diff-Serv (DS) domain is a group of Diff-Serv nodes that adopt the same service
policies and implement the same PHB aggregate.

The precedence of packets is usually accepted or re-defined on the core Router.


On the border Router in the IP domain or MPLS domain, DSCP and EXP also need
to be mapped.

The BA classification can map the internal precedence to the external precedence,
and the external precedence to the internal precedence. However, mapping
between traffic of the same type, for example, IP traffic or MPLS traffic, is not
supported.

Using the qos default-service-class command, you can configure the upstream traffic on
the interface to enter the specific queues and provide service. After this command is run,
other packets cannot be enabled to enter the queues, and BA classification cannot be
enabled.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 110


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Do as follows on the Router:

Pre-configuration Tasks
Before configuring traffic shaping, complete the following tasks:

● Configuring the physical parameters of interfaces


● Configuring the link layer attributes of interfaces to ensure their normal
operation
● Configuring IP addresses for interfaces
● Enabling the routing protocol for communication between devices

This configuration is supported only on the admin VS.

Procedure
● Configure the mappings between DSCP values of IP packets, service classes,
and colors.
a. Run system-view

The system view is displayed.


b. Run diffserv domain { ds-domain-name | default | 5p3d } [ domain-id
domain-id-value ]
A DiffServ domain is defined and the DiffServ domain view is displayed.
c. Define traffic policies on the Router based on the actual situation.

▪ To define a traffic policy for incoming IP traffic, run the ip-dscp-


inbound dscp-value phb service-class [ color ] command.

▪ To define a traffic policy for outgoing IP traffic, run the ip-dscp-


outbound service-class color map dscp-value command.

The system predefines a domain named default for IP packets. You are
not allowed to delete the default domain.

If the priority mapping in Step 3 is not set in the DiffServ domain, the
system uses the default mapping. The default domain describes the
default mappings between the DSCP values, QoS service classes, and
colors for IP packets. You can change the mappings in as required. In the
default domain, the DSCP values of the packets from an upstream device
are mapped to QoS service classes and colors. Their mappings are shown
in Table 5-3. The QoS service classes and colors of the packets entering a
downstream device are mapped to DSCP values. Their mappings are
shown in Table 5-4.

Table 5-3 Default mappings between DSCP values and service classes in
the default domain

DSCP Service Color DSCP Service Color

00 BE Green 32 AF4 Green

01 BE Green 33 BE Green

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 111


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

DSCP Service Color DSCP Service Color

02 BE Green 34 AF4 Green

03 BE Green 35 BE Green

04 BE Green 36 AF4 Yellow

05 BE Green 37 BE Green

06 BE Green 38 AF4 Red

07 BE Green 39 BE Green

08 AF1 Green 40 EF Green

09 BE Green 41 BE Green

10 AF1 Green 42 BE Green

11 BE Green 43 BE Green

12 AF1 Yellow 44 BE Green

13 BE Green 45 BE Green

14 AF1 Red 46 EF Green

15 BE Green 47 BE Green

16 AF2 Green 48 CS6 Green

17 BE Green 49 BE Green

18 AF2 Green 50 BE Green

19 BE Green 51 BE Green

20 AF2 Yellow 52 BE Green

21 BE Green 53 BE Green

22 AF2 Red 54 BE Green

23 BE Green 55 BE Green

24 AF3 Green 56 CS7 Green

25 BE Green 57 BE Green

26 AF3 Green 58 BE Green

27 BE Green 59 BE Green

28 AF3 Yellow 60 BE Green

29 BE Green 61 BE Green

30 AF3 Red 62 BE Green

31 BE Green 63 BE Green

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 112


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Table 5-4 shows the default mappings between internal service classes,
colors, and DSCP values for IP packets.

Table 5-4 Default mappings between service classes and DSCP values

Service Color DSCP

BE Green 0

AF1 Green 10

AF1 Yellow 12

AF1 Red 14

AF2 Green 18

AF2 Yellow 20

AF2 Red 22

AF3 Green 26

AF3 Yellow 28

AF3 Red 30

AF4 Green 34

AF4 Yellow 36

AF4 Red 38

EF Green 46

CS6 Green 48

CS7 Green 56

d. Run commit

The configuration is committed.


e. Run quit

Return to the system view.


f. Run interface interface-type interface-number

The interface view is displayed.


g. Run trust upstream { 5p3d | ds-domain-name | default } [ inbound |
outbound ]

The DiffServ domain is bound to the interface, and BA classification is


enabled on the interface.
h. Run commit

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 113


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

The configuration is committed.

----End

Checking the Configurations


Run the following commands to check the previous configuration.

● Run the display diffserv domain [ ds-domain-name ] [ 8021p | dscp | exp ]


[ inbound | outbound ] command to display the configurations of a DiffServ
domain.
● Run the display diffserv domain application [ ds-domain-name ] command
to display the interface list applied to a DiffServ domain.

5.5 Configuring CTC-based Traffic Policies for VLAN


Packets
This section describes how to configure CTC-based traffic policies for VLAN
packets.

Usage Scenario
To manage or limit the traffic that goes into or flows in a network according to
the class of service, you need to configure QoS traffic policies based on the
complex traffic classification. That is, you need to provide differentiated services
according to the VLAN attributes of packets. In this way, traffic from different
users, such as voice services, video services, and data services can be served
differently in terms of bandwidth, delay, and precedence. After VLAN QoS is used
for the traffic entering the VLAN network, the traffic can either retain its QoS
attributes of the previous network, or has its QoS attributes modified according to
the configurations of the VLAN. In this manner, the traffic continues to be
transmitted in the VLAN network.

CTC-based traffic policies are usually configured on the Router located at the edge
of the network, whereas traffic policies that are based on simple traffic
classification are configured on the Router located near the core of a network.

Pre-configuration Tasks
Before configuring CTC-based traffic policies for VLAN packets, you need to
complete the following tasks:

● Configuring physical parameters on interfaces


● Configuring link-layer attributes on interfaces
● Assigning IP addresses to interfaces

5.5.1 Configuring Rules for Mapping VLAN Frame Priorities


This section describes how to configure the rule for mapping VLAN frame
priorities.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 114


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Context
Do as follows on the Router:

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run traffic classifier classifier-name [ operator { and | or } ]

A traffic classifier is created and the traffic classifier view is displayed.

Step 3 Run if-match 8021p 8021p-value

A rule for mapping the 802.1p values of VLAN packets is defined.

Step 4 Run commit

The configuration is committed.

----End

5.5.2 Configuring VLAN Priorities


This section describes how to configure the VLAN priorities.

Context
Do as follows on the Router:

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run traffic behavior behavior-name

A traffic behavior is configured and the traffic behavior view is displayed.

Step 3 Perform one of the following operations to re-mark 802.1p values.


● To re-mark the 802.1p values in both inner and outer VLAN tags, run the
remark 8021p 8021p-value command.
● To re-mark the 802.1p value in either inner or outer VLAN tag, run either of
the following commands:
– Run the remark inner-8021p 8021p-value command to enable a device
to re-mark the 802.1p value in the inner VLAN tag of double-tagged
VLAN packets.
– Run the remark outer-8021p 8021p-value command to enable a device
to re-mark the 802.1p value in the outer VLAN tag of double-tagged
VLAN packets.

Step 4 Run commit

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 115


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

The configuration is committed.

----End

5.5.3 Defining a Traffic Policy and Specifying Its Traffic


Behaviors
After traffic classifiers and traffic behaviors are defined, traffic classifiers and
traffic behaviors need to be associated to form traffic policies.

Context
Do as follows on the Router:

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run traffic policy policy-name

A traffic policy is defined and the traffic policy view is displayed.

Step 3 Run classifier classifier-name behavior behavior-name [ precedence precedence-


value ]
A traffic behavior is specified for the specified traffic classifier in the traffic policy
and the precedence of the traffic policy is also specified.

Step 4 (Option) Run step step-value

The step between policies is specified.

Step 5 Run commit

The configuration is committed.

----End

5.5.4 Applying a Traffic Policy


A class-based traffic policy takes effect only when it is applied to an interface.

Context
Perform the following steps on the Router:

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Perform the following operations based on the interfaces on which a traffic policy
is used:

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 116


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

● Apply a traffic policy on a Layer 3 interface.


a. To enter the Layer 3 interface view, run the interface interface-type
interface-number command.
b. To apply a traffic policy to the Layer 3 interface, run the traffic-policy
policy-name { inbound | outbound } [ all-layer | link-layer | mpls-
layer ] command.

If you specify link-layer, the Router matches Layer 2 information about packets with
the traffic policy and performs a corresponding action.
If you specify mpls-layer, the Router performs complex traffic classification based on
MPLS packet header information.
If you specify all-layer, the device first performs rule-matching according to Layer 2
information and implements a corresponding traffic action. If Layer 2 information of a
packet does not match the traffic rule, the system performs rule-matching according
to Layer 3 information and implements a corresponding traffic action.
● Apply a traffic policy on a Layer 2 interface. You can specify a VLAN ID range
to apply the traffic policy on the Layer 2 interface.
a. To enter the Layer 3 interface view, run the interface interface-type
interface-number command.
b. To change the interface mode from Layer 3 to Layer 2, run the
portswitch command.
c. To add the Layer 2 interface to specific VLANs in tagged mode, run the
port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
command.
d. To apply a traffic policy on the Layer 2 interface, run the traffic-policy
policy-name { inbound | outbound } vlan { vlan-id1 [ to vlan-id2 ] | all }
[ all-layer | link-layer | mpls-layer ] command.
● Apply a traffic policy on an EVC Layer 2 sub-interface. You can specify a
bandwidth allocation type to apply the traffic policy on the EVC Layer 2 sub-
interface.
a. To enter the EVC Layer 2 sub-interface view, run the interface interface-
type interface-number.subnum mode l2 command.
b. To apply a traffic policy on the EVC Layer 2 sub-interface, run the traffic-
policy policy-name { inbound | outbound } identifier { none | vid | ce-
vid | vid-ce-vid } [ all-layer | link-layer | mpls-layer ] command.

The parameter identifier specified bandwidth allocation type must be the same
as the one configured on the EVC Layer 2 sub-interface.
● Apply a traffic policy on a QinQ VLAN tag termination sub-interface. You can
specify a PVLAN ID and CVLAN ID range to apply the traffic policy on the
QinQ VLAN tag termination sub-interface.
a. To enter the sub-interface view, run the interface interface-type
interface-number.subinterface-number command.
b. To set a VLAN ID range for the sub-interface and configure the sub-
interface to remove the tags from double-tagged packets, run the
encapsulation qinq-termination [ local-switch | rt-protocol ]
command.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 117


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

c. To configure the sub-interface as a QinQ VLAN tag termination sub-


interface, run the qinq termination pe-vid pe-vid [ to high-pe-vid ] ce-
vid ce-vid [ to high-ce-vid ] [ vlan-group group-id ] command.
d. To apply a traffic policy on the QinQ VLAN tag termination sub-interface,
run the traffic-policy policy-name { inbound | outbound } pe-vid pe-vid
ce-vid ce-vid1 [ to ce-vid2 ] [ all-layer | link-layer | mpls-layer ]
command.

To apply a traffic policy to a QinQ VLAN tag termination sub-interface, you can
also directly run the traffic-policy policy-name { inbound | outbound } [ all-
layer | link-layer | mpls-layer ] command without specifying a PVLAN ID or
CVLAN ID range.

Step 3 Run commit


The configuration is committed.

----End

5.5.5 Enabling the Statistical Function of a Traffic Policy


The function to collect statistics of a traffic policy needs to be enabled in prior to
viewing statistics of this traffic policy.

Context
Do as follows on the Router:

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run traffic policy policy-name
A traffic policy is configured, and th traffic policy view is displayed.
Step 3 Run statistics enable
The function to collect statistics of the traffic policy is enabled.
Step 4 Run share-mode
The shared mode is specified for the traffic policy.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 118


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Step 3 is optional. To save memory resources, the function to collect statistics of a traffic
policy is disabled by default. When users need to view statistics about a traffic policy, run
the statistics enable command to enable this function.
Step 4 is optional. The default attribute of a traffic policy is shared.
● After a traffic policy is applied to an interface, you cannot change the mode of the
traffic policy, regardless of the shared or unshared mode. Before changing the mode of
a traffic policy, you must disable the traffic policy on the interface.
● If a shared traffic policy is applied to different interfaces, this shared traffic policy
collects statistics on the traffic of all the interfaces as a whole. That is, the shared
traffic policy does not collect statistics on the traffic of interfaces individually.
● If an unshared traffic policy is applied to different interfaces, this unshared traffic
policy collects statistics on the traffic of the interfaces individually.
● A traffic policy collects statistics on incoming traffic and outgoing traffic individually,
whether its attribute is shared or unshared.

Step 5 Run commit

The configuration is committed.

----End

5.5.6 Verifying the Configuration of MF classification-based


Traffic Policies for VLAN Packets
After VLAN QoS is successfully configured, you can view the traffic classifiers,
traffic behaviors, binding between traffic classifiers and behaviors in the specified
traffic policy, configured traffic policies and their application, and configured
queues and their application.

Procedure
● Run the display interface [ interface-type [ interface-number ] ] [ | { begin |
exclude | include } regular-expression ] command to view the information
about the traffic on the interface.
● Run the display traffic behavior { system-defined | user-defined }
[ behavior-name ] command to view information about the configured traffic
behaviors.
● Run the display traffic classifier { system-defined | user-defined }
[ classifier-name ] command to view information about the configured traffic
classifiers.
● Run the display traffic policy { system-defined | user-defined } [ policy-
name [ classifier classifier-name ] ] command to view information about the
association between all or the specified traffic classifiers and traffic behaviors
in traffic policies.
● Run the display traffic policy statistics interface interface-type interface-
number [ vlan vlan-id | pe-vid pe-vid ce-vid ce-vid ] { inbound | outbound }
[ verbose { classifier-based [ class class-name ] | rule-based [ class class-
name ] [ filter ] } ] command to view traffic statistics of traffic policies that
are configured on the interface.

This command is supported only on the Admin VS.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 119


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

● Run the display traffic policy statisticsdisplay traffic policy statistics


bridge-domain bdid [ vlan vlan-id | pe-vid pe-vid ce-vid ce-vid | vid vid | ce-
vid ce-vid | vid vid-id ce-vid ce-vid ] { inbound | outbound } [ verbose
{ classifier-based [ class class-name ] | rule-based [ class class-name ]
[ filter ] } ] command to view traffic statistics of traffic policies that are
configured on a bridge-domain.

This command is supported only on the Admin VS.


● Run the display traffic policy not-support policy policy-name interface-type
interface-number outbound command to query the rules that are not
applicable to outgoing traffic on a specified interface.

----End

5.6 Configuring Priority Mappings for VLAN Packets


This section describes how to configure priority mappings for VLAN packets and
the application environment of this function.

Context
Traffic policy based on BA classification is used to map the precedence of traffic
on one type of network to another type. That is, to transmit the traffic in the
other network according to the original precedence.

When the NE40E serves as the border router for different networks, the original
external priorities (802.1p values) in the VLAN packets that go into the NE40E are
all mapped to the internal priorities of the router represented by service classes of
DiffServ and colors. When the NE40E sends out the packet, the internal priority is
mapped back to the external priority.

If unified scheduling is required for all upstream traffic on an interface, you can run the qos
default-service-class command to configure the upstream traffic on the interface to enter
the specific queues and provide corresponding services.
After this command is run, other packets cannot be enabled to enter the queues, and BA
classification cannot be enabled.

Pre-configuration Tasks
Before configuring traffic shaping, complete the following tasks:

● Configuring the physical parameters of interfaces


● Configuring the link layer attributes of interfaces to ensure their normal
operation
● Configuring IP addresses for interfaces
● Enabling the routing protocol for communication between devices

This configuration is supported only on the Admin VS.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 120


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run diffserv domain { ds-domain-name | default | 5p3d } [ domain-id domain-


id-value ]

A DS domain is defined and the DS domain view is displayed.

Step 3 Define traffic policies on the Router based on the actual situation.
● To define a traffic policy for incoming VLAN traffic, run the 8021p-inbound
8021p-value phb service-class [ color ] command.
● To define a traffic policy for outgoing VLAN traffic, run the 8021p-outbound
service-class color map 8021p-value command.

Following DS domain templates are pre-defined by the system for VLAN packets:
the 5p3d domain template, and the default domain template.

● The 5p3d domain template describes mapping relations from the 802.1
priorities of VLAN packets to the QoS CoSs and colors, or from the QoS CoSs
and colors to the 802.1 priorities. You can change the mapping relations in
the 5p3d domain template. The 802.1p priorities of the packets from an
upstream device are mapped to the QoS CoSs and colors. Their mapping
relations are shown in Table 5-5. The QoS CoSs and colors of the packets
going to a downstream device are mapped to the 802.1p priorities. Their
mapping relations are shown in Table 5-6.

Table 5-5 Mapping from the 802.1p value to the service-class and color

802.1p Service Color

0 BE Yellow

1 BE Green

2 AF2 Yellow

3 AF2 Green

4 AF4 Yellow

5 AF4 Green

6 CS6 Green

7 CS7 Green

Table 5-6 Mapping from the service-class and color to the 802.1p value

Service Color 802.1p

BE Green 1

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 121


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Service Color 802.1p

BE Yellow 0

BE Red 0

AF1 Green 1

AF1 Yellow 0

AF1 Red 0

AF2 Green 3

AF2 Yellow 2

AF2 Red 2

AF3 Green 3

AF3 Yellow 2

AF3 Red 2

AF4 Green 5

AF4 Yellow 4

AF4 Red 4

EF Green 5

EF Yellow 4

EF Red 4

CS6 Green, Yellow, Red 6

CS7 Green, Yellow, Red 7

● The default domain template describes the default mapping relations from
the 802.1p priorities of VLAN packets to the QoS services classes and colors,
or from the QoS services classes and colors to the 802.1p priorities. You can
change the mapping relations in the default domain template. The 802.1p
priorities of the packets from an upstream device are mapped to the QoS
CoSs and colors. Their mapping relations are shown in Table 5-7. The QoS
CoSs and colors of the packets going to a downstream device are mapped to
the 802.1p priorities. Their mapping relations are shown in Table 5-8.

Table 5-7 Default mapping from the IP Precedence/MPLS EXP/802.1p to the


service-class and color

IP Precedence/MPLS Service Color


EXP/802.1p

0 BE Green

1 AF1 Green

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 122


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

IP Precedence/MPLS Service Color


EXP/802.1p

2 AF2 Green

3 AF3 Green

4 AF4 Green

5 EF Green

6 CS6 Green

7 CS7 Green

Table 5-8 Default mapping from the service-class and color to IP Precedence/
MPLS EXP/802.1p
Service Color IP Precedence/MPLS EXP/802.1p

BE Green, 0
Yellow, Red

AF1 Green, 1
Yellow, Red

AF2 Green, 2
Yellow, Red

AF3 Green, 3
Yellow, Red

AF4 Green, 4
Yellow, Red

EF Green, 5
Yellow, Red

CS6 Green, 6
Yellow, Red

CS7 Green, 7
Yellow, Red

Step 4 Run field dei enable vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }
The DEI capability for a range of VLANs on an interface is specified. After you
enable DEI for a VLAN and configure simple traffic classification, packets enter
queues based on CoSs and are marked with different colors based on the values of
their CFI fields.

The DEI function takes effect only after simple traffic classification is configured and trust
priority of 802.1p.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 123


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Step 5 Run commit

The configuration is committed.

Step 6 Run quit

Return to the system view.

Step 7 Perform the following operations based on the interfaces on which a traffic policy
will be used:
● Apply a traffic policy to VLAN packets on a Layer 3 sub-interface.
a. To enter the sub-interface view, run the interface gigabitethernet
interface-number.subnumber command.
b. Bind the sub-interface to a DS domain.

You can use either the qos phb enable command or trust upstream command
to bind a Layer 3 sub-interface to a DS domain and map priorities for packets.
The qos phb enable command, however, maps priorities only for downstream
traffic. To map priorities for both upstream and downstream traffic, run the trust
upstream command.

▪ To bind the sub-interface to a DS domain and map priorities for


packets, run the trust upstream { 5p3d | ds-domain-name |
default } command.

▪ To bind the sub-interface to a DS domain and map priorities only for


downstream packets, run the qos phb enable { ds-domain-name |
default } command.

If the trust upstream command is not run on the Layer 3 sub-interface, run
the undo qos phb disable command on the Layer 3 sub-interface to map
priorities only for downstream packets.
The undo qos phb disable command is mutually exclusive to the trust
upstream.
c. To enable 802.1 priority-based BA classification, run the trust { 8021p |
inner-8021p | outer-8021p } [ inbound | outbound ] command.

Before running the trust 8021p command on a sub-interface, use the trust
upstream command to bind the sub-interface to a DS domain. Otherwise, the
trust 8021p configuration does not take effect.
After you add an interface to a DiffServ domain, the traffic policy configured for
the domain automatically takes effect for the incoming and outgoing traffic on
the interface.
● Apply a traffic policy to VLAN packets on a Layer 2 interface.
a. To enter the view of a Layer 3 interface, run the interface
gigabitethernet interface-number command.
b. To change the interface mode from Layer 3 to Layer 2, run the
portswitch command.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 124


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

c. To add the Layer 2 interface to specific VLANs in tagged mode, run the
port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
command.
d. Bind the Layer 2 interface to a DS domain.

You can use either the qos phb enable vlan command or trust upstream vlan
command to bind a Layer 2 interface to a DS domain and map priorities for
packets. The qos phb enable vlan command, however, maps priorities only for
downstream traffic. To map priorities for both upstream and downstream traffic,
run the trust upstream vlan command.

▪ To bind the Layer 2 interface to a DS domain and map priorities for


packets, run the trust upstream { 5p3d | ds-domain-name |
default } [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] [ inbound |
outbound ] command.

▪ To bind the Layer 2 interface to a DS domain and map priorities only


for downstream packets, run the qos phb enable { ds-domain-name
| default | 5p3d } [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]
command.

If the trust upstream { ds-domain-name | default } vlan { vlan-id1 [ to


vlan-id2 ] } &<1-10> command is not run on the Layer 2 interface, run the
qos phb enable { ds-domain-name | default } vlan { vlan-id1 [ to vlan-
id2 ] } &<1-10> command on the Layer 2 interface to map priorities only for
downstream packets.
The qos phb enable command is mutually exclusive to the trust upstream
vlan and qos phb disable commands on the Layer 2 interface.
e. To enable 802.1 priority-based BA classification, run the trust 8021p
[ inbound | outbound ] vlan { vlan-id1 [ to vlan-id2 ] } command.

Step 8 Run commit

The configuration is committed.

----End

Checking the Configurations


Run the following commands to check the previous configuration.

● Run the display diffserv domain [ ds-domain-name ] [ 8021p | dscp | exp ]


[ inbound| outbound ] command to display the configurations of a DS
domain.
● Run the display diffserv domain application [ ds-domain-name ] command
to display the interface list applied to a DS domain.

5.7 Configuring Priority Mappings for MPLS Packets


This section describes how to configure priority mappings for MPLS packets and
the application environment of this function.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 125


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Context
Traffic policy based on BA classification is used to map the precedence of traffic
on one type of network to another type. That is, to transmit the traffic in the
other network according to the original precedence.
When the NE40E serves as the border router for different networks, the original
external priorities (EXP values) in the MPLS packets that go into the NE40E are all
mapped to the internal priorities of the router represented by service classes of
DiffServ and colors. When the NE40E sends out the packet, the internal priority is
mapped back to the external priority.
Generally, the priority mappings of MPLS packets are configured on the core
device of the network.

Pre-configuration Tasks
Before configuring traffic shaping, complete the following tasks:
● Configuring the physical parameters of interfaces
● Configuring the link layer attributes of interfaces to ensure their normal
operation
● Configuring IP addresses for interfaces
● Enabling the routing protocol for communication between devices
This configuration is supported only on the Admin VS.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run diffserv domain ds-domain-name [ domain-id domain-id ]
A DS domain is defined and the DS domain view is displayed.
Step 3 Define traffic policies on the Router based on the actual situation.
● To define a traffic policy for incoming MPLS traffic, run the mpls-exp-
inbound exp phb service-class [ color ] command.
● To define a traffic policy for outgoing MPLS traffic, run the mpls-exp-
outbound service-class color map exp-value command.
The system predefines a default domain. If you do not configure priority mappings
in Step 3 for the DS domain, the system uses the default mappings. The default
domain describes the default mappings from the EXP values of MPLS packets to
QoS service classes and colors, or from QoS service classes and colors to the EXP
values of MPLS packets. You can change the mappings in the default domain. The
EXP values of the packets from an upstream device are mapped to QoS service
classes and colors. Their mappings are shown in Table 5-9. The QoS service
classes and colors of the packets entering a downstream device are mapped to
EXP values. Their mappings are shown in Table 5-10.
The default mappings between the EXP values of MPLS packets and QoS service
classes are shown in Table 5-9.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 126


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Table 5-9 Default mappings between the EXP values the QoS service classes

EXP Service Color EXP Service Color

0 BE Green 4 AF4 Green

1 AF1 Green 5 EF Green

2 AF2 Green 6 CS6 Green

3 AF3 Green 7 CS7 Green

The default mappings between the EXP values of MPLS packets and QoS service
classes are shown in Table 5-10.

Table 5-10 The default mappings between the EXP values and QoS service classes

Service Color MPLS EXP

BE Green 0

AF1 Green, Yellow, Red 1

AF2 Green, Yellow, Red 2

AF3 Green, Yellow, Red 3

AF4 Green, Yellow, Red 4

EF Green 5

CS6 Green 6

CS7 Green 7

Step 4 Run commit

The configuration is committed.

Step 5 Run quit

Return to the system view.

Step 6 Run interface interface-type interface-number

The interface view is displayed.

Step 7 Run trust upstream { ds-domain-name | default }

The DS domain is bound to the interface, and BA classification is enabled on the


interface.

Step 8 (Optional) Run mpls l2vc diffserv domain { 5p3d | domain-name | default }

A DS domain to which the private network tag preference to be marked belongs is


bound to a VLL interface.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 127


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Step 9 (Optional) Run slot slot-id


The slot view is displayed.
Step 10 (Optional) Run mpls-inner-exp phb disable vll
The function of obtaining the private network tag priority from a DS domain for
the downstream traffic on the PW interface is disabled in the VLL networking.
Step 11 Run commit
The configuration is committed.

----End

Checking the Configurations


Run the following commands to check the previous configuration.
● Run the display diffserv domain [ ds-domain-name ] [ 8021p | atm | dscp |
exp ] [ inbound| outbound ] command to display the configurations of a DS
domain.
● Run the display diffserv domain application [ ds-domain-name ] command
to display the interface list applied to a DS domain.

5.8 Configuring User Priority Mapping in a Domain


You need to configure the mappings among the user priority, CoS, and color to
implement QoS on packets in a domain.

Context
You can configure the desired priorities for online users. To perform traffic
scheduling according to the user priority, you can configure user priority mapping
in a domain. After a user in this domain goes online, the priority of the user is
mapped to the internal CoS of the device according to the configured mapping
relationship.
Perform the following steps on the Router:

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run aaa
The AAA view is displayed.
Step 3 Run domain domain-name
The AAA domain view is displayed.
Step 4 Run user-priority { upstream | downstream } { priority | trust-8021p-inner |
trust-8021p-outer | trust-dscp-outer | trust-dscp-inner | trust-exp-inner | trust-
exp-outer | unchangeable }

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 128


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

The user priority is configured.


The methods for configuring user priorities are as follows:
● Directly specifying the user priority, which ranges from 0 to 7
● Using the internal or external 802.1p value of Layer 2 packets of the user as
the user priority (not applicable to packets sent from the network side to the
user side)
● Using the DSCP value of user packets as the user priority
● Using the EXP value of MPLS packets as the user priority
Step 5 Run diffserv domain { ds-domain-name | default | 5p3d } [ domain-id domain-
id ]
A DS domain is defined and the DS domain view is displayed.
Step 6 (Optional) Run user-priority priority phb { af1 | af2 | af3 | af4 | be | cs6 | cs7 |
ef } [ green | yellow | red ]
Priority mapping is configured for users in a domain.
Before configuring the user priority mapping by running the user-priority phb
command, you must specify the user priority that needs to be mapped by running
the user-priority command in the AAA domain. Otherwise, the mapping does not
take effect.
If the CoS is CS6, CS7, EF or BE, packets can be marked only in green.

Table 5-11 Default mapping between user priorities and CoSs


User Priority Service Color

0 BE Green

1 AF1 Green

2 AF2 Green

3 AF3 Green

4 AF4 Green

5 EF Green

6 CS6 Green

7 CS7 Green

Step 7 Run quit


Return to the system view.
Step 8 Run aaa
The AAA view is displayed.
Step 9 Run domain domain-name
The AAA domain view is displayed.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 129


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Step 10 To configure priority mapping for IP packets, MPLS packets, and multicast packets
of a domain, run the trust upstream ds-domain-name command to enable simple
traffic classification in the domain.
Step 11 (Optional) Run qos phb { dscp | inner-8021p | outer-8021p | mpls-exp } disable
PHB for specific priorities of downstream packets in an AAA domain is disabled.
Step 12 (Optional) Configure the function to redirect enterprise users to a specified BA
classification domain.
1. Run quit
Return to the system view.
2. Run dhcp option option-code include option-include redirect ds-domain
enable
The function to redirect enterprise users to a specified BA classification
domain is enabled.
3. Run aaa
The AAA view is displayed.
4. Run domain domain-name
The AAA domain view is displayed.
5. Run redirect ds-domain ds-domain-name
The function to redirect enterprise users in a DS domain to a specified BA
classification domain is enabled.
Step 13 Run commit
The configuration is committed.

----End

Checking the Configurations


Run the following commands to check the previous configuration.
● Run the display diffserv domain [ ds-domain-name ] [ 8021p | atm | dscp |
exp ] [ inbound | outbound ] command to display the configurations of a DS
domain.
● Run the display diffserv domain application [ ds-domain-name ] command
to display the interface list applied to a DS domain.

5.9 Configuring MF Classification for VXLAN Packets


This section describes how to configure MF classification for VXLAN packets.

Usage Scenario
MF classification can be configured to provide differentiated services for VXLAN
packets based on parameters of the packets, such as the DSCP value, protocol
type, IP address, or port number, to meet services' requirements on bandwidth and
delay.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 130


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

MF classification is usually configured on the Router located at the edge of the


network, whereas BA classification is configured on the Router located at the core
of a network.

Pre-configuration Tasks
Before configuring traffic policies for VXLAN packets, complete the following tasks:

● Configure a VXLAN tunnel.


● Bind a VNI to a BD/VPN.

5.9.1 Defining a Traffic Classifier


To classify traffic, you can configure traffic classifiers based on ACL rules, packet
priorities, protocol types, and addresses.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run traffic classifier classifier-name [ operator { and | or } ]

A traffic classifier is defined and the traffic classifier view is displayed.

Step 3 Define matching rules for the traffic classifier as required.


● To define a matching rule based on an ACL, run the if-match acl { acl-
number | name acl-name } command.

If the rule [ rule-id ] { deny | permit } { protocol | udp } vxlan vni vni and rule [ rule-
id ] { deny | permit } protocol [ packet-length length-operation length-value ]
commands are configured for an advanced ACL, the rules that can be configured will
be reduced.
● To define a matching rule based on the DSCP value, run the if-match dscp
dscp-value command.
● To define a matching rule based on the IP precedence, run the if-match
[ ipv6 ] ip-precedence ip-precedence command.
● To define a matching rule to match all packets, run the if-match any
command.

ACL rules can be defined based on different parameters, such as the protocol type, source
address, destination address, and the precedence field in packets. Packets are matched
against rules configured using the rule command in the if-match acl configuration, and
traffic behaviors are performed for the matching packets.

If you define multiple matching rules in one traffic classifier, you can set the
logical relationship between the matching rules by specifying the parameter
operator in Step 2.

● and: A packet belongs to the classifier only when it matches all the rules.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 131


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

● or: A packet belongs to the classifier if it matches any one of the rules.

----End

5.9.2 Defining a Traffic Behavior and Configuring Actions


This section describes the traffic behaviors supported by the NE40E and how to
configure actions.

Context
The NE40E supports various types of traffic behaviors. You can choose one or
more behaviors to meet your requirements.

Procedure
● Configure traffic policing actions.

Do as follows on the Router.

a. Run system-view

The system view is displayed.


b. Run traffic behavior behavior–name

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Run car { cir cir-value [ pir pir-value ] } [ cbs cbs-value [ pbs pbs-
value ] ] [ adjust adjust-value ] [ green { discard | pass [ remark dscp
dscp | service-class class color color ] } | yellow { discard | pass
[ remark dscp dscp | service-class class color color ] } | red { discard |
pass [ remark dscp dscp | service-class class color color ] } ] *
[ summary ] [ color-aware ] [ limit-type pps ]

A traffic policing action is configured.

This command is cyclic in nature. If this command is configured for


multiple times, only the last configuration takes effect.

If the CoS of a packet is re-marked as EF, BE, CS6, or CS7, the packet can be re-
marked green only.
d. Run user-queue cir cir-value [ [ pir pir-value ] | [ flow-queue flow-
queue-name ] | [ flow-mapping mapping-name ] | [ user-group-queue
group-name ] | [ service-template service-template-name ] ]*
The class-based HQOS parameters for the specified traffic behavior is
configured.

The outgoing traffic supports class-based HQoS scheduling only when the
traffic policy works in unshared mode and is applied to an ETM subcard.

The user-queue and car commands cannot be both configured in the same
traffic behavior.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 132


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

e. (Optional) Run flow-car cir cir-value [ pir pir-value ] [ cbs cbs-value


[ pbs pbs-value ] ] identifier { source-ip | destination-ip }

Flow CAR is implemented for flows with the source or destination IP


addresses residing on the specified network segment.
f. Run commit

The configuration is committed.


g. Run bridge-domain bd-id
● Configure forced traffic classification.

Perform the following steps on the Router:

a. Run system-view

The system view is displayed.


b. Run traffic behavior behavior–name

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Run service-class service-class color color

Packets with a certain CoS are colored.


d. (Optional) Runservice-class service-class color color track { master |
slave } bfd-session session-name bfd-session-name

The function of marking matching packets' CoS and color based on the
status of the specified BFD session is configured.
e. Run commit

The configuration is committed.


● Set the packet precedence.

Do as follows on the Router.

a. Run system-view

The system view is displayed.


b. Run traffic behavior behavior–name

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Perform the following operation as required.

To re-mark the DSCP value of VXLAN packets, run the remark dscp dscp-
value command.
d. Run commit

The configuration is committed.


● Cascading a traffic policy.

The ACL rules are generally used for redirection in the traffic behavior.
However, the specification of ACL rules is limited. When ACL rules defined for
MF classification do not meet the live network requirements, you can redirect
the traffic behavior to a configured traffic policy to implement cascaded MF
classification.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 133


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

a. Run system-view

The system view is displayed.


b. Run traffic behavior behavior–name

A traffic behavior is configured, and the traffic behavior view is displayed.


c. Run traffic-policy policy-name

The traffic behavior is redirected to the traffic policy.

▪ Cascading a traffic policy over another will cause the the device
forwarding performance to deteriorate.

▪ When the traffic on an interface matches the cascaded traffic policy:


○ The forwarding behavior and cascading a traffic policy are
mutually exclusive.
○ If the traffic behaviors in the two traffic policies are different,
they can be individually implemented.
○ If the traffic behaviors in the two traffic policies are the same,
the specific behavior configuration in the cascaded traffic policy
takes effect.

▪ The parameters specified for a traffic policy, such as inbound,


outbound, link-layer, mpls-layer, and all-layer, are inherited by the
cascaded traffic policy.

▪ When the traffic behaviors for two-level ACLs are service-class,


level-1 service-class preferentially takes effect. However, if level 1
service-class carries no-remark, level-2 service-class preferentially
takes effect.
d. (Optional) Run hierarchical-car enable

Hierarchical CAR is enabled in a cascaded traffic policy.

When a traffic policy is configured in a traffic behavior, CAR can also be


configured in the traffic policy to implement hierarchical CAR.
e. Run commit

The configuration is committed.

----End

5.9.3 Defining a Traffic Policy and Associating a Behavior with


a Classifier in the Traffic Policy
The configured traffic classifiers and traffic behaviors need to be associated in a
traffic policy.

Context
Do as follows on the Router.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 134


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run traffic policy policy-name
A traffic policy is configured, and the traffic policy view is displayed.
Step 3 Run classifier classifier-name behavior behavior-name [ precedence precedence-
value ]
A traffic classifier is associated with a traffic behavior, and a matching priority is
configured.
Step 4 (Optional) Run step step-value
The step between policies is configured.
Step 5 Run commit
The configuration is committed.

----End

5.9.4 Applying a Traffic Policy


A class-based traffic policy takes effect only after being applied to a BD/VPN.

Context
Do as follows on the Router.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Perform one of the following commands as required.
● To enter a BD view, run the bridge-domain bd-id command.
● To enter a VPN view, run the ip [ dcn ] vpn-instance vpn-instance-name
command.
Step 3 Perform the following operations based on the type of the instance to which a
traffic policy applies.
● To apply a traffic policy to a BD, perform the following operations:
a. Run the bridge-domain bd-id command to enter the BD view.
b. Run the traffic-policy policy-name { inbound [ link-layer ] | outbound }
vxlan-mode command to apply the traffic policy to the BD.
● To apply a traffic policy to a VPN, perform the following operations:
a. Run the ip [ dcn ] vpn-instance vpn-instance-name command to enter
the VPN view.
b. Run the traffic-policy policy-name { inbound [ link-layer ] | outbound }
vxlan-mode command to apply the traffic policy to the VPN.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 135


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Step 4 Run commit

The configuration is committed.

----End

5.9.5 Enabling the Statistics Collecting Function for a Traffic


Policy
This section describes how to enable the statistics collecting function for a traffic
policy for statistics query.

Context
Perform the following operations on the Router to which a traffic policy has been
applied.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run traffic policy policy-name

The view of the traffic policy is displayed.

Step 3 Run statistics enable

The statistics collecting function is enabled for the traffic policy.

Step 4 Run share-mode

The shared mode is specified for the traffic policy.

Step 3 is optional. To reduce memory resource consumption, the statistics collecting


function is disabled for a traffic policy by default. Before querying statistics about a traffic
policy, run the statistics enable command to enable the statistics collecting function for
the traffic policy.
Step 4 is optional. The default attribute of a policy is shared.

Step 5 Run commit

The configuration is committed.

----End

5.9.6 Verifying the Configuration of MF classification-based


Traffic Policies for VXLAN Packets
After MF classification is configured, check the configurations, such as information
about traffic classifiers, traffic behaviors, association between traffic classifiers and
behaviors, traffic policies, and queues.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 136


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Procedure
● Run the display traffic behavior { system-defined | user-defined }
[ behavior-name ] command to view information about the configured traffic
behaviors.
● Run the display traffic classifier { system-defined | user-defined }
[ classifier-name ] command to view information about the configured traffic
classifiers.
● Run the display traffic policy { system-defined | user-defined } [ policy-
name [ classifier classifier-name ] ] command to view information about the
association between all or the specified traffic classifiers and traffic behaviors
in traffic policies.
● Run the display traffic policy statistics { bridge-domain bdid vxlan-mode |
vpn-instance vpn-name vxlan-mode } { inbound | outbound } [ verbose
{ classifier-based [ class class-name ] | rule-based [ class class-name ]
[ filter ] } ] command to check statistics about a traffic policy on an interface.

This command is supported only on the Admin VS.

----End

5.10 (Optional) Configuring the DSCP of Protocol


Packets
You can set the Differentiated Services Code Point (DSCP) values of management
or control protocol packets sent by the local device, and enable protocol packets
to enter the specified internal priority queue and obtain corresponding colors
based on the DSCP values.

Context
Currently, when the NE40E performs internal scheduling on protocol packets, by
default, the NE40E places protocol packets to the CS6 queue without the color,
and the priority of the packets remains unchanged. If you use the CS6 queue for
another purpose or not for service forwarding, services are affected. In addition,
on the downstream device, scheduling requirements of specified protocol packets
may fail to be met because these packets may enter the low-priority QoS queue.
Therefore, to allow for flexible packet scheduling, allow these packets to enter
other queues.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run host-packet type { management-protocol | control-protocol } dscp dscp-


value

The DSCP value of management or control protocol packets is set.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 137


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Generally, each protocol has a default DSCP value, and the DSCP values of some protocols
can be configured using the host-packet type command or the corresponding commands
for changing the DSCP values of the protocols. In this case, the rules for the DSCP values to
take effect as follows:
● If a protocol has its own command for changing the DSCP value, the DSCP value
configured using its own command takes effect regardless of whether the DSCP value is
controlled by the host-packet type command.
● If a protocol does not have its own command for changing the DSCP value and the
DSCP value is controlled by the host-packet type command, the DSCP value configured
using the command takes effect.
● If a protocol does not have its own command for changing the DSCP value and the
DSCP value is not controlled by the host-packet type command, the default DSCP value
takes effect.

Table 5-12 and Table 5-13 describe how to change the ToS/DSCP value of the
IPv4 protocol and the traffic class/DSCP value of the IPv6 protocol, respectively.

Table 5-12 ToS/DSCP value of the protocol and its modification method
Protocols Default ToS/ Whether it is Each protocol's own
DSCP value controlled by the modification
host-packet type command
command?

ICMP_ECHO 0 No ping -dscp dscp-value

ICMP_ECHO 0 No NA
_REPLY

ICMP Error 6 No NA

DNS 0 No NA

FTP 6 Yes, host-packet type NA


management-protocol

TFTP 6 Yes, host-packet type NA


management-protocol

SNMP 6 Yes, host-packet type snmp-agent packet-


management-protocol priority snmp priority-
level
SSH 6 Yes, host-packet type ssh server dscp value
management-protocol

TELNET 6 Yes, host-packet type telnet server dscp


management-protocol value

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 138


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Protocols Default ToS/ Whether it is Each protocol's own


DSCP value controlled by the modification
host-packet type command
command?

SYSLOG 0 Yes, host-packet type info-center syslog


(UDP) management-protocol packet-priority
priority-level
The info-center syslog
packet-priority
priority-level command
priority is higher than
the host-packet type
management-protocol
command.

SYSLOG 0 No info-center syslog


(TCP) packet-priority
priority-level
HWTACACS 6 Yes, host-packet type NA
management-protocol

Radius 6 No NA

NTP 6 Yes, host-packet type NA


control-protocol

BFD 7 No tos-exp tos-value (BFD


session view)
tos-exp tos-value
{ dynamic | static }
(BFD view)

IGMP 6 No NA

PIM 6 No NA

CUSP 6 Yes, host-packet type NA


control-protocol

BGP 6 Yes, host-packet type NA


control-protocol

LDP 6 Yes, host-packet type NA


control-protocol

OSPF 6 Yes, host-packet type NA


control-protocol

DHCP 6 No dhcp dscp-outbound


Server/ value
DHCP Relay

DHCP 0 No NA
Snooping

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 139


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Protocols Default ToS/ Whether it is Each protocol's own


DSCP value controlled by the modification
host-packet type command
command?

GRE If the inner IP No NA


ToS is valid,
the ToS/DSCP
value of the
inner IP
packet is
inherited,
otherwise it
is set to 6.

IKE 6 No NA

VXLAN If the inner IP No NA


ToS is valid,
the ToS/DSCP
value of the
inner IP
packet is
inherited,
otherwise it
is set to 6.

RSVP-TE 6 No NA

MSDP 6 No NA

Table 5-13 Traffic Class/DSCP value of the protocol and its modification method
Protocols Traffic Class/ Whether it is Each protocol's
DSCP value controlled by the own
host-packet type modification
command? command

ICMP6_ECHO 0 No ping ipv6 -tc


traffic-class-value
ICMP6_ECHO_REP Copy the ToS/ No NA
LY DSCP value of the
ICMP6_ECHO
message.

ICMP6 Error Copy the ToS/ No NA


DSCP value of the
ICMP6_ECHO
message.

ND(NS/NA/RS/RA 6 No NA
)

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 140


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Protocols Traffic Class/ Whether it is Each protocol's


DSCP value controlled by the own
host-packet type modification
command? command

TNL6(IPv6 over 0 No NA
IPv4)

TNL6(IPv4 over 0 No tunnel ipv4-ipv6


IPv6) traffic-class
class-value
DNSv6 0 No NA

FTPv6 6 Yes, host-packet NA


type
management-
protocol

TFTPv6 6 Yes, host-packet NA


type
management-
protocol

SNMPv6 6 Yes, host-packet snmp-agent


type packet-priority
management- snmp priority-
protocol level
SSHv6 6 Yes, host-packet NA
type
management-
protocol

TELNETv6 6 Yes, host-packet NA


type
management-
protocol

SYSLOG(UDP) 0 No info-center
syslog packet-
priority priority-
level
SYSLOG(TCP) 0 No info-center
syslog packet-
priority priority-
level
HWTACACS 6 Yes, host-packet NA
type
management-
protocol

Radius 6 No NA

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 141


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Protocols Traffic Class/ Whether it is Each protocol's


DSCP value controlled by the own
host-packet type modification
command? command

NTPv6 6 Yes, host-packet NA


type control-
protocol

BFDv6 7 No tos-exp tos-value


(BFD session
view)

tos-exp tos-value
{ dynamic |
static } (BFD
view)

MLD 6 No NA

PIMv6 6 No NA

BGP4+ 6 Yes, host-packet NA


type control-
protocol

OSPFv3 6 Yes, host-packet NA


type control-
protocol

DHCPv6 6 No NA

GRE If the inner IP ToS No NA


is valid, the TC/
DSCP value of the
inner IP packet is
inherited,
otherwise it is set
to 6.

VXLAN If the inner IP ToS No NA


is valid, the TC/
DSCP value of the
inner IP packet is
inherited,
otherwise it is set
to 6.

Step 3 Run host-packet dscp dscp-value map local-service cos-value [ color color ]
Mappings between DSCP values of protocol packets and internal priorities and
between DSCP values and colors are configured.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 142


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

The DSCP value in the host-packet type command only indicates the priority of protocol
packets. 802.1p priorities of Layer 2 protocol packets are mapped from the DSCP value
based on the DS domain configured on the outbound interface. EXP priorities of MPLS
packets are the leftmost 3 bits of DSCP value. If this command is not used, sent protocol
packets carry the preconfigured priority.

Step 4 Run commit

The configuration is committed.

----End

5.11 Maintaining Class-based QoS Configuration


This section describes how to clear statistics of traffic policies.

5.11.1 Clearing Statistics of a Traffic Policy


This section describes the command for clearing statistics of a traffic policy.

Context

NOTICE

Once deleted, statistics cannot be restored. Therefore, use caution when deleting
statistics.

Procedure
● To clear the statistics of a traffic policy on an interface, run the reset traffic
policy [ [ name ] policy-name ] statistics interface { interface-name |
interface-type interface-number } [ vlan vlan-id | pe-vid pe-vid ce-vid ce-vid |
vid vid | ce-vid ce-vid | vid vid ce-vid ce-vid ] { inbound | outbound }
command in the user view.
● To clear the statistics of a traffic policy on an bridge-domain, run the reset
traffic policy statistics bridge-domain bdid { inbound | outbound }
command in the user view.
● To clear statistics about an AC-side traffic policy applied to a VPN instance,
run the reset traffic policy [ name policy-name ] statistics { vsi vsi-instance-
name [ ac-mode ] | vpn-instance vpn-instance-name } [ slot slot-id ]
{ inbound | outbound } command.
● To clear flow CAR entries on a specific board or the device, run thereset flow-
car [ { source-ip | destination-ip } ip-address ] slot slot-id or reset flow-car
all command.
● To clear flow CAR statistics about specific-direction traffic in a specific slot
based on the source or destination IP address, run the reset flow-car

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 143


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

statistics { source-ip | destination-ip } [ ip-address ] slot slot-id { inbound |


outbound } command.

----End

5.12 Configuration Examples for Class-based QoS


This section provides typical examples for configuring class-based QoS.

5.12.1 Example for Configuring IP-based Complex Traffic


Classification
This section provides an example of how to configure IP-based complex traffic
classification.

Networking Requirements
As shown in Figure 5-1, MF classification is configured on Device C to implement
access control between Device A and Device B. In addition, traffic statistics can be
collected to verify packet sending and receiving.

Interfaces 1 and 2 in this example are GE 0/1/0 and GE 0/2/0, respectively.

Figure 5-1 Configuring a traffic policy based on MF classification

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure an ACL rule.


2. Configure a traffic classifier.
3. Configure a traffic behavior.
4. Configure a traffic policy.
5. Apply the traffic policy.

Data Preparation
To complete the configuration, you need the following data:

● ACL number

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 144


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

● Names of the traffic classifier, traffic behavior, and traffic policy, and number
of the interface to which the traffic policy is applied

Procedure
Step 1 Configure an ACL rule.
<HUAWEI> system-view
[~HUAWEI] sysname DeviceC
[*HUAWEI] commit
[~DeviceC] acl number 3333
[*DeviceC-acl-adv-3333]rule 5 permit ip source 1.1.1.1 0 destination 2.2.2.2 0
[*DeviceC-acl-adv-3333]rule 10 permit ip source 2.2.2.2 0 destination 1.1.1.1 0
[*DeviceC-acl-adv-3333] commit
[~DeviceC-acl-adv-3333] quit

Step 2 Configure a traffic classifier.


[~DeviceC] traffic classifier c1
[*DeviceC-classifier-c1] if-match acl 3333
[*DeviceC-classifier-c1] commit
[~DeviceC-classifier-c1] quit

Step 3 Configure a traffic behavior.


[~DeviceC] traffic behavior b1
[*DeviceC-behavior-b1] permit
[*DeviceC-behavior-b1] commit
[~DeviceC-behavior-b1] quit

Step 4 Configure a traffic policy.


[~DeviceC] traffic policy p1
[*DeviceC-trafficpolicy-p1] classifier c1 behavior b1
[*DeviceC-trafficpolicy-p1] share-mode
[*DeviceC-trafficpolicy-p1] statistic enable
[*DeviceC-trafficpolicy-p1] commit
[~DeviceC-trafficpolicy-p1] quit

Step 5 Apply the traffic policy.


[~DeviceC] interface gigabitethernet 0/1/0
[~DeviceC-GigabitEthernet0/1/0] traffic-policy p1 inbound
[*DeviceC-GigabitEthernet0/1/0] traffic-policy p1 outbound
[*DeviceC-GigabitEthernet0/1/0] commit
[~DeviceC-GigabitEthernet0/1/0] quit
[~DeviceC] interface gigabitethernet 0/2/0
[~DeviceC-GigabitEthernet0/2/0] traffic-policy p1 inbound
[*DeviceC-GigabitEthernet0/2/0] traffic-policy p1 outbound
[*DeviceC-GigabitEthernet0/2/0] commit
[~DeviceC-GigabitEthernet0/2/0] quit

Step 6 Verify the configuration.


After completing the configurations, run the ping 2.2.2.2 command on Device A
to ping Device B, and run the display traffic policy statistics command on Device
C to view statistics about traffic exchanged between Device A and Device B.
[~DeviceC] display traffic policy statistics interface gigabitethernet 0/1/0 inbound

Info: The statistics is shared because the policy is shared.


Interface: GigabitEthernet0/1/0
Traffic policy inbound: p1
Traffic policy applied at 2017-08-30 18:30:20
Statistics enabled at 2017-08-30 18:30:20
Statistics last cleared: Never
Rule number: 1 IPv4, 0 IPv6
Current status: OK!
Item Packets Bytes
-------------------------------------------------------------------

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 145


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Matched 5 500
+--Passed 4 400
+--Dropped 1 100

Last 30 seconds rate


Item pps bps
-------------------------------------------------------------------
Matched 5 500
+--Passed 4 400
+--Dropped 1 100

----End

Configuration File on Device C


#
sysname DeviceC
#
acl number 3333
rule 5 permit ip source 1.1.1.1 0 destination 2.2.2.2 0
rule 10 permit ip source 2.2.2.2 0 destination 1.1.1.1 0
#
traffic classifier c1
if-match acl 3333
#
traffic behavior b1
permit
#
traffic policy p1
share-mode
statistic enable
classifier c1 behavior b1
#
interface GigabitEthernet0/1/0
traffic-policy p1 inbound
traffic-policy p1 outbound
#
interface GigabitEthernet0/2/0
traffic-policy p1 inbound
traffic-policy p1 outbound

5.12.2 Example for Configuring IP-based Multi-Field


Classification on an MPLS Interface
This section provides an example for configuring IP-based multi-field (MF)
classification on an MPLS interface.

Networking Requirements
As shown in Figure 5-2, PE1, P, and PE2 are routers on an MPLS backbone
network. CE1, CE2, CE3, and CE4 are access routers on the edge of the backbone
network. Use PE1 as an example. You can configure IP-based MF classification on
the public network interface (interface 3) of PE1 to implement traffic control on
the public network side and verify the packet sending and receiving through traffic
statistics.

Interfaces 1 through 3 in this example are GE 0/1/0, GE 0/2/0, and GE 0/3/0, respectively.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 146


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Figure 5-2 Configuring IP-based MF classification on an MPLS interface

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure basic MPLS functions.


2. Configure IP-based MF classification for outgoing or incoming packets on the
public network interface.
3. Configure an ACL rule.
4. Configure a traffic classifier.
5. Configure a traffic behavior.
6. Configure a traffic policy.
7. Apply the traffic policy.

Data Preparation
To complete the configuration, you need the following data:

● ACL number
● Names of the traffic classifier, traffic behavior, and traffic policy, and number
of the interface to which the traffic policy is applied

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 147


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Procedure
Step 1 Configure basic MPLS functions.
For details about how to configure basic MPLS functions, see Example for
Configuring BGP/MPLS IP VPN in HUAWEI NE40E-M2 Series Configuration Guide -
VPN - BGP/MPLS IP VPN Configuration.
Step 2 Configure IP-based MF classification for outgoing or incoming packets on the
public network interface.
<HUAWEI> system-view
[~HUAWEI] sysname PE1
[*HUAWEI] commit
[~PE1] slot 1
[~PE1-slot-1] traffic-policy match-ip-layer mpls-pop
[*PE1-slot-1] traffic-policy match-ip-layer mpls-push
[*PE1-slot-1] commit
[~PE1-slot-1] quit

Step 3 Configure an ACL rule.


[~PE1] acl number 3333
[*PE1-acl-adv-3333] rule 5 permit ip source 11.11.11.11 0 destination 33.33.33.33 0
[*PE1-acl-adv-3333] rule 10 permit ip source 33.33.33.33 0 destination 11.11.11.11 0
[*PE1-acl-adv-3333] commit
[~PE1-acl-adv-3333] quit

Step 4 Configure a traffic classifier.


[~PE1] traffic classifier c1
[*PE1-classifier-c1] if-match acl 3333
[*PE1-classifier-c1] commit
[~PE1-classifier-c1] quit

Step 5 Configure a traffic behavior.


[~PE1] traffic behavior b1
[*PE1-behavior-b1] permit
[*PE1-behavior-b1] commit
[~PE1-behavior-b1] quit

Step 6 Configure a traffic policy.


[~PE1] traffic policy p1
[*PE1-trafficpolicy-p1] classifier c1 behavior b1
[*PE1-trafficpolicy-p1] share-mode
[*PE1-trafficpolicy-p1] statistic enable
[*PE1-trafficpolicy-p1] commit
[~PE1-trafficpolicy-p1] quit

Step 7 Apply the traffic policy.


[~PE1] interface gigabitethernet 0/3/0
[~PE1-GigabitEthernet0/3/0] traffic-policy p1 inbound
[*PE1-GigabitEthernet0/3/0] traffic-policy p1 outbound
[*PE1-GigabitEthernet0/3/0] commit
[~PE1-GigabitEthernet0/3/0] quit

Step 8 Verify the configuration.


After completing the configurations, run the ping 33.33.33.33 command on CE1
to ping CE3, and run the display traffic policy statistics command on PE1 to view
statistics about traffic exchanged between CE3 and CE1.
[~PE1] display traffic policy statistics interface gigabitethernet 0/3/0 inbound
Info: The statistics is shared because the policy is shared.
Interface: GigabitEthernet0/3/0
Traffic policy inbound: p1
Traffic policy applied at 2017-08-30 18:30:20
Statistics enabled at 2017-08-30 18:30:20

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 148


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Statistics last cleared: Never


Rule number: 1 IPv4, 0 IPv6
Current status: OK!
Item Packets Bytes
-------------------------------------------------------------------
Matched 5 500
+--Passed 4 400
+--Dropped 1 100

Last 30 seconds rate


Item pps bps
-------------------------------------------------------------------
Matched 5 500
+--Passed 4 400
+--Dropped 1 100

----End

Configuration Files on PE1


#
sysname PE1
#
slot 1 traffic-policy match-ip-layer mpls-pop
traffic-policy match-ip-layer mpls-push
#
acl number 3333
rule 5 permit ip source 11.11.11.11 0 destination 33.33.33.33 0
rule 5 permit ip source 33.33.33.33 0 destination 11.11.11.11 0
#
traffic classifier c1
if-match acl 3333
#
traffic behavior b1
permit
#
traffic policy p1
share-mode
statistic enable
classifier c1 behavior b1
#
interface GigabitEthernet0/3/0
traffic-policy p1 inbound
traffic-policy p1 outbound

5.12.3 Example for Configuring Redirection on Dual Outbound


Interfaces
This section provides an example for configuring redirection on dual outbound
interfaces.

Networking Requirements
As shown in Figure 5-3, Device A connects to the intranet through interface 1 and
connects to the public network through interface 2 and interface 3. By default,
traffic from the intranet is transmitted to the public network through interface 3.
To enable traffic from the server to be transmitted to the public network through
interface 2 and other traffic to the public network through interface 3, configure a
traffic policy on Device A.

Interfaces 1 through 3 are GE 0/1/0, GE 0/2/0, and GE 0/3/0, respectively.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 149


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Figure 5-3 Configuring redirection on dual outbound interfaces

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a default route.
2. Configure an ACL rule.
3. Configure traffic classifiers.
4. Configure traffic behaviors.
5. Configure a traffic policy.
6. Apply the traffic policy.

Data Preparation
To complete the configuration, you need the following data:
● ACL number
● Names of the traffic classifier, traffic behavior, and traffic policy, and number
of the interface to which the traffic policy is applied

Procedure
Step 1 Configure the default route so that intranet traffic is transmitted to the public
network through interface 3 by default and interface 2 is used as the backup
outbound interface.
<HUAWEI> system-view
[~HUAWEI] ip route-static 0.0.0.0 0.0.0.0 10.1.99.1
[*HUAWEI] ip route-static 0.0.0.0 0.0.0.0 10.1.99.5 preference 70
[*HUAWEI] commit

Step 2 Configure an ACL rule.


# Configure rule 3001 to match the traffic from the server to other devices on the
intranet.
[~HUAWEI]acl 3001
[*HUAWEI-acl-adv-3001]rule permit ip source 10.1.40.0 0.0.0.255 destination 10.1.40.0 0.0.0.255
[*HUAWEI-acl-adv-3001]rule permit ip source 10.1.40.0 0.0.0.255 destination 10.1.41.0 0.0.0.255
[*HUAWEI-acl-adv-3001]rule permit ip source 10.1.40.0 0.0.0.255 destination 10.1.42.0 0.0.0.255
[*HUAWEI-acl-adv-3001]commit

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 150


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

[~HUAWEI-acl-adv-3001]quit

# Configure rule 3002 to match the traffic with the source address being the IP
address of the server.
[~HUAWEI] acl 3002
[*HUAWEI-acl-adv-3002] rule permit ip source 10.1.40.0 0.0.0.255
[*HUAWEI-acl-adv-3002] commit
[~HUAWEI-acl-adv-3001]commit

Step 3 Configure traffic classifiers.


# Configure a traffic classifier named c1.
[~HUAWEI]traffic classifier c1
[*HUAWEI-classifier-c1]if-match acl 3001
[*HUAWEI-classifier-c1]commit
[~HUAWEI-classifier-c1]quit

# Configure a traffic classifier named c2.


[~HUAWEI]traffic classifier c2
[*HUAWEI-classifier-c2]if-match acl 3002
[*HUAWEI-classifier-c2]commit
[~HUAWEI-classifier-c2]quit

Step 4 Configure traffic behaviors.


# Configure a traffic behavior named b1.
[~HUAWEI]traffic behavior b1
[*HUAWEI-behavior-b1] permit
[*HUAWEI-behavior-b1] commit
[~HUAWEI-behavior-b1] quit

# Configure a traffic behavior b2.


[~HUAWEI] traffic behavior b2
[*HUAWEI-behavior-b2] redirect ip-nexthop 10.1.99.5
[*HUAWEI-behavior-b2] commit
[~HUAWEI-behavior-b2] quit

Step 5 Configure a traffic policy.


[~HUAWEI] traffic policy p1
[*HUAWEI-trafficpolicy-p1] classifier c1 behavior b1
[*HUAWEI-trafficpolicy-p1] classifier c2 behavior b2
[*HUAWEI-trafficpolicy-p1] commit
[~HUAWEI-trafficpolicy-p1] quit

Step 6 Apply the traffic policy.


[~HUAWEI] interface gigabitethernet 0/1/0
[~HUAWEI-GigabitEthernet0/1/0] traffic-policy p1 inbound
[*HUAWEI-GigabitEthernet0/1/0] commit
[~HUAWEI-GigabitEthernet0/1/0] quit

Step 7 Verify the configuration.


After completing the configurations, run the display traffic policy command on
Device A to view the configurations of the traffic policy, traffic classifier, and
traffic behavior.
[~HUAWEI] display traffic policy user-defined p1
User Defined Traffic Policy Information:
Policy: p1
Total: 5120 Used: 3 Free: 5117
Description:
Step: 1
Share-mode

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 151


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Classifier: c1 Precedence: 1
Behavior: b1
-none-

Classifier: c2 Precedence: 2
Behavior: b2
Redirecting:
redirect ip-nexthop 10.1.99.5

Classifier: default-class Precedence: 65535


Behavior: be
-none-

----End

Configuration Files
#
ip route-static 0.0.0.0 0.0.0.0 10.1.99.1
ip route-static 0.0.0.0 0.0.0.0 10.1.99.5 preference 70
#
acl 3001
rule permit ip source 10.1.40.0 0.0.0.255 destination 10.1.40.0 0.0.0.255
rule permit ip source 10.1.40.0 0.0.0.255 destination 10.1.41.0 0.0.0.255
rule permit ip source 10.1.40.0 0.0.0.255 destination 10.1.42.0 0.0.0.255
acl 3002
rule permit ip source 10.1.40.0 0.0.0.255
#
traffic classifier c1
if-match acl 3001
traffic classifier c2
if-match acl 3002
#
traffic behavior b1
permit
traffic behavior b2
redirect ip-nexthop 10.1.99.5
#
traffic policy p1
classifier c1 behavior b1
classifier c2 behavior b2
#
interface gigabitethernet0/1/0
traffic-policy p1 inbound
#
return

5.12.4 Example for Configuring Complex Traffic Classification


on QinQ Termination Sub-interfaces
This section provides an example of how to configure complex traffic classification
on QinQ termination sub-interfaces.

Networking Requirements
On the network shown in Figure 5-4, SwitchA is connected to the operator
network through Device A. SwitchB is connected to the operator network through
Device B. Complex traffic classification is configured on GE 0/2/0.1 (a QinQ
termination sub-interface) of Device A to limit the rate of traffic sent by users
attached to SwitchA to 10 Mbit/s and limit the CBS to 150000 bytes.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 152


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

For details on how to configure QinQ termination sub-interfaces, see the chapter "QinQ
Configuration" in the HUAWEI NE40E-M2 Series Universal Service Router Configuration
Guide - LAN Access and MAN Access.

Interfaces 1 through 2 in this example are GE 0/1/0, GE 0/2/0, respectively.

Figure 5-4 Network diagram for configuring complex traffic classification on QinQ
termination sub-interfaces

Table 5-14
Device name Interface IP address

DeviceA GE0/1/0 10.10.1.1/24

GE0/2/0 10.1.1.1/24

DeviceB GE0/1/0 10.10.1.2/24

GE0/2/0 10.2.1.1/24

Precautions
N/A

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the GE0/2/0.1 interfaces on DeviceA and DeviceB as QinQ
termination sub-interfaces.
2. Configure complex traffic classification-based traffic policing on the QinQ
termination sub-interfaces.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 153


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Data Preparation
To complete the configuration, you need the following data:
● IP address of each interface
● Ranges of VLAN IDs in packet tags to be removed by QinQ termination sub-
interfaces
● Rate (10 Mbit/s) of traffic sent from users attached to SwitchA and CBS
(150000 bytes)
● Traffic classifier name, traffic behavior name, and traffic policy name, and
interface to which the traffic policy is applied

Procedure
Step 1 Configure an IGP on the backbone network. This example uses OSPF as an IGP.
For details on how to configure OSPF, see the chapter "OSPF Configuration" in the
HUAWEI NE40E-M2 Series Universal Service Router Configuration Guide- IP
Routing.
# Configure Device A.
<*HUAWEI> system-view
[~HUAWEI] sysname DeviceA
[*HUAWEI] commit
[~DeviceA] interface gigabitethernet 0/1/0
[~DeviceA-GigabitEthernet0/1/0] undo shutdown
[*DeviceA-GigabitEthernet0/1/0] ip address 10.10.1.1 24
[*DeviceA-GigabitEthernet0/1/0] commit
[~DeviceA-GigabitEthernet0/1/0] quit
[~DeviceA] ospf
[*DeviceA-ospf-1] area 0
[*DeviceA-ospf-1-area-0.0.0.0] network 10.10.1.0 0.0.0.255
[*DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[*DeviceA-ospf-1-area-0.0.0.0] commit
[~DeviceA-ospf-1-area-0.0.0.0] quit
[~DeviceA-ospf-1] quit

# Configure Device B.
<*HUAWEI> system-view
[~HUAWEI] sysname DeviceB
[*HUAWEI] commit
[~DeviceB] interface gigabitethernet 0/1/0
[~DeviceB-GigabitEthernet0/1/0] undo shutdown
[*DeviceB-GigabitEthernet0/1/0] ip address 10.10.1.2 24
[*DeviceB-GigabitEthernet0/1/0] commit
[~DeviceB-GigabitEthernet0/1/0] quit
[~DeviceB] ospf
[*DeviceB-ospf-1] area 0
[*DeviceB-ospf-1-area-0.0.0.0] network 10.10.1.0 0.0.0.255
[*DeviceB-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[*DeviceB-ospf-1-area-0.0.0.0] commit
[~DeviceB-ospf-1-area-0.0.0.0] quit
[~DeviceB-ospf-1] quit

Step 2 Configure QinQ termination sub-interfaces.


# Configure a QinQ termination sub-interface on Device A.
[~DeviceA] interface gigabitethernet 0/2/0.1
[*DeviceA-GigabitEthernet0/2/0.1] control-vid 1 qinq-termination
[*DeviceA-GigabitEthernet0/2/0.1] qinq termination pe-vid 100 ce-vid 10 to 20
[*DeviceA-GigabitEthernet0/2/0.1] ip address 10.1.1.1 24

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 154


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

[*DeviceA-GigabitEthernet0/2/0.1] commit
[~DeviceA-GigabitEthernet0/2/0.1] quit

# Configure a QinQ termination sub-interface on Device B.


[~DeviceB] interface gigabitethernet 0/2/0.1
[*DeviceB-GigabitEthernet0/2/0.1] control-vid 1 qinq-termination
[*DeviceB-GigabitEthernet0/2/0.1] qinq termination pe-vid 100 ce-vid 10 to 20
[*DeviceB-GigabitEthernet0/2/0.1] ip address 10.2.1.1 24
[*DeviceB-GigabitEthernet0/2/0.1] commit
[~DeviceB-GigabitEthernet0/2/0.1] quit

Step 3 Configure complex traffic classification on the QinQ termination sub-interface of


Device A.

# Configure a traffic classifier and define matching rules.


[~DeviceA] traffic classifier c1
[*DeviceA-classifier-c1] if-match any
[*DeviceA-classifier-c1] commit
[~DeviceA-classifier-c1] quit

# Define a traffic behavior.


[~DeviceA] traffic behavior b1
[*DeviceA-behavior-b1] car cir 10000 cbs 150000 pbs 0
[*DeviceA-behavior-b1] commit
[~DeviceA-behavior-b1] quit

# Define a traffic policy to associate the traffic classifier with the traffic behavior.
[~DeviceA] traffic policy p1
[*DeviceA-trafficpolicy-p1] classifier c1 behavior b1
[*DeviceA-trafficpolicy-p1] commit
[~DeviceA-trafficpolicy-p1] quit

# After you complete the preceding configurations, run the display traffic policy
command to check the configurations of the traffic policy, traffic classifier, and
traffic behavior.
[~Device] display traffic policy user-defined
User Defined Traffic Policy Information:
Policy: p1
Classifier: default-class
Behavior: be
-none-
Classifier: c1
Behavior: b1
Committed Access Rate:
CIR 10000 (Kbps), PIR 0 (Kbps), CBS 150000 (byte), PBS 0 (byte)
Conform Action: pass
Yellow Action: pass
Exceed Action: discard

# Apply the traffic policy to interfaces.


[~DeviceA] interface gigabitethernet 0/2/0.1
[*DeviceA-GigabitEthernet0/2/0.1] traffic-policy p1 inbound
[*DeviceA-GigabitEthernet0/2/0.1] commit
[~DeviceA-GigabitEthernet0/2/0.1] quit

Step 4 Verify the configuration.

After you apply the traffic policy to GE 0/2/0.1 of Device A, the sub-interface
accepts only 10 Mbit/s traffic and discards nonconforming traffic.

----End

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 155


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Configuration Files
● Configuration file of Device A
#
sysname DeviceA
#
traffic classifier c1 operator or
if-match any
#
traffic behavior b1
car cir 10000 cbs 150000 pbs 0 green pass yellow pass red discard
#
traffic policy p1
classifier c1 behavior b1
#
interface GigabitEthernet0/2/0.1
control-vid 1 qinq-termination
qinq termination pe-vid 100 ce-vid 10 to 20
ip address 10.1.1.1 255.255.255.0
traffic-policy p1 inbound
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.10.1.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.10.1.0 0.0.0.255
#
return

● Configuration file of Device B


#
sysname DeviceB
#
interface GigabitEthernet0/2/0.1
control-vid 1 qinq-termination
qinq termination pe-vid 100 ce-vid 10 to 20
ip address 10.2.1.1 255.255.255.0
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.10.1.2 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.10.1.0 0.0.0.255
#
return

5.12.5 Example for Configuring a Traffic Policy Based on


Complex Traffic Classification Under a MPLS Network
This part describes the configuration and application of traffic classifiers and
traffic behaviors in the context of traffic policy based on complex traffic
classification.

Networking Requirements
As shown in Figure 5-5, PE1, P, and PE2 are routers on an MPLS backbone
network. CE1 and CE2 are access routers on the edge of the backbone network.
Three users from the local network access the Internet through CE1.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 156


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

● On CE1, the CIR of the traffic of the user from the network segment 1.1.1.0 is
limited to 10 Mbit/s and the CBS is limited to 150000 bytes.
● On CE1, the CIR of the traffic of the user from the network segment 2.1.1.0 is
limited to 5 Mbit/s and the CBS is limited to 100000 bytes.
● On CE1, the CIR of the traffic of the user from the network segment 3.1.1.0 is
limited to 2 Mbit/s and the CBS is limited to 100000 bytes.
● On CE1, the DSCP values of the service packets from the three network
segments are re-marked to 40, 26, and 0.
● PE1 accesses the MPLS backbone network at the CIR of 15 Mbit/s, the CBS of
300000 bytes, the PIR of 20 Mbit/s, and the PBS of 500000 bytes.
● On CE1, the CIR, CBS, PIR and PBS of the UDP protocol packets (except DNS,
SNMP, SNMP Trap, and Syslog packets) are respectively limited to 5 Mbit/s,
100000 bytes,
15 Mbit/s and 200000 bytes
.

Interfaces 1 through 4 in this example are GE 0/1/0, GE 0/2/0, GE 0/3/0, GE 0/1/8,


respectively.

Figure 5-5 Diagram for configuring a traffic policy based on complex traffic
classification

Configuration Notes
When configuring traffic policies based on complex traffic classification, pay
attention to the following:

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 157


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

● If both the if-match any and deny parameters are configured in the complex
traffic classification rules on an interface, all packets, including protocol
packets, are discarded by the interface. Therefore, use caution when
configuring both the if-match any and deny parameters in a traffic
classification rule.
● If the permit or deny parameter is configured in both the rule command and
the traffic behavior view, only packets that are permitted are further
processed according to the configured traffic behavior. If the deny action is
configured in either the rule command or the traffic behavior view, all
matched packets are discarded.

Configuration Roadmap
The configuration roadmap is as follows:
1. Define ACL rules.
2. Configure traffic classifiers.
3. Configure traffic behaviors.
4. Configure traffic policies.
5. Apply the traffic policies to interfaces.

Data Preparation
To complete the configuration, you need the following data:
● ACL numbers 2001, 2002, 2003, 3001, and 3002
● Re-marked DSCP values 40, 26, and 0 for the packets from the three network
segments
● CIRs of the traffic from users belonging to the three network segments, which
are respectively 10 Mbit/s, 5 Mbit/s, and 2 Mbit/s, with their respective CBSs
being 150000 bytes, 100000 bytes, and 100000 bytes
● CIR of the UDP protocol packets (except DNS, SNMP, SNMP Trap, and Syslog
packets) on CE1, which is 5 Mbit/s, the CBS, which is 100000 bytes, and the
PIR, which is 15 Mbit/s
● CIR of PE1, which is 15 Mbit/s; the CBS, which is 300000 bytes; the PIR, which
is 20 Mbit/s; and the PBS, which is 500000 bytes.
● Traffic classifier name, traffic behavior name, traffic policy name, and the
interface number where the traffic policy is applied

Procedure
Step 1 Configure the IP addresses for the interfaces, routes, and basic MPLS functions
(detail omitted here).
Step 2 Configure complex traffic classification on CE1 to control the traffic that accesses
CE1 from the three local networks.
# Define ACL rules.
<CE1> system-view
[~CE1] acl number 2001
[*CE1-acl-basic-2001] rule permit source 1.1.1.0 0.0.0.255
[*CE1-acl-basic-2001] commit

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 158


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

[~CE1-acl-basic-2001] quit
[~CE1] acl number 2002
[*CE1-acl-basic-2002] rule permit source 2.1.1.0 0.0.0.255
[*CE1-acl-basic-2002] commit
[~CE1-acl-basic-2002] quit
[~CE1] acl number 2003
[*CE1-acl-basic-2003] rule permit source 3.1.1.0 0.0.0.255
[*CE1-acl-basic-2003] commit
[~CE1-acl-basic-2003] quit
[~CE1] acl number 3001
[*CE1-acl-basic-3001] rule 0 permit udp destination-port eq dns
[*CE1-acl-basic-3001] rule 1 permit udp destination-port eq snmp
[*CE1-acl-basic-3001] rule 2 permit udp destination-port eq snmptrap
[*CE1-acl-basic-3001] rule 3 permit udp destination-port eq syslog
[*CE1-acl-basic-3001] commit
[~CE1-acl-basic-3001] quit
[~CE1] acl number 3002
[*CE1-acl-basic-3002] rule 4 permit udp
[*CE1-acl-basic-3002] commit
[~CE1-acl-basic-3002] quit

# Configure traffic classifiers and define ACL-based matching rules.


[*CE1] traffic classifier a
[*CE1-classifier-a] if-match acl 2001
[*CE1-classifier-a] commit
[~CE1-classifier-a] quit
[~CE1] traffic classifier b
[*CE1-classifier-b] if-match acl 2002
[*CE1-classifier-b] commit
[~CE1-classifier-b] quit
[~CE1] traffic classifier c
[*CE1-classifier-c] if-match acl 2003
[*CE1-classifier-c] commit
[~CE1-classifier-c] quit
[~CE1]traffic classifier udplimit
[*CE1-classifier-udplimit] if-match acl 3001
[*CE1-classifier-udplimit] commit
[~CE1-classifier-udplimit] quit
[~CE1] traffic classifier udplimit1
[*CE1-classifier-udplimit1] if-match acl 3002
[*CE1-classifier-udplimit1] commit
[~CE1-classifier-udplimit1] quit

After the configuration is complete, run the display traffic classifier command to
view the configuration of the traffic classifiers.
[~CE1] display traffic classifier user-defined
User Defined Classifier Information:
Classifier: a
Description:
Operator: or
Rule(s):
if-match acl 2001
Classifier: b
Description:
Operator: or
Rule(s):
if-match acl 2002
Classifier: c
Description:
Operator: or
Rule(s):
if-match acl 2003
Classifier: udplimit
Description:
Operator: or
Rule(s) :
if-match acl 3001
Classifier: udplimit1

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 159


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Description:
Operator: or
Rule(s) :
if-match acl 3002

# Define traffic behaviors, and configure traffic policing and DSCP values to be re-
marked.
[~CE1] traffic behavior e
[*CE1-behavior-e] car cir 10000 cbs 150000 pbs 0
[*CE1-behavior-e] remark dscp 40
[*CE1-behavior-e] commit
[~CE1-behavior-e] quit
[~CE1] traffic behavior f
[*CE1-behavior-f] car cir 5000 cbs 100000 pbs 0
[*CE1-behavior-f] remark dscp 26
[*CE1-behavior-f] commit
[~CE1-behavior-f] quit
[~CE1] traffic behavior g
[*CE1-behavior-g] car cir 2000 cbs 100000 pbs 0
[*CE1-behavior-g] remark dscp 0
[*CE1-behavior-g] commit
[~CE1-behavior-g] quit
[~CE1] traffic behavior udplimit
[*CE1-behavior-udplimit] permit
[*CE1-behavior-udplimit] commit
[~CE1-behavior-udplimit] quit
[~CE1] traffic behavior udplimit1
[*CE1-behavior-udplimit1] car cir 5000 pir 15000 cbs 100000 pbs 200000 green pass yellow discard red
discard
[*CE1-behavior-udplimit1] commit
[~CE1-behavior-udplimit1] quit

# Define traffic policies and associate traffic classifiers and traffic behaviors.
[~CE1] traffic policy 1
[*CE1-trafficpolicy-1] classifier a behavior e
[*CE1-trafficpolicy-1] commit
[~CE1-trafficpolicy-1] quit
[~CE1] traffic policy 2
[*CE1-trafficpolicy-2] classifier b behavior f
[*CE1-trafficpolicy-2] commit
[~CE1-trafficpolicy-2] quit
[~CE1] traffic policy 3
[*CE1-trafficpolicy-3] classifier c behavior g
[*CE1-trafficpolicy-3] commit
[~CE1-trafficpolicy-3] quit
[~CE1] traffic policy udplimit
[*CE1-trafficpolicy-udplimit] classifier udplimit behavior udplimit
[*CE1-trafficpolicy-udplimit] classifier udplimit1 behavior udplimit1
[*CE1-trafficpolicy-3] commit
[~CE1-trafficpolicy-3] quit

After the preceding configuration, run the display traffic policy command to view
the configuration of the traffic policies, traffic classifiers defined in the traffic
policies, and the traffic behaviors associated with traffic classifiers.
[~CE1] display traffic policy user-defined
User Defined Traffic Policy Information:
Total: 4095 Used: 3 Free: 4092
Policy: 1
Total: 256 Used: 2 Free: 254
Description:
Step: 5
Share-mode
Classifier: a Precedence: 5
Behavior: e
Committed Access Rate:
CIR 10000 (Kbps), PIR 0 (Kbps), CBS 15000 (byte), PBS 0 (byte)

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 160


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Conform Action: pass


Yellow Action: pass
Exceed Action: discard
Marking:
Remark DSCP cs5
Classifier: default-class Precedence: 65535
Behavior: be
-none-
Policy: 2
Total: 256 Used: 2 Free: 254
Description:
Step: 5
Share-mode
Classifier: b Precedence: 5
Behavior: f
Committed Access Rate:
CIR 5000 (Kbps), PIR 0 (Kbps), CBS 100000 (byte), PBS 0 (byte)
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Marking:
Remark DSCP af31
Classifier: default-class Precedence: 65535
Behavior: be
-none-
Policy: 3
Total: 256 Used: 2 Free: 254
Description:
Step: 5
Share-mode
Classifier: c Precedence: 5
Behavior: g
Committed Access Rate:
CIR 2000 (Kbps), PIR 0 (Kbps), CBS 100000 (byte), PBS 0 (byte)
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Marking:
Remark DSCP default
Classifier: default-class Precedence: 65535
Behavior: be
-none-
Policy: udplimit
Total: 256 Used: 2 Free: 254
Description:
Step: 5
Share-mode
Classifier: udplimit Precedence: 5
Behavior: udplimit
-none-
Classifier: udplimit1 Precedence: 10
Behavior: udplimit1
Committed Access Rate:
CIR 5000 (Kbps), PIR 15000 (Kbps), CBS 100000 (byte), PBS 200000 (byte)
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Classifier: default-class Precedence: 65535
Behavior: be
-none-

# Apply the traffic policies to the inbound interfaces.


[~CE1] interface gigabitethernet 0/1/0
[~CE1-GigabitEthernet0/1/0] undo shutdown
[*CE1-GigabitEthernet0/1/0] traffic-policy 1 inbound
[*CE1-GigabitEthernet0/1/0] commit
[~CE1-GigabitEthernet0/1/0] quit
[~CE1] interface gigabitethernet 0/3/0
[~CE1-GigabitEthernet0/3/0] undo shutdown

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 161


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

[*CE1-GigabitEthernet0/3/0] traffic-policy 2 inbound


[*CE1-GigabitEthernet0/3/0] commit
[~CE1-GigabitEthernet0/3/0] quit
[~CE1] interface gigabitethernet 0/1/8
[~CE1-GigabitEthernet0/1/8] undo shutdown
[*CE1-GigabitEthernet0/1/8] traffic-policy 3 inbound
[*CE1-GigabitEthernet0/1/8] commit
[~CE1-GigabitEthernet0/1/8] quit
[~CE1] interface gigabitethernet 0/2/0
[~CE1-GigabitEthernet0/2/0] undo shutdown
[*CE1-GigabitEthernet0/2/0] traffic-policy udplimit outbound
[*CE1-GigabitEthernet0/2/0] commit
[~CE1-GigabitEthernet0/2/0] quit

Step 3 Configure complex traffic classification on PE1 to control the traffic that goes to
the MPLS backbone network.
# Configure a traffic classifier and define the matching rule.
<PE1> system-view
[~PE1] traffic classifier pe
[*PE1-classifier-pe] if-match any
[*PE1-classifier-pe] commit
[~PE1-classifier-pe] quit

After the preceding configuration, you can run the display traffic classifier
command to view the configuration of the traffic classifier.
[~PE1] display traffic classifier user-defined
User Defined Classifier Information:
Classifier: pe
Description:
Operator: OR
Rule(s):
if-match any

# Define a traffic behavior and configure traffic policing.


[~PE1] traffic behavior pe
[*PE1-behavior-pe] car cir 15000 pir 20000 cbs 300000 pbs 500000
[*PE1-behavior-pe] commit
[~PE1-behavior-pe] quit

# Define a traffic policy to associate the traffic classifier with the traffic behavior.
[~PE1] traffic policy pe
[*PE1-trafficpolicy-pe] classifier pe behavior pe
[*PE1-trafficpolicy-pe] commit
[~PE1-trafficpolicy-pe] quit

After the preceding configuration, run the display traffic policy command to view
the configuration of the traffic policies, traffic classifiers defined in the traffic
policies, and the traffic behaviors associated with traffic classifiers.
[~PE1] display traffic policy user-defined
User Defined Traffic Policy Information:
Total: 4095 Used: 3 Free: 4092
Policy: 1
Description:
Step: 5
Share-mode
Classifier: a Precedence: 5
Behavior: e
Committed Access Rate:
CIR 10000 (Kbps), PIR 0 (Kbps), CBS 15000 (byte), PBS 0 (byte)
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Marking:

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 162


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Remark DSCP cs5


Classifier: default-class Precedence: 65535
Behavior: be
-none-

# Apply the traffic policies to the incoming traffic.


[~PE1] interface gigabitethernet 0/1/0
[~PE1-GigabitEthernet0/1/0] undo shutdown
[*PE1-GigabitEthernet0/1/0] traffic-policy pe inbound
[*PE1-GigabitEthernet0/1/0] commit
[~PE1-GigabitEthernet0/1/0] quit

Step 4 Verify the configuration.


Run the display interface command on CE1 and PE1. You can view that the traffic
on the interfaces are regulated according to the configured traffic policies.

----End

Configuration Files
● Configuration file of CE1
#
sysname CE1
#
acl number 2001
rule 5 permit source 1.1.1.0 0.0.0.255
acl number 2002
rule 5 permit source 2.1.1.0 0.0.0.255
acl number 2003
rule 5 permit source 3.1.1.0 0.0.0.255
acl number 3001
rule 0 permit udp destination-port eq dns
rule 1 permit udp destination-port eq snmp
rule 2 dpermit udp destination-port eq snmptrap
rule 3 permit udp destination-port eq syslog
acl number 3302
rule 4 permit udp
#
traffic classifier a operator or
if-match acl 2001
traffic classifier c operator or
if-match acl 2003
traffic classifier b operator or
if-match acl 2002
traffic classifier udplimit operator or
if-match acl 3001
traffic classifier udplimit1 operator or
if-match acl 3002
#
traffic behavior e
car cir 10000 cbs 150000 pbs 0 green pass red discard
remark dscp cs5
traffic behavior g
car cir 2000 cbs 100000 pbs 0 green pass red discard
remark dscp default
traffic behavior f
car cir 5000 cbs 100000 pbs 0 green pass red discard
remark dscp af31
traffic behavior udplimit
traffic behavior udplimit1
car cir 5000 pir 15000 cbs 100000 pbs 200000 green pass yellow discard red discard
#
traffic policy 3
classifier c behavior g precedence 5
traffic policy 2
classifier b behavior f precedence 5

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 163


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

traffic policy 1
classifier a behavior e precedence 5
traffic policy udplimit
classifier udplimit behavior udplimit precedence 5
classifier udplimit1 behavior udplimit1 precedence 10
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 1.1.1.1 255.255.255.0
traffic-policy 1 inbound
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 10.1.1.1 255.255.255.0
traffic-policy udplimit outbound
#
interface GigabitEthernet0/3/0
undo shutdown
ip address 2.1.1.1 255.255.255.0
traffic-policy 2 inbound
#
interface GigabitEthernet0/1/8
undo shutdown
ip address 3.1.1.1 255.255.255.0
traffic-policy 3 inbound
#
ospf 1
area 0.0.0.0
network 1.1.1.0 0.0.0.255
network 2.1.1.0 0.0.0.255
network 3.1.1.0 0.0.0.255
network 10.1.1.0 0.0.0.255
#
return
● Configuration file of PE1
#
sysname PE1
#
mpls lsr-id 11.11.11.11
mpls
#
mpls ldp
#
traffic classifier pe operator or
if-match any
#
traffic behavior pe
car cir 15000 pir 20000 cbs 300000 pbs 500000 green pass yellow pass red discard
#
traffic policy pe
classifier pe behavior pe
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.2 255.255.255.0
traffic-policy pe inbound
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 10.10.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack0
ip address 11.11.11.11 255.255.255.255
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 164


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

network 10.10.1.0 0.0.0.255


network 11.11.11.11 0.0.0.0
#
return
● Configuration file of P
#
sysname P
#
mpls lsr-id 33.33.33.33
mpls
#
mpls ldp
#
interface GigabitEthernet0/1/0
ip address 10.10.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/2/0
ip address 10.11.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack0
ip address 33.33.33.33 255.255.255.255
#
ospf 1
area 0.0.0.0
network 10.10.1.0 0.0.0.255
network 10.11.1.0 0.0.0.255
network 33.33.33.33 0.0.0.0
#
return
● Configuration file of PE2
#
sysname PE2
#
mpls lsr-id 22.22.22.22
mpls
#
mpls ldp
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.12.1.2 255.255.255.0
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 10.11.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack0
ip address 22.22.22.22 255.255.255.255
#
ospf 10
area 0.0.0.0
network 10.11.1.0 0.0.0.255
network 10.12.1.0 0.0.0.255
network 22.22.22.22 0.0.0.0
#
return
● Configuration file of CE2
#
sysname CE2
#
interface GigabitEthernet0/2/0

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 165


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

undo shutdown
ip address 10.12.1.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.12.1.0 0.0.0.255
#
return

5.12.6 Example for Configuring CTC-based Traffic Policies for


VLAN Packets
This part is an example for configuring and applying priority mapping rules.

Networking Requirements
As shown in Figure 5-6, DeviceA and DeviceB connect to each other through a
VLAN. When IP packets sent by DeviceA enter the VLAN, by default, the
precedence of these IP packets is mapped to the 802.1p value. When these IP
packets (carrying VLAN frame priority) leave the VLAN and arrive at DeviceB, the
VLAN frame priority is mapped to the IP precedence according to the
configuration on DeviceB. Then, these packets are forwarded according to their IP
preference.

Interfaces 1 through 3 in this example are GE 0/1/0, GE 0/2/0, GE 0/3/0, respectively.

Figure 5-6 Networking diagram for configuring VLAN QoS

Configuration Notes
When configuring VLAN QoS, pay attention to the following:

● The statistical function of traffic policies is disabled by default. To display the


statistics about a traffic policy, you can enable statistics for the traffic policy
by running the statistics enable command.

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure the VLAN and routes on DeviceA and DeviceB.


2. Configure QoS policies on DeviceB.

Data Preparation
To complete the configuration, you need the following data:

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 166


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

● Names of traffic classification, traffic behaviors, and traffic policies


● Preferences for re-marking

Procedure
Step 1 Define a classifier to match packets whose 802.1p value is 2.
<HUAWEI> system-view
[~HUAWEI] sysname RouterB
[*HUAWEI] commit
[~RouterB] traffic classifier test
[*RouterB-classifier-test] if-match 8021p 2
[*RouterB-classifier-test] commit
[~RouterB-classifier-test] quit

Step 2 Define a traffic behavior to re-mark the IP preference of packets as 4.


[~RouterB] traffic behavior test
[*RouterB-behavior-test] remark ip-precedence 4
[*RouterB-behavior-test] commit
[~RouterB-behavior-test] quit

Step 3 Define a QoS policy to associate a configured traffic behavior with a specified
traffic classifier.
[~RouterB] traffic policy test
[*RouterB-trafficpolicy-test] classifier test behavior test
[*RouterB-trafficpolicy-test] commit
[~RouterB-trafficpolicy-test] quit

Step 4 Apply the QoS policy to the incoming traffic of GE 0/2/0.1 on DeviceB.
[~RouterB] interface Gigabitethernet 0/2/0.1
[*RouterB-Gigabitethernet0/2/0.1] traffic-policy test inbound link-layer
[*RouterB-Gigabitethernet0/2/0.1] commit
[~RouterB-Gigabitethernet0/2/0.1] quit

Step 5 Verify the configuration.


After the preceding configurations, when packets whose IP preference is 2 are
forwarded by GE0/1/0.1 on DeviceA reach the VLAN, the IP preference 2 is
mapped to the VLAN priority 2. After these VLAN frames reach DeviceB, DeviceB
forwards these VLAN frames as IP packets with the IP preference of 4 to the
network segment 10.1.2.0/24.

----End

Configuration File
● Configuration file of DeviceB
#
sysname RouterB
#
traffic classifier test operator or
if-match 8021p 2
#
traffic behavior test
remark ip-precedence 4
#
traffic policy test
classifier test behavior test precedence 5
#
interface GigabitEthernet0/2/0.1
undo shutdown
vlan-type dot1q 10
traffic-policy test inbound link-layer

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 167


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

5.12.7 Example for Configuring Priority Mappings for VLAN


Packets Based on Simple Traffic Classification on Layer 2
Interfaces
This section provides an example of how to configure simple traffic classification
in the context of priority mappings for VLAN packets.

Networking Requirements
On the network shown in Figure 5-7, Switch A forwards frames from VLAN 10 to
Device A. Device A maps the priorities of the VLAN frames to the priorities of IP
packets based on the configured priority mappings in the DS domain set on
Device A. Device A then forwards the packets to the IP network.

Interface 1 and interface 2 stand for GE 0/1/0 and GE 0/2/0, respectively.

Figure 5-7 Networking diagram for configuring priority mappings for VLAN
packets based on simple traffic classification on Layer 2 interfaces

Precautions
When configuring priority mappings for VLAN packets based on simple traffic
classification on Layer 2 interfaces, note the following point:
● Before running the trust 8021p vlan command on an interface, use the trust
upstream vlan command to bind a DS domain to the interface. Otherwise,
the trust 8021p vlan configuration does not take effect.

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a VLAN on Device A.
2. Configure the inbound interface of Device A to trust the priorities of packets
from an upstream device.
3. Configure priority mappings based on simple traffic classification on the
inbound interface of Device A.
4. Configure priority mappings for packets on the outbound interface of Device
A.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 168


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Data Preparation
To complete the configuration, you need the following data:
● VLAN ID
● 802.1p priorities, service classes and colors of the packets on the Router, and
DSCP values of IP packets

Procedure
Step 1 Create a VLAN on Device A.
# Create a VLAN.
<DeviceA> system-view
[~DeviceA] vlan 10
[*DeviceA] commit
[~DeviceA] interface gigabitethernet 0/1/0
[~DeviceA-GigabitEthernet0/1/0] portswitch
[*DeviceA-GigabitEthernet0/1/0] port trunk allow-pass vlan 10
[*DeviceA-GigabitEthernet0/1/0] commit

Step 2 Enable simple traffic classification on GE 0/1/0 of Device A to map the priorities of
IP packets to the priorities of VLAN frames based on the default mappings.
[~DeviceA] interface gigabitethernet 0/1/0
[~DeviceA-GigabitEthernet0/1/0] trust upstream default vlan 10
[*DeviceA-GigabitEthernet0/1/0] trust 8021p vlan 10
[*DeviceA-GigabitEthernet0/1/0] commit
[~DeviceA] quit

Step 3 On GE 0/2/0 of Device A, configure the mapping from 802.1p priorities to IP DSCP
values.
<DeviceA> system-view
[~DeviceA] diffserv domain default
[*DeviceA-dsdomain-default] 8021p-inbound 2 phb ef green
[*DeviceA-dsdomain-default] ip-dscp-outbound ef green map 34
[*DeviceA-dsdomain-default] commit
[~DeviceA-dsdomain-default] quit
[~DeviceA] interface gigabitethernet 0/2/0
[*DeviceA-GigabitEthernet0/2/0] portswitch
[*DeviceA-GigabitEthernet0/2/0] port trunk allow-pass vlan 10
[*DeviceA-GigabitEthernet0/2/0] trust upstream default vlan 10
[*DeviceA-GigabitEthernet0/2/0] trust 8021p vlan 10
[*DeviceA-GigabitEthernet0/2/0] commit
[~DeviceA-GigabitEthernet0/2/0] return

After you complete these configurations, Device A maps the VLAN frames with the
802.1p priority of 2 from an upstream device to IP packets with the service classes
of EF, and the packet colors of green. Device A maps the other 802.1p priorities of
VLAN frames to the corresponding DSCP values of IP packets based on the default
mappings.
Step 4 Verify the configuration.
Run the display port-queue statistics interface gigabitethernet 0/2/0
outbound command on Device A. The statistics about AF2 packets are not
displayed because the mapping from the 802.1p priority of 2 to the IP service
priority of EF is configured on the inbound interface.
<DeviceA> display port-queue statistics interface gigabitethernet 0/2/0 outbound

GigabitEthernet0/2/0 outbound traffic statistics:


[be]

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 169


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Current usage percentage of queue: 0


Total pass:
1,003,905,621 packets, 90,351,505,260 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[af1]
Current usage percentage of queue: 0
Total pass:
0 packets, 0 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[af2]
Current usage percentage of queue: 0
Total pass:
0 packets, 0 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[af3]
Current usage percentage of queue: 0
Total pass:
0 packets, 0 bytes

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 170


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[af4]
Current usage percentage of queue: 0
Total pass:
0 packets, 0 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[ef]
Current usage percentage of queue: 0
Total pass:
27,167,382 packets, 3,477,424,896 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
844,397 pps, 864,661,792 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[cs6]
Current usage percentage of queue: 0
Total pass:
335 packets, 25,502 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 171


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[cs7]
Current usage percentage of queue: 0
Total pass:
0 packets, 0 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps

----End

Configuration Files
● Configuration file of Device A
#
sysname DeviceA
#
diffserv domain default
8021p-inbound 2 phb ef green
ip-dscp-outbound ef green map 34
#
vlan batch 10
#
interface GigabitEthernet 0/1/0
portswitch
undo shutdown
port trunk allow-pass vlan 10
trust upstream default vlan 10
trust 8021p vlan 10
#
interface GigabitEthernet0/2/0
portswitch
undo shutdown
port trunk allow-pass vlan 10
trust upstream default vlan 10
trust 8021p vlan 10
#
return

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 172


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

5.12.8 Example for Configuring Priority Mappings Based on


Simple Traffic Classification (MPLS)
This part describes how to configure simple traffic classification in the context of
priority mappings for MPLS packets.

Networking Requirements
MPLS neighbor relationships are established between DeviceA, DeviceB, and
DeviceC. When IP packets reach DeviceA, DeviceA adds MPLS header to these IP
packets before transmitting them to DeviceC. When these MPLS packets reach
DeviceC, DeviceC removes their MPLS headers and forwards them as IP packets.

In this manner, the DSCP value of the IP traffic can be changed to the EXP value of
MPLS traffic on DeviceA, and the EXP value of MPLS traffic can be changed to the
DSCP value of the IP traffic on DeviceC.

Interfaces 1 through 2 in this example are GE 0/1/0, GE 0/2/0, respectively.

Figure 5-8 Networking diagram

● In this configuration example, it is assumed that the three Routers have been configured
so that DeviceA forwards IP traffic as MPLS traffic to DeviceC, and Deviceforwards MPLS
traffic as IP traffic.
● This example lists only the commands related to QoS.

Configuration Notes
During the configuration, pay attention to the following:

None

Configuration Roadmap
The configuration roadmap is as follows:

1. On the inbound interface GigabitEthernet 0/1/0 of DeviceA, configure the


mapping from the IP DSCP field to the MPLS EXP field and enable simple
traffic classification.
2. On the inbound interface GigabitEthernet 0/1/0 of DeviceC, configure the
mapping from the MPLS EXP field to the IP DSCP field and enable simple
traffic classification.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 173


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Data Preparation
To complete the configuration, you need the following data:
MPLS EXP values, the internal service classes and colors of the packets on the
Router, and the DSCP values of IP packets to be mapped

Procedure
Step 1 Configure basic MPLS functions and routes (detail omitted here).
For detailed configuration, refer to the Chapter "Basic MPLS Configuration" in the
HUAWEI NE40E-M2 SeriesUniversal Service Router Configuration Guide - MPLS.
Step 2 Configure the mapping between DSCP field and EXP field at GigabitEthernet0/1/0
on DeviceA.
<RouterA> system-view
[~RouterA] diffserv domain default
[*RouterA-dsdomain-default] ip-dscp-inbound 18 phb af4 green
[*RouterA-dsdomain-default] mpls-exp-outbound af4 green map 5
[*RouterA-dsdomain-default] commit
[~RouterA-dsdomain-default] quit
[~RouterA] interface GigabitEthernet 0/1/0
[~RouterA-GigabitEthernet0/1/0] undo shutdown
[*RouterA-GigabitEthernet0/1/0] trust upstream default
[*RouterA-GigabitEthernet0/1/0] commit
[~RouterA-GigabitEthernet0/1/0] quit
[~RouterA] interface GigabitEthernet 0/2/0
[~RouterA-GigabitEthernet0/2/0] undo shutdown
[*RouterA-GigabitEthernet0/2/0] trust upstream default
[*RouterA-GigabitEthernet0/2/0] commit
[~RouterA-GigabitEthernet0/2/0] quit

In the preceding configuration, AF2 green packets (DSCP value being 18) are
mapped to the internal service level of AF4 of the Router on the inbound interface
of DeviceA. On the outbound interface, the internal service level of AF4 of the
Router is mapped to the EF service level (MPLS priority 5) of the MPLS service. In
this manner, the traffic that enters DeviceA leaves as EF traffic.
Step 3 Configure the mapping from the MPLS EXP field to the IP DSCP field on
GigabitEthernet 0/1/0 of DeviceC.
<RouterC> system-view
[~RouterC] diffserv domain default
[*RouterC-dsdomain-default] mpls-exp-inbound 5 phb af3 green
[*RouterC-dsdomain-default] ip-dscp-outbound af3 green map 32
[*RouterC-dsdomain-default] commit
[~RouterC-dsdomain-default] quit
[~RouterC] interface GigabitEthernet 0/1/0
[~RouterC-GigabitEthernet0/1/0] undo shutdown
[*RouterC-GigabitEthernet0/1/0] trust upstream default
[*RouterC-GigabitEthernet0/1/0] commit
[~RouterC-GigabitEthernet0/1/0] quit
[~RouterC] interface GigabitEthernet 0/2/0
[~RouterC-GigabitEthernet0/2/0] undo shutdown
[*RouterC-GigabitEthernet0/2/0] trust upstream default
[*RouterC-GigabitEthernet0/2/0] commit
[~RouterC-GigabitEthernet0/2/0] quit

In the preceding configuration, the MPLS priority 5 is mapped to the internal


service level of AF3 (green packets) of the Router on the inbound interface of
DeviceC. On the outbound interface, the internal service level of AF3 (green
packets) of the Router is mapped to the DSCP value of 32. In this manner, the
traffic that enters DeviceC leaves as AF4 traffic.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 174


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Step 4 Verify the configuration.


After the preceding configurations, if traffic is sent from GigabitEthernet 0/1/0 on
DeviceA at 100 Mbit/s with the DSCP value being 18, DeviceC forwards the traffic
at 100 Mbit/s with the DSCP value being 32.

----End

Configuration Files
● Configuration file of DeviceA
#
sysname RouterA
#
diffserv domain default
ip-dscp-inbound 18 phb af4 green
mpls-exp-outbound af4 green map 5
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 2.2.2.1 255.255.255.0
trust upstream default
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 3.3.3.1 255.255.255.0
trust upstream default
#
return

● Configuration file of DeviceC


#
sysname RouterC
#
diffserv domain default
ip-dscp-outbound af3 green map 32
mpls-exp-inbound 5 phb af3 green
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 4.4.4.1 255.255.255.0
trust upstream default
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 5.5.5.1 255.255.255.0
trust upstream default
#
return

5.12.9 Example for Configuring Priority Mappings for VLAN


Packets Based on BA Classification on EVC Sub-interfaces
This section provides an example for configuring priority mappings for VLAN
packets based on BA classification on EVC sub-interfaces.

Networking Requirements
Different communities require the same services, such as Internet, IPTV, and VoIP
services. To facilitate management, network administrators of different
communities add services into the same VLAN. In addition, they configure BA
classification on PE1 and PE2 to provide differentiated services.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 175


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

As shown in Figure 5-9, communities 1 and 2 have the same services, which
belong to the same VLAN. It is required that communities 1 and 2
intercommunicate with each other at low costs. In addition, priority mapping is
configured for DS domains on PE1 and PE2. It is required that the outer 802.1p
and DSCP values of downstream traffic on the EVC sub-interface GE 0/1/1.1 of
PE1 and the outer 802.1p and EXP values of downstream traffic on the EVC sub-
interface GE 0/1/1.1 of PE2 remain unchanged.

Interfaces 1 through 2 and Subinterface1.1 in this example are GE 0/1/1, GE 0/1/2,


GE0/1/1.1, respectively.

Figure 5-9 Configuring EVC QoS

Precautions
All services in the VLAN are located on the same network segment.

Configuration Roadmap
Create an EVC model.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 176


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

1. Add interfaces of devices in communities 1 and 2 to VLAN 10.


2. Create an EVC model on the PEs.
– Configure a BD to forward services.
– Create Layer 2 sub-interfaces, add them to the BD, and configure traffic
encapsulation on the downstream interface to ensure that communities 1
and 2 can communicate with each other.
Enable BA classification.
1. Configure mappings between the 802.1p priority, CoS, and color on GE
0/1/1.1 of PE1.
2. Configure mappings between the CoS, color, and 802.1p priority on GE 0/1/1.1
and GE 0/1/1.2 of PE2.

Data Preparation
To complete the configuration, you need the following data:
● Number of interfaces from which users access devices
● Number of interfaces connecting devices
● ID of the VLAN to which services belong
● BD ID
● 802.1p priority, CoS, and color to be mapped

Procedure
Step 1 Add downstream interfaces of the CEs to a specific VLAN.
# Configure CE1.
<HUAWEI> system-view
[~HUAWEI] sysname CE1
[*HUAWEI] commit
[~CE1] vlan 10
[*CE1-vlan10] quit
[*CE1] interface gigabitethernet 0/1/1
[*CE1-GigabitEthernet0/1/1] undo shutdown
[*CE1-GigabitEthernet0/1/1] portswitch
[*CE1-GigabitEthernet0/1/1] port link-type access
[*CE1-GigabitEthernet0/1/1] port default vlan 10
[*CE1-GigabitEthernet0/1/1] quit
[*CE1] interface gigabitethernet 0/1/2
[*CE1-GigabitEthernet0/1/2] undo shutdown
[*CE1-GigabitEthernet0/1/2] portswitch
[*CE1-GigabitEthernet0/1/2] port link-type trunk
[*CE1-GigabitEthernet0/1/2] port trunk allow-pass vlan 10
[*CE1-GigabitEthernet0/1/2] quit
[*CE1] commit

# Configure CE2.
<HUAWEI> system-view
[~HUAWEI] sysname CE2
[*HUAWEI] commit
[~CE2] vlan 10
[*CE2] interface gigabitethernet 0/1/1
[*CE2-GigabitEthernet0/1/1] undo shutdown
[*CE2-GigabitEthernet0/1/1] portswitch
[*CE2-GigabitEthernet0/1/1] port link-type access

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 177


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

[*CE2-GigabitEthernet0/1/1] port default vlan 10


[*CE2-GigabitEthernet0/1/1] quit
[*CE2] interface gigabitethernet 0/1/2
[*CE2-GigabitEthernet0/1/2] undo shutdown
[*CE2-GigabitEthernet0/1/2] portswitch
[*CE2-GigabitEthernet0/1/2] port link-type trunk
[*CE2-GigabitEthernet0/1/2] port trunk allow-pass vlan 10
[*CE2-GigabitEthernet0/1/2] quit
[*CE2] commit

Step 2 Establish an EVC model.


1. Create a BD on the PEs.
# Configure PE1.
<HUAWEI> system-view
[~HUAWEI] sysname PE1
[*HUAWEI] commit
[~PE1] bridge-domain 10
[*PE1-bd10] quit

# Configure PE2.
<HUAWEI> system-view
[~HUAWEI] sysname PE2
[*HUAWEI] commit
[~PE2] bridge-domain 10
[*PE2-bd10] quit

2. Create Layer 2 sub-interfaces, add them to the BD, and configure traffic
encapsulation and traffic behaviors.
# Configure PE1.
[~PE1] interface gigabitethernet 0/1/1
[*PE1-GigabitEthernet0/1/1] undo shutdown
[*PE1-GigabitEthernet0/1/1] quit
[*PE1] interface gigabitethernet 0/1/1.1 mode l2
[*PE1-GigabitEthernet0/1/1.1] encapsulation dot1q vid 10
[*PE1-GigabitEthernet0/1/1.1] bridge-domain 10
[*PE1-GigabitEthernet0/1/1.1]commit
[*PE1-GigabitEthernet0/1/1.1] quit

# Configure PE2.
[*PE2] interface gigabitethernet 0/1/1
[*PE2-GigabitEthernet0/1/1] undo shutdown
[*PE2-GigabitEthernet0/1/1] quit
[*PE2] interface gigabitethernet 0/1/1.1 mode l2
[*PE2-GigabitEthernet0/1/1.1] encapsulation dot1q vid 10
[*PE2-GigabitEthernet0/1/1.1] bridge-domain 10
[*PE1-GigabitEthernet0/1/1.1]commit
[*PE2-GigabitEthernet0/1/1.1] quit

Step 3 Enable BA classification on the EVC interfaces.


# Configure PE1.
[*PE1] diffserv domain gina
[*PE1-dsdomain-gina] 8021p-outbound cs6 red map 5
[*PE1-dsdomain-gina] quit
[*PE1] interface gigabitethernet 0/1/1.1 mode l2
[*PE1-GigabitEthernet0/1/1.1] trust upstream gina
[*PE1-GigabitEthernet0/1/1.1] qos phb outer-8021p disable
[*PE1-GigabitEthernet0/1/1.1] qos phb dscp disable
[*PE1-GigabitEthernet0/1/1.1]commit
[*PE1-GigabitEthernet0/1/1.1]quit

# Configure PE2.
[*PE2] diffserv domain gina
[*PE2-dsdomain-gina] 8021p-inbound 2 phb af1 green

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 178


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

[*PE2-dsdomain-gina] quit
[*PE2] interface gigabitethernet 0/1/1.1 mode l2
[*PE2-GigabitEthernet0/1/1.1] trust upstream gina
[*PE2-GigabitEthernet0/1/1.1] qos phb outer-8021p disable
[*PE2-GigabitEthernet0/1/1.1] qos phb mpls-exp disable
[*PE1-GigabitEthernet0/1/1.1]commit
[*PE2-GigabitEthernet0/1/1] quit

Step 4 Verify the configuration.


The display bridge-domain command output shows information about the BD to
which the Layer 2 sub-interfaces are added. Take PE1 as an example:
[~PE1] display bridge-domain
The total number of bridge-domains is : 1
--------------------------------------------------------------------------------
MAC_LRN: MAC learning; STAT: Statistics; SPLIT: Split-horizon;
BC: Broadcast; MC: Unknown multicast; UC: Unknown unicast;
*down: Administratively down; FWD: Forward; DSD: Discard;
--------------------------------------------------------------------------------

BDID State MAC-LRN STAT BC MC UC SPLIT Description


--------------------------------------------------------------------------------
10 up enable disable FWD FWD FWD disable

The display diffserv domain [ ds-domain-name ] [ 8021p | atm | dscp| | exp ]


[ inbound| outbound ] command output shows configurations of the DS domain.
Take PE1 as an example:
[~PE1] display diffserv domain gina
Diffserv domain name:gina
8021p-inbound 0 phb be green
8021p-inbound 1 phb af1 green
8021p-inbound 2 phb af2 green
8021p-inbound 3 phb af3 green
8021p-inbound 4 phb af4 green
8021p-inbound 5 phb ef green
8021p-inbound 6 phb cs6 green
8021p-inbound 7 phb cs7 green
8021p-outbound be green map 0
8021p-outbound be yellow map 0
8021p-outbound be red map 0
8021p-outbound af1 green map 1
8021p-outbound af1 yellow map 1
8021p-outbound af1 red map 1
8021p-outbound af2 green map 2
8021p-outbound af2 yellow map 2
8021p-outbound af2 red map 2
8021p-outbound af3 green map 3
8021p-outbound af3 yellow map 3
8021p-outbound af3 red map 3
8021p-outbound af4 green map 4
8021p-outbound af4 yellow map 4
8021p-outbound af4 red map 4
8021p-outbound ef green map 5
8021p-outbound ef yellow map 5
8021p-outbound ef red map 5
8021p-outbound cs6 green map 6
8021p-outbound cs6 yellow map 6
8021p-outbound cs6 red map 5
8021p-outbound cs7 green map 7
8021p-outbound cs7 yellow map 7
8021p-outbound cs7 red map 7
ip-dscp-inbound 0 phb be green
ip-dscp-inbound 1 phb be green
ip-dscp-inbound 2 phb be green
ip-dscp-inbound 3 phb be green
ip-dscp-inbound 4 phb be green
ip-dscp-inbound 5 phb be green

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 179


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

ip-dscp-inbound 6 phb be green


ip-dscp-inbound 7 phb be green
ip-dscp-inbound 8 phb af1 green
ip-dscp-inbound 9 phb be green
ip-dscp-inbound 10 phb af1 green
ip-dscp-inbound 11 phb be green
ip-dscp-inbound 12 phb af1 yellow
ip-dscp-inbound 13 phb be green
ip-dscp-inbound 14 phb af1 red
ip-dscp-inbound 15 phb be green
ip-dscp-inbound 16 phb af2 green
ip-dscp-inbound 17 phb be green
ip-dscp-inbound 18 phb af2 green
ip-dscp-inbound 19 phb be green
ip-dscp-inbound 20 phb af2 yellow
ip-dscp-inbound 21 phb be green
ip-dscp-inbound 22 phb af2 red
ip-dscp-inbound 23 phb be green
ip-dscp-inbound 24 phb af3 green
ip-dscp-inbound 25 phb be green
ip-dscp-inbound 26 phb af3 green
ip-dscp-inbound 27 phb be green
ip-dscp-inbound 28 phb af3 yellow
ip-dscp-inbound 29 phb be green
ip-dscp-inbound 30 phb af3 red
ip-dscp-inbound 31 phb be green
ip-dscp-inbound 32 phb af4 green
ip-dscp-inbound 33 phb be green
ip-dscp-inbound 34 phb af4 green
ip-dscp-inbound 35 phb be green
ip-dscp-inbound 36 phb af4 yellow
ip-dscp-inbound 37 phb be green
ip-dscp-inbound 38 phb af4 red
ip-dscp-inbound 39 phb be green
ip-dscp-inbound 40 phb ef green
ip-dscp-inbound 41 phb be green
ip-dscp-inbound 42 phb be green
ip-dscp-inbound 43 phb be green
ip-dscp-inbound 44 phb be green
ip-dscp-inbound 45 phb be green
ip-dscp-inbound 46 phb ef green
ip-dscp-inbound 47 phb be green
ip-dscp-inbound 48 phb cs6 green
ip-dscp-inbound 49 phb be green
ip-dscp-inbound 50 phb be green
ip-dscp-inbound 51 phb be green
ip-dscp-inbound 52 phb be green
ip-dscp-inbound 53 phb be green
ip-dscp-inbound 54 phb be green
ip-dscp-inbound 55 phb be green
ip-dscp-inbound 56 phb cs7 green
ip-dscp-inbound 57 phb be green
ip-dscp-inbound 58 phb be green
ip-dscp-inbound 59 phb be green
ip-dscp-inbound 60 phb be green
ip-dscp-inbound 61 phb be green
ip-dscp-inbound 62 phb be green
ip-dscp-inbound 63 phb be green
ip-dscp-outbound be green map 0
ip-dscp-outbound be yellow map 0
ip-dscp-outbound be red map 0
ip-dscp-outbound af1 green map 10
ip-dscp-outbound af1 yellow map 12
ip-dscp-outbound af1 red map 14
ip-dscp-outbound af2 green map 18
ip-dscp-outbound af2 yellow map 20
ip-dscp-outbound af2 red map 22
ip-dscp-outbound af3 green map 26
ip-dscp-outbound af3 yellow map 28

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 180


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

ip-dscp-outbound af3 red map 30


ip-dscp-outbound af4 green map 34
ip-dscp-outbound af4 yellow map 36
ip-dscp-outbound af4 red map 38
ip-dscp-outbound ef green map 46
ip-dscp-outbound ef yellow map 46
ip-dscp-outbound ef red map 46
ip-dscp-outbound cs6 green map 48
ip-dscp-outbound cs6 yellow map 48
ip-dscp-outbound cs6 red map 48
ip-dscp-outbound cs7 green map 56
ip-dscp-outbound cs7 yellow map 56
ip-dscp-outbound cs7 red map 56
mpls-exp-inbound 0 phb be green
mpls-exp-inbound 1 phb af1 green
mpls-exp-inbound 2 phb af2 green
mpls-exp-inbound 3 phb af3 green
mpls-exp-inbound 4 phb af4 green
mpls-exp-inbound 5 phb ef green
mpls-exp-inbound 6 phb cs6 green
mpls-exp-inbound 7 phb cs7 green
mpls-exp-outbound be green map 0
mpls-exp-outbound be yellow map 0
mpls-exp-outbound be red map 0
mpls-exp-outbound af1 green map 1
mpls-exp-outbound af1 yellow map 1
mpls-exp-outbound af1 red map 1
mpls-exp-outbound af2 green map 2
mpls-exp-outbound af2 yellow map 2
mpls-exp-outbound af2 red map 2
mpls-exp-outbound af3 green map 3
mpls-exp-outbound af3 yellow map 3
mpls-exp-outbound af3 red map 3
mpls-exp-outbound af4 green map 4
mpls-exp-outbound af4 yellow map 4
mpls-exp-outbound af4 red map 4
mpls-exp-outbound ef green map 5
mpls-exp-outbound ef yellow map 5
mpls-exp-outbound ef red map 5
mpls-exp-outbound cs6 green map 6
mpls-exp-outbound cs6 yellow map 6
mpls-exp-outbound cs6 red map 6
mpls-exp-outbound cs7 green map 7
mpls-exp-outbound cs7 yellow map 7
mpls-exp-outbound cs7 red map 7

----End

Configuration Files
● PE1 configuration file
#
sysname PE1
#
diffserv domain gina
8021p-outbound cs6 red map 5
#
bridge-domain 10
#
interface GigabitEthernet0/1/1
undo shutdown
#
interface GigabitEthernet 0/1/1.1 mode l2
encapsulation dot1q vid 10
bridge-domain 10
trust upstream gina
qos phb outer-8021p disable
qos phb dscp disable

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 181


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

#
return

● PE2 configuration file


#
sysname PE2
#
diffserv domain gina
8021p-inbound 2 phb af1 green
#
bridge-domain 10
#
interface GigabitEthernet0/1/1
undo shutdown
#
interface GigabitEthernet 0/1/1.1 mode l2
encapsulation dot1q vid 10
bridge-domain 10
trust upstream gina
qos phb outer-8021p disable qos phb mpls-exp disable
#
return

● CE1 configuration file


#
sysname CE1
#
vlan 10
#
interface GigabitEthernet0/1/1
portswitch
undo shutdown
port link-type access
port default vlan 10
dcn
#
interface GigabitEthernet0/1/2
portswitch
undo shutdown
port link-type trunk
port trunk allow-pass vlan 10
#
return

● CE2 configuration file


#
sysname CE2
#
vlan 10
#
interface GigabitEthernet0/1/1
portswitch
undo shutdown
port link-type access
port default vlan 10
dcn
#
interface GigabitEthernet0/1/2
portswitch
undo shutdown
port link-type trunk
port trunk allow-pass vlan 10
#
return

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 182


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

5.12.10 Example for Configuring User Priority Mapping in a


Domain
This section provides an example for configuring user priority mapping in a
domain based on simple traffic classification.

Networking Requirements
As shown in Figure 5-10, Subscriber1 accesses the Internet through PPPoEoVLAN.
The network is deployed as follows:
● Subscriber1 belongs to the domain isp1 and accesses the Internet through GE
2/0/0.1 on the Device through PPPoEoVLAN. The device connected to the
Device supports the dialup function.
● RADIUS authentication and RADIUS accounting are used.
● The IP address of the RADIUS server is 192.168.7.249. The authentication port
number is 1645 and the accounting port number is 1646. The RADIUS+1.1
protocol is adopted, with the shared key being itellin.
● The IP address of the DNS server is 192.168.7.252.
● Subscriber1 in the domain isp1 accesses the Internet with the priority being 3.
Then, user priority mapping is required on the Device to change the 802.1p values
when the Device forwards out the VLAN packets received from Subscriber1.

interface1 and subinterface2.1 in this example are GE0/1/0, GE0/2/0.1, respectively.

Figure 5-10 Networking diagram of configuring user priority mapping in a


domain

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the BRAS service on the Device so that Subscriber1 can successfully
access the Internet.

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 183


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

2. Configure user priority mapping in a domain of the Device.

Data Preparation
To complete the configuration, you need the following data:
● Name of the domain to which a user belongs
● User priority to be mapped
● Internal CoS and color of the packet

Procedure
Step 1 Configure the BRAS service on the Device so that Subscriber1 can successfully
access the Internet.
For detailed configuration, refer to the HUAWEI NE40E-M2 SeriesUniversal Service
RouterConfiguration Guide - User Access.
Step 2 Configure user priority mapping in the domain.
# Configure the priority for Subscriber1 to access the Internet.
<HUAWEI> system-view
[~Device] aaa
[*Device-aaa] domain isp1
[*Device-aaa-domain-isp1] user-priority upstream 3
[*Device-aaa-domain-isp1] commit
[*Device-aaa-domain-isp1] quit

# Configure user priority mapping.


<Device> system-view
[~Device] diffserv domain isp1
[*Device-dsdomain-isp1] user-priority 3 phb af4 yellow
[*Device-dsdomain-isp1] commit
[*Device-dsdomain-isp1] quit

# Enable simple traffic classification in the domain.


<HUAWEI> system-view
[~Device] aaa
[*Device-aaa] domain isp1
[*Device-aaa-domain-isp1] trust upstream isp1
[*Device-aaa-domain-isp1] user-priority upstream trust-8021p-outer
[*Device-aaa-domain-isp1] commit
[*Device-aaa-domain-isp1] quit

After the preceding configurations, the priorities of the packets sent from
Subscriber1 in the domain isp1 are all 3. The priorities are mapped to the internal
CoS AF4 and the color yellow on the Device.
Step 3 Verify the configuration.
Run the display port-queue statistics interface gigabitethernet 0/1/0
outbound command on the Device. Because simple traffic classification is enabled
for the users with the priority being 3 in the domain isp1, traffic of Subscriber1
enters the AF4 queue and the 802.1p values carried in the packets are marked as
4 on the outbound interface.
<HUAWEI> display port-queue statistics gigabitethernet 0/1/0 outbound
GigabitEthernet0/1/0 outbound traffic statistics:
[be]

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 184


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Current usage percentage of queue: 0


Total pass:
1,003,905,621 packets, 90,351,505,260 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[af1]
Current usage percentage of queue: 0
Total pass:
0 packets, 0 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[af2]
Current usage percentage of queue: 0
Total pass:
0 packets, 0 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[af3]
Current usage percentage of queue: 0
Total pass:
0 packets, 0 bytes

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 185


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[af4]
Current usage percentage of queue: 0
Total pass:
1,748,941 packets, 157,404,690 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
26,117 pps, 18,804,240 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[ef]
Current usage percentage of queue: 0
Total pass:
0 packets, 0 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[cs6]
Current usage percentage of queue: 0
Total pass:
335 packets, 25,502 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 186


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps
[cs7]
Current usage percentage of queue: 0
Total pass:
0 packets, 0 bytes
Total discard:
0 packets, 0 bytes
Drop tail discard:
0 packets, 0 bytes
Wred discard:
0 packets, 0 bytes
Last 30 seconds pass rate:
0 pps, 0 bps
Last 30 seconds discard rate:
0 pps, 0 bps
Drop tail discard rate:
0 pps, 0 bps
Wred discard rate:
0 pps, 0 bps
buffer size: 10 kbytes
used buffer size: 0 kbytes
Peak rate:
0000-00-00 00:00:00 0 bps

----End

Configuration Files
● Configuration file of the Router
#
sysname HUAWEI
#
radius-server group rd1
radius-server authentication 192.168.7.249 1645 weight 0
radius-server accounting 192.168.7.249 1646 weight 0
radius-server shared-key-cipher %^%#clY:%[]x='-RMNJus[s/VJ:3YBq3<..|.{'xgbp+%^%
radius-server type plus11
radius-server traffic-unit kbyte
#
interface Virtual-Template1
#
interface GigabitEthernet0/2/0
undo shutdown
#
interface GigabitEthernet0/2/0.1
pppoe-server bind Virtual-Template 1
user-vlan 1
bas
access-type layer2-subscriber default-domain authentication isp1
authentication-method ppp
#
interface GigabitEthernet0/1/0
ip address 192.168.7.1 255.255.255.0
#

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 187


HUAWEI NE40E-M2 Series Universal Service Router
Configuration Guide - QoS 5 Class-based QoS Configuration

ip pool pool1 bas local


gateway 10.82.0.1 255.255.255.0
section 0 10.82.0.2 10.82.0.200
dns-server 192.168.7.252
#
diffserv domain default
diffserv domain isp1
user-priority 3 phb af4 yellow
diffserv domain qinq
diffserv domain 5p3d
#
aaa
authentication-scheme auth1
accounting-scheme acct1
#
domain default0
domain default1
domain default_admin
domain isp1
authentication-scheme auth1
accounting-scheme acct1
radius-server group rd1
ip-pool pool1
trust upstream isp1
user-priority upstream 3
#
return

Issue 04 (2020-04-30) Copyright © Huawei Technologies Co., Ltd. 188

You might also like