Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Example: Configuring Class of Service for the Midsize Enterprise Campus

 

This example provides detailed steps for configuring class of service (CoS) on the switches in the access, aggregation, and core layers. The CoS parameters used in this example are designed to provide high quality of service to voice, video, and critical data applications by giving the application traffic priority over other traffic.

This example covers:

Requirements

Table 1 shows the hardware and software requirements for this example. Table 2 shows the scaling and performance targets used for this example.

Table 1: Hardware and Software Requirements

Hardware

Device Name

Software

MX240

cs-edge-r01, cs-edge-r02

13.2 R2.4

SRX650

cs-edge-fw-01, cs-edge-fw02

12.1 X44-D39.4

EX9200/EX9250

cs-core-sw01, cs-core-sw02

13.2 R3.7

EX4600

cs-agg-01

12.3 R3.4

EX2300

cs-2300-ab5

12.3 R3.4

EX3400

cs-3400-ab4

12.3 R3.4

EX4300

cs-4300-ab1

12.3 R3.4

EX4300

cs-4300-ab2, cs-4300-ab3

13.2 X51-D21.1

Table 2: Node Features and Performance/Scalability

Node

Features

Performance/Scalability Target Value

Edge (MX240, SRX650)

MC-LAG, OSPF, BGP, IRB

3k IPv4

Core (EX9200/EX9250 )

VLANs, MC-LAG, LAG, IGMP snooping, OSPF, PIM-SM, IGMP, DHCP relay, IRB

3k IPv4 routes

128k MAC table entries

16k ARP entries

Aggregation (EX4600)

VLANs, LAG, IGMP snooping, OSPF, PIM-SM, IGMP, DHCP relay, RVI

3k IPv4 routes

5 IGMP groups

Access (EX3400, EX4300, EX4300)

VLANs, LAG, 802.1X, IGMP snooping, DHCP snooping, ARP inspection, IP source guard

55k MAC table entries

13k 8021.x users

5 IGMP groups

The configuration procedures that follow assume that the devices and device interfaces have been configured as described in Example: Configuring High Availability for the Midsize Enterprise Campus and Example: Configuring Layer 2 and Layer 3 Network Services for the Midsize Enterprise Campus.

Overview and Topology

As described in Understanding the Design of the Midsize Enterprise Campus Solution, a CoS configuration consists of multiple components, such as forwarding classes, schedulers, rewrite rules, and classifiers, that are configured on a per-hop basis. Figure 1 shows where different components are configured in this solution.

Figure 1: Class-of-Service Components in the LAN
Class-of-Service Components in the
LAN

Configuring CoS in the Access Layer

This section describes how to configure CoS on the Virtual Chassis in the access layer. Table 3 summarizes the CoS parameters used in the configuration.

Table 3: CoS Parameters for Access Virtual Chassis

Forwarding Class

Queue Number

DSCP Code Point

Queue Priority

Buffer Size

Transmit Rate

Rate Limiting

EX4300, EX3400, EX2300

EX4300

EX4300, EX3400, EX2300

EX4300

Network Ports

Access Ports

Network- Control

Network- Control

7

3

NC1

Strict-high

5%

5%

1%

Voice

Voice

5

1

EF

Strict-high

5%

5%

1%

Video

mcast-be

3

8

AF21

Low

20%

20%

Mission- Critical

Mission- Critical

1

2

AF11

Low

40%

40%

Best-Effort

Best-Effort

0

0

BE

Low

Remainder

Remainder

As shown in Table 3, the forwarding classes and queues used on the EX2300, EX3400, and EX4300 Virtual Chassis differ from the default forwarding classes and queues used on the EX4300 Virtual Chassis. Because of this, two sets of configuration statements are shown for each step in the following procedures: one for the EX2300, EX3400, and EX4300 Virtual Chassis and one for the EX4300 Virtual Chassis.

To configure CoS on the Virtual Chassis in the access layer, perform these tasks:

Configure the Forwarding Classes

Step-by-Step Procedure

