Configuring QoS for ATM Interfaces
The E-series router provides extended ATM QoS functionality through its integrated scheduler. The integrated scheduler consists of two schedulers in series—the hierarchical round robin (HRR) scheduler and the segmentation and reassembly (SAR) scheduler.
The integrated scheduler enables you to configure QoS on your ATM networks using the HRR scheduler that is used on all E-series ASIC-enabled line modules. In addition, you can use the commercial SAR scheduler to configure traditional ATM cell-based QoS.
NOTE: The term HRR scheduler is used in this chapter to describe the scheduling performed by the ASIC on the ATM line module.
Integrating the HRR Scheduler and SAR Scheduler
The proper integration of the two schedulers is an important element of the router's ATM QoS support. There are three QoS port modes that control integration of the two schedulers:
- Default integrated QoS port mode—ATM application controls the scheduling facilities of the SAR scheduler.
- Low-latency QoS port mode—HRR scheduler controls the traffic rate.
- Low-CDV QoS port mode—HRR scheduler and the SAR scheduler operate in concert, with both contributing to the traffic scheduling.
Improper configuration of the two schedulers might create an inefficient scenario in which extra latency is introduced, or might cause the scheduler to underuse the link. To configure integration of the schedulers, use the qos-mode-port commands shown in Table 22.
NOTE: For ERX-7xx models, ERX-14xx models, and the ERX-310, the qos-mode-port commands are valid only for the major interface on port 0.
It is important that you ensure that the HRR and the SAR schedulers shape packets at the same rate. If the HRR scheduler sends packets at a higher rate than the SAR scheduler shapes them, the SAR scheduler could become congested and block the entire port. To manage the integration of the HRR and the SAR schedulers, first use the qos-shaping-mode cell command to specify the cell-based shaping mode. Next, use the qos-mode-port low-cdv command to configure low-CDV QoS port mode, which ensures that the HRR and SAR schedulers are configured at the same rate. Finally, configure the QoS application to control the SAR scheduler's operation. In this mode you configure both schedulers using scheduler profiles and QoS profiles. The E-series router then ensures that VPs and VCs are shaped to the same rates in both schedulers.
Backpressure
ATM packets are initially scheduled through the HRR scheduler and then sent to the SAR scheduler, from where the cells are scheduled onto the circuit. If a SAR VC queue begins to fill up, the SAR scheduler issues VC backpressure messages to the HRR scheduler. The backpressure messages control the amount of traffic the HRR scheduler sends to the SAR scheduler. The SAR scheduler can also exert port backpressure on the HRR scheduler.
Backpressure is a critical mechanism that allows the two schedulers in series to operate as a single integrated scheduler. Backpressure ensures that packets do not drain over internal data paths at an unmanageable rate from the HRR scheduler to the SAR scheduler. Without backpressure from the SAR scheduler, the HRR scheduler would see no congestion even if the SAR scheduler is completely saturated.
Figure 23 shows the HRR and SAR schedulers working together to form the integrated scheduler. When the SAR VC queues start to back up, the SAR exerts VC backpressure to the corresponding VC node in the HRR scheduler.
VC backpressure affects only VC nodes that are in the default traffic-class group. As a consequence, VC nodes that are in named traffic-class groups within the scheduler hierarchy are not affected by VC backpressure.
![]()
Configuring the Integrated Scheduler
The HRR scheduler and the SAR scheduler work together as an integrated scheduler for ATM traffic. The HRR scheduler is configured by default with per-VC and per-IP interface scheduler nodes, and one best-effort class queue for each IP interface. The SAR scheduler implements weighted round-robin scheduling with one queue per VC. The VC queues are grouped into round robins based on the ATM service classes and the VP tunnels you have configured.
In the default integrated mode, controlled by the ATM application, the SAR scheduler controls the scheduling via the VC backpressure messages it sends to the HRR scheduler. When the HRR scheduler receives a backpressure message from the SAR scheduler, the HRR scheduler disables the node regardless of the node weight or shaping rate. When the HRR scheduler receives a backpressure release, the scheduler node is reenabled.
Configuring the SAR Scheduler Mode of Operation
You use the qos-mode-port command to configure port queuing on the SAR scheduler, enabling per-packet rather than per-circuit scheduling. Port queuing mode allows you to use more of the facilities of the HRR scheduler, which are effectively disabled in default integrated mode, while at the same time making the SAR scheduler more transparent. In port queuing mode, you use the QoS application to configure the three levels of the HRR scheduler, including weighted round robin, traffic shaping, and strict priority scheduling.
The qos-mode-port commands, including the no version, are described in the following list:
- no qos-mode-port—The default integrated mode, in which the ATM SAR scheduler does the scheduling. Both VC and port backpressure are enabled, and the HRR scheduler does minimal scheduling. The SAR scheduler performs significant buffering.
- qos-mode-port low-latency—The HRR scheduler does the scheduling. All QoS configurations are supported. VC backpressure is disabled, port backpressure is set as aggressive, and the SAR scheduler does minimal buffering. This mode enables the lowest latency for packets scheduled in the HRR scheduler with strict priority. Because the SAR scheduler is running with minimal buffering, there is no head-of-line blocking.
- qos-mode-port low-cdv—The HRR and SAR schedulers both perform scheduling; QoS synchronizes the rates of the two schedulers. All QoS configurations are supported. VC backpressure is disabled, and port backpressure is set to the default thresholds of 6 MB per OC3 port and 24 MB per OC12 port. This mode allows you to configure shaping in both the SAR scheduler and the HRR scheduler; low-cdv mode works with cell shaping mode only and enables relative weighted VCs and hierarchical shaping in the HRR scheduler. The SAR scheduler performs normal buffering and can shape either the VC or VP, but not both.
NOTE: For ERX-7xx models, ERX-14xx models, and the ERX-310, the qos-mode-port commands are valid only for the major interface on port 0.
Configuring the Operational QoS Shaping Mode
The E-series router enables you to shape ATM traffic based on either frames or cells. The default frame shaping mode provides compatibility with previous versions of the E-series software. When you use cell shaping mode to configure the shaping or policing rate, the resulting traffic stream conforms exactly to the policing rates configured in downstream ATM switches. Using cell shaping also reduces the number of packet drops in the ATM network.
ATM policing is sensitive to cell delay variation tolerance (CDVT). If the cells on a particular VC or VP arrive too closely spaced, an ATM switch might drop cells. However, the cell scheduler reduces CDVT by ensuring cell spacing. The router enables you to use techniques such as WRR on the HRR scheduler to achieve the proper packet scheduling. You use the SAR scheduler in series with the HRR scheduler to even out cell bursts into smoother per-VC and per-VP traffic profiles that bound CDVT. You accomplish this by using the qos-shaping-mode cell command to configure the QoS shaping mode, and the qos-mode-port low-cdv command to configure the port queuing mode.
The QoS shaping mode also determines how QoS statistics are reported. Frame shaping reports QoS statistics such as transmitted bytes and dropped bytes based on bytes within frames. Cell shaping reports the statistics in bytes within cells and also accounts for cell encapsulation and padding overhead.
The router uses an operational shaping mode, which is based on the following two commands:
- The QoS shaping mode you set with the qos-shaping-mode command on port 0 and on the specific port
- The port queuing mode you set with the qos-mode-port command on port 0
The router uses the following rules to determine the operational shaping mode used for a port.
- If the specific port has a QoS shaping mode configured, the operational shaping mode for that port is the same as the QoS shaping mode.
- If the specific port has no QoS shaping mode configured, the operational shaping mode is the same as the QoS shaping mode for port 0, if one is configured.
- If both the specific port and port 0 have no QoS shaping mode configured, the operational shaping mode is based on the port 0 queuing mode. If the port 0 queuing mode (set by the qos-mode-port command) is low-cdv, the operational shaping mode is cell; otherwise the operational shaping mode is frame.
Table 23 lists the possible combinations of the two commands and the resultant operational shaping mode.
ATM QoS Configuration Examples
This section provides configuration examples for the three modes for QoS on ATM interfaces.
Default Integrated Mode
In the default integrated mode, the SAR scheduler is the dominant scheduler, and it backpressures the first-stage (HRR) scheduler per VC. Each VC buffers only a few hundred bytes. Figure 24 shows the default integrated mode.
![]()
The following example creates the default integrated mode.
- From the desired port, set the QoS port mode to default integrated mode. (For ATM interfaces on ERX-7xx models, ERX-14xx models, and the ERX-310, you must use port 0.)
host1(config)#interface atm 2/0host1(config-if)#no qos-mode-port- Specify the VP shaping rate.
host1(config-if)#atm vp-tunnel 0 2000- Specify the shaping rate for the ATM subinterface.
host1(config-if)#interface atm 2/0.5host1(config-subif)#atm-pvc 5 0 5 aal5snap 768Low-Latency Mode
In low-latency mode, the SAR scheduler backpressures the HRR scheduler per physical port; each physical port buffers only a few kilobytes. In this mode, the SAR scheduler is neutralized and the HRR scheduler is dominant. Figure 25 shows the low-latency mode.
![]()
In the following example, low-latency mode configuration is used with a strict-priority queue and a best-effort queue.
- Configure the traffic class.
host1(config)#traffic-class stricthost1(config-traffic-class)#exit- Set the traffic class in the traffic-class group.
host1(config)#traffic-class-group stricthost1(config-traffic-class-group)#traffic-class stricthost1(config-traffic-class-group)#exit- Define the scheduler profile for the traffic-class group.
host1(config)#scheduler-profile stricthost1(config-scheduler-profile)#strict-priorityhost1(config-scheduler-profile)#exit- Configure the QoS profile with two ATM VC queues.
host1(config)#qos-profile low-latency-q-phost1(config-qos-profile)#atm-vc nodehost1(config-qos-profile)#atm-vc queue traffic-class best-efforthost1(config-qos-profile)#atm group strict scheduler-profile stricthost1(config-qos-profile)#atm-vc queue traffic-class stricthost1(config-qos-profile)#exit- From the desired port, set the QoS port mode to low latency. (For ATM interfaces on ERX-7xx models, ERX-14xx models, and the ERX-310, you must use port 0.)
host1(config)#interface atm 2/0host1(config-if)#qos-mode-port low-latencyhost1(config-if)#qos-profile low-latency-q-pLow-CDV Mode
In low-CDV mode, the HRR scheduler and the SAR scheduler operate in concert. The SAR scheduler shapes VPs, VCs, or both according to the QoS scheduler shaping rate. Therefore, the QoS shaping mode must be set to the cell mode. In low-CDV mode, the SAR scheduler converts frame-atomic bursts of cells to CDVT-conformant streams of interleaved cells. There is no VC backpressure, and the port backpressure is loose, so several megabytes of cells can reside in the SAR buffer pool. Figure 26 shows low-CDV mode with per-VP CDVT, and Figure 27 shows low-CDV mode with per-VC CDVT.
![]()
![]()
In the following example, low-CDV mode is used with a strict-priority queue and a best-effort queue.
- Configure the traffic class.
host1(config)#traffic-class stricthost1(config-traffic-class)#exit- Set the traffic class in the traffic-class group.
host1(config)#traffic-class-group stricthost1(config-traffic-class-group)#traffic-class stricthost1(config-traffic-class-group)#exit- Define the scheduler profiles for the traffic-class group.
host1(config)#scheduler-profile stricthost1(config-scheduler-profile)#strict-priorityhost1(config-scheduler-profile)#exithost1(config)#scheduler-profile 500khost1(config-scheduler-profile)#shaping-rate 500000host1(config-scheduler-profile)#exithost1(config)#scheduler-profile 1mhost1(config-scheduler-profile)#shaping-rate 1000000host1(config-scheduler-profile)#exithost1(config)#scheduler-profile 2mhost1(config-scheduler-profile)#shaping-rate 2000000host1(config-scheduler-profile)#exit- Configure the QoS profile with two ATM VC queues.
host1(config)#qos-profile low-cdv-q-phost1(config-qos-profile)#atm-vc node scheduler-profile 1mhost1(config-qos-profile)#atm-vp node scheduler-profile 2mhost1(config-qos-profile)#atm-vc queue traffic-class best-efforthost1(config-qos-profile)#atm group strict scheduler-profile stricthost1(config-qos-profile)#atm-vc queue traffic-class strict scheduler-profile 500khost1(config-qos-profile)#exit- From the desired port, configure shapeless VP tunnels and set the QoS port mode to low CDV. (For ATM interfaces on ERX-7xx models, ERX-14xx models, and the ERX-310, you must use port 0.)
host1(config)#interface atm 2/0host1(config-if)#atm vp-tunnel 0 0host1(config-if)#atm vp-tunnel 1 0host1(config-if)#qos-mode-port low-cdvhost1(config-if)#qos-profile low-cdv-q-phost1(config-subif)#interface atm 2/0.5host1(config-subif)#atm pvc 5 0 5 aal5snaphost1(config-subif)#interface atm 2/0.6host1(config-subif)#atm pvc 6 0 6 aal5snaphost1(config-subif)#interface atm 2/0.7host1(config-subif)#atm pvc 7 1 7 aal5snaphost1(config-subif)#interface atm 2/0.8host1(config-subif)#atm pvc 8 1 8 aal5snapatm vp-tunnel
- Use to configure a shapeless virtual path tunnel that is used when the QoS application controls SAR scheduler shaping. Configure shapeless virtual path tunnels by specifying a VP tunnel shaping rate of 0. In low-CDV QoS port mode, QoS automatically configures the shaping rate of the tunnel based on the QoS profile and the scheduler profile.
- Example
host1(config)#interface atm 1/0host1(config-if)#atm vp-tunnel 0 0Use the no version to remove the VP tunnel specification. qos-mode-port
- Use to configure an ATM port for per-port queuing, and enable certain scheduling features for the HRR scheduler that are effectively disabled in default integrated mode.
- For ATM interfaces on ERX-7xx models, ERX-14xx models, and the ERX-310, you can configure per-port queuing only on port 0 (zero).
- When the low-latency keyword or no keyword is used:
- VC backpressure is disabled.
- Port backpressure is enabled as aggressive.
- SAR scheduler performs minimal buffering.
- QoS synchronizes the shaping rates for VPs and VCs in the HRR and SAR schedulers.
- VC backpressure is disabled.
- Port backpressure is set to default thresholds of 6 MB per OC3 port and 24 MB per OC12 port.
- SAR scheduler performs more buffering than in low-latency mode.
- Cell QoS shaping mode should be used.
- For ATM interfaces on ERX-7xx models, ERX-14xx models, and the ERX-310, this command must be issued on ATM port 0
- Excludes non-UBR ATM QoS services on any VC on the ATM module; for example, PCR, nrtVBR, and CBR
- Cannot be used if shaping is currently configured on the SAR scheduler
- Cannot be used with ATM VP tunnels with nonzero rates; however, can be used with tunnels with rates of zero (shapeless tunnels)
host1(config)#interface atm 1/0host1(config-if)#qos-mode-port low-latencyUse the no version to remove per-port queuing on the ATM port and restore the default integrated mode setting. When per-port queuing is disabled:
- Both VC and port backpressure are enabled.
- HRR scheduler does minimal scheduling.
- SAR scheduler performs significant buffering.
- The atm-vc node command must appear in the QoS profile attached to the ATM port.
qos-shaping-mode
- frame—SAR shaping is controlled by the ATM application. Shaping is based on the number of bytes in the frame, without regard to cell encapsulation or padding overhead; this is the default mode.
- cell—SAR shaping is controlled by the QoS application. Shaping is based on the number of bytes in cells, and accounts for the ATM cell encapsulation and padding overhead.
- For ATM interfaces on ERX-7xx models, ERX-14xx models, and the ERX-310, this command must be issued on ATM port 0.
- Example
host1(config)#interface atm 1/0host1(config-if)#qos-shaping-mode cellUse the no version to restore the default setting, frame.
NOTE: We recommend that you clear the statistics counters whenever you change the QoS shaping mode. Otherwise, the statistics contain a mixture of frame-based and cell-based values.