MPLS QoS commands -- 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

mdc-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

MPLS QoS commands -- 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

mdc-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

MPLS QoS commands -- 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

mdc-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

MPLS QoS commands -- 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

mdc-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

MPLS QoS commands -- remark imposition-mpls-exp

Use remark imposition-mpls-exp to configure an EXP value marking action for added labels in a traffic behavior.

Use undo remark imposition-mpls-exp to delete the action.

Syntax

remark [ green | red | yellow ] imposition-mpls-exp exp-value

undo remark [ green | red | yellow ] imposition-mpls-exp

Default

No EXP value marking action for added labels is configured in a traffic behavior.

Views

Traffic behavior view

Predefined user roles

network-admin

mdc-admin

Parameters

green: Specifies green packets.

red: Specifies red packets.

yellow: Specifies yellow packets.

exp-value: Specifies an EXP value in the range of 0 to 7.

Usage guidelines

If you do not specify a color, this command marks the EXP value for packets of all colors.

Examples

# Set the EXP value to 0 for added labels of MPLS packets.

<Sysname> system-view

[Sysname] traffic behavior database

[Sysname-behavior-database] remark imposition-mpls-exp 0

Related commands

remark mpls-exp

MPLS QoS commands -- 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 [ green | red | yellow ] mpls-exp exp-value

undo remark [ green | red | yellow ] mpls-exp

Default

No EXP value marking action is configured in a traffic behavior.

Views

Traffic behavior view

Predefined user roles

network-admin

mdc-admin

Parameters

green: Specifies green packets.

red: Specifies red packets.

yellow: Specifies yellow packets.

exp-value: Specifies an EXP value in the range of 0 to 7.

Usage guidelines

If you do not specify a color, this command marks the EXP value for packets of all colors.

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