[go: up one dir, main page]

0% found this document useful (0 votes)
48 views14 pages

Configuring Mpls Qos

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)
48 views14 pages

Configuring Mpls Qos

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/ 14

Configuring MPLS QoS

• Classifying and Marking MPLS EXP, on page 1


• Information About MPLS QoS, on page 2
• How to Configure MPLS QoS, on page 3
• Configuration Examples for MPLS QoS, on page 9
• Additional References, on page 12
• Feature History for QoS MPLS EXP, on page 13

Classifying and Marking MPLS EXP


The QoS EXP Matching feature allows you to classify, mark and queue network traffic by modifying the
Multiprotocol Label Switching (MPLS) experimental bits (EXP) field. This module contains conceptual
information and the configuration tasks for classifying and marking network traffic using the MPLS EXP
field.

Prerequisites for MPLS QoS


• The switch must be configured as an MPLS provider edge (PE) or provider (P) router, which can include
the configuration of a valid label protocol and underlying IP routing protocols.

Restrictions for MPLS QoS


• MPLS classification and marking can only occur in an operational MPLS network.
• If a packet is classified by IP type of service (ToS) or class of service (CoS) at ingress, it cannot be
reclassified by MPLS EXP at egress (imposition case). However, if a packet is classified by MPLS at
ingress, it can be reclassified by IP ToS, CoS, or Quality of Service (QoS) group at egress (disposition
case).
• To apply QoS on traffic across protocol boundaries, use QoS-group. You can classify and assign ingress
traffic to the QoS-group. Thereafter, you can use the QoS-group at egress to classify and apply QoS.
• If a packet is encapsulated in MPLS, the MPLS payload cannot be checked for other protocols, such as
IP, for classification or marking. Only MPLS EXP marking affects packets that are encapsulated by
MPLS.

Configuring MPLS QoS


1
Configuring MPLS QoS
Information About MPLS QoS

• The short pipe mode is not supported to transport packets through the MPLS network. You can transport
packets using any one of the following modes—uniform mode or pipe mode.

Information About MPLS QoS


This section provides information about MPLS QoS:

MPLS QoS Overview


MPLS QoS functionality enables network administrators to provide differentiated services across an MPLS
network. Network administrators can satisfy a wide range of networking requirements by specifying the class
of service applicable to each transmitted IP packet. Different classes of service can be established for IP
packets by setting the IP precedence bit in the header of each packet. Classification, remarking, and queuing
on an MPLS network is performed over MPLS EXP bits. In the MPLS network the packets are differentiated
by the MPLS EXP field marking and treated appropriately, depending on the weighted early random detection
(WRED) configuration.
MPLS EXP field in MPLS packet allows you to:
• Classify traffic
The classification process selects the traffic to be marked. Classification accomplishes this by partitioning
traffic into multiple priority levels, or classes of service. Traffic classification is the primary component
of class-based QoS provisioning. For more information, see the “Classifying Network Traffic” module.
• Police and mark traffic
Policing causes traffic that exceeds the configured rate to be discarded or marked to a different drop
level. Marking traffic is a way to identify packet flows to differentiate them. Packet marking allows you
to partition your network into multiple priority levels or classes of service. For more information, see
the “Marking Network Traffic” module.
• Queueing
Queueing helps prevent traffic congestion. This includes priority level queueing, weighted tail drop
(WTD), scheduling, shaping and weighted random early detection (WRED) features.

MPLS Experimental Field


The MPLS experimental bits (EXP) field is a 3-bit field in the MPLS header that you can use to define the
QoS treatment (per-hop behavior) that a node should give to a packet. In an IP network, the DiffServ Code
Point (DSCP) (a 6-bit field) defines a class and drop precedence. The EXP bits can be used to carry some of
the information encoded in the IP DSCP and can also be used to encode the dropping precedence.
By default, Cisco IOS Software copies the three most significant bits of the DSCP or the IP precedence of
the IP packet to the EXP field in the MPLS header. This action happens when the MPLS header is initially
imposed on the IP packet. However, you can also set the EXP field by defining a mapping between the DSCP
or IP precedence and the EXP bits. This mapping is configured using the set mpls experimental or police
commands. For more information, see the “How to Classify and Mark MPLS EXP” section.

Configuring MPLS QoS


2
Configuring MPLS QoS
Benefits of MPLS EXP Classification and Marking

