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:

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.
    host1(config)#traffic-class video host1(config-traffic-class)#exit host1(config)#traffic-class voice host1(config-traffic-class)#fabric-strict-priority host1(config-traffic-class)#exit host1(config)#traffic-class best-effort host1(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.
    host1(config)#scheduler-profile expeditedGroup host1(config-scheduler-profile)#strict-priority host1(config-scheduler-profile)#shaping-rate 20000000 host1(config-scheduler-profile)#assured-rate 20000000 host1(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.
    host1(config)#scheduler-profile assuredGroup host1(config-scheduler-profile)#shaping-rate 50000000 host1(config-scheduler-profile)#assured-rate hierarchical host1(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.
    host1(config)#scheduler-profile bestEffortGroup host1(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.
    host1(config)#scheduler-profile voice host1(config-scheduler-profile)#shaping-rate 1000000 host1(config-scheduler-profile)#exit host1(config)#scheduler-profile video host1(config-scheduler-profile)#shaping-rate 1000000 host1(config-scheduler-profile)#exit host1(config)#scheduler-profile best-effort host1(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.
    host1(config)#traffic-class-group assured-forwarding auto-strict-priority host1(config-traffic-class-group)#traffic-class video host1(config-traffic-class-group)#exit host1(config)#traffic-class-group expedited-forwarding extended host1(config-traffic-class-group)#traffic-class voice host1(config-traffic-class-group)#exit host1(config)#traffic-class-group best-effort extended host1(config-traffic-class-group)#traffic-class best-effort host1(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.
    host1(config)#qos-profile qpDiffServExample host1(config-qos-profile)#ethernet group assured-fwd scheduler-profile assuredGroup host1(config-qos-profile)#ethernet group expedited-fwd scheduler-profile expeditedGroup host1(config-qos-profile)#ethernet group best-effort scheduler-profile bestEffortGroup host1(config-qos-profile)#ip node group assured-fwd scheduler-profile default host1(config-qos-profile)#ip node group expedited-fwd scheduler-profile default host1(config-qos-profile)#ip node group best-effort scheduler-profile default host1(config-qos-profile)#ip queue traffic-class voice scheduler-profile voice host1(config-qos-profile)#ip queue traffic-class video scheduler-profile video host1(config-qos-profile)#ip queue traffic class best-effort scheduler-profile best-effort host1(config-qos-profile)#exit
  8. Attach the QoS profile to an Ethernet port.
    host1(config)#interface fastEthernet 9/0 host1(config-if)#qos-profile qpDiffServExample host1(config-if)#exit

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

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.

host1(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.

host1(config)#qos-profile qpDiffServExample host1(config-qos-profile)#ip node scheduler-profile defaulthost1(config-qos-profile)#ip queue traffic-class voice scheduler-profile voice host1(config-qos-profile)#ip queue traffic-class video scheduler-profile video host1(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

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.