Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring CoS Hierarchical Port Scheduling (ETS)

Hierarchical port scheduling defines the class-of-service (CoS) properties of output queues, which are mapped to forwarding classes. Traffic is classified into forwarding classes based on code point (priority), so mapping queues to forwarding classes also maps queues to priorities). Hierarchical port scheduling enables you to group priorities that require similar CoS treatment into priority groups. You define the port bandwidth resources for a priority group, and you define the amount of the priority group’s resources that each priority in the group can use.

Hierarchical port scheduling is the Junos OS implementation of enhanced transmission selection (ETS), as described in IEEE 802.1Qaz. One major benefit of hierarchical port scheduling is greater port bandwidth utilization. If a priority group on a port does not use all of its allocated bandwidth, other priority groups on that port can use that bandwidth. Also, if a priority within a priority group does not use its allocated bandwidth, other priorities within that priority group can use that bandwidth.

Configuring hierarchical scheduling is a multistep procedure that includes:

  • Mapping forwarding classes to queues

  • Defining forwarding class sets (priority groups)

  • Defining behavior aggregate classifiers

  • Configuring priority-based flow control (PFC) for lossless priorities (queues)

  • Applying classifiers and PFC configuration to ingress interfaces

  • Defining drop profiles

  • Defining schedulers

  • Mapping forwarding classes to schedulers

  • Defining traffic control profiles

  • Assigning priority groups and traffic control profiles to egress ports

This example describes how to configure hierarchical scheduling:

Requirements

This example uses the following hardware and software components:

  • One switch (this example was tested on a Juniper Networks QFX3500 Switch)

  • Junos OS Release 11.1

Use Feature Explorer to confirm platform and release support for ETS.

Overview

Keep the following considerations in mind when you plan the port bandwidth allocation for priority groups and for individual priorities:

  • How much traffic and what types of traffic you expect to traverse the system.

  • How you want to divide different types of traffic into priorities (forwarding classes) to apply different CoS treatment to different types of traffic. Dividing traffic into priorities includes:

    • Mapping the code points of ingress traffic to forwarding classes using behavior aggregate (BA) classifiers. This classifies incoming traffic into the appropriate forwarding class based on code point.

    • Mapping forwarding classes to output queues. This defines the output queue for each type of traffic.

    • Attaching the BA classifier to the desired ingress interfaces so that incoming traffic maps to the desired forwarding classes and queues.

  • How you want to organize priorities into priority groups (forwarding class sets).

    Traffic that requires similar treatment usually belongs in the same priority group. To do this, place forwarding classes that require similar bandwidth, loss, and other characteristics in the same forwarding class set. For example, you can map all types of best-effort traffic forwarding classes into one forwarding class set.

  • How much of the port bandwidth you want to allocate to each priority group and to each of the priorities in each priority group. The following considerations apply to bandwidth allocation:

    • Estimate how much traffic you expect in each forwarding class, and how much traffic you expect in each forwarding class set (the amount of traffic you expect in a forwarding class set is the aggregate amount of traffic in the forwarding classes that belong to the forwarding class set).

    • The combined minimum guaranteed bandwidth of the priorities (forwarding classes) in a priority group should not exceed the minimum guaranteed bandwidth of the priority group (forwarding class set). The transmit rate scheduler parameter defines the minimum guaranteed bandwidth for forwarding classes. Scheduler maps associate schedulers with forwarding classes.

    • The combined minimum guaranteed bandwidth of the priority groups (forwarding class sets) on a port should not exceed the port’s total bandwidth. The guaranteed rate parameter in the traffic control profile defines the minimum bandwidth for a forwarding class set. Associating a scheduler map with a traffic control profile sets the scheduling for the individual forwarding classes in the forwarding class set.

This example creates hierarchical port scheduling by defining priority groups for best effort, guaranteed delivery, and high-performance computing (HPC) traffic. Each priority group includes priorities that need to receive similar CoS treatment. Each priority group and each priority within each priority group receive the CoS resources needed to service their flows. Lossless priorities use PFC to prevent packet loss when the network experiences congestion.