Note A policy map configured with set ip dscp is not supported on the provider edge device because the policy
action for MPLS label imposition node should be based on set mpls experimental imposition value. However,
a policy map with action set ip dscp is supported when both the ingress and egress interfaces are Layer 3
ports.

You can perform MPLS EXP marking operations using table-maps. It is recommended to assign QoS-group
to a different class of traffic in ingress policy and translate QoS-group to DSCP and EXP markings in egress
policy using table-map.
If a service provider does not want to modify the value of the IP precedence field in packets transported
through the network, they can use the MPLS EXP field value to classify and mark IP packets.
By choosing different values for the MPLS EXP field, you can mark critical packets so that those packets
have priority if network congestion occurs.
WRED monitors network traffic to anticipate and prevent congestion at common network and internetwork
bottlenecks. WRED can selectively discard lower priority traffic when an interface becomes congested. This
feature can also provide differentiated performance characteristics for different classes of service.
There are two ways to transport packets through the MPLS network:
Uniform mode: Uniform mode of transferring packets operates on one layer of QoS. The Provider Edge at
ingress copies the DSCP information from the incoming IP packet into the MPLS EXP bits of the imposed
labels and the IP precedence bits are mapped to the MPLS EXP field . As the EXP bits travel through the
core, they may or may not be modified by the intermediate devices on the network. The Provider Edge at
egress copies the EXP bits to the DSCP bits of the newly exposed IP packet.
Pipe mode: Pipe mode of transferring packets operates on two layers of QoS. An underlying QoS for the data
that remains unchanged when traversing the core. A per-core QoS, which is separate from that of the underlying
IP packets. The DSCP information is saved and stored as the packet travels through the MPLS network. The
MPLS EXP label is applied by the PE at ingress but the IP precedence bits are not stored. At egress, the
original IP precedence value is preserved.

Benefits of MPLS EXP Classification and Marking


If a service provider does not want to modify the value of the IP precedence field in packets transported
through the network, they can use the MPLS EXP field value to classify and mark IP packets.
By choosing different values for the MPLS EXP field, you can mark critical packets so that those packets
have priority if network congestion occurs.

How to Configure MPLS QoS


This section provides information about how to configure MPLS QoS:

Classifying MPLS Encapsulated Packets


You can use the match mpls experimental topmost command to define traffic classes based on the packet
EXP values, inside the MPLS domain. You can use these classes to define services policies to mark the EXP
traffic using the police command.

Configuring MPLS QoS


3
Configuring MPLS QoS
Marking MPLS EXP on the Outermost Label

Procedure

Command or Action Purpose


Step 1 enable Enables privileged EXEC mode.
Example: • Enter your password if prompted.

Device> enable

Step 2 configure terminal Enters global configuration mode.


Example:

Device# configure terminal

Step 3 class-map [match-all | match-any] Creates a class map to be used for matching
class-map-name traffic to a specified class, and enters class-map
configuration mode.
Example:
• Enter the class map name.
Device(config)# class-map exp3

Step 4 match mpls experimental topmost Specifies the match criteria.


mpls-exp-value
Note The match mpls experimental
Example: topmost command classifies traffic on
the basis of the EXP value in the
Device(config-cmap)# match mpls topmost label header.
experimental topmost 3

Step 5 end (Optional) Returns to privileged EXEC mode.


Example:

Device(config-cmap)# end

Marking MPLS EXP on the Outermost Label


Perform this task to set the value of the MPLS EXP field on imposed label entries.

Before you begin


In typical configurations, marking MPLS packets at imposition is used with ingress classification on IP ToS
or CoS fields.

Note For IP imposition marking, the IP precedence value is copied to the MPLS EXP value by default.

Configuring MPLS QoS


4
Configuring MPLS QoS
Marking MPLS EXP on the Outermost Label

Note The egress policy on provider edge works with MPLS EXP class match, only if there is a remarking policy
at ingress. The provider edge at ingress is an IP interface and only DSCP value is trusted by default. If you
do not configure remarking policy at ingress the label for queueing is generated based on DSCP value and
not MPLS EXP value. However, a transit provider router works without configuring remarking policy at
ingress as the router works on MPLS interfaces.

Note The set mpls experimental imposition command works only on packets that have new or additional MPLS
labels added to them.

Procedure

Command or Action Purpose


