Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Combining CoS with MPLS on EX Series Switches

You can use class of service (CoS) within MPLS networks to prioritize certain types of traffic during periods of congestion. The CoS value is included within the MPLS label, which is passed through the network, enabling end-to-end CoS across the network.

MPLS services are often used to ensure better performance for low-latency applications such as VoIP and other business-critical functions. These applications place specific demands on a network for successful transmission. CoS gives you the ability to control the mix of bandwidth, delay, jitter, and packet loss while taking advantage of the MPLS labeling mechanism.

This example shows how to configure CoS on an MPLS network that is using a unidirectional circuit cross-connect (CCC) from the ingress provider edge (PE) switch to the egress PE switch. for the customer-edge interface of the ingress provider edge (PE) switch. It describes adding the configuration of CoS components to the ingress PE switch, the egress PE switch, and the core provider switches of the existing MPLS network. Because of the unidirectional configuration, the DSCP classifier needs to be configured only on the ingress PE switch.

Requirements

This example uses the following hardware and software components:

  • Junos OS Release 10.1 or later for EX Series switches

  • Three EX Series switches

Before you configure CoS with MPLS, be sure you have:

Configured an MPLS network with two PE switches and one provider switch. See Basic MPLS Configuration. This example assumes that an MPLS network has been configured using a cross circuit-connect (CCC).

Overview and Topology

This example describes adding custom classifiers and custom rewrite rules to switches in an MPLS network that is using MPLS over CCC.

It is a unidirectional configuration. Therefore, you need to configure custom classifiers and custom rewrite rules as follows:

  • On the ingress PE switch: custom DSCP classifier and custom EXP rewrite rule

  • On the egress PE switch: custom EXP classifier

  • On the provider switch: customer EXP classifier and custom EXP rewrite rule

Note:

You can also configure schedulers and shapers as needed. If you are using assured-forwarding, expedited-forwarding, or other custom forwarding classes, we recommend that you configure a scheduler to support that forwarding class. See Defining CoS Schedulers and Scheduler Maps (CLI Procedure).

The example creates a custom DSCP classifier (dscp1) on the ingress PE switch and binds this classifier to the CCC interface. It includes configuration of a policer on the ingress PE switch. The policer is applied as a filter on the label-switched path (LSP) lsp_to_pe2_ge1 to ensure that the amount of traffic forwarded through the LSP never exceeds the requested bandwidth allocation.

This example creates a custom EXP rewrite rule (exp1) on the ingress PE switch, specifying a loss-priority and code point to be used for the expedited-forwarding class as the packet travels through the LSP. The switch applies this custom rewrite rule on the core interfaces ge-0/0/5.0 and ge-0/0/6.0, which are the egress interfaces for this switch.

Table 1 shows the CoS configuration components added to the ingress PE switch.

Table 1: CoS Configuration Components on the Ingress PE Switch

Property

Settings

Description

Local PE switch hardware

EX Series switch

PE-1

Policing filter configured and applied to the LSP.

policing filter mypolicer

filter myfilter

Name of the rate-limiting policer.

Name of the filter, which refers to the policer

Custom DSCP classifier

dscp1

Specifies the name of the custom DSCP classifier

Custom EXP rewrite rule

e1

Name of the custom EXP rewrite rule.

Customer-edge interface

ge-0/0/1.0

Interface that receives packets from devices outside the network.

The custom DSCP classifier must be specified on this CCC interface.

Core interfaces

ge-0/0/5.0 and ge-0/0/6.0

Interfaces that transmit MPLS packets to other switches within the MPLS network.

The EXP rewrite rule is applied implicitly to these interfaces.

Table 2 shows the CoS configuration components added to the egress PE switch in this example.

Table 2: CoS Configuration Components of the Egress PE Switch

Property

Settings

Description

Remote provider edge switch hardware

EX Series switch

PE-2

Custom EXP classifier

exp1

Name of custom EXP classifier

Customer-edge interface

ge-0/0/1.0

Interface that transmits packets from this network to devices outside the network. No CoS classifier is specified for this interface. A scheduler can be specified.

Core interfaces

ge-0/0/7.0 and ge-0/0/8.0

Core interfaces on PE-2 that receive MPLS packets from the provider switch. The EXP classifier is enabled by default on the switch and applied implicitly to these interfaces.