Topology

Table 1 shows the configuration components for this example.

Table 1: Components of the Hierarchical Port Scheduling (ETS) Configuration Topology

Property

Settings

Hardware

QFX3500 switch

Mapping of forwarding classes (priorities) to queues

best-effort to queue 0

be2 to queue 1

fcoe (Fibre Channel over Ethernet) to queue 3

no-loss to queue 4

hpc (high-performance computing) to queue 5

network-control to queue 7

Forwarding class sets (priority groups)

best-effort-pg: contains forwarding classes best-effort, be2, and network control

guar-delivery-pg: contains forwarding classes fcoe and no-loss

hpc-pg: contains forwarding class hpc

Behavior aggregate classifier (maps forwarding classes and loss priorities to incoming packets by IEEE 802.1 code point)

Name—hsclassifier1

Code point mapping:

  • 000 to forwarding class best-effort and loss priority low

  • 001 to forwarding class be2 and loss priority high

  • 011 to forwarding class fcoe and loss priority low

  • 100 to forwarding class no-loss and loss priority low

  • 101 to forwarding class hpc and loss priority low

  • 110 to forwarding class network-control and loss priority low

PFC

Congestion notification profile name—gd-cnp

PFC enabled on code points: 011 (fcoe priority), 010 (no-loss priority)

Drop profiles

Note:

The fcoe and no-loss priorities (queues) do not use drop profiles because they are lossless traffic classes.

dp-be-low: drop start point 25, drop end point 50, maximum drop rate 80

dp-be-high: drop start point 10, drop end point 40, maximum drop rate 100

dp-hpc: drop start point 75, drop end point 90, maximum drop rate 75

dp-nc: drop start point 80, drop end point 100, maximum drop rate 100

Queue schedulers

be-sched: minimum bandwidth 3g, maximum bandwidth 100%, priority low, drop profiles dp-be-low and dp-be-high

fcoe-sched: minimum bandwidth 2.5g, maximum bandwidth 100%, priority low

hpc-sched: minimum bandwidth 2g, maximum bandwidth 100%, priority low, drop profile dp-hpc

nc-sched: minimum bandwidth 500m, maximum bandwidth 100%, priority low, drop profile dp-nc

nl-sched: minimum bandwidth 2g, maximum bandwidth 100%, priority low

Forwarding class-to-scheduler mapping

Scheduler map be-map: Forwarding class best-effort, scheduler be-schedForwarding class be2, scheduler be-schedForwarding class network-control, scheduler nc-sched

Scheduler map gd-map: Forwarding class fcoe, scheduler fcoe-schedForwarding class no-loss, scheduler nl-sched

Scheduler map hpc-map: Forwarding class hpc, scheduler hpc-sched

Traffic control profiles

be-tcp: scheduler map be-map, minimum bandwidth 3.5g, maximum bandwidth 100%

gd-tcp: scheduler map gd-map, minimum bandwidth 4.5g, maximum bandwidth 100%

hpc-tcp: scheduler map hpc-map, minimum bandwidth 2g, maximum bandwidth 100%

Interfaces

This example configures hierarchical port scheduling on interfaces xe-0/0/20 and xe-0/0/21. Because traffic is bidirectional, you apply the ingress and egress configuration components to both interfaces:

  • Classifier Name—hsclassifier1

  • Forwarding class sets—best-effort-pg, guar-deliver-pg, hpc-pg

  • Congestion notification profile—gd-cnp

Figure 1 shows a block diagram of the configuration components and the configuration flow of the CLI statements used in the example. You can perform the configuration steps in a different sequence if you want.

Figure 1: Hierarchical Port Scheduling Components Block Diagram Hierarchical Port Scheduling Components Block Diagram

Figure 2 shows a block diagram of the hierarchical scheduling packet flow from ingress to egress.

Figure 2: Hierarchical Port Scheduling Packet Flow Block Diagram Hierarchical Port Scheduling Packet Flow Block Diagram

