Technical Documentation

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 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 Example: Configuring MPLS on EX Series Switches. 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 (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(created in Example: Configuring MPLS on EX Series Switches) 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 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.

Configuring the Local PE Switch

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:


[edit]
set class-of-service classifiers dscp dscp1 import default
set class-of-service classifiers dscp dscp1 forwarding-class expedited-forwarding loss-priority low code-points 000111
set class-of-service rewrite-rules exp e1 forwarding-class expedited-forwarding loss-priority low code-point 111
set class-of-service interfaces ge-0/0/1 unit 0 classifier dscp1
set firewall policer mypolicer if-exceeding bandwidth-limit 500m
set firewall policer mypolicer if-exceeding burst-size-limit 33553920
set firewall policer mypolicer then discard
set firewall family any filter myfilter term t1 then policer mypolicer
set protocols mpls label-switched-path lsp_to_pe2_ge1 to 127.1.1.3 policing filter myfilter

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:

    [edit class-of-service]
    user@switch# set classifiers dscp dscp1 import default
  2. Add the expedited-forwarding class to this custom DSCP classifier, specifying a loss priority and code point:

    [edit class-of-service]
    user@switch# set classifiers dscp dscp1 forwarding-class expedited-forwarding loss-priority low code-points 000111
  3. Specify the values for the custom EXP rewrite rule, e1:

    [edit class-of-service]
    user@switch# set rewrite-rules exp e1 forwarding-class expedited-forwarding loss-priority low code-point 111
  4. Bind the DSCP classifier to the CCC interface:

    [edit ]
    user@switch# set class-of-service interfaces ge-0/0/1 unit 0 classifier dscp1
  5. Specify the number of bits per second permitted, on average, for the firewall policer, which will later be applied to the LSP:

    [edit firewall]
    set policer mypolicer if-exceeding bandwidth-limit 500m
  6. Specify the maximum size permitted for bursts of data that exceed the given bandwidth limit for this policer:

    [edit firewall policer]
    set mypolicer if-exceeding burst-size-limit 33553920
  7. Discard traffic that exceeds the rate limits for this policer:

    [edit firewall policer]
    set mypolicer then discard
  8. To reference the policer, configure a filter term that includes the policer action:

    [edit firewall]
    user@switch# set family any filter myfilter term t1 then policer mypolicer
  9. Apply the filter to the LSP:

    [edit protocols mpls]
    set label-switched-path lsp_to_pe2_ge1 policing filter myfilter

Results

Display the results of the configuration:

[edit]
user@switch# show
class-of-service {classifiers {dscp dscp1 {import default;forwarding-class expedited-forwarding {loss-priority low code-points 000111;}}}interfaces {ge-0/0/1 {unit 0 {classifiers {dscp dscp1;}}}}rewrite-rules {exp e1 {forwarding-class expedited-forwarding {loss-priority low code-point 111;}}}}firewall {family any {filter myfilter {term t1 {then policer mypolicer;}}}policer mypolicer {if-exceeding {bandwidth-limit 500m;burst-size-limit 33553920;}then discard;}}

Configuring the Remote PE Switch

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:


[edit]
set class-of-service classifiers exp exp1 import default
set class-of-service classifiers exp exp1 forwarding-class expedited-forwarding loss-priority low code-points 010

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:

    [edit class-of-service]
    user@switch# set classifiers exp exp1 import default
  2. Add the expedited-forwarding class to this custom EXP classifier, specifying a loss priority and code point:

    [edit class-of-service]
    user@switch# set classifiers exp exp1 forwarding-class expedited-forwarding loss-priority low code-points 010

Results

Display the results of the configuration:

[edit]
user@switch# show
class-of-service {classifiers {exp exp1 {import default;forwarding-class expedited-forwarding {loss-priority low code-points 010;}}

Configuring the Provider Switch

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:


[edit]
set class-of-service classifiers exp exp1 import default
set class-of-service classifiers exp exp1 forwarding-class expedited-forwarding loss-priority low code-points 010
set class-of-service rewrite-rules exp e1 forwarding-class expedited-forwarding loss-priority low code-point 111

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:

    [edit class-of-service]
    user@switch# set classifiers exp exp1 import default
  2. Add the expedited-forwarding class to this custom EXP classifier, specifying a loss priority and code point:

    [edit class-of-service]
    user@switch# set classifiers exp exp1 forwarding-class expedited-forwarding loss-priority low code-points 010
  3. Specify the values for the custom EXP rewrite rule, e1:

    [edit class-of-service]
    user@switch# set rewrite-rules exp e1 forwarding-class expedited-forwarding loss-priority low code-point 111

Results

Display the results of the configuration:

[edit]
user@switch# show
class-of-service {classifiers {exp exp1 {import default;forwarding-class expedited-forwarding {loss-priority low code-points 010;}}}rewrite-rules {exp e1 {forwarding-class expedited-forwarding {loss-priority low code-point 111;}}}}

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


user@switch> show firewall

Filter: myfilter Policers: Name Packets mypolicer-t1 0

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


 
Classifier table index: 7, # entries: 64, Table type: DSCP
Entry #   Code point   Forwarding-class #   PLP
   0        000000        0       0
   1        000001        0       0
   2        000010        0       0
   3        000011        0       0
   4        000100        0       0
   5        000101        0       0
   6        000110        0       0
   7        000111        0       0
   8        001000        0       0
   9        001001        0       0
  10        001010        0       0
  11        001011        0       0
  12        001100        0       0
  13        001101        0       0
  14        001110        0       0
  15        001111        0       0
  16        010000        0       0
  17        010001        0       0
  18        010010        0       0
  19        010011        0       0
  20        010100        0       0
  21        010101        0       0
  22        010110        0       0
  23        010111        0       0
  24        011000        0       0
  25        011001        0       0
  26        011010        0       0
  27        011011        0       0
  28        011100        0       0
  29        011101        0       0
  30        011110        0       0
  31        011111        0       0
  32        100000        0       0
  33        100001        0       0
  34        100010        0       0
  35        100011        0       0
  36        100100        0       0
  37        100101        0       0
  38        100110        0       0
  39        100111        0       0
  40        101000        0       0
  41        101001        0       0
  42        101010        0       0
  43        101011        0       0
  44        101100        0       0
  45        101101        0       0
  46        101110        0       0
  47        101111        0       0
  48        110000        3       0
  49        110001        3       0
  50        110010        3       0
  51        110011        3       0
  52        110100        3       0
  53        110101        3       0
  54        110110        3       0
  55        110111        3       0
  56        111000        3       0
  57        111001        3       0
  58        111010        3       0
  59        111011        3       0
  60        111100        3       0
  61        111101        3       0
  62        111110        3       0
  63        111111        3       0

Classifier table index: 11, # entries: 8, Table type: IEEE 802.1
Entry #   Code point   Forwarding-class #   PLP
   0           000        0       0
   1           001        0       0
   2           010        0       0
   3           011        0       0
   4           100        0       0
   5           101        0       0
   6           110        3       0
   7           111        3       0

Classifier table index: 12, # entries: 8, Table type: IPv4 precedence
Entry #   Code point   Forwarding-class #   PLP
   0           000        0       0
   1           001        0       0
   2           010        0       0
   3           011        0       0
   4           100        0       0
   5           101        0       0
   6           110        3       0
   7           111        3       0

Classifier table index: 16, # entries: 8, Table type: Untrust
Entry #   Code point   Forwarding-class #   PLP
   0           000        0       0
   1           001        0       0
   2           010        0       0
   3           011        0       0
   4           100        0       0
   5           101        0       0
   6           110        0       0
   7           111        0       0

Classifier table index: 9346, # entries: 64, Table type: DSCP
Entry #   Code point   Forwarding-class #   PLP
   0        000000        0       0
   1        000001        0       0
   2        000010        0       0
   3        000011        0       0
   4        000100        0       0
   5        000101        0       0
   6        000110        0       0
   7        000111        1       0
   8        001000        0       0
   9        001001        0       0
  10        001010        0       0
  11        001011        0       0
  12        001100        0       0
  13        001101        0       0
  14        001110        0       0
  15        001111        0       0
  16        010000        0       0
  17        010001        0       0
  18        010010        0       0
  19        010011        0       0
  20        010100        0       0
  21        010101        0       0
  22        010110        0       0
  23        010111        0       0
  24        011000        0       0
  25        011001        0       0
  26        011010        0       0
  27        011011        0       0
  28        011100        0       0
  29        011101        0       0
  30        011110        0       0
  31        011111        0       0
  32        100000        0       0
  33        100001        0       0
  34        100010        0       0
  35        100011        0       0
  36        100100        0       0
  37        100101        0       0
  38        100110        0       0
  39        100111        0       0
  40        101000        0       0
  41        101001        0       0
  42        101010        0       0
  43        101011        0       0
  44        101100        0       0
  45        101101        0       0
  46        101110        0       0
  47        101111        0       0
  48        110000        3       0
  49        110001        3       0
  50        110010        3       0
  51        110011        3       0
  52        110100        3       0
  53        110101        3       0
  54        110110        3       0
  55        110111        3       0
  56        111000        3       0
  57        111001        3       0
  58        111010        3       0
  59        111011        3       0
  60        111100        3       0
  61        111101        3       0
  62        111110        3       0
  63        111111        3       0

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


                       Table Index/
Interface      Index      Q num      Table type
ge-0/0/1.0        92       9346      DSCP

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


Rewrite table index: 31, # entries: 4, Table type: DSCP
FC#     Low bits  State      High bits  State
0       000000  Enabled       000000  Enabled
1       101110  Enabled       101110  Enabled
2       001010  Enabled       001100  Enabled
3       110000  Enabled       111000  Enabled

Rewrite table index: 34, # entries: 4, Table type: IEEE 802.1
FC#     Low bits  State      High bits  State
0          000  Enabled          001  Enabled
1          010  Enabled          011  Enabled
2          100  Enabled          101  Enabled
3          110  Enabled          111  Enabled

Rewrite table index: 35, # entries: 4, Table type: IPv4 precedence
FC#     Low bits  State      High bits  State
0          000  Enabled          000  Enabled
1          101  Enabled          101  Enabled
2          001  Enabled          001  Enabled
3          110  Enabled          111  Enabled

Rewrite table index: 9281, # entries: 1, Table type: EXP
FC#     Low bits  State      High bits  State
1          111  Enabled          000  Disabled

Meaning

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


Published: 2010-08-19

Help
|
My Account
|
Log Out