To configure the forwarding classes and associated queues shown in Table 3:

  • Enter the following commands:

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

Configure Schedulers and Scheduler Maps

Step-by-Step Procedure

Schedulers define buffer sizes, queue priorities, transmit rates, drop profiles, and queue shaping. Scheduler maps associate specific schedulers with specific forwarding classes, or queues.

To configure the schedulers and scheduler maps:

  1. Configure the schedulers.

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

  2. Create scheduler maps that map the schedulers to forwarding classes.

    Two scheduler maps are created: one for use with access ports (access-port-sched) and the other for the uplink ports (network-port-sched).

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

  3. Assign the scheduler maps to the interfaces on the access switches.

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

Configure Rewrite Rules

Step-by-Step Procedure

The rewrite rules mark packets with the DSCP code points shown in Table 3.

To configure the rewrite rules:

  1. Create the rewrite rules.

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

  2. Assign the rewrite rules to the logical interfaces on the aggregated Ethernet interfaces leading to the aggregation layer.

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

Configure Multifield Classifiers

Step-by-Step Procedure

The multifield classifiers are implemented as firewall filters that classify traffic into the forwarding classes shown in Table 3.

To configure the multifield classifiers:

  1. Create the multifield classifier for classifying voice traffic.

    In this example, traffic arriving on port 5060, the standard port for SIP traffic, is classified as voice traffic.

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

  2. Create the multifield classifier for classifying video or multicast traffic.

    This multifield classifier matches traffic with the multicast destination address or with the DSCP value equaling af21.

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

  3. Create the multifield classifier for classifying mission-critical traffic arriving at the access ports.

    In this example, traffic on port 80 (HTTP traffic) and port 25 (SMTP traffic) is classified as mission-critical traffic.

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

  4. Create the multifield classifier for classifying mission-critical traffic returning from the HTTP and SMTP servers.

    This classifier matches on source address matching the IP addresses of the servers or the DSCP value equaling af11.

    BA classification cannot be used for the return traffic on the Layer 2 interfaces from the aggregation layers because the multifield classifiers used on the VLANs take precedence.

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

  5. Create the multifield classifier for classifying best-effort traffic.

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

  6. Assign the multifield classifiers to the VLANs carrying user traffic.

    Examples of doing so for the VLANs eng1_data_wired and eng1_voice_wired are shown.

    EX2300, EX3400, and EX4300 Virtual Chassis:

    EX4300 Virtual Chassis:

Configuring CoS in the Aggregation Layer

This section describes how to configure CoS on the EX4600 Virtual Chassis in location B. Table 4 summarizes the CoS parameters used in the configuration.

Table 4: CoS Parameters for Aggregation Virtual Chassis

Forwarding Class

Queue Number

DSCP Code Point

Queue Priority

Buffer Size

Transmit Rate

Network-Control

7

NC1

Strict-high

5%

Voice

5

EF

Strict-high

5%

Video

3

AF21

Low

20%

20%

Mission-Critical

1

AF11

Low

40%

40%

Best-Effort

0

BE

Low

Remainder

Remainder

To configure CoS on the EX4600 Virtual Chassis, perform these tasks:

Configure Forwarding Classes

Step-by-Step Procedure

To configure the forwarding classes and associated queues shown in Table 4:

  • Enter the following commands:

Configure Schedulers and Scheduler Maps

Step-by-Step Procedure

Schedulers define buffer sizes, queue priorities, transmit rates, drop profiles, and queue shaping. Scheduler maps associate specific schedulers with specific forwarding classes, or queues.

For the aggregation switch, you create one scheduler per forwarding class, configuring the scheduler with the queue priority, buffer size, and transmit rate shown in Table 4.

To configure the schedulers and scheduler maps:

  1. Configure the schedulers.
  2. Configure the scheduler map.
  3. Assign the scheduler map to the interfaces leading to the core switches and to all aggregated Ethernet interfaces.

Configure the Behavior Aggregate Classifier

Step-by-Step Procedure

