Cisco Nexus 7000 Series NX-OS MPLS Configuration Guide
Configuring MPLS Quality of Service
Downloads: This chapterpdf (PDF - 545.0KB) The complete bookPDF (PDF - 13.46MB) | Feedback

Table of Contents

Configuring MPLS Quality of Service

Information About MPLS QoS

MPLS QoS Terminology

MPLS QoS Features

MPLS Experimental Field

Trust

Classification

Policing and Marking

Preserving IP ToS

EXP Mutation

MPLS DiffServ Tunneling

MQC CLI

Topology and Roles

LERs at the Ingress Edge of an MPLS Network

LSRs at the Core of an MPLS Network

LERs at the Egress Edge of an MPLS Network

MPLS QoS Classification at the Edges and the Core

IP to MPLS

MPLS to MPLS

MPLS to IP

MPLS DiffServ Tunneling Modes

MPLS QoS and HA

Licensing Requirements for MPLS QoS

Prerequisites for MPLS QoS

Guidelines and Limitations for MPLS QoS

Default Settings for MPLS QoS

Configuring MPLS QoS

Con figuring a Class Map to Classify MPLS Packets

Con figuring a Policy Map

Configuring a Policy Map to Set the EXP Value on All Imposed Labels

Configuring a Policy Map Using the Police Command

Configuring a Policy Map Using Table Maps

Creating a Table Map

Verifying the MPLS QoS Configuration

Configuration Examples for MPLS QoS

Example: Configuring a Class Map to Classify MPLS Packets

Example: Configuring a Policy Map to Set the EXP Value on All Imposed Labels

Example: Configuring a Policy Map Using the Police Command

Example: Configuring a Policy Map Using Table Maps

Additional References for MPLS QoS

Related Document

MIBs

Feature History for MPLS QoS

Configuring MPLS Quality of Service

 

This chapter describes how to configure Multiprotocol Label Switching (MPLS) quality of service (QoS) on Cisco NX-OS devices.

This chapter includes the following sections:

Information About MPLS QoS

MPLS QoS enables you to provide differentiated types of service across an MPLS network. Differentiated types of service satisfy a range of requirements by supplying the service specified for each packet.


Note QoS allows you to classify the network traffic, police and prioritize the traffic flow, and provide congestion avoidance. For general information about QoS in Cisco NX-OS, see the Cisco Nexus 7000 Series NX-OS Quality of Service Configuration Guide.


This section includes the following topics:

MPLS QoS Terminology

This section defines some MPLS QoS terminology:

  • Class of Service (CoS) refers to three bits in an 802.1Q header that are used to indicate the priority of the Ethernet frame as it passes through a switched network. The CoS bits in the 802.1Q header are commonly referred to as the 802.1p bits. To maintain QoS when a packet traverses both Layer 2 and Layer 3 domains, the type of service (ToS) and CoS values can be mapped to each other.
  • Classification is the process used for selecting traffic to be marked for QoS.
  • Differentiated Services Code Point (DSCP) is the first six bits of the ToS byte in the IP header. DSCP is only present in an IP packet.
  • Disposition is the process of removing or popping one or more MPLS labels by the edge label switch router (LSR) when the packet is leaving an MPLS domain.
  • E-LSP is a label switched path (LSP) on which nodes infer the QoS treatment for MPLS packets exclusively from the experimental (EXP) bits in the MPLS header. Because the QoS treatment is inferred from the EXP (both class and drop precedence), several classes of traffic can be multiplexed onto a single LSP (use the same label). A single LSP can support up to eight classes of traffic because the EXP field is a 3-bit field.
  • EXP bits define the QoS treatment (per-hop behavior) that a node should give to a packet. It is the equivalent of the DiffServ Code Point (DSCP) in the IP network. A DSCP defines a class and drop precedence. The EXP bits are generally used to carry all the information encoded in the IP DSCP. In some cases, however, the EXP bits are used exclusively to encode the dropping precedence.
  • Frames carry traffic at Layer 2. Layer 2 frames carry Layer 3 packets.
  • IP precedence is the three most significant bits of the ToS byte in the IP header.
  • Imposition is the process of adding or imposing one or more MPLS labels by the edge LSR when the packet is entering an MPLS domain.
  • QoS tags are prioritization values carried in Layer 3 packets and Layer 2 frames. A Layer 2 CoS label can have a value ranging between zero for low priority and seven for high priority. A Layer 3 IP precedence label can have a value ranging between zero for low priority and seven for high priority. IP precedence values are defined by the three most significant bits of the 1-byte ToS byte. A Layer 3 DSCP label can have a value between 0 and 63. DSCP values are defined by the six most significant bits of the 1-byte IP ToS field.
  • LERs (label edge routers) are devices that impose and dispose of labels upon packets; LERs are also referred to as Provider Edge (PE) routers.
  • LSRs (label switching routers) are devices that forward traffic based upon labels present in a packet; LSRs are also referred to as Provider (P) routers.
  • Marking is the process of setting a Layer 3 DSCP value in a packet. Marking is also the process of choosing different values for the MPLS EXP field to mark packets so that they have the priority that they require during periods of congestion.
  • MQC is the Cisco Modular QoS command line interface (MQC) framework, which is a modular and highly extensible framework for deploying QoS.
  • Packets carry traffic at Layer 3.
  • Policing is limiting bandwidth used by a flow of traffic. Policing can mark or drop traffic.
  • Swapping is the process of replacing one or more MPLS labels by the LSR within an MPLS domain.