Step 1 enable Enables privileged EXEC mode.
Example: • Enter your password if prompted.

Device> enable

Step 2 configure terminal Enters global configuration mode.


Example:

Device# configure terminal

Step 3 policy-map policy-map-name Specifies the name of the policy map to be


created and enters policy-map configuration
Example:
mode.
Device(config)# policy-map mark-up-exp-2 • Enter the policy map name.

Step 4 class class-map-name Creates a class map to be used for matching


traffic to a specified class, and enters class-map
Example:
configuration mode.
Device(config-pmap)# class prec012 • Enter the class map name.

Step 5 set mpls experimental imposition Sets the value of the MPLS EXP field on top
mpls-exp-value label.
Example:

Device(config-pmap-c)# set mpls


experimental imposition 2

Step 6 end (Optional) Returns to privileged EXEC mode.


Example:

Configuring MPLS QoS


5
Configuring MPLS QoS
Marking MPLS EXP on Label Switched Packets

Command or Action Purpose

Device(config-pmap-c)# end

Marking MPLS EXP on Label Switched Packets


Perform this task to set the MPLS EXP field on label switched packets.

Before you begin

Note The set mpls experimental topmost command marks EXP for the outermost label of MPLS traffic. Due to
this marking at ingress policy, the egress policy must include classification based on the MPLS EXP values.

Procedure

Command or Action Purpose


Step 1 enable Enables privileged EXEC mode.
Example: • Enter your password if prompted.

Device> enable

Step 2 configure terminal Enters global configuration mode.


Example:

Device# configure terminal

Step 3 policy-map policy-map-name Specifies the name of the policy map to be


created and enters policy-map configuration
Example:
mode.
Device(config)# policy-map mark-up-exp-2 • Enter the policy map name.

Step 4 class class-map-name Creates a class map to be used for matching


traffic to a specified class, and enters class-map
Example:
configuration mode.
Device(config-pmap)# class-map exp012 • Enter the class map name.

Step 5 set mpls experimental topmost Sets the MPLS EXP field value in the topmost
mpls-exp-value label on the output interface.
Example:

Device(config-pmap-c)# set mpls


experimental topmost 2

Configuring MPLS QoS


6
Configuring MPLS QoS
Configuring Conditional Marking

Command or Action Purpose


Step 6 end (Optional) Returns to privileged EXEC mode.
Example:

Device(config-pmap-c)# end

Configuring Conditional Marking


To conditionally set the value of the MPLS EXP field on all imposed label, perform the following task:

Before you begin

Note The set-mpls-exp-topmost-transmit action affects MPLS encapsulated packets only. The
set-mpls-exp-imposition-transmit action affects any new labels that are added to the packet.

Procedure

Command or Action Purpose


Step 1 enable Enables privileged EXEC mode.
Example: • Enter your password if prompted.

Device> enable

Step 2 configure terminal Enters global configuration mode.


Example:

Device# configure terminal

Step 3 policy-map policy-map-name Specifies the name of the policy map to be


created and enters policy-map configuration
Example:
mode.
Device(config)# policy-map ip2tag • Enter the policy map name.

Step 4 class class-map-name Creates a class map to be used for matching


traffic to a specified class, and enters
Example:
policy-map class configuration mode.
Device(config-pmap)# class iptcp • Enter the class map name.

Step 5 police cir bps bc pir bps be Defines a policer for classified traffic and enters
policy-map class police configuration mode.
Example:

Device(config-pmap-c)# police cir 1000000


pir 2000000

Configuring MPLS QoS


7
Configuring MPLS QoS
Configuring WRED for MPLS EXP

Command or Action Purpose


Step 6 conform-action transmit Defines the action to take on packets that
conform to the values specified by the policer.
Example:
• In this example, if the packet conforms to
Device(config-pmap-c-police)# the committed information rate (cir) or is
conform-action transmit 3 within the conform burst (bc) size, the
MPLS EXP field is set to 3.

Step 7 exceed-action set-mpls-exp-topmost-transmit Defines the action to take on packets that exceed
exp table table-map-name the values specified by the policer.
Example:

Device(config-pmap-c-police)#
exceed-action
set-mpls-exp-topmost-transmit exp table
dscp2exp