Table 3 shows the MPLS configuration components used for the provider switch in this example.

Table 3: CoS Configuration Components of the Provider Switch

Property

Settings

Description

Provider switch hardware

EX Series switch

Transit switch within the MPLS network configuration.

Custom EXP classifier

exp1

Name of the custom EXP classifier.

Custom EXP rewrite rule

e1

Name of the custom EXP rewrite rule.

Core interfaces receiving packets from other MPLS switches.

ge-0/0/5.0 and ge-0/0/6.0

Interfaces that connect the provider switch to the ingress PE switch (PE-1). The EXP classifier is enabled by default on the switch and applied implicitly to these interfaces.

Core interfaces transmitting packets to other switches within the MPLS network.

ge-0/0/7.0 and ge-0/0/8.0

Interfaces that transmit packets to the egress PE (PE-2). The EXP rewrite rule is applied implicitly on these interfaces. Schedulers can also be specified and will be applied to these interfaces.

Topology

Configuring the Local PE Switch

Procedure

CLI Quick Configuration

To quickly configure a custom DSCP classifier, custom EXP rewrite rule, and a policer on the local PE switch, copy the following commands and paste them into the switch terminal window of PE-1:

Step-by-Step Procedure

To configure a custom DSCP classifier, custom EXP rewrite rule, and a policer on the ingress PE switch:

  1. Import the default DSCP classifier classes to the custom DSCP classifier that you are creating:

  2. Add the expedited-forwarding class to this custom DSCP classifier, specifying a loss priority and code point:

  3. Specify the values for the custom EXP rewrite rule, e1:

  4. Bind the DSCP classifier to the CCC interface:

  5. Specify the number of bits per second permitted, on average, for the firewall policer, which will later be applied to the LSP:

  6. Specify the maximum size permitted for bursts of data that exceed the given bandwidth limit for this policer:

  7. Discard traffic that exceeds the rate limits for this policer:

  8. To reference the policer, configure a filter term that includes the policer action:

  9. Apply the filter to the LSP:

Results

Display the results of the configuration:

Configuring the Remote PE Switch

Procedure

CLI Quick Configuration

To quickly configure a custom EXP classifier on the remote PE switch, copy the following commands and paste them into the switch terminal window of PE-2:

Step-by-Step Procedure

To configure a custom EXP classifier on the egress PE switch:

  1. Import the default EXP classifier classes to the custom EXP classifier that you are creating:

  2. Add the expedited-forwarding class to this custom EXP classifier, specifying a loss priority and code point:

Results

Display the results of the configuration:

Configuring the Provider Switch

Procedure

CLI Quick Configuration

To quickly configure a custom EXP classifier and a custom EXP rewrite rule on the provider switch, copy the following commands and paste them into the switch terminal window of the provider switch:

Step-by-Step Procedure

To configure a custom EXP classifier and a custom EXP rewrite rule on the provider switch:

  1. Import the default EXP classifier classes to the custom EXP classifier that you are creating:

  2. Add the expedited-forwarding class to this custom EXP classifier, specifying a loss priority and code point:

  3. Specify the values for the custom EXP rewrite rule, e1:

Results

Display the results of the configuration:

Verification

To confirm that the configuration is working properly, perform these tasks:

Verifying That the Policer Firewall Filter Is Operational

Purpose

Verify the operational state of the policer that is configured on the ingress PE switch.

Action

Meaning

This output shows that the firewall filter mypolicer has been created.

Verifying That the CoS Classifiers Are Going to the Right Queue

Purpose

Verify that the CoS classifiers are going to the right queue.

Action

Meaning

This output shows that a new DSCP classifier has been created, index 9346, on the ingress PE switch (PE-1).

Verifying the CoS Forwarding Table Mapping

Purpose

For each logical interface, display either the table index of the classifier for a given code point type or the queue number (if it is a fixed classification) in the forwarding table.

Action

Meaning

The results show that the new DSCP classifier, index number 9346, is bound to interface ge-0/0/1.0.

Verifying the Rewrite Rules

Purpose

Display mapping of the queue number and loss priority to code point value for each rewrite rule as it exists in the forwarding table.

Action

Meaning

This output shows that a new EXP classifier with the index number 9281 has been created.