MPLS QoS Features

These topics describe the following MPLS QoS features that are supported in an MPLS network:

MPLS Experimental Field

MPLS Experimental Field

Setting the MPLS experimental (EXP) field value satisfies the requirement of operators who do not want the value of the IP precedence field modified within IP packets transported through their networks.

By choosing different values for the MPLS EXP field, you can mark packets so that packets have the priority that they require during periods of congestion.

By default, the three most significant bits of the DSCP are copied into the MPLS EXP field during imposition.You can mark the MPLS EXP bits with an MPLS QoS policy.

Trust

For received Layer 2 or Layer 3 MPLS packets, the router usually trusts the EXP value in the received topmost label. None of the following have any effect on MPLS packets:

  • Interface trust state
  • Port CoS value

Classification

Classification is the process that selects the traffic to be marked. Classification partitions traffic into multiple priority levels or classes of service. Traffic classification is the primary component of class-based QoS provisioning. The router makes classification decisions based on the EXP bits in the received topmost label of the received MPLS packets (after a policy is installed). For more information, see the “Configuring a Class Map to Classify MPLS Packets” section.

Policing and Marking

Policing causes traffic that exceeds the configured rate to be discarded or marked down to a higher drop precedence. Marking 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.

The MPLS QoS policing and marking features that you can implement depend on the received traffic type and the forwarding operation applied to the traffic. See the “Configuring a Policy Map” section for information.

Preserving IP ToS

The router automatically preserves the IP type of service (ToS) during all MPLS operations including imposition, swapping, and disposition.You do not need to enter a command to save the IP ToS.

EXP Mutation

You can configure a named egress EXP mutation map to mutate the internal DSCP-derived EXP value before it is used as the egress EXP value. You can attach egress EXP mutation maps to these interface types:

  • LAN port subinterfaces
  • Layer 3 VLAN interfaces
  • Layer 3 LAN ports

You cannot attach egress EXP mutation maps to these interface types:

  • Layer 2 LAN ports (ports that are configured with the switchport command)

MPLS DiffServ Tunneling

The router uses MPLS DiffServ tunneling to provide QoS transparency from one edge of a network to the other edge of the network. See the “MPLS DiffServ Tunneling Modes” section for more information.

MQC CLI

All policing and marking features available for MPLS QoS are managed from the modular QoS command-line interface (CLI). The modular QoS CLI (MQC) allows you to define traffic classes (class maps), create and configure traffic policies (policy maps), and then attach those traffic policies to interfaces.


Note For detailed information on configuring QoS in NX-OS using the MQC, see the Cisco Nexus 7000 Series NX-OS Quality of Service Configuration Guide.


Topology and Roles

This section describes the roles of network devices in implementing MPLS QoS.

Figure 1-1 shows an MPLS network of a service provider that connects two sites of a customer network.

Figure 1-1 MPLS Network Connecting Two Sites of a Customer’s IP Network

The network is bidirectional, but for the purpose of this document, the packets move left to right.

In Figure 1-1, the symbols have the following meanings:

  • CE1—Customer equipment 1
  • PE1—Service provider ingress LER
  • P1—LSR within the core of the network of the service provider
  • P2—LSR within the core of the network of the service provider
  • PE2—Service provider egress LER
  • CE2—Customer equipment 2

Note PE1 and PE2 are at the boundaries between the MPLS network and the IP network.


This section includes the following topics:

LERs at the Ingress Edge of an MPLS Network

LERs at the Ingress Edge of an MPLS Network


Note Incoming labels are aggregate or nonaggregate. The aggregate label indicates that the arriving MPLS or MPLS VPN packet must be switched through an IP lookup to find the next hop and the outgoing interface. The nonaggregate label indicates that the packet contains the IP next-hop information.


At the ingress edge of an MPLS network, LERs process packets as follows:

1. Layer 2 or Layer 3 traffic enters the edge of the MPLS network at the edge LER (PE1).

2. The router receives the traffic from the input interface and uses the 802.1p bits or the IP ToS bits to perform any classification, marking, and policing to derive the new EXP bits. For classification of incoming IP packets, the input service policy can also use access control lists (ACLs).

3. For each incoming packet, the router performs a lookup on the IP address to determine the next-hop router.

4. The appropriate label is pushed (imposition) into the packet, and the EXP value resulting from the QoS decision is copied into the MPLS EXP field in the label header.

5. The router forwards the labeled packets to the appropriate output interface for processing.

6. The router also forwards the 802.1p bits or the IP ToS bits to the output interface. The 802.1p bits or the IP ToS bits can be remarked by EXP bits in the topmost label.

7. The labeled packets (marked by EXP) are sent to the core MPLS network.

LSRs at the Core of an MPLS Network

At the core of an MPLS network, LSRs process packets as follows:

1. Incoming MPLS-labeled packets (and 802.1p bits or IP ToS bits) from an edge LER (or other core device) arrive at the core LSR.

