[Contents] [Prev] [Next] [Index] [Report an Error]

## Example: Diffserv Configuration with Multiple Traffic-Class Groups

In this example configuration, a service provider offers three types of service: data, video-on-demand, and voice. Each service has different QoS requirements. The data users log in and can dynamically subscribe to video and voice services. The data service is a best-effort service. The video service is a better than best effort service, which corresponds to assured forwarding PHB. The voice service is a low-latency service, which corresponds expedited forwarding PHB.

You can meet these varying traffic requirements by creating a traffic class group for each of the three services. Creating groups enables you to apply QoS to the group nodes. For example, you could specify the following:

- The voice service gets low-latency, strict priority treatment through the fabric and on egress. You configure an assured rate of 20 Mbps, and shape the traffic to 20 Mbps. Each voice user is shaped to 1 Mbps to support up to 20 voice subscribers without oversubscription. Call admission control ensures that there are no more than 20 simultaneous voice service subscribers. Unused bandwidth is divided among the video and best-effort users.
- The video service is scheduled by the HRR scheduler and gets the hierarchical assured rate. You shape the video traffic to 50 Mbps. Each video service user is assured 1 Mbps, and is shaped to 1 Mbps to support up to 50 video subscribers without oversubscription. Call admission control ensures that there are no more than 50 simultaneous video service subscribers. Unused bandwidth is divided among the best-effort users.
- The best-effort data service is scheduled by the HRR scheduler and gets the bandwidth left over from the voice and video services.

Configure this implementation as follows.

1. Create the video and voice traffic classes. Assign the voice traffic class a strict-priority treatment within the fabric. Manually creating a best-effort traffic class is superfluous because the router creates this class by default.
   `
   (config)#traffic-class video
   (config-traffic-class)#exit
   (config)#traffic-class voice
   (config-traffic-class)#fabric-strict-priority
   (config-traffic-class)#exit
   (config)#traffic-class best-effort
   (config-traffic-class)#exit
   `
2. Create scheduler profiles for the assured forwarding, expedited forwarding, and best-effort groups. Specify strict priority scheduling for the expedited forwarding traffic and shape it to 20 Mbps.
   `
   (config)#scheduler-profile expeditedGroup
   (config-scheduler-profile)#strict-priority
   (config-scheduler-profile)#shaping-rate 20000000
   (config-scheduler-profile)#assured-rate 20000000
   (config-scheduler-profile)#exit
   `
3. Assured traffic is not strict, so it is scheduled by the HRR scheduler. Shape the assured traffic to 50 Mbps, and specify the hierarchical assured rate to give assured traffic preferential treatment over best-effort traffic.
   `
   (config)#scheduler-profile assuredGroup
   (config-scheduler-profile)#shaping-rate 50000000
   (config-scheduler-profile)#assured-rate hierarchical
   (config-scheduler-profile)#exit
   `
4. Best effort traffic is also scheduled by the HRR scheduler. You do not apply any shaping for this traffic because it simply gets the leftover bandwidth.
   `
   (config)#scheduler-profile bestEffortGroup
   (config-scheduler-profile)#exit
   `
5. Create scheduler profiles for the voice, video, and best-effort service classes. Shape voice and video to 1 Mbps. Because you do not specify a shaping rate, the best-effort traffic can borrow unused bandwidth.
   `
   (config)#scheduler-profile voice
   (config-scheduler-profile)#shaping-rate 1000000
   (config-scheduler-profile)#exit
   (config)#scheduler-profile video
   (config-scheduler-profile)#shaping-rate 1000000
   (config-scheduler-profile)#exit
   (config)#scheduler-profile best-effort
   (config-scheduler-profile)#exit
   `
