- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
06-MPLS QoS commands | 89.19 KB |
Contents
MPLS QoS commands
diffserv-mode
Use diffserv-mode to configure the MPLS DiffServ mode.
Use undo diffserv-mode to restore the default.
Syntax
diffserv-mode { ingress { pipe service-class | short-pipe service-class | uniform } egress { pipe | short-pipe [ trust { dscp | inner-dot1p } ] | uniform } | { pipe service-class | short-pipe service-class | uniform } }
undo diffserv-mode
Default
No MPLS DiffServ mode is configured.
Views
System view
VPN instance view
VSI view
Cross-connect view
Predefined user roles
network-admin
Parameters
ingress: Configures the MPLS DiffServ mode for the inbound direction.
egress: Configures the MPLS DiffServ mode for the outbound direction.
pipe: Specifies the pipe mode.
short-pipe: Specifies the short-pipe mode.
trust: Specifies the priority trust mode. If you do not specify this keyword, the DSCP in MPLS L2VPN packets is trusted. This keyword is available only in VSI view and cross-connect view.
· inner-dot1p: Trusts the inner 802.1p priority in MPLS L2VPN packets.
· dscp: Trusts the DSCP in MPLS L2VPN packets.
uniform: Specifies the uniform mode.
service-class: Specifies the MPLS EXP value for packets that enter from a private network to a public network, in the range of 0 to 7.
Usage guidelines
If you do not specify a direction when executing this command, the configured MPLS DiffServ mode applies to both directions.
If you execute this command for the same direction multiple times, the most recent configuration takes effect.
In a DiffServ architecture, an intermediate node can modify the IP precedence, DSCP, and EXP fields, which are collectively referred to as class of service (CoS). Therefore, the CoS value of a packet might change during transmission in an IP network or MPLS network. The device supports the following MPLS DiffServ modes to process CoS:
· pipe—When an IP packet enters an MPLS network, the ingress node ignores the IP precedence or DSCP value of the IP packet and uses the configured value as the EXP value of the MPLS packet. When the MPLS packet leaves the MPLS network, the egress node does not modify the original IP precedence or DSCP value. In the MPLS network, the packet is scheduled based on the configured EXP value.
· short-pipe—When an IP packet enters and leaves an MPLS network, the packet is processed in the same way as in pipe mode.
¡ On nodes from the ingress node to the penultimate node, the packet is scheduled based on the configured EXP value.
¡ On the egress node, the top label is popped, and then the packet is scheduled based on the configured priority trust mode. If no priority trust mode is configured, the packet is scheduled based on its IP precedence or DSCP value.
· uniform
¡ For a L2VPN:
- If the ingress node is configured with the qos trust command on an AC interface, it maps the trusted priority of the incoming IP packet to the EXP value of the MPLS packet.
- If the ingress node is not configured with the qos trust command on the AC interface, the ingress node maps the 802.1p priority of the IP packet to the EXP value of the MPLS packet. If the IP packet does not have VLAN tags, the EXP value will be 0. When the MPLS packet leaves the MPLS network, the penultimate node or egress node maps the EXP value to the 802.1p priority. If the MPLS packet does not have VLAN tags, the ingress node performs no mapping.
¡ For a L3VPN, when an IP packet enters an MPLS network, the ingress node maps the IP precedence or DSCP value of the IP packet to the EXP value of the MPLS packet. When the MPLS packet leaves the MPLS network, the penultimate node or egress node maps the EXP value to the IP precedence or DSCP value.
This comamnd does not affect P devices in an MPLS network. When a P device swaps the label in a packet, the EXP value in the packet remain unchanged.
Table 1 shows the priority mappings for each MPLS DiffServ mode on each node in an MPLS network.
Table 1 Priority mappings for each MPLS DiffServ mode on each node
MPLS DiffServ mode |
Labels |
PHP |
Priority |
Node |
|||
Ingress |
P |
Penultimate hop |
Egress |
||||
Ingress: Uniform Egress: Uniform |
1 |
Yes |
EXP |
Got from dscp-exp map |
Unchanged |
N/A |
N/A |
DSCP |
Unchanged |
Unchanged |
Got from exp-dscp map |
Unchanged |
|||
No |
EXP |
Got from dscp-exp map |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Got from exp-dscp map |
|||
2 |
Yes |
EXP |
Got from dscp-exp map |
Unchanged |
Unchanged |
N/A |
|
DSCP |
Unchanged |
Unchanged |
Unchanged |
Got from exp-dscp map |
|||
No |
EXP |
Got from dscp-exp map |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Got from exp-dscp map |
|||
Ingress: Pipe Egress: Pipe |
1 |
Yes |
EXP |
As configured |
Unchanged |
N/A |
N/A |
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
2 |
Yes |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
|
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
Ingress: Short-pipe Egress: Short-pipe |
1 |
Yes |
EXP |
As configured |
Unchanged |
N/A |
N/A |
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
2 |
Yes |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
|
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
Ingress: Uniform Egress: Pipe |
1 |
Yes |
EXP |
Got from dscp-exp map |
Unchanged |
N/A |
N/A |
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
Got from dscp-exp map |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
2 |
Yes |
EXP |
Got from dscp-exp map |
Unchanged |
Unchanged |
N/A |
|
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
Got from dscp-exp map |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
Ingress: Uniform Egress: Short-pipe |
1 |
Yes |
EXP |
Got from dscp-exp map |
Unchanged |
N/A |
N/A |
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
Got from dscp-exp map |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
2 |
Yes |
EXP |
Got from dscp-exp map |
Unchanged |
Unchanged |
N/A |
|
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
Got from dscp-exp map |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
Ingress: Pipe Egress: Uniform |
1 |
Yes |
EXP |
As configured |
Unchanged |
N/A |
N/A |
DSCP |
Unchanged |
Unchanged |
Got from exp-dscp map |
Unchanged |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Got from exp-dscp map |
|||
2 |
Yes |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
|
DSCP |
Unchanged |
Unchanged |
Unchanged |
Got from exp-dscp map |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Got from exp-dscp map |
|||
Ingress: Pipe Egress: Short-pipe |
1 |
Yes |
EXP |
As configured |
Unchanged |
N/A |
N/A |
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
2 |
Yes |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
|
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
Ingress: Short-pipe Egress: Uniform |
1 |
Yes |
EXP |
As configured |
Unchanged |
N/A |
N/A |
DSCP |
Unchanged |
Unchanged |
Got from exp-dscp map |
Unchanged |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Got from exp-dscp map |
|||
2 |
Yes |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
|
DSCP |
Unchanged |
Unchanged |
Unchanged |
Got from exp-dscp map |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Got from exp-dscp map |
|||
Ingress: Short-pipe Egress: Pipe |
1 |
Yes |
EXP |
As configured |
Unchanged |
N/A |
N/A |
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
2 |
Yes |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
|
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
|||
No |
EXP |
As configured |
Unchanged |
Unchanged |
N/A |
||
DSCP |
Unchanged |
Unchanged |
Unchanged |
Unchanged |
Mappings between IP precedence or DSCP and EXP are performed according to the IP precedence-exp map, dscp-exp map, and exp-dscp map. For more information about these priorities and maps, see ACL and QoS Configuration Guide.
Examples
# Configure the MPLS DiffServ mode as uniform for VPN instance abc.
<Sysname> system-view
[Sysname] ip vpn-instance abc
[Sysname-vpn-instance-abc] diffserv-mode uniform
# In VPN instance xyz, configure the MPLS DiffServ mode as pipe with EXP AF1 for the inbound direction and as short-pipe for the outbound direction.
<Sysname> system-view
[Sysname] ip vpn-instance xyz
[Sysname-vpn-instance-xyz] diffserv-mode ingress pipe af1 egress short-pipe
# Configure the MPLS DiffServ mode as uniform for VSI abc.
<Sysname> system-view
[Sysname] vsi abc
[Sysname-vsi-abc] diffserv-mode uniform
# For cross-connect 1 in cross-connect group xyz, configure the MPLS DiffServ mode as pipe with EXP 4 in the inbound direction.
<Sysname> system-view
[Sysname] xconnect-group xyz
[Sysname-xcg-xyz] connection 1
[Sysname-xcg-xyz-1] diffserv-mode ingress pipe 4
# Configure the global MPLS DiffServ mode as pipe with EXP 4 in the inbound direction.
<Sysname> system-view
[Sysname-xcg-xyz-1] diffserv-mode ingress pipe 4
if-match mpls-exp
Use if-match mpls-exp to define a criterion to match the EXP field in the first (topmost) MPLS label.
Use undo if-match mpls-exp to delete the match criterion.
Syntax
if-match [ not ] mpls-exp exp-value&<1-8>
undo if-match [ not ] mpls-exp exp-value&<1-8>
Default
No criterion is defined to match the EXP field in the first (topmost) MPLS label.
Views
Traffic class view
Predefined user roles
network-admin
Parameters
not: Matches packets not conforming to the specified criterion.
exp-value&<1-8>: Specifies a space-separated list of up to eight EXP values. The value range for the exp-value argument is 0 to 7. If the same EXP value is specified multiple times, the system considers them as one. If a packet matches one of the defined MPLS EXP values, it matches the if-match clause.
Examples
# Define a criterion to match packets with EXP value 3 or 4 in the topmost MPLS label.
<Sysname> system-view
[Sysname] traffic classifier database
[Sysname-classifier-database] if-match mpls-exp 3 4
if-match mpls-label
Use if-match mpls-label to define a criterion to match the topmost MPLS label.
Use undo if-match mpls-label to delete the match criterion.
Syntax
if-match [ not ] mpls-label { label-value&<1-8> | label-value1 to label-value2 }
undo if-match [ not ] mpls-label { label-value&<1-8> | label-value1 to label-value2 }
Default
No criterion is defined to match the topmost MPLS label.
Views
Traffic class view
Predefined user roles
network-admin
Parameters
not: Matches packets not conforming to the specified criterion.
label-value&<1-8>: Specifies a space-separated list of up to eight MPLS label values. The value range for the label-value argument is 0 to 1048575.
label-value1 to label-value2: Specifies a range of MPLS label values. The value for label-value2 must be greater than or equal to the value for label-value1. The value range for the label-value argument is 0 to 1048575.
Usage guidelines
You can configure multiple MPLS label values in one command.
· If the same MPLS label value is specified multiple times, the system considers them as one.
· If a packet matches one of the defined MPLS label values, it matches the if-match clause.
Examples
# Define a criterion to match packets with topmost MPLS label values in the range of 1 to 1000.
<Sysname> system-view
[Sysname] traffic classifier database
[Sysname-classifier-database] if-match mpls-label 1 to 1000
if-match second-mpls-exp
Use if-match second-mpls-exp to define a criterion to match the EXP field in the second MPLS label.
Use undo if-match second-mpls-exp to delete the match criterion.
Syntax
if-match [ not ] second-mpls-exp exp-value&<1-8>
undo if-match [ not ] second-mpls-exp exp-value&<1-8>
Default
No criterion is defined to match the EXP field in the second MPLS label.
Views
Traffic class view
Predefined user roles
network-admin
Parameters
not: Matches packets not conforming to the specified criterion.
exp-value&<1-8>: Specifies a space-separated list of up to eight EXP values. The value range for the exp-value argument is 0 to 7. If the same MPLS EXP value is specified multiple times, the system considers them as one. If a packet matches one of the defined MPLS EXP values, it matches the if-match clause.
Examples
# Define a criterion to match packets with EXP value 3 or 4 in the second MPLS label.
<Sysname> system-view
[Sysname] traffic classifier database
[Sysname-classifier-database] if-match second-mpls-exp 3 4
if-match second-mpls-label
Use if-match second-mpls-label to define a criterion to match the second MPLS label.
Use undo if-match second-mpls-label to delete the match criterion.
Syntax
if-match [ not ] second-mpls-label { label-value&<1-8> | label-value1 to label-value2 }
undo if-match [ not ] second-mpls-label { label-value&<1-8> | label-value1 to label-value2 }
Default
No criterion is defined to match the second MPLS label.
Views
Traffic class view
Predefined user roles
network-admin
Parameters
not: Matches packets not conforming to the specified criterion.
label-value&<1-8>: Specifies a space-separated list of up to eight MPLS label values. The value range for the label-value argument is 0 to 1048575.
label-value1 to label-value2: Specifies a range of MPLS label values. The value for label-value2 must be greater than or equal to the value for label-value1. The value range for the label-value argument is 0 to 1048575.
Usage guidelines
You can configure multiple MPLS label values in one command.
· If the same MPLS label value is specified multiple times, the system considers them as one.
· If a packet matches one of the defined MPLS label values, it matches the if-match clause.
Examples
# Define a criterion to match packets with the second MPLS label value in the range of 1 to 1000.
<Sysname> system-view
[Sysname] traffic classifier database
[Sysname-classifier-database] if-match second-mpls-label 1 to 1000
remark mpls-exp
Use remark mpls-exp to configure an EXP value marking action in a traffic behavior.
Use undo remark mpls-exp to delete the action.
Syntax
remark mpls-exp exp-value
undo remark mpls-exp
Default
No EXP value marking action is configured in a traffic behavior.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
exp-value: Specifies an EXP value in the range of 0 to 7.
Usage guidelines
If an MPLS packet has multiple labels, this command marks the topmost label.
Examples
# Set the EXP value to 0 for MPLS packets.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] remark mpls-exp 0