In this procedure, you create the behavior aggregate (BA) classifier, using the code points shown in Table 4 to map traffic to forwarding classes. You then assign the classifier to interfaces.

To configure the BA classifier:

  1. Create the BA classifier.
  2. Assign the BA classifier to interfaces.

    For the example topology, the classifier is assigned to the logical interfaces leading to the core switches and to the logical aggregated Ethernet interfaces.

Configuring CoS in the Core Layer

This section describes how to configure CoS on the EX9200/EX9250 core switches. Table 5 summarizes the CoS parameters used in the configuration.

Table 5: CoS Parameters for Core Switches

Forwarding Class

Queue Number

DSCP Code Point

Queue Priority

Buffer Size

Transmit Rate

Network-Control

7

NC1

Low

5%

5%

Voice

5

EF

Strict-high

5%

Video

3

AF21

Low

20%

20%

Mission-Critical

1

AF11

Low

40%

40%

Best-Effort

0

BE

Low

Remainder

Remainder

To configure CoS in the core layer, perform these tasks on both cs-core-sw01 and cs-core-sw02:

Configure Forwarding Classes

Step-by-Step Procedure

To configure the forwarding classes and their associated queues, as shown in Table 5:

  • Enter the following commands:

Configure Schedulers and Scheduler Maps

Step-by-Step Procedure

Schedulers define buffer sizes, queue priorities, transmit rates, drop profiles, and queue shaping. Scheduler maps associate specific schedulers with specific forwarding classes, or queues.

For the core switches, you create one scheduler per forwarding class, configuring the scheduler with the queue priority, buffer size, and transmit rate shown in Table 5.

To configure the schedulers and scheduler maps:

  1. Configure the schedulers.
  2. Configure the scheduler map.
  3. Assign the scheduler map to the interface leading to the aggregation switch and to all aggregated Ethernet interfaces.

Configure the Behavior Aggregate Classifier

Step-by-Step Procedure

In this procedure, you create the behavior aggregate (BA) classifier, using the code points shown in Table 5 to map traffic to forwarding classes. You then assign the classifier to interfaces.

To configure the BA classifier:

  1. Create the BA classifier.
  2. Assign the BA classifier to logical interfaces.

    For the example topology, the classifier is assigned to the interface leading to the aggregation switch, to all aggregated Ethernet interfaces, and to all IRB interfaces.

Verifying the Configuration

Confirm that the configuration is working properly.

Verifying the CoS Configuration in the Access Layer

Purpose

Verify that CoS is configured correctly on the Virtual Chassis in the access layer.

Action

Perform the following steps on the switches in the access layer:

  1. Verify that the rewrite rules are properly configured.
    • On EX2300, EX3400, and EX4300 switches, enter:

      user@cs-4300-ab1> show class-of-service rewrite-rule name rewrite-dscp
    • On EX4300 switches, enter:

      user@cs-4300-ab3> show class-of-service rewrite-rule name rewrite-dscp

    The DSCP code points are displayed in binary. Table Table 6 shows the binary representation of the DSCP code points used in this configuration example.

    Table 6: Binary Representation of Code Points

    Forwarding Class

    DSCP Code Point

    Binary Representation

    Network-Control

    NC1

    110000

    Voice

    EF

    101110

    Video

    mcast-be

    AF21

    010010

    Mission-Critical

    AF11

    001010

    Best-Effort

    BE

    000000

  2. Verify that the class-of-service queues on the uplink interfaces–that is, an interface facing the core switch–are correct and that the queues are forwarding traffic. Note

    On the access switches used in this network configuration example, queue information is not available for aggregated Ethernet interfaces. To verify the class-of-service queues for an aggregated Ethernet interface, you must display the queues for the member interfaces themselves.

    • On EX2300, EX3400, and EX4300 switches, enter:

      user@cs-4300-ab1> show interfaces queue xe-2/1/0
    • On EX4300 switches, enter:

      user@cs-4300-ab3> show interfaces queue xe-0/2/0
  3. Verify that the class-of-service queues on an access interface—that is, an interface facing a client—are correct and that the queues are forwarding traffic.
    • On EX2300, EX3400, and EX4300 switches, enter:

      user@cs-4300-ab1> show interfaces queue ge-3/0/42
    • On EX4300 switches, enter:

      user@cs-4300-ab3> show interfaces queue ge-4/0/42