2. The router receives the traffic from the input interface and uses the EXP bits to perform classification, marking, and policing.

3. The router performs a table lookup to determine the next-hop LSR.

4. An appropriate label is placed (swapped) into the packet and the MPLS EXP bits are copied into the label header.

5. The router forwards the labeled packets to the appropriate output interface for processing.

6. The router also forwards the 802.1p bits or the IP ToS bits to the output interface.

7. The outbound packet is differentiated by the MPLS EXP field for marking or policing.

8. The labeled packets (marked with EXP) are sent to another LSR in the core MPLS network or to an LER at the output edge.


Note Within the network, there is no IP precedence field for the queueing algorithm to use because the packets are MPLS packets. The packets remain MPLS packets until they arrive at PE2, the provider edge router.


LERs at the Egress Edge of an MPLS Network

At the egress edge of an MPLS network, LERs process packets as follows:

1. MPLS-labeled packets (and 802.1p bits or IP ToS bits) from a core LSR arrive at the egress LER (PE2) from the MPLS network backbone.

2. The router pops the MPLS labels (disposition) from the packets. Aggregate and nonaggregate labels are classified with the EXP value by default.

3. For aggregate labels, the router performs a lookup on the IP address to determine the packet’s destination; the router then forwards the packet to the appropriate output interface for processing. For nonaggregate labels, forwarding is based on the label. By default, nonaggregate labels are popped at the penultimate-hop router (next to last), not the egress PE router.

4. The router also forwards the 802.1p bits or the IP ToS bits to the output interface.

5. The packets are differentiated according to the 802.1p bits or the IP ToS bits and treated accordingly.


Note The MPLS EXP bits allow you to specify the QoS for an MPLS packet. The IP precedence and DSCP bits allow you to specify the QoS for an IP packet.


MPLS QoS Classification at the Edges and the Core

This section includes the following topics:

IP to MPLS

This section provides information about QoS features for LERs at the ingress (CE-to-PE) and egress (PE-to-CE) edges for MPLS and MPLS VPN networks. Both MPLS and MPLS VPN support general MPLS QoS features.

The router provides the following MPLS QoS capabilities at the IP-to-MPLS edge:

  • Assigning an EXP value based on the policy-map command
  • Marking an EXP value using a policy
  • Policing traffic using a policy

This section includes the following topics:

Classification for IP to MPLS

The router ingress and egress policies for IP traffic classify traffic on the original received IP using match commands for IP precedence, IP DSCP, and IP ACLs.

After the router applies the QoS policies, it assigns the internal DSCP. The router then assigns the EXP value based on the internal DSCP-to-EXP global map for the labels that it imposes. If more than one label is imposed, the EXP value is the same in each label. The router preserves the original IP ToS when the MPLS labels are imposed.

The router assigns the egress CoS based on the internal DSCP-to-CoS global map. If the default internal DSCP-to-EXP and the internal DSCP-to-CoS maps are consistent, then the egress CoS has the same value as the imposed EXP.

If the ingress port receives both IP-to-IP and IP-to-MPLS traffic, you use classification to separate the two types of traffic. For example, if the IP-to-IP and IP-to-MPLS traffic have different destination address ranges, you can classify traffic on the destination address, apply IP ToS policies to the IP-to-IP traffic, and apply a policy (that marks or sets the EXP value in the imposed MPLS header) to the IP-to-MPLS traffic. See the following two examples:

• A router policy to mark IP ToS sets the internal DSCP—If it is applied to all traffic, then for IP-to-IP traffic, the egress port rewrites the CoS (derived from the internal DSCP) to the IP ToS byte in the egress packet. For IP-to-MPLS traffic, the router maps the internal DSCP to the imposed EXP value.

  • A router policy to mark MPLS EXP sets the internal DSCP—If it is applied to all traffic, then for IP-to-IP traffic, the egress port rewrites the IP ToS according to the ingress IP policy (or trust). The CoS is mapped from the ToS. For IP-to-MPLS traffic, the router maps the internal DSCP to the imposed EXP value.

Classification for IP-to-MPLS Mode MPLS QoS

MPLS QoS at the ingress to PE1 supports the following:

  • Matching on IP precedence or DSCP values or filtering with an access group
  • The set mpls experimental imposition and police commands

MPLS QoS at the egress of PE1 supports the mpls experimental topmost command.

Classification at IP-to-MPLS Ingress Port

Classification for IP to MPLS is the same as for IP to IP. Port classification is based on the received Layer 2 802.1Q CoS value.

Classification at IP-to-MPLS Egress Port

Port classification is based on the received EXP value, and the egress CoS value is mapped from that value.

If the egress port is a trunk, the ports copy the egress CoS into the egress 802.1Q field.

MPLS to MPLS

This section provides information about MPLS QoS features for LSRs at the core (MPLS to MPLS) for MPLS and MPLS VPN networks.

MPLS QoS at the MPLS core supports the following:

  • Per-EXP policing based on a service policy
  • Copying the input topmost EXP value into the newly imposed EXP value
  • Optional EXP mutation (changing of EXP values on an interface edge between two neighboring MPLS domains) on the egress boundary between MPLS domains
  • Optional propagation of the topmost EXP value into the underlying EXP value when popping the topmost label from a multilabel stack.