6. Put the video traffic class into the assured-forwarding traffic-class group and specify the group as strict priority. Put the voice traffic class into the expedited-forwarding traffic-class group. Put the best-effort traffic class into the best-effort traffic-class group.
   `
   (config)#traffic-class-group assured-forwarding auto-strict-priority
   (config-traffic-class-group)#traffic-class video
   (config-traffic-class-group)#exit
   (config)#traffic-class-group expedited-forwarding extended
   (config-traffic-class-group)#traffic-class voice
   (config-traffic-class-group)#exit
   (config)#traffic-class-group best-effort extended
   (config-traffic-class-group)#traffic-class best-effort
   (config-traffic-class)#exit
   `
7. Create a QoS profile that contains the group rules for the assured-forwarding, expedited-forwarding, and best-effort traffic-class groups.
   `
   (config)#qos-profile qpDiffServExample
   (config-qos-profile)#ethernet group assured-fwd scheduler-profile assuredGroup
   (config-qos-profile)#ethernet group expedited-fwd scheduler-profile expeditedGroup
   (config-qos-profile)#ethernet group best-effort scheduler-profile bestEffortGroup
   (config-qos-profile)#ip node group assured-fwd scheduler-profile default
   (config-qos-profile)#ip node group expedited-fwd scheduler-profile default
   (config-qos-profile)#ip node group best-effort scheduler-profile default
   (config-qos-profile)#ip queue traffic-class voice scheduler-profile voice
   (config-qos-profile)#ip queue traffic-class video scheduler-profile video
   (config-qos-profile)#ip queue traffic class best-effort scheduler-profile best-effort
   (config-qos-profile)#exit
   `
8. Attach the QoS profile to an Ethernet port.
   `
   (config)#interface fastEthernet 9/0
   (config-if)#qos-profile qpDiffServExample
   (config-if)#exit
   `

Figure 39 shows this configuration with 3 users: IP 1, IP 2, and IP 3.

- IP 1 subscribes to data, video, and voice services.
- IP 2 subscribes to data and video services.
- IP 3 subscribes to data and voice services.

  Figure 39: Diffserv Configuration with Multiple Traffic-Class Groups

The following set of commands configures the QoS profile detailed in Step 7 previously. Each line in the profile is known as a profile rule. The numbers associated with each rule correspond to the numbers in Figure 39.

`

(config)#qos-profile qpDiffServExample
(1) (config-qos-profile)#ethernet group best-effort scheduler-profile bestEffortGroup
(2) (config-qos-profile)#ethernet group assured-fwd scheduler-profile assuredGroup
(3) (config-qos-profile)#ethernet group expedited-fwd scheduler-profile expeditedGroup
(4) (config-qos-profile)#ip node group best-effort scheduler-profile default
(5) (config-qos-profile)#ip node group assured-fwd scheduler-profile default
(6) (config-qos-profile)#ip node group expedited-fwd scheduler-profile default
(7) (config-qos-profile)#ip queue traffic-class voice scheduler-profile voice
(8) (config-qos-profile)#ip queue traffic-class video scheduler-profile video
(9) (config-qos-profile)#ip queue traffic class best-effort scheduler-profile best-effort

`

When you specify a group rule within an attached QoS profile, nodes and queue may be attached to group nodes. If the qpDiffServExample QoS profile used in the preceding example did not contain group rules, then the groups would exist with no attachments.

For example, the following set of commands configures the same QoS profile, but with the group removed, as shown in Figure 40.

`

(config)#qos-profile qpDiffServExample
(config-qos-profile)#ip node scheduler-profile default
config-qos-profile)#ip queue traffic-class voice scheduler-profile voice
config-qos-profile)#ip queue traffic-class video scheduler-profile video
config-qos-profile)#ip queue traffic class best-effort scheduler-profile best-effort

`

In this case, the configuration creates the groups but does not place any of the traffic classes into the groups. Figure 40 shows that IP 1, IP 2, and IP 3 contain the ungrouped traffic classes, data, video, and voice.

Figure 40: Diffserv Configuration Without Traffic-Class Groups

Because the BE, AF, and EF groups have no queues, their scheduler attributes (weight, assured rate, shaping rate) do not affect the HRR scheduler's distribution of bandwidth.

[Contents] [Prev] [Next] [Index] [Report an Error]