Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Configuring Class-of-Service on Link Services Interfaces

 

On a Juniper Networks device, when LFI is enabled, all forwarding traffic assigned to queue 2 or member link is treated as LFI (voice) traffic. The topics below discuss the overview of classifiers and forwarding class, definition and application of schedule maps, and overview and configuration details of interface shaping rates on SRX series devices.

Understanding How to Define Classifiers and Forwarding Classes

By defining classifiers you associate incoming packets with a forwarding class and loss priority. Based on the associated forwarding class, you assign packets to output queues. To configure classifiers, you specify the bit pattern for the different types of traffic. The classifier takes this bit pattern and attempts to match it to the type of packet arriving on the interface. If the information in the packet’s header matches the specified pattern, the packet is sent to the appropriate queue, defined by the forwarding class associated with the classifier.

On a Juniper Networks device, when LFI is enabled, all forwarding traffic assigned to queue 2 or member link is treated as LFI (voice) traffic. You do not need to assign network control traffic to a queue explicitly, because it is assigned to queue 3 by default.

Note

On member links:

  • DATA is assigned to queue 0.

  • VOICE is assigned to queue 2.

  • NC (network control) is assigned to queue 3. By default NC is assigned to queue 3.

Example: Defining Classifiers and Forwarding Classes

This example shows how to define classifiers for different types of traffic, such as voice, data, and network control packets, and to direct the traffic to different output queues to manage your throughput.

Requirements

Before you begin:

  • Configure two Juniper Networks devices with at least two serial interfaces that communicate over serial links.

  • Configure CoS components. See Junos OS Class of Service Configuration Guide for Security Devices.

Overview

In this example, you configure class of service and set the default IP precedence classifier to classify_input, which is assigned to all incoming traffic. You then set the precedence bit value in the type of service field to 000 for all incoming data traffic and 010 for all incoming voice traffic. You set all outgoing data traffic to queue 0 and all voice traffic to queue 2, and fragmentation-map maps queue 2 to no fragmentation.

Configuration

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.

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To define classifiers and forwarding classes:

  1. Configure class of service.
  2. Configure the behavior aggregate classifier for classifying packets.
  3. Assign packets with IP precedence to the data forwarding class and specify a loss priority.
  4. Assign packets with IP precedence to the voice forwarding class and specify a loss priority.
  5. Specify the forwarding class one-to-one with the output queues.
  6. Create an interface and apply the behavior aggregate classifier.
  7. Configure fragmentation map.
  8. Attach fragmentation map to the interface.

Results

From configuration mode, confirm your configuration by entering the show class-of-service command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

If you are done configuring the device, enter commit from configuration mode.

Verification

To confirm that the configuration is working properly, perform this task:

Verifying Classifiers and Forwarding Classes

Purpose

Verify the classifiers and the forwarding classes.

Action

From operational mode, enter the show class-of-service command.

Understanding How to Define and Apply Scheduler Maps

Juniper Networks devices support per-unit scheduling set class-of-service schedulers S0 priority low, which allows you to configure scheduler maps on each MLPPP or MLFR multilink bundle. You can also configure scheduler maps on constituent links, but you must maintain the same relative priority on the constituent links and on the multilink bundle.

If you configure CoS components with LFI on a Juniper Networks device, we recommend that you follow certain recommendations for shaping rate, scheduling priority, and buffer size.

When you configure LFI, we recommend that you configure the shaping rate on each constituent link of the multilink bundle. Shaping rate configuration on the constituent links is required to limit the jitter on the LFI queue. If you anticipate no delay-sensitive or jitter-sensitive traffic on the LFI queue, or if there is no LFI traffic at all, shaping rate configuration is optional.

Table 1 shows an example of correct and incorrect relative priorities on a multilink bundle and its constituent link. In this example, you have assigned a high priority to LFI packets and a low priority to data packets on the multilink bundle. To maintain the relative priority on the constituent links, you can assign a high priority to the LFI packets and a medium-high priority to the data packets, but you cannot assign a medium-high priority to LFI packets and a high priority to data packets.

Table 1: Relative Priorities on Multilink Bundles and Constituent Links

Multilink Bundle

Correct Constituent Link Priorities

Incorrect Constituent Link Priorities

LFI packets—High priority

LFI packets—High priority

LFI packet—Medium-high priority

Data packets—Low priority

Data packets—Medium-high priority

Data packets—High priority

By defining schedulers you configure the properties of output queues that determine the transmission service level for each queue. These properties include the amount of interface bandwidth assigned to the queue, the size of the memory buffer allocated for storing packets, and the priority of the queue. After defining schedulers you associate them with forwarding classes by means of scheduler maps. You then associate each scheduler map with an interface, thereby configuring the hardware queues and packet schedulers that operate according to this mapping.