This section includes the following topics:

Classification for MPLS to MPLS

For received MPLS packets, the router trusts the EXP value in the topmost label.


Note The MPLS QoS ingress and egress policies for MPLS traffic classify traffic on the EXP value in the received topmost label when you enter the match mpls experimental command.


MPLS QoS maps the EXP value to the internal DSCP using the EXP-to-DSCP global map. What the router does next depends on whether it is swapping labels, imposing a new label, or popping a label:

  • Swapping labels—When swapping labels, the router preserves the EXP value in the received topmost label and copies it to the EXP value in the outgoing topmost label. The router assigns the egress CoS using the internal DSCP-to-CoS global map. If the DSCP global maps are consistent, then the egress CoS is based on the EXP in the outgoing topmost label.

The router can mark down out-of-profile traffic using the police command’s exceed and violate actions. It does not mark in-profile traffic, so the conform action must be transmitted and the set command cannot be used. If the router is performing a markdown, it uses the internal DSCP as an index into the internal DSCP markdown map. The router maps the result of the internal DSCP markdown to an EXP value using the internal DSCP-to-EXP global map. The router rewrites the new EXP value to the topmost outgoing label and does not copy the new EXP value to the other labels in the stack. The router assigns the egress CoS using the internal DSCP-to-CoS global map. If the DSCP maps are consistent, then the egress CoS is based on the EXP value in the topmost outgoing label.

  • Imposing an additional label—When imposing a new label onto an existing label stack, the router maps the internal DSCP to the EXP value in the imposed label using the internal DSCP-to-EXP map. It then copies the EXP value in the imposed label to the underlying swapped label. The router assigns the egress CoS using the internal DSCP-to-CoS global map. If the DSCP maps are consistent, the egress CoS is based on the EXP value in the imposed label.

The router can mark in-profile and mark down out-of-profile traffic. After it marks the internal DSCP, the router uses the internal DSCP-to-EXP global map to map the internal DSCP to the EXP value in the newly imposed label. The router then copies the EXP in the imposed label to the underlying swapped label. The router assigns the egress CoS using the internal DSCP-to-CoS global map. Therefore, the egress CoS is based on the EXP in the imposed label.

  • Popping a label—When popping a label from a multi-label stack, the router preserves the EXP value in the exposed label. The router assigns the egress CoS using the internal DSCP-to-CoS global map. If the DSCP maps are consistent, then the egress CoS is based on the EXP value in the popped label.
  • If EXP propagation is configured for the egress interface, the router maps the internal DSCP to the EXP value in the exposed label using the DSCP-to-EXP global map. The router assigns the egress CoS using the internal DSCP-to-CoS global map. If the DSCP maps are consistent, the egress CoS is based on the EXP value in the exposed label.

Classification for MPLS-to-MPLS QoS

MPLS QoS at the ingress to P1 or P2 supports the following:

  • Matching with the mpls experimental topmost command
  • The set mpls experimental imposition , police , and police with set imposition commands

MPLS QoS at the egress of P1 or P2 supports matching with the mpls experimental topmost command.

Classification at MPLS-to-MPLS Ingress Port

Port classification is based on the ingress CoS from the router.

Classification at MPLS-to-MPLS Egress Port

Port classification is based on the egress CoS value from the router.

If the egress port is a trunk, the LAN ports copy the egress CoS into the egress 802.1Q field.

MPLS to IP

This section provides information about QoS features for LERs at the egress (PE-to-CE) edges for MPLS and MPLS VPN networks. Both MPLS and MPLS VPN support general MPLS QoS features.

MPLS QoS supports these capabilities at the MPLS-to-IP edge:

  • Option to propagate the EXP value into IP DSCP on exit from an MPLS domain per egress interface
  • Option to use IP service policy on the MPLS-to-IP egress interface

This section includes the following topics:

Classification for MPLS to IP

The router assigns the internal DSCP (internal priority that the router assigns to each frame) based on the QoS result. The QoS result is affected by the following:

• Default trust EXP value

  • Number of VPNs

• Explicit NULL use

  • QoS policy

The router does one of the following:

  • Preserves the underlying IP ToS
  • Rewrites the IP ToS by a value derived from the EXP-to-DSCP global map
  • Changes the IP ToS to any value derived from the egress IP policy

In all cases, egress queueing is based on the final IP ToS from the DSCP-to-CoS map.

For incoming MPLS packets on the PE-to-CE ingress, the router supports MPLS classification and ingress IP policies. The PE-to-CE traffic from the MPLS core is classified or policed on egress as IP.

Classification for MPLS-to-IP MPLS QoS

MPLS QoS at the ingress to PE2 supports matching on the EXP value and the police command.

MPLS QoS at the egress of PE2 supports matching on the IP precedence, DSCP values, or filtering with an access group and the police command.

Classification at MPLS-to-IP Ingress Port

Ingress port classification is based on the EXP value.

Classification at MPLS-to-IP Egress Port

Classification for MPLS to IP is the same as it is for IP to IP.

Egress port classification is based on the egress CoS.

If the egress port is a trunk, the ports copy the egress CoS into the egress 802.1Q field.


