# Implicit Constituent Selection Overview

The implicit selection process for simple and compound shared shaping are the same. The process operates according to the following rules:

1. The point at which the scheduler profile that contains a shared-shaping-rate command is associated with a best-effort node or best-effort queue determines the logical interface type that the shared shaper applies to. Logical interface types include IP, VP, VC, VLAN, S-VLAN, and so on.
2. All nodes and queues for the same logical interface are potential constituents.
3. The best-effort node is selected if you configure node-based shared shaping. The best-effort queue is selected if you configure queue-based shared shaping. If you configure both, then the best-effort node is selected over the best-effort queue.
4. Non-best-effort queues are selected.

The implicit selection process for compound shared shaping operates according to the following rules:

1. The point at which the scheduler profile that contains a shared-shaping-rate command is associated with a best-effort node or best-effort queue determines the logical interface type that the shared shaper applies to. Logical interface types include IP, VP, VC, VLAN, and S-VLAN.
2. All nodes and queues for the same logical interface are potential constituents.
3. Nodes are selected over queues.

   For example, suppose a shared shaper is associated with a particular interface type. A node for that interface type is present and has a queue for that interface type stacked above it. The node is selected and becomes an active constituent; the queue is not selected.

   Now suppose a shared shaper is associated with a logical interface at the best-effort node, and a second shared shaper is simultaneously associated with the same interface at the best-effort queue. In this case, the node is selected as the constituent, because nodes are selected over queues.

In Figure 29, scheduler profile A includes a shared-shaping rule, and is associated with the best-effort node for VC 2. The constituents are all the scheduler objects associated with VC 2: VC 2 nodes and VC 2 queues. Nodes are selected over queues, so the implicitly selected active constituents are the VC 2 default group node, the VC 2 Group EF node, and the VC 2 Group AF node.

Figure 29: Implicit Constituent Selection for Compound Shared Shaper at Best-Effort Node

In Figure 30, scheduler profile B is associated with the best-effort queue for VC 3. This association indicates that the logical interface type being shared is VC. The constituents are all the scheduler objects associated with VC 3: VC 3 nodes and VC 3 queues. Nodes are selected over queues, so the implicitly selected active constituents for profile B’s shared shaper are the VC 3 default group queue, the VC 3 Group EF node, and the VC 3 Group AF node. The VC 3 default group queue is selected instead of the VC 3 default group node because the shared shaper is associated with that best-effort queue.

Figure 30: Implicit Constituent Selection for Compound Shared Shaper at Best-Effort Queue

Figure 30 illustrates other examples of implicit constituent selection. It does not reflect typical configurations, but includes a mixture of interface types: IP, VC, and VP. If only scheduler profile A is applied, the associated interface is VC 1. The selected constituents then consist of the VC 1 best-effort node, the VC 1 TC voice queue, and the VC 1 TC video queue.

If only scheduler profile B is applied, the associated interface is IP 1. The selected constituents then consist of the IP 1 best-effort queue, the IP 1 TC voice queue, and the IP 1 TC video queue.

If only scheduler profile C is applied, the associated interface is VP 1. The selected constituents then consist of the VP 1 default group node, the VP 1 Group EF node, and the VP 1 Group AF node.

## Implicit Bandwidth Allocation for Compound Shared Shaping

After selecting the implicit constituents for compound shared shaping, the router places the constituents in an order that determines how the constituents can claim a share of the available shared bandwidth.

When it implements compound implicit shared shapers, the software selects attributes for the active constituents consistent with the hierarchical scheduler.

- Auto-strict nodes and queues have the highest priority.
- Nodes and queues in extended traffic-class groups are next.
- Nodes and queues in the default traffic-class group have the lowest priority.

For example, suppose a compound shared shaper has a rate of 2 Mbps. The shared shaper has three active constituents: the best-effort node, a voice queue in the auto-strict traffic-class group, and a video queue in an extended traffic-class group. For compound implicit shared shaping, the shared shaper assigns the voice queue all the 2 MB, the video queue the next priority, and the best-effort node the last priority. The voice queue is unlikely to drop because it has highest priority in the hierarchical scheduler as well as highest priority within its shared shaper. The video queue is less likely to drop, but you must still take care that the hierarchical scheduler is provisioned to allocate the proper assured bandwidth to video. The shared shaper can shape, or deny, bandwidth to its constituents, but it cannot allocate assured bandwidth in the hierarchical scheduler.