Verifying the CoS Configuration in the Aggregation Layer

Purpose

Verify that CoS is configured correctly on the EX4600 Virtual Chassis in the aggregation layer.

Action

Perform the following steps on the EX4600 Virtual Chassis:

  1. Verify that the correct DSCP code points have been configured.
    user@cs-agg-01> show class-of-service classifier name dscp_ba

    The DSCP code points are displayed in binary. Table 7 shows the binary representation of the DSCP code points used in this configuration example.

    Table 7: Binary Representation of Code Points

    Forwarding Class

    DSCP Code Point

    Binary Representation

    Network-Control

    NC1

    110000

    Voice

    EF

    101110

    Video

    mcast-be

    AF21

    010010

    Mission-Critical

    AF11

    001010

    Best-Effort

    BE

    000000

  2. Verify that the class-of-service queues on the aggregated Ethernet interfaces connecting the access switches are correct and that the queues are forwarding traffic. Note

    On the EX4600 switches, queue information is not directly available for aggregated Ethernet interfaces. To verify the class-of-service queues for an aggregated Ethernet interface, you must display the queues for the member interfaces themselves.

    user@cs-agg-01> show interfaces queue xe-1/0/30
  3. Verify that the class-of-service queues on the interfaces going to the core switches (xe-0/0/0 and xe-1/0/0) are correct and that the queues are forwarding traffic.
    user@cs-agg-01> show interfaces queue xe-0/0/0
    user@cs-agg-01> show interfaces queue xe-1/0/0
  4. Verify the network scheduler map configuration.
    user@cs-agg-01> show class-of-service scheduler-map network-port-sched
  5. Verify the forwarding classes configured on the aggregation switch.
    user@cs-agg-01> show class-of-service forwarding-class

Verifying the CoS Configuration on the Core Switches

Purpose

Verify that CoS is configured correctly on the EX9200/EX9250 switches in the core layer.

Action

Perform the following steps on the EX9200/EX9250 switches:

  1. Verify that the correct DSCP code points have been configured.
    user@cs-core-sw01-1> show class-of-service classifier name dscp_ba

    The DSCP code points are displayed in binary. Table 8 shows the binary representation of the DSCP code points used in this configuration example.

    Table 8: Binary Representation of Code Points

    Forwarding Class

    DSCP Code Point

    Binary Representation

    Network-Control

    NC1

    110000

    Voice

    EF

    101110

    Video

    mcast-be

    AF21

    010010

    Mission-Critical

    AF11

    001010

    Best-Effort

    BE

    000000

  2. Verify that the network-port-sched scheduler map and the dscp_ba classifier are active on interfaces.
    • An example of doing so for an aggregated Ethernet interface:

      user@cs-core-sw01-1> show class-of-service interface ae1
    • An example of doing so for a physical interface:

      user@cs-core-sw01-1> show class-of-service interface xe-0/1/0
    • An example of doing so for an IRB interface:

      user@cs-core-sw01-1> show class-of-service interface irb.60
  3. Verify the network scheduler map configuration.
    user@cs-core-sw01-1> show class-of-service scheduler-map network-port-sched
  4. Verify the forwarding classes configured on the core switch.
    user@cs-core-sw01-1> show class-of-service forwarding-class
  5. Verify that the class-of-service queues the MC-LAG interfaces going to the access switches are correct and that the queues are forwarding traffic.
    user@cs-core-sw01-1> show interfaces queue ae1 egress
  6. Verify that the class-of-service queues on the interfaces going to the aggregation switch are correct and that the queues are forwarding traffic.
    user@cs-core-sw01-1> show interfaces queue xe-0/1/0 egress