Note For MPLS to IP, egress IP ACL or QoS is not effective on the egress interface if the egress interface has MPLS IP (or tag IP) enabled. The exception is a VPN CAM hit, where the packet is classified on egress as IP.


MPLS DiffServ Tunneling Modes

Tunneling provides QoS the ability to be transparent from one edge of a network to the other edge of the network. A tunnel starts where there is label imposition. A tunnel ends where there is label disposition; that is, where the label is removed from the stack, and the packet goes out as an MPLS packet with a different per-hop behavior (PHB) layer underneath or as an IP packet with the IP PHB layer.

For the MPLS router, there are two ways to forward packets through a network:

  • Short Pipe or Pipe mode—EXP marking implemented in the core does not propagate to the packet ToS byte. In Short Pipe mode, the egress PE router uses the original Layer 3 packet marking instead of the marking used by the intermediate provider (P) routers. In Pipe mode, the egress PE router uses the Layer 2 marking of the intermediate provider (P) routers.
  • Uniform mode—EXP marking implemented in the core is propagated to the underlying ToS byte. In Uniform mode, you can manipulate the marking in the IP packet to reflect the operator’s QoS marking in the core. This mode provides consistent QoS classification and marking throughout the network including the CE and core routers.

Both tunneling modes affect the behavior of edge and penultimate LSRs where labels are put onto packets and removed from packets. They do not affect label swapping at intermediate routers. An operator can choose different types of tunneling modes for each customer.

For additional information, see MPLS DiffServ Tunneling Modes at this URL: http://www.cisco.com/en/US/docs/ios/12_2t/12_2t13/feature/guide/ftdtmode.html

MPLS QoS and HA

The Cisco NX-OS architecture and High Availability (HA) infrastructure provide support for feature components to be restarted and resume operations transparently to other services on the device and on neighboring devices. This feature allows for continuous operation and zero data loss during planned software changes and unplanned software failures.

MPLS QoS supports these Cisco NX-OS HA features:

  • Nonstop forwarding (NSF)
  • Stateful HA

MPLS QoS supports these Cisco NX-OS HA technologies to allow NSF and stateful HA:

  • Stateful process restart
  • Stateful switch over (SSO)
  • In-Service Software Upgrade (ISSU)

Licensing Requirements for MPLS QoS

 

Product
License Requirement

Cisco NX-OS

MPLS QoS requires an MPLS license. For a complete explanation of the Cisco NX-OS licensing scheme and how to obtain and apply licenses, see the Cisco NX-OS Licensing Guide.

Prerequisites for MPLS QoS

MPLS QoS has the following prerequisites:

• Your network must support Multiprotocol Label Switching (MPLS)

• Your network must support at least one of the following Interior Gateway (IGP) protocols:

Intermediate System-to-Intermediate System (IS-IS)

Open Shortest Path First (OSPF)

Guidelines and Limitations for MPLS QoS

MPLS QoS has the following configuration guidelines and limitations:

  • There is no global command to enable or disable MPLS QoS. If no QoS polices are configured, the switch follows the default behavior described in this section.
  • For IP-to-MPLS imposition when the received packet is an IP packet, the following applies:

When no QoS polices are configured, the EXP value is based on the received IP ToS.

  • For MPLS-to-MPLS operations, the following applies:

When swapping and no QoS polices are configured, the EXP value is based on the original EXP value (in the absence of EXP mutation).

When swapping and QoS is queuing only, the EXP value is based on the original EXP value (in the absence of EXP mutation).

When imposing an additional label and no QoS polices are configured, the EXP value is based on the original EXP value (in the absence of EXP mutation).

When imposing an additional label and QoS is queuing only, the EXP value is based on the original EXP value (in the absence of EXP mutation).

When popping one label and no QoS polices are configured, the EXP value is based on the underlying EXP value.

When popping one label and QoS is queuing only, the EXP value is based on the underlying EXP value.

  • For classifying MPLS packets with class maps, the following applies:

The match mpls experimental command specifies the name of an EXP field value to be used as the match criterion against which packets are checked to determine if they belong to the class specified by the class map.

To use the match mpls experimental command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. After you identify the class, you can use the match mpls experimental command to configure its match criteria.

If you specify more than one command in a class map, only the last command entered applies. The last command overrides the previously entered commands.

• When configuring a policy map, the following applies:

You can attach only one policy map of a given type to an interface in a specific direction.

• When setting the EXP value on all imposed labels, the following applies:

Use the set mpls experimental imposition command during label imposition. This command sets the MPLS EXP field on all imposed label entries.

The set mpls experimental imposition command is supported only on input interfaces (imposition).

The set mpls experimental imposition command does not mark the EXP value directly; instead, it marks the internal DSCP that is mapped to EXP through the internal DSCP-to-EXP global map.

It is important to note that classification (based on the original received IP header) and marking (done to the internal DSCP) do not distinguish between IP-to-IP traffic and IP-to-MPLS traffic. The commands that you use to mark IP ToS and mark EXP have the same result as when you mark the internal DSCP.

Use the set mpls experimental imposition command to set the pushed label entry value to a value that is different from the default value during label imposition.

