Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Remarking Diffserv Code Points to 802.1P PCPs to Carry CoS Profiles Across a Service Provider’s VPLS Network

This configuration example explains how to implement class-of-service (CoS) capabilities over a Virtual Private LAN Service (VPLS) network.

Requirements

To verify this procedure, this example uses a traffic generator. The traffic generator can be hardware-based or it can be software running on a server or host machine.

The functionality in this procedure is widely supported on devices that run Junos OS. The example shown here was tested and verified on MX Series routers running Junos OS Release 10.4.

Overview

VPLS networks create a Virtual Private LAN that provides a very close approximation of an Ethernet LAN to customers of a service provider. In a VPLS network, it is not necessary for all customers to be connected to a single LAN. Instead, the customers can be spread across two or more LANs. In the simplest sense, a VPLS network connects individual LANs across a packet-switched network so that they appear as a single LAN. See Figure 1 for an example of a typical VPLS topology.

Figure 1: Typical VPLS TopologyTypical VPLS Topology

Junos OS contains several DiffServ code point (DSCP) default rewrite rules that might meet your requirements. You display them with the show class-of-service rewrite-rule command. A partial set of the default rewrite DSCP rule mappings is shown in the following table.

You can also define your own custom rewrite-rules table, or use a mixture of the default rewrite-rules and a custom table that you create. This example uses default rewrite-rules.

Table 1: Default rewrite rules

Map from Forwarding Class

PLP Value

MAP to DSCP/DSCP IPv6/EXP/IP Code Point Aliases

expedited-forwarding

low

ef

expedited-forwarding

high

ef

assured-forwarding

low

af11

assured-forwarding

high

af12 (DSCP/DSCP IPv6/EXP)

best-effort

low

be

best-effort

high

be

network-control

low

nc1/cs6

network-control

high

nc2/cs7

Junos OS uses the values shown in the following table for MPLS CoS in the EXP fields of the MPLS header.

Forwarding Class

Loss Priority

EXP Code Point

best-effort

low

000

best-effort

high

001

expedited-forwarding

low

010

expedited-forwarding

high

011

assured-forwarding

low

100

assured-forwarding

high

101

network-control

low

110

network-control

high

111

Note:

In addition to providing the necessary information to complete the purpose of this example, this example also includes all of the commands required to recreate the VPLS network as shown in Figure 2. A full explanation of the tasks required to configure a VPLS network is not included in this example. If you need more information regarding configuring a VPLS network, see the VPLS User Guide for Routing Devices at http://juniper.net/documentation and RFC 4761 at http://tools.ietf.org/html/rfc4761 .

A thorough explanation of the required CoS tasks and the underlying algorithms used in this example is beyond the scope of this document. For more information, refer to QOS-Enabled Networks—Tools and Foundations by Miguel Barreiros and Peter Lundqvist. This book is available at many online booksellers and at www.juniper.net/books .

Topology

This example uses the topology in Figure 2.

Figure 2: VPLS with CoS ScenarioVPLS with CoS Scenario

Configuration

Procedure

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Device CE1

Device PE1

Device P1

Device P2

Device PE2

Device CE2

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.

To configure Device CE1:

  1. Configure the device interfaces.

  2. Configure the VLAN parameters.

  3. Configure the class-of-service parameters.

  4. Configure the protocol parameters.

  5. Configure the firewall DSCP rewrite parameters.

Step-by-Step Procedure

To configure Device PE1:

  1. Configure the device interfaces.

  2. Configure the VLAN parameters.

  3. Configure the protocol parameters.

  4. Configure the routing option parameters.

  5. Configure the routing instance parameters.

Step-by-Step Procedure

To configure Device P1:

  1. Configure the device interfaces.

  2. Configure the protocol parameters.

  3. Configure the routing options parameter.

Step-by-Step Procedure

To configure Device P2:

  1. Configure the device interfaces.

  2. Configure the protocol parameters.

  3. Configure the routing option parameter.

Step-by-Step Procedure

To configure Device PE2:

  1. Configure the device interfaces.

  2. Configure the VLAN parameters.

  3. Configure the protocol parameters.

  4. Configure the routing option parameters.

  5. Configure the routing instance parameters.

Step-by-Step Procedure

To configure Device CE2:

  1. Configure the device interfaces.

  2. Configure the VLAN parameters

  3. Configure the class-of-service parameters.

  4. Configure the protocol parameters.

  5. Configure the firewall DSCP rewrite parameters.

Results

From configuration mode, confirm your configuration by entering the show interfaces, show class-of-service, show protocols, show routing-options, show routing-instances, and show firewall, commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

If you are done configuring Device CE1, enter commit from configuration mode.

If you are done configuring Device PE1, enter commit from configuration mode.

If you are done configuring Device P1, enter commit from configuration mode.

If you are done configuring Device P2, enter commit from configuration mode.

If you are done configuring Device PE2, enter commit from configuration mode.

If you are done configuring Device CE2, enter commit from configuration mode.

Verification

Confirm that the configuration is working properly by verifying that the DSCP aliases are maintained from Device CE1 to Device CE2.

Clearing the Firewall Counters

Purpose

Confirm that the firewall counters are cleared.

Action

On Device CE2, run the clear firewall all command to reset the firewall counters to 0.

Sending Traffic into the Network from TCP HTTP Ports 80 and 12345 and Verifying the Results

Purpose

Send traffic into the network that can be verified at Device CE2.

Action

Configure a new firewall on Device CE2 if you want to verify that the traffic that is being transmitted to Device Host2 from Device Host1 still has the correct DSCP aliases. The following commands create and apply the firewall filter that displays the traffic counts for each code point alias:

When you are done configuring Device CE2, enter commit from configuration mode.

When you are done testing, you can leave the counting filter in place, or remove it.

  1. On Device Host1 use a traffic generator to send 20 TCP packets with a source port of 80 into the network.

    The -s flag sets the source port. The -k flag causes the source port to remain steady instead of incrementing. The -c flag sets the number of packets to 20.

    Repeat the task using a source port of 12345.

  2. On Device CE2, display the firewall counters by using the show firewall command.

Meaning

The code point aliases set by Device CE1 are maintained across the VPLS backbone and appear intact at Device CE2.