The compound shared-shaper mechanism also works as follows. In the legacy scheduler, weight and shaping rate are independent attributes that together determine bandwidth allocation. The scheduler allocates bandwidth based on relative weights, and the shaper can deny that bandwidth when the shaping rate is reached. With the shared shaper in effect, two independent shaping rates must be satisfied for the queue or node to dequeue. A deficit in either type of shaping bounds the bandwidth.

As a general way of predicting the scheduler behavior, if the physical port is congested because many queues and nodes are competing in the hierarchical scheduler, the legacy weights and shaping rates dominate the scheduler outcome. If the hierarchical scheduler is not congested, a shared shaper configured for a logical interface dominates the outcome for the traffic scheduled through that logical interface.

The compound shared shaper orders constituents, and allocates shared bandwidth to them, according to the following rules:

1. Strict constituents in the auto-strict-priority traffic-class group

   For multiple strict-priority traffic-class groups, bandwidth allocation order is the same order in which the additional strict traffic class groups were configured. You can issue the show traffic-class-groups command to view this order.

2. Strict constituents in extended traffic-class groups

   For multiple extended traffic class groups, bandwidth allocation order is the same order in which the traffic class groups were configured. You can issue the show traffic-class-groups command to view this order.

3. Strict constituents in the default group
4. Weighted constituents in the auto-strict-priority traffic class group
5. Weighted constituents in extended traffic class groups
6. Weighted constituents in the default group

By default, strict constituents transmit traffic at a rate up to the lesser of their shared-shaping rate or the legacy shaping rate. Individual strict constituents can be allocated any bandwidth value less than the shared rate. The sum of all constituent rate credits does not have to be less than the shared rate. Individual constituent rates are not capped, because a particular traffic class often does not exceed a limit because of admission control, or because the class is policed at some point in the path.

Unlike strict constituents, which can consume bandwidth up to the legacy shaping rate or the shared-shaping rate, weighted constituents share bandwidth with their peers solely in proportion to their shared-shaping-weight. A higher weight value grants the constituent a greater proportion of the available bandwidth.

Although a shared shaper can be applied to up to eight constituents, only four of these can be weighted constituents. If you configure more than four weighted constituents as part of the same shared shaper, the first four are treated as weighted constituents but the remainder are handled as strict constituents, generating a warning message.

### Weighted Compound Shared Shaping Example

Weighted shared shaping is most useful for sharing bandwidth between traffic classes carrying TCP data. Figure 31 shows an application of weighted shared shaping where weighted constituents span multiple traffic class groups, making them ineligible for legacy weighted scheduling. Best-effort data and premium data constituents are weighted.

Figure 31: Weighted Shared Shaping

Scheduler profile A specifies the shared-shaping rate of 1Mbps for the best-effort node, which is associated with a VC logical interface. The node is further configured with a weight of 1. Scheduler profile B specifies the VC 1 AF node as a weighted constituent with a weight of 31.

The implicitly selected constituents of the shared shaper are the VC 1 best-effort node, the VC 1 AF group node, and the VC 1 EF group node. Bandwidth is allocated as follows:

- The VC 1 EF group node is strict and can transmit up to the shared-shaping rate of 1Mbps. Any remaining bandwidth is available to the remaining constituents.
- The VC 1 AF group node is weighted with the VC 1 best-effort node. The sum of the constituent weights is 32. With a weight of 31, the VC 1 AF group node can transmit 31/32nds of the available bandwidth when both constituents are competing for bandwidth.
- The VC 1 best-effort node is weighted with VC 1 AF group node. The sum of the constituent weights is 32. With a weight of 1, the VC 1 best-effort node can transmit 1/32 of the available bandwidth when both constituents are competing for bandwidth.

Figure 32 illustrates an example of mixed interface shaping and its implications for implicit constituent selection for compound shared shaping.

Figure 32: Implicit Constituent Selection for Compound Shared Shaper: Mixed Interface Types

#### Related Documentation

- Configuring Implicit Constituents for Simple or Compound Shared Shaping