You optionally can use the set mpls experimental imposition command with the IP precedence, DSCP field, or QoS IP ACL to set the value of the MPLS EXP field on all imposed label entries.

When imposing labels onto the received IP traffic, you can mark the EXP field using the set mpls experimental imposition command.

• When using the police command to configure a policy map, the following applies:

With MPLS, the exceed-action action command and the violate-action action command work similarly to IP usage. The packet might get dropped or the EXP value is marked down.

When swapping labels for received MPLS traffic, you can mark down out-of-profile traffic using the police command exceed-action policed-dscp-transmit and violate-action policed-dscp-transmit keywords. The router does not mark in-profile traffic; when marking down out-of-profile traffic, the router marks the outgoing topmost label. The router does not propagate the marking down through the label stack.

You can use the police command to set the pushed label entry value to a value that is different from the default value during label imposition.

When imposing labels onto the received IP traffic, you can mark the EXP field using the conform-action set-mpls-exp-imposition-transmit keywords.

  • Before you downgrade from Cisco NX-OS Release 5.2 or later to an earlier Cisco NX-OS release, clear the QoS MIB and MPLS QoS defaults using the clear qos mpls-snmp command. Otherwise, the downgrade might fail.
  • When you configure a partial queueing policy such as the set mpls-exp-topmost cos table exp-cos-map command on a default queue, only the MPLS configuration is programmed in the hardware. Other parameters in the hardware, such as queue limits, bandwidth, and thresholds, retain the previously applied configuration. When the line card is reloaded, previously applied configuration parameters are not retained because new policy parameters are absent for the queue limits, bandwidth, and thresholds. As a result, some hardware parameters might be different before and after the reload. To address this problem, define parameters like queue limits, bandwidth, and thresholds for class maps along with the MPLS configuration to copy the EXP bits to cos.

Default Settings for MPLS QoS

Table 1-1 lists the default settings for MPLS QoS parameters.

 

Table 1-1 Default Settings for MPLS QoS

Parameters
Default

Port CoS value

0 (zero)

Port-based or VLAN-based QoS

Port-based

EXP to DSCP map
(DSCP set from EXP values)

EXP 0 = DSCP 0
EXP 1 = DSCP 8
EXP 2 = DSCP 16
EXP 3 = DSCP 24
EXP 4 = DSCP 32
EXP 5 = DSCP 40
EXP 6 = DSCP 48
EXP 7 = DSCP 56

IP precedence to DSCP map
(DSCP set from IP precedence values)

IP precedence 0 = DSCP 0
IP precedence 1 = DSCP 8
IP precedence 2 = DSCP 16
IP precedence 3 = DSCP 24
IP precedence 4 = DSCP 32
IP precedence 5 = DSCP 40
IP precedence 6 = DSCP 48
IP precedence 7 = DSCP 56

DSCP to EXP map
(EXP set from DSCP values)

DSCP 0–7 = EXP 0
DSCP 8–15 = EXP 1
DSCP 16–23 = EXP 2
DSCP 24–31 = EXP 3
DSCP 32–39 = EXP 4
DSCP 40–47 = EXP 5
DSCP 48–55 = EXP 6
DSCP 56–63 = EXP 7

Marked-down DSCP from DSCP map

Marked-down DSCP value equals original DSCP value (no mark down)

EXP mutation map

No mutation map by default

Policers

None

Policy maps

None

MPLS flow mask in NetFlow table

Label and EXP value

MPLS core QoS

There are four possibilities at the MPLS core QoS:

  • Swapping—The incoming EXP field is copied to the outgoing EXP field.
  • Swapping and imposition—The incoming EXP field is copied to both the swapped EXP field and the imposed EXP field.
Note If there is a service policy with a set for EXP field, its EXP field is placed into the imposed label and also into the swapped label.

  • Disposition of topmost label—The exposed EXP field is preserved.
  • Disposition of only label—The exposed IP DSCP is preserved.

MPLS to IP edge QoS

Preserve the exposed IP DSCP

Configuring MPLS QoS


Note You can configure MPLS QoS commands inside a config session.


This section include the following topics:

Configuring a Class Map to Classify MPLS Packets

You can configure a class map.

SUMMARY STEPS

1. configure terminal

2. [ no ] class-map [ type qos ] [match-any] class-map-name

3. [ no ] match [ not ] mpls experimental topmost exp-list

DETAILED STEPS

Command
Purpose

Step 1

configure terminal

 

Example:

switch# configure terminal

switch(config)#

Enters global configuration mode.

Step 2

[ no ] class-map [ type qos ] [ match-any ] class-map-name

 

Example:

switch(config)# class-map type qos match-any Class2

switch(config-cmap-qos)#

Defines a class map, enters class-map configuration mode, and specifies the packet matching criteria as follows:

  • match-any —(Optional) Specifies that if a packet matches any of the policies of this class map, the class map is applied to the packet.

Step 3

[ no ] match [ not ] mpls experimental topmost exp-list

 

Example:

switch(config-cmap-qos)# match mpls experimental topmost 2, 5-7

Specifies that the packets should be matched (or not) on the 3-bit experimental (EXP) field in the outermost (topmost) MPLS label in the MPLS header as follows:

  • exp-list —The list can contain values and ranges. Values can range from 0 to 7.