Step 8 violate-action drop Defines the action to take on packets whose rate
exceeds the peak information rate (pir) and is
Example:
outside the bc and be ranges.
Device(config-pmap-c-police)# • You must specify the exceed action before
violate-action drop you specify the violate action.
• In this example, if the packet rate exceeds
the pir rate and is outside the bc and be
ranges, the packet is dropped.

Step 9 end (Optional) Returns to privileged EXEC mode.


Example:

Device(config-pmap-c-police)# end

Configuring WRED for MPLS EXP


Perform this task to enable WRED for MPLS EXP.

Procedure

Command or Action Purpose


Step 1 enable Enables privileged EXEC mode.
Example: • Enter your password if prompted.
Device> enable

Step 2 configure terminal Enters global configuration mode.


Example:

Configuring MPLS QoS


8
Configuring MPLS QoS
Configuration Examples for MPLS QoS

Command or Action Purpose

Device# configure terminal

Step 3 policy-map policy-map-name Specifies the name of the policy map to be


created and enters policy-map configuration
Example:
mode.
Device(config)# policy-map wred_exp • Enter the policy map name.

Step 4 class class-map-name Creates a class map to be used for matching


traffic to a specified class, and enters class-map
Example:
configuration mode.
Device(config-pmap)# class exp • Enter the class map name.

Step 5 bandwidth{kbps|remainingpercentage|percentperce Specify either the bandwidth allocated for a


ntage} class belonging to a policy map or the traffic
shaping.
Example:

Device(config-pmap-c)# bandwidth percent


30

Step 6 random-detect{aggregate|dscp-based|cos-based|dscp|dscp-based|exp|mpsl-exp-based|prec-based|precedence|precedence-based} Configures WRED to use the MPLS EXP value


when it calculates the drop probability for the
Example:
packet.
Device(config-pmap-c)# random-detect
mpls-exp- based

Step 7 random-detectexpexp-valuepercentmin-threshold Specifies the MPLS EXP value, minimum and


max-threshold maximum thresholds, in percentage.
Example:

Device(config-pmap-c)# random-detect exp


1 10 20
Device(config-pmap-c)# random-detect exp
2 30 40
Device(config-pmap-c)# random-detect exp
2 40 80

Step 8 end (Optional) Returns to privileged EXEC mode.


Example:

Device(config-pmap-c-police)# end

Configuration Examples for MPLS QoS


This section provides configuration examples for MPLS QoS:

Configuring MPLS QoS


9
Configuring MPLS QoS
Example: Classifying MPLS Encapsulated Packets

Example: Classifying MPLS Encapsulated Packets

Defining an MPLS EXP Class Map


The following example defines a class map named exp3 that matches packets that contains MPLS
experimental value 3:
Device(config)# class-map exp3
Device(config-cmap)# match mpls experimental topmost 3
Device(config-cmap)# exit

Defining a Policy Map and Applying the Policy Map to an Ingress Interface
The following example uses the class map created in the example above to define a policy map. This
example also applies the policy map to a physical interface for ingress traffic.
Device(config)# policy-map change-exp-3-to-2
Device(config-pmap)# class exp3
Device(config-pmap-c)# set mpls experimental topmost 2
Device(config-pmap)# exit
Device(config)# interface GigabitEthernet 0/0/0
Device(config-if)# service-policy input change-exp-3-to-2
Device(config-if)# exit

Defining a Policy Map and Applying the Policy Map to an Egress Interface
The following example uses the class map created in the example above to define a policy map. This
example also applies the policy map to a physical interface for egress traffic.
Device(config)# policy-map WAN-out
Device(config-pmap)# class exp3
Device(config-pmap-c)# shape average 10000000
Device(config-pmap-c)# exit
Device(config-pmap)# exit
Device(config)# interface GigabitEthernet 0/0/0
Device(config-if)# service-policy output WAN-out
Device(config-if)# exit

Example: Marking MPLS EXP on Outermost Label

Defining an MPLS EXP Imposition Policy Map


The following example defines a policy map that sets the MPLS EXP imposition value to 2 based
on the IP precedence value of the forwarded packet:
Device# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Device(config)# class-map prec012
Device(config-cmap)# match ip prec 0 1 2
Device(config-cmap)# exit
Device(config)# policy-map mark-up-exp-2
Device(config-pmap)# class prec012
Device(config-pmap-c)# set mpls experimental imposition 2

Configuring MPLS QoS


10
Configuring MPLS QoS
Example: Marking MPLS EXP on Label Switched Packets