Note

When data and LFI streams are present, the following scheduler map configuration is recommended for constituent links. This gives less latency for LFI traffic and avoids out-of-order transmission of data traffic.

Configure the following schedulers:

  • set class-of-service schedulers S0 buffer-size temporal 20k

  • set class-of-service schedulers S0 priority low

  • set class-of-service schedulers S2 priority high

  • set class-of-service schedulers S3 priority high

Configure the following scheduler map:

  • set class-of-service scheduler-maps lsqlink_map forwarding-class best-effort scheduler S0

  • set class-of-service scheduler-maps lsqlink_map forwarding-class assured-forwarding scheduler S2

  • set class-of-service scheduler-maps lsqlink_map forwarding-class network-control scheduler S3

Attach scheduler map to all member links:

  • set class-of-service interfaces t1-2/0/0 unit 0 scheduler-map lsqlink_map

Note

Even after this configuration, if out-of-range sequence number drops are observed on the reassembly side, increase the drop-timeout of the bundle to 200 ms.

Example: Configuring Scheduler Maps

This example shows how to configure scheduler maps to determine the transmission service level for each output queue.

Requirements

Before you begin, you should have two Juniper Networks devices configured with at least two serial interfaces that communicate over serial links.

Overview

In this example, you create interfaces called lsq-0/0/0, se-1/0/0, and se-1/0/1. You enable per-unit scheduling to allow the configuration of scheduler maps on the bundle. You configure a scheduler map as s_map on lsq-0/0/0. You then apply the scheduler map to the constituent links, se-1/0/0 and se-1/0/1, of the multilink bundle. You associate the scheduler with each of the forwarding classes, DATA, VOICE and NC. You define the properties of output queues for the DATA scheduler by setting the transmit rate and the buffer size to 49 percent. You specify the properties of output queues for the VOICE scheduler by setting the transmit rate to 50 percent, the buffer size to 5 percent, and the priority to high. Finally, you define the properties of output queues for the NC scheduler by setting the transmit rate and the buffer size to 1 percent and the priority to high.

Configuration

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.

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure scheduler maps:

  1. Create interfaces and enable per-unit scheduling.
  2. Define a scheduler map and apply it to the constituent links in the multilink bundle.
  3. Associate a scheduler with each forwarding class.
  4. Define the properties of output queues for the DATA scheduler.
  5. Define the properties of output queues for the VOICE scheduler.
  6. Define the properties of output queues for the NC scheduler.

Results

From configuration mode, confirm your configuration by entering the show class-of-service command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

If you are done configuring the device, enter commit from configuration mode.

Verification

To confirm that the configuration is working properly, perform this task:

Verifying the Configuration of scheduler maps.

Purpose

Verify the configuration of scheduler maps.

Action

From operational mode, enter the show class-of-services lsq-0/0/0 scheduler-map s_map, show class-of-services se-1/0/0 scheduler-map s_map, and show class-of-services se-1/0/1 scheduler-map s_map commands.

Understanding Interface Shaping Rates

When you configure LFI, we recommend that you configure the shaping rate on each constituent link of the multilink bundle. Shaping rate configuration on the constituent links is required to limit the jitter on the LFI queue. If you anticipate no delay-sensitive or jitter-sensitive traffic on the LFI queue, or if there is no LFI traffic at all, shaping rate configuration is optional.

The shaping rate specifies the amount of bandwidth to be allocated for the multilink bundle. You must configure the shaping rate to be equal to the combined physical interface bandwidth for the constituent links. The combined bandwidth capacity of the two constituent links is 2 Mbps. Hence, configure a shaping rate of 2 Mbps on each constituent link.

Example: Configuring Interface Shaping Rates

This example shows how to configure interface shaping rates to control the maximum rate of traffic transmitted on an interface.

Requirements

Before you begin:

  • Configure two Juniper Networks devices configured with at least two serial interfaces that communicate over serial links. For more information about serial interfaces. See Serial Interfaces Overview.

  • To apply shaping rates to interfaces, you have to first enable per-unit scheduling. For more information on per-unit scheduling. See Example: Configuring Scheduler Maps.

Overview

In this example, you set the shaping rate to 2000000 for the constituent links of the multilink bundle, se-1/0/0 and se-1/0/1.

Configuration

Step-by-Step Procedure

To configure the interface shaping rates:

  1. Configure class of service.
  2. Apply the shaping rates to the constituent links of the multilink bundle.

Verification

To verify the configuration is working properly, enter the show class-of-service command.

Related Documentation

  • Junos OS Feature Support Reference for SRX Series and J Series Devices