Configuring a Policy Map to Set the EXP Value on All Imposed Labels

You can configure a policy map to set the EXP value on all imposed labels.

To set the value of the MPLS EXP field on all imposed label entries, use the set mpls experimental imposition command in QoS policy-map class configuration mode. To disable the setting, use the no form of this command.

SUMMARY STEPS

1. configure terminal

2. [ no ] policy-map [type qos ] policy-map-name

3. [ no ] class [ type qos ] { class-map-name | class-default} [ insert-before class-map-name ]

4. set mpls experimental imposition mpls-exp-value

DETAILED STEPS

Command
Purpose

Step 1

configure terminal

 

Example:

switch# configure terminal

switch(config)#

Enters global configuration mode.

Step 2

[ no ] policy-map [ type qos ] policy-map-name

 

Example:

switch(config)# policy-map Policy1

switch(config-pmap-qos)#

Defines a class map and enters class-map configuration mode.

Step 3

[ no ] class [ type qos ] { class-map-name | class-default } [insert-before class-map-name]

 

Example:

switch(config-pmap-qos)# class Class2

switch(config-pmap-c-qos)

Specifies the class name of the policy to create or change:

  • class-map-name —The name of the class to configure or modify the policy.
  • class-default —A predefined class to which traffic is directed if that traffic does not match any of the match criteria in the configured class maps.

Step 4

set mpls experimental imposition mpls-exp-value

 

Example:

switch(config-pmap-c-qos)# set mpls experimental imposition 3

Sets the value of the MPLS experimental (EXP) field on all imposed label entries.

Configuring a Policy Map Using the Police Command

Policing is a function in the router hardware that provides the ability to rate limit a particular traffic class to a specific rate. The router supports aggregate policing. Microflow policing is not supported.

Aggregate policing meters all traffic that ingresses into a port, regardless of the different source, destination, protocol, source port, or destination port.


Note For additional information about using the police command, see the Cisco Nexus 7000 Series NX-OS Quality of Service Configuration Guide.


SUMMARY STEPS

1. configure terminal

2. [ no ] policy-map [type qos ] policy-map-name

3. [ no ] class [ type qos ] { class-map-name | class-default}

4. [ no ] police [ cir ] { x [ bps | kbps | mbps | gbps ] | percent x-percent } [[ bc ] bc [ bytes | kbytes | mbytes | ms | us ]] [ pir y [ bps | kbps | mbps | gbps ] | percent y-percent ] [[ be ] be [ bytes | kbytes | mbytes | ms | us ]] [ conform conform-action [ exceed exceed-action [ violate violate-action ]]]

DETAILED STEPS

Command
Purpose

Step 1

configure terminal

 

Example:

switch# configure terminal

switch(config)#

Enters global configuration mode.

Step 2

[ no ] policy-map [ type qos ] policy-map-name

 

Example:

switch(config)# policy-map Policy1

switch(config-pmap-qos)

Defines a class map and enters class-map configuration mode.

Step 3

[ no ] class [ type qos ] { class-map-name | class-default }

 

Example:

switch(config-pmap-qos)# class Class2

switch(config-pmap-c-qos)

Specifies the class name of the policy to create or change:

  • class-map-name —The name of the class to configure or modify the policy.
  • class-default —A predefined class to which traffic is directed if that traffic does not match any of the match criteria in the configured class maps.

Step 4

[ no ] police [ cir ] { x [ bps | kbps | mbps | gbps ] | percent x-percent} [[bc ] bc [ bytes | kbytes | mbytes | ms | us ]] [ pir y [ bps | kbps | mbps | gbps ] | percent y-percent] [[be ] be [ bytes | kbytes | mbytes | ms | us]] [conform conform-action [ exceed exceed-action [ violate violate-action ]]]

 

Example:

switch(config-pmap-c-qos)# police cir 256000 conform set-mpls-exp-topmost-transmit violate drop

Specifies that a class of traffic should have a maximum rate imposed on it, and if that rate is exceeded, an immediate action must be taken.

In addition to the conform actions described in the Cisco Nexus 7000 Series NX-OS Quality of Service Configuration Guide , MPLS QoS provides two conform actions:

  • set-mpls-exp-imposition-transmit —Sets the EXP field on all imposed labels to a specified value and transmits the packet.
  • set-mpls-exp-topmost-transmit —Sets the EXP field on the outer (topmost) label to a specified value and transmits the packet.

Configuring a Policy Map Using Table Maps

You can use the system-defined table maps to perform marking in the set and police policy map class commands.


Note For general information about using table maps, see the Cisco Nexus 7000 Series NX-OS Quality of Service Configuration Guide.


SUMMARY STEPS

1. configure terminal

2. [ no ] policy-map [type qos ] policy-map-name

3. [ no ] class [ type qos ] { class-map-name | class-default}

4. [ no ] set to-field from-field table table-map-name

DETAILED STEPS

Command
Purpose

Step 1

configure terminal

 

Example:

switch# configure terminal

switch(config)#

Enters global configuration mode.

Step 2

[ no ] policy-map [ type qos ] policy-map-name

 

Example:

switch(config)# policy-map Policy1

switch(config-pmap-qos)

Defines a class map and enters class-map configuration mode.