Configuration

CLI Quick Configuration

To quickly configure hierarchical port scheduling on systems that support lossless transport, copy the following commands, paste them in a text file, remove line breaks, change variables and details to match your network configuration, and then copy and paste the commands into the CLI at the [edit class-of-service] hierarchy level:

Procedure

Step-by-Step Procedure

To perform a step-by-step configuration of the forwarding classes (priorities), forwarding class sets (priority groups), classifiers, queue schedulers, PFC, traffic control profiles, and interfaces to set up hierarchical port scheduling (ETS):

  1. Configure the forwarding classes (priorities) and map them to unicast output queues (do not explicitly map the fcoe and no-loss forwarding classes to output queues; use the default configuration):

  2. Configure forwarding class sets (priority groups) to group forwarding classes (priorities) that require similar CoS treatment:

  3. Configure a classifier to set the loss priority and IEEE 802.1 code points assigned to each forwarding class at the ingress:

  4. Configure a congestion notification profile to enable PFC on the FCoE and no-loss queue IEEE 802.1 code points:

  5. Assign the classifier to the interfaces:

  6. Apply the PFC configuration to the interfaces:

  7. Configure the drop profile for the best-effort low loss-priority queue:

  8. Configure the drop profile for the best-effort high loss-priority queue:

  9. Configure the drop profile for the network-control queue:

  10. Configure the drop profile for the high-performance computing queue:

  11. Define the minimum guaranteed bandwidth, priority, maximum bandwidth, and drop profiles for the best-effort queue:

  12. Define the minimum guaranteed bandwidth, priority, and maximum bandwidth for the FCoE queue:

  13. Define the minimum guaranteed bandwidth, priority, maximum bandwidth, and drop profile for the high-performance computing queue:

  14. Define the minimum guaranteed bandwidth, priority, maximum bandwidth, and drop profile for the network-control queue:

  15. Define the minimum guaranteed bandwidth, priority, and maximum bandwidth for the no-loss queue:

  16. Map the schedulers to the appropriate forwarding classes (queues):

  17. Define the traffic control profile for the best-effort priority group (queue scheduler to mapping, minimum guaranteed bandwidth, and maximum bandwidth):

  18. Define the traffic control profile for the guaranteed delivery priority group (queue to scheduler mapping, minimum guaranteed bandwidth, and maximum bandwidth):

  19. Define the traffic control profile for the high-performance computing priority group (queue to scheduler mapping, minimum guaranteed bandwidth, and maximum bandwidth):

  20. Apply the three priority groups (forwarding class sets) and the appropriate traffic control profiles to the egress ports:

Results

Display the results of the configuration (the system shows only the explicitly configured parameters; it does not show default parameters such as the fcoe and no-loss lossless forwarding classes).

Tip:

To quickly configure the interfaces, issue the load merge terminal command, and then copy the hierarchy and paste it into the switch terminal window.

Verification

To verify that you created the hierarchical port scheduling components and they are operating properly, perform these tasks:

Verifying the Forwarding Classes (Priorities)

Purpose

Verify that you created the forwarding classes and mapped them to the correct queues. (The system shows only the explicitly configured forwarding classes. It does not show default forwarding classes such as fcoe and no-loss.)

Action

List the forwarding classes using the operational mode command show class-of-service forwarding-class:

Meaning

The show class-of-service forwarding-class command lists all of the configured forwarding classes, the internal identification number of each forwarding class, the queues that are mapped to the forwarding classes, the policing priority, and whether the forwarding class is lossless (no-loss packet drop attribute enabled) or lossy forwarding class (no-loss packet drop attribute disabled). The command output shows that:

  • Forwarding class best-effort maps to queue 0 and is lossy

  • Forwarding class be2 maps to queue 1 and is lossy

  • Forwarding class hpc maps to queue 5 and is lossy

  • Forwarding class network-control maps to queue 7 and is lossy

In addition, the command lists the default multicast (multidestination) forwarding class and the default queue to which it is mapped.

