C H A P T E R 24 |
Configuring Differentiated Services |
This chapter describes how to configure Differentiated Services (DiffServ).
This chapter contains the following topics:
Differentiated Services (DiffServ) is one technique for implementing Quality of Service (QoS) policies. Using DiffServ in your network allows you to directly configure the relevant parameters on the switches and routers rather than using a resource reservation protocol.This section explains how to configure the Sun Netra CP3240 switch to identify which traffic class a packet belongs to, and how it should be handled to provide the desired quality of service. As implemented on the Sun Netra CP3240 switch, DiffServ allows you to control what traffic is accepted and what traffic is discarded.
Traffic to be processed by the DiffServ feature requires an IP header if the system uses IP Precedence or IP DSCP marking.
How you configure DiffServ support on a Sun Netra CP3240 switch varies depending on the role of the switch in your network:
Before configuring DiffServ on a particular Sun Netra CP3240 switch, you must determine the QoS requirements for the network as a whole. The requirements are expressed in terms of rules, which are used to classify inbound traffic on a particular interface. FASTPATH does not support DiffServ in the outbound direction.
During configuration, you define DiffServ rules in terms of classes, policies and services:
This example shows how a network administrator can provide equal access to the Internet (or other external network) to different departments within a company. Each of four departments has its own Class B subnet that is allocated 25% of the available bandwidth on the port accessing the Internet.
FIGURE 24-1 DiffServ Internet Access Example Network Diagram
Ensure DiffServ operation is enabled for the switch.
Create a DiffServ class of type “all” for each of the departments, and name them. Define the match criteria -- Source IP address -- for the new classes.
Create a DiffServ policy for inbound traffic named 'internet_access', adding the previously created department classes as instances within this policy.
This policy uses the assign-queue attribute to put each department's traffic on a different egress queue. This is how the DiffServ inbound policy connects to the CoS queue settings established in the following example.
Attach the defined policy to interfaces 1/0/1 through 1/0/4 in the inbound direction
Set the CoS queue configuration for the (presumed) egress interface 1/0/5 such that each of queues 1, 2, 3 and 4 get a minimum guaranteed bandwidth of 25%. All queues for this interface use weighted round robin scheduling by default. The DiffServ inbound policy designates that these queues are to be used for the departmental traffic through the assign-queue attribute. It is presumed that the switch will forward this traffic to interface 1/0/5 based on a normal destination address lookup for internet traffic.
interface 1/0/5 cos-queue min-bandwidth 0 25 25 25 25 0 0 exit exit |
Use the following screens to perform the same configuration using the Graphical User Interface:
FIGURE 24-2 DiffServ Configuration
FIGURE 24-3 \DiffServ Class Configuration
FIGURE 24-4 DiffServ Class Configuration
FIGURE 24-6 DiffServ Class Configuration
FIGURE 24-7 DiffServ Class Summary
FIGURE 24-8 DiffServ Policy Configuration
FIGURE 24-9 DiffServ Policy Configuration
FIGURE 24-10 DiffServ Policy Class Definition
FIGURE 24-12 DiffServ Policy Attribute Summary
FIGURE 24-13 DiffServ Policy Attribute Summary
FIGURE 24-14 DiffServ Service Configuration
FIGURE 24-15 DiffServ Service Summary
FIGURE 24-16 DiffServ VoIP Example Network Diagram
One of the most valuable uses of DiffServ is to support Voice over IP (VoIP). VoIP traffic is inherently time-sensitive: for a network to provide acceptable service, a guaranteed transmission rate is vital. This example shows one way to provide the necessary quality of service: how to set up a class for UDP traffic, have that traffic marked on the inbound side, and then expedite the traffic on the outbound side. The configuration script is for Router 1 in the accompanying diagram: a similar script should be applied to Router 2.
Enter Global Config mode. Set queue 5 on all ports to use strict priority mode. This queue shall be used for all VoIP packets. Activate DiffServ for the switch.
Create a DiffServ classifier named 'class_voip' and define a single match criterion to detect UDP packets. The class type "match-all" indicates that all match criteria defined for the class must be satisfied in order for a packet to be considered a match.
class-map match-all class_voip match protocol udp exit |
Create a second DiffServ classifier named 'class_ef' and define a single match criterion to detect a DiffServ code point (DSCP) of 'EF' (expedited forwarding). This handles incoming traffic that was previously marked as expedited elsewhere in the network.
class-map match-all class_ef match ip dscp ef exit |
Create a DiffServ policy for inbound traffic named 'pol_voip', then add the previously created classes 'class_ef' and 'class_voip' as instances within this policy.
This policy handles incoming packets already marked with a DSCP value of 'EF' (per 'class_ef' definition), or marks UDP packets per the 'class_voip' definition) with a DSCP value of 'EF'. In each case, the matching packets are assigned internally to use queue 5 of the egress port to which they are forwarded.
policy-map pol_voip in class class_ef assign-queue 5 exit class class_voip mark ip-dscp ef assign-queue 5 exit exit |
Attach the defined policy to an inbound service interface.
interface 1/0/2 service-policy in pol_voip exit exit |
© 2007 Diversified Technology, Inc. All Rights Reserved. © 2009 Sun Microsystems, Inc. All rights reserved.