Step 3

[ no ] class [ type qos ] { class-map-name | class-default }

 

Example:

switch(config-pmap-qos)# class Class2

switch(config-pmap-c-qos)

Specifies the class name of the policy to create or change:

  • class-map-name —The name of the class to configure or modify the policy.
  • class-default —A predefined class to which traffic is directed if that traffic does not match any of the match criteria in the configured class maps.

Step 4

set to-field from-field table table-map-name

 

Example:

switch(config-pmap-c-qos)# set cos mpls-exp-topmost table dscp-cos-map

Defines a mapping of values between two QoS fields.

In addition to the to-field and from-field arguments described in the Cisco Nexus 7000 Series NX-OS Quality of Service Configuration Guide , MPLS QoS provides the following fields:

  • to-field:

mpls-exp-topmost —The EXP field on the outer (topmost) label.

  • from-field:

mpls-exp-imposition —The EXP field to be applied on all imposed labels.

mpls-exp-topmost —The EXP field to be applied on the outer (topmost) label.

command.

Creating a Table Map

You can define a table that remaps QoS values for use in the set and police policy map class commands.


Note For additional information about table maps, see the Cisco Nexus 7000 Series NX-OS Quality of Service Configuration Guide.


SUMMARY STEPS

1. configure terminal

2. table-map table-map-name

3. from number to number

4. Repeat step 3 to complete table.

DETAILED STEPS

Command
Purpose

Step 1

configure terminal

 

Example:

switch# configure terminal

switch(config)#

Enters global configuration mode.

Step 2

table-map table-map-name

 

Example:

switch(config)# table-map TableMap1

switch(config-tmap)

Creates a table map and enters table map configuration mode.

Step 3

from number to number

 

Example:

switch(config-tmap)# from 1 to 1

switch(config-tmap)# from 2 to 1

switch(config-tmap)# from 3 to 2

switch(config-tmap)# from 4 to 2

...

Maps one number to another. The range of number is from 0 to 63. This step can repeat up to 64 times.

Step 4

Repeat Step 3 to complete table.

Verifying the MPLS QoS Configuration

To display the MPLS QoS configuration, perform the following task:

Command
Purpose

show policy-map type qos interface interface

Displays the statistics that show the packets matched for every class on that interface in the given direction.

Configuration Examples for MPLS QoS

This section includes the following configuration examples:

Example: Configuring a Class Map to Classify MPLS Packets

The following example shows how to create a class map to match EXP field values 2 and 5 through 7 on the outer (topmost) label of an MPLS header:

switch# configure terminal
switch(config)# class-map Class2
switch(config-cmap-qos)# match mpls experimental topmost 2, 5-7
 

Example: Configuring a Policy Map to Set the EXP Value on All Imposed Labels

The following example shows how to create a policy map to set the EXP field to a value of 3 on all imposed labels of an MPLS header:

switch# configure terminal
switch(config)# policy-map Policy1
switch(config-pmap-qos)# class Class2
switch(config-pmap-c-qos)# set mpls experimental imposition 3
 

Example: Configuring a Policy Map Using the Police Command

The following example shows how to create a policy map to enforce a committed data rate of 256000 bps. If the data rate is in conformance, the router sets the EXP field of the outer (topmost) label of the MPLS header. If the data rate is exceeded, the router drops packets.

switch# configure terminal
switch(config)# policy-map Policy1
switch(config-pmap-qos)# class Class2
switch(config-pmap-c-qos)# police cir 256000 conform set-mpls-exp-topmost-transmit violate drop
 

Example: Configuring a Policy Map Using Table Maps

The following example shows how to create a policy map that maps CoS values of 0 to 3 to an EXP field value of 1 and CoS values of 4 to 7 to an EXP field value of 6. The EXP value is then written to the outer (topmost) label of the MPLS header.

switch# configure terminal

switch(config)# table-map TableMap1

switch(config-tmap)# from 0 to 1

switch(config-tmap)# from 1 to 1

switch(config-tmap)# from 2 to 1

switch(config-tmap)# from 3 to 1

switch(config-tmap)# from 4 to 6

switch(config-tmap)# from 5 to 6

switch(config-tmap)# from 6 to 6

switch(config-tmap)# from 7 to 6

switch(config-tmap)# exit

switch(config)# policy-map Policy1
switch(config-pmap-qos)# class Class2

switch(config-pmap-c-qos)# set cos mpls-exp-topmost table TableMap1

 

Additional References for MPLS QoS

The following sections provide references related to the MPLS QoS feature.

Related Document

Related Topic
Document Title

Cisco NX-OS QoS configuration

Cisco Nexus 7000 Series NX-OS Quality of Service Configuration Guide

Cisco NX-OS MPLS QoS commands

Cisco Nexus 7000 Series NX-OS Quality of Service Command Reference

Cisco NX-OS MPLS commands

Cisco NX-OS Multiprotocol Label Switching Command Reference

MIBs

MIB
MIBs Link

No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs

Feature History for MPLS QoS

Table 1-2 lists the release history for this feature.

 

Table 1-2 Feature History for MPLS QoS

Feature Name
Releases
Feature Information

MPLS QoS

5.2(1)

This feature was introduced.