Verifying the Forwarding Class Sets (Priority Groups)

Purpose

Verify that you created the priority groups and that the correct priorities (forwarding classes) belong to the appropriate priority group.

Action

List the forwarding class sets using the operational mode command show class-of-service forwarding-class-set:

Meaning

The show class-of-service forwarding-class-set command lists all of the configured forwarding class sets (priority groups), the forwarding classes (priorities) that belong to each priority group, and the internal index number of each priority group. The command output shows that:

  • The forwarding class set best-effort-pg includes the forwarding classes best-effort, be2, and network-control.

  • The forwarding class set guar-delivery-pg includes the forwarding classes fcoe and no-loss.

  • The forwarding class set hpc-pg includes the forwarding class hpc.

Verifying the Classifier

Purpose

Verify that the classifier maps forwarding classes to the correct IEEE 802.1p code points and packet loss priorities.

Action

List the classifier configured for hierarchical port scheduling using the operational mode command show class-of-service classifier name hsclassifier1:

Meaning

The show class-of-service classifier name hsclassifier1 command lists all of the IEEE 802.1p code points and the loss priorities mapped to all of the forwarding classes in the classifier. The command output shows that the forwarding classes best-effort, be2, no-loss, fcoe, hpc, and network-control have been created and mapped to IEEE 802.1p code points and loss priorities.

Verifying Priority-Based Flow Control

Purpose

Verify that PFC is enabled on the correct priorities for lossless transport.

Action

List the congestion notification profiles using the operational mode command show class-of-service congestion-notification:

Meaning

The show class-of-service congestion-notification command lists all of the congestion notification profiles and the IEEE 802.1p code points with PFC enabled. The command output shows that PFC is enabled for code points 011 (fcoe priority and queue) and 100 (no-loss priority and queue) for the gd-cnp congestion notification profile.

The command also shows the default cable length (100 meters), the default maximum receive unit (2500 bytes), and the default mapping of priorities to output queues because this example does not include configuring these options.

Verifying the Output Queue Schedulers

Purpose

Verify that you created the output queue schedulers with the correct bandwidth parameters and priorities, mapped to the correct queues, and mapped to the correct drop profiles.

Action

List the scheduler maps using the operational mode command show class-of-service scheduler-map:

Meaning

The show class-of-service scheduler-map command lists all of the configured scheduler maps. For each scheduler map, the command output includes:

  • The name of the scheduler map (scheduler-map field)

  • The name of the scheduler (scheduler field)

  • The forwarding classes mapped to the scheduler (forwarding-class field)

  • The minimum guaranteed queue bandwidth (transmit-rate field)

  • The scheduling priority (priority field)

  • The maximum bandwidth in the priority group the queue can consume (shaping-rate field)

  • The drop profile loss priority (loss priority field) for each drop profile name (name field)

The command output shows that:

  • The scheduler map be-map was created and has these properties:

    • There are two schedulers, be-sched and nc-sched.

    • The scheduler be-sched has two forwarding classes, best-effort and be2.

    • Scheduler be-sched forwarding classes best-effort and be2 share a minimum guaranteed bandwidth of 3,000,000,000 bps, can consume a maximum of 100 percent of the priority group bandwidth, and use the drop profile dp-be-low for low loss-priority traffic, the default drop profile for medium-high loss-priority traffic, and the drop profile dp-be-high for high loss-priority traffic.

    • The scheduler nc-sched has one forwarding class, network-control.

    • The network-control forwarding class has a minimum guaranteed bandwidth of 500,000,000 bps, can consume a maximum of 100 percent of the priority group bandwidth, and uses the drop profile dp-nc for low loss-priority traffic and the default drop profile for medium-high and high loss priority traffic.

  • The scheduler map gd-map was created and has these properties:

    • There are two schedulers, fcoe-sched and nl-sched.

    • The scheduler fcoe-sched has one forwarding class, fcoe.

    • The fcoe forwarding class has a minimum guaranteed bandwidth of 2,500,000,000 bps, and can consume a maximum of 100 percent of the priority group bandwidth.

    • The scheduler nl-sched has one forwarding class, no-loss.

    • The no-loss forwarding class has a minimum guaranteed bandwidth of 2,000,000,000 bps, and can consume a maximum of 100 percent of the priority group bandwidth.

  • The scheduler map hpc-map was created and has these properties:

    • There is one scheduler, hpc-sched.

    • The scheduler hpc-sched has one forwarding class, hpc.

    • The hpc forwarding class has a minimum guaranteed bandwidth of 2,000,000,000 bps, can consume a maximum of 100 percent of the priority group bandwidth, and uses the drop profile dp-hpc for low loss-priority traffic and the default drop profile for medium-high and high loss-priority traffic.