Device(config-pmap-c)# exit
Device(config-pmap)# exit

Applying the MPLS EXP Imposition Policy Map to a Main Interface


The following example applies a policy map to Gigabit Ethernet interface 0/0/0:
Device# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Device(config)# interface GigabitEthernet 0/0/0
Device(config-if)# service-policy input mark-up-exp-2
Device(config-if)# exit

Example: Marking MPLS EXP on Label Switched Packets

Defining an MPLS EXP Label Switched Packets Policy Map


The following example defines a policy map that sets the MPLS EXP topmost value to 2 according
to the MPLS EXP value of the forwarded packet:
Device# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Device(config)# class-map exp012
Device(config-cmap)# match mpls experimental topmost 0 1 2
Device(config-cmap)# exit
Device(config-cmap)# policy-map mark-up-exp-2
Device(config-pmap)# class exp012
Device(config-pmap-c)# set mpls experimental topmost 2
Device(config-pmap-c)# exit
Device(config-pmap)# exit

Applying the MPLS EXP Label Switched Packets Policy Map to a Main Interface
The following example shows how to apply the policy map to a main interface:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Device(config)# interface GigabitEthernet 0/0/0
Device(config-if)# service-policy input mark-up-exp-2
Device(config-if)# exit

Example: Configuring Conditional Marking


The example in this section creates a policer for the iptcp class, which is part of the ip2tag policy
map, and attaches the policy map to the Gigabit Ethernet interface.

Device(config)# policy-map ip2tag


Device(config-pmap)# class iptcp
Device(config-pmap-c)# police cir 1000000 pir 2000000
Device(config-pmap-c-police)# conform-action transmit
Device(config-pmap-c-police)# exceed-action set-mpls-exp-imposition-transmit 2
Device(config-pmap-c-police)# violate-action drop

Configuring MPLS QoS


11
Configuring MPLS QoS
Example: Configuring WRED for MPLS EXP

Device(config-pmap-c-police)# exit
Device(config-pmap-c)# exit
Device(config-pmap)# exit
Device(config)# interface GigabitEthernet 0/0/1
Device(config-if)# service-policy input ip2tag

Example: Configuring WRED for MPLS EXP


The example in this section enables WRED for MPLS EXP.
Device# configure terminal
Device(config)# policy-map wred_exp
Device(config-pmap-c)# bandwidth percent 30
Device(config-pmap-c)# random-detect mpls-exp-based
Device(config-pmap-c)# random-detect exp 1 10 20
Device(config-pmap-c)# random-detect exp 2 30 40
Device(config-pmap-c)# random-detect exp 2 40 80

Displaying WRED threshold labels


Use the show policy-mappolicy-map-name command to verify WRED Configuration for MPLS
EXP.
The following sample output displays WRED threshold labels.
Device# show policy-map wred_exp
Policy Map wred_exp
Class exp
bandwidth 30 (%)
percent-based wred, exponential weight 9
exp min-threshold max-threshold
--------------------------------------
0 - -
1 10 20
2 30 40
3 40 80
4 - -
5 - -
6 - -
7 - -

Additional References
Related Documents

Related Topic Document Title

QoS commands Cisco IOS Quality of Service Solutions Command Reference

Configuring MPLS QoS


12
Configuring MPLS QoS
Feature History for QoS MPLS EXP

Feature History for QoS MPLS EXP


This table provides release and related information for features explained in this module.
These features are available on all releases subsequent to the one they were introduced in, unless noted
otherwise.

Release Feature Feature Information

Cisco IOS XE Everest 16.5.1a QoS MPLS EXP The QoS EXP Matching feature
allows you to classify, mark and
queue network traffic by modifying
the Multiprotocol Label Switching
(MPLS) experimental bits (EXP)
field.

Cisco IOS XE Amsterdam 17.3.1 MPLS QoS - WRED Introduces support for weighted
random early detection (WRED) in
MPLS Quality of Service (QoS).
This feature configures WRED to
use the MPLS experimental bits
(EXP) to calculate the drop
probability of a packet.

Use Cisco Feature Navigator to find information about platform and software image support. To access Cisco
Feature Navigator, go to http://www.cisco.com/go/cfn.

Configuring MPLS QoS


13
Configuring MPLS QoS
Feature History for QoS MPLS EXP

Configuring MPLS QoS


14

You might also like