Verifying the Drop Profiles

Purpose

Verify that you created the drop profiles dp-be-high, dp-be-low, dp-hpc, and dp-nc with the correct fill levels and drop probabilities.

Action

List the drop profiles using the operational mode command show configuration class-of-service drop-profiles:

Meaning

The show configuration class-of-service drop-profiles command lists the drop profiles and their properties. The command output shows that there are four drop profiles configured, dp-be-high, dp-be-low, dp-hpc, and dp-nc. The output also shows that:

  • For dp-be-low, the drop start point (the first fill level) is when the queue is 25 percent filled, the drop end point (the second fill level) occurs when the queue is 50 percent filled, and the drop probability at the drop end point is 80 percent.

  • For dp-be-high, the drop start point (the first fill level) is when the queue is 10 percent filled, the drop end point (the second fill level) occurs when the queue is 40 percent filled, and the drop probability at the drop end point is 100 percent.

  • For dp-hpc, the drop start point (the first fill level) is when the queue is 75 percent filled, the drop end point (the second fill level) occurs when the queue is 90 percent filled, and the drop probability at the drop end point is 75 percent.

  • For dp-nc, the drop start point (the first fill level) is when the queue is 80 percent filled, the drop end point (the second fill level) occurs when the queue is 100 percent filled, and the drop probability at the drop end point is 100 percent.

Verifying the Priority Group Output Schedulers (Traffic Control Profiles)

Purpose

Verify that you created the traffic control profiles be-tcp, gd-tcp, and hpc-tcp with the correct bandwidth parameters and scheduler mapping.

Action

List the traffic control profiles using the operational mode command show class-of-service traffic-control-profile:

Meaning

The show class-of-service traffic-control-profile command lists all of the configured traffic control profiles. For each traffic control profile, the command output includes:

  • The name of the traffic control profile (traffic-control-profile)

  • The maximum port bandwidth the priority group can consume (shaping-rate)

  • The scheduler map associated with the traffic control profile (scheduler-map)

  • The minimum guaranteed priority group port bandwidth (guaranteed-rate)

The command output shows that:

  • The traffic control profile be-tcp can consume a maximum of 100 percent of the port bandwidth, is associated with the scheduler map be-map, and has a minimum guaranteed bandwidth of 3,500,000,000 bps.

  • The traffic control profile gd-tcp can consume a maximum of 100 percent of the port bandwidth, is associated with the scheduler map gd-map, and has a minimum guaranteed bandwidth of 4,500,000,000 bps.

  • The traffic control profile hpc-tcp can consume a maximum of 100 percent of the port bandwidth, is associated with the scheduler map hpc-map, and has a minimum guaranteed bandwidth of 2,000,000,000 bps.

Verifying the Interface Configuration

Purpose

Verify that the classifier, the congestion notification profile, and the forwarding class sets are configured on interfaces xe-0/0/20 and xe-0/0/21.

Action

List the interfaces using the operational mode commands show configuration class-of-service interfaces xe-0/0/20 and show configuration class-of-service interfaces xe-0/0/21:

Meaning

The show configuration class-of-service interfaces interface-name command shows that each interface includes the forwarding class sets best-effort-pg, guar-delivery-pg, and hpc-pg, congestion notification profile gd-cnp, and the IEEE 802.1p classifier hsclassifier1.