Class Based Queuing Solutions

Class-Based Weighed Fair Queuing (CBWFQ) combines advantages of CQ and WFQ to create an ad' method that provides fair queuing to up to 64 user-defined classes. CBWFQ classes can be defined access list, or input interface; each class has its own queue. Classes are customized using characte bandwidth, weight and queue size. After a queue exceeds its maximum size, packets are dropped default behavioe, or WRED if configured to do so. Traffic that does not match any class characterist class, is sent to the default queue where each flow (traffic sharing the same source and destination numPer) is fairly (queued using WFQ.

Before configuring CBWFQ, you need to be aware of a number of rules, including the following:

• Before CBWFQ can be installed, interfaces must be running their default queuing method. CBW default method o2 queuing.

• Unless specified, CBWFQ uses tail drop rather than WRED when dropping packets.

• If you are planning to use CBWFQ with WRED, make sure that the interface is not already run

• CBWFQ does not support subinterfaces; it must be installed on a physical interface.

• CBWFQ sup ports only ATM variable bit rate (VBR) and available bit rate (ABR) circuits.

• Policy maps can be used for more than one interface, saving configuration space.

• The CBWFQ-configured bandwidth must not exceed Ch percent of the interface bandwidth. Th used for overhead control and routing traffic. If the bandwidth used by a policy map exceeds interface, the policy map is desie d a nd uemoved from all other interfaces.

• CBWFQ, CQ, PQ, WFQ, and WRED are all muthai ly exclusive, service policies must be remove queuing method can be installed.

• CBWFQ supports quene size li mits and WRED, but not bot h in the same class poli cy.

As discussed in the foliowing sirtion, C CWFQ is a powerful QoS tool. Usi ng CBWFQ, you can config Oranular QwS p olicies managi ng different types of traffic in diffenent ways on the sam e interfaced

CBWFQ can also use Network-Based Application Recognition (NBAR) protocol heuristics specified w pfotocol name. Although IN BAR is not covered in gce^t detail in this boon, NBAR CBWFQ configurati desuribe d later ¡n this rhapter.

NOTE

NBAR protocol heuristics help identify protocols and applications that previously required long complicated access lists. NBAR uses packet description language modules (PDLMs) to define p characteristics. PDLMs can be found on the Cisco website in the Software Download area uoOb Software, Other Cisco IOS Extensions, Packet Description Language Modules. PDLMs are loade like any other software code or configurations. After you have loaded a PDLM, you can specify using the ip nbarpath -.filename command in global configuration mode.

NOTE

CBWFQ NBAR support requires the use of Cisco Express Forwarding (CEF) switching on the in the service policy is applied.

CBWFQ classes are defined using class maps. Class maps contain the match criterion, which is usei protocol that belongs to each class. Class maps make uses of the new Cisco IOS Software modular interface (CLI) and are created using the class-map command. The class-map command differs s IOS> vetsion 12.1 and 12.2. In 12.2, t he optional match-any or match-all statement is added.

In Cisco IOS Software Release 12.2 and higher, you can also specify the type of class map by using match-all or match-any statements. The match-all class map matches all of the criteria (logical any class map matches any of the criteria specified by the class map (logical OR).

Cisco IOS Software Release 12.1:

class-mapclass-name

Cisco IOS Software Release 12.2:

class-map [match-any | match-all]class-name

NOTE

A number of QoS changes were made in Cisco IOS Software Release 12.2. In this chapter, Cis Release 12.2 is used in all examples. To remain compatible with Cisco IOS Software Release 1 use commands that are available in versions 12.1 and 12.2.

After you have created the class map, you enter the class map configuration mode, where you can criteria. Using the match command within the class map configuration mode, you can define class lists, input interfaces, protocol types, and many other items as definitions. Table 6-20 shows the cl configuration commands and their definitions as of Cisco IOS Software Release 12.2(7).

Table 6-20. Class Map match Command Values

Match Command

Version

Description

access-group {access-list-number| nameaccess-list-name}

12.1

Matches an access list, ranging from 1 to 2699, or a named access list.

any

12.2

Matches any packets.

class-map class-map-name

12.2

Matches another nested class map.

coscos-value

1 2.2

Class of service (CoS) matches one of the IEEE 802.1Q/ISL class of service/user priority values, ranging from 0 to 7. Up to 4 CoS value entries may be made using spaces as separators.

destination-address machex-address

12.2

Matches an destination MAC address in hexadecimal xxxx.xxxx.xxxx format.

input-interfaceinterface-name interface-number

12.1

Ma tche s an inp ut interface.

ip jdscpdscp-value| precedence precedence-value| rtplower-port-range range}

12.2

ip dscp matches up to 8 DSCP values from 0 to 63, one of the 12 AF classes mentioned in Table 714, one of the 7 Class Selector (CS) codepoints corresponding to an IP precedence value, the default DSCP value, or the Expedited Forwarding (EF) PHB value.

ip precedence matches (up to 4) IP precedence values using either an integer value (0-7), or the IP precedence names from Table 614.

ip rtp matches a RTP UDP port number from 2000 to 65,535, and a RTP UDP port range from 0 to 16,383.

mpls experimentalvalue

12.2

Multiprotocol label switching (MPLS).

Matches up to 8 MPLS values, ranging from 0 to 7.

not jaccess-groupaccess-list-numberl any |class-mapclass-map-name| destination-address machex-address| input-interfaceinterface-name interface-number| ip jdscp dscp-value| precedenceprecedence-valuel rtplower-port-range range) | mplsvaluel qos-groupqos-group-index| sources-address machex-address}

12.2

Does not match an access-group, any, class-map, destination-address, input-interface, ip, mpls, qos-group, or sources-address specified.

protocolpro tocol-name

12.1m

Match« the specified protocol using NBAR heuristics:

bgp— BGP protocol bridge— Bridging bst/n— Block Serial Tunnel

cdp— Cisco Discovery Protocol citrix— Citrix traffic clns— ISO CfNS

clns_es— ISO CfNS end system clns_is— ISO CfNS intermediate system cmns— ISO CMNS

compressedtcp— Compressed TCP

cuseeme— CU-SeeMe desktop videoconference custom-01— Custom protocol custom-01

custom-02— Custom protocol custom-02

custom-03— Custom protocol custom-03

custom-04— Custofr protocol custom-04

custom-05— Custom protocol custom-05

custom-06— Custom protocol custom-(r6

custom-07Custom protocol custom-07

cuotom- 08— Custom protocol custom-08

custom-09— Custom p rotoco l custim(09

dhcp— DHCP protocol dlsw— Data-link switching dns— DNS lookup egp— EGP routing protocol eigrp— EIGRP routing Protocol exchange— MS-RPC for Exchange fasttrack— FastTrack traffic (KaZaA, Morpheus, Grokster, and so on)

finger— Finger ftp— FTP protocol gnutella— Gnutella traffic (BearShare,LimeWire,Gnotella, and so on )

gopher— Gopher gre— GRE tunneling protocol http— HTTP web traffic icmp— ICMP protocol imap— IMAP Protocol i p— IPv4 p rotocol ipinip— IP in IP tunnel encapsulation ipsec— IP Security Protocol (ESP/AH)

ipx— Novell IPX

irc— Internet Relay Chat kesberos— Kerberos authvn tication l 2tp— L2F/L2TP t unn el

Idap— LDAP directory! p rotoco l

n apstea— Napster t raffic netbioo— NetBIOS

netshow— Microsoft NetShow nfs— UNIX Network File System nntp— Network News Transfer Protocol notes— Lotus Notes novadigm— Novadigm EDM

ntp— Network Time Protocol pad— X.25 PAD

pcanywhere— Symantec pcANYWHERE

pop3— Post Office Protocol pptp— Microsoft PPTP tunneling printer— LPD print spooler qllc— QLLC protocol rcmd— BSD r commands (rsh, rlogin, rexec)

realaudio— Real Audio streaming protocol rip— RIP routing protocol rsrb— RSRB bridging rsvp— RSVP protocol rtp— Real Time Protocol secure-ftp— FTP over TLS/SSL

securm- http— Snuted HTTP

sgehctuhreep-irmocaepss—oIfMpArePpoavrienrgTfLoSr/tShSeL

secure-ldap— L DA P over TLS/ Oee sScureenntp— N NTP over TLS/SSL

secure-pop3— POP3 over TH/SSL

decur e-telnet— Te 1 net over TLS/SSL

smt p— kMTP protocol snapshot— Snapshot routing protocol snmp— SNMP protocol socks— SOCKS

sqlnet— SQL*NET for Oracle

sqlserver— MS SQL Server

ssh— Secured Shell

streamwork— Xing Technology StreamWorks player

stun— Serial Tunnel protocol

sunrpc— Sun RPC

syslog— System logging utility

telnet— Telnet

tftp— TFTP protocol

vdolive— VDOLive streaming video

vofr— Voice over Frame Relay

xwindows— X Windows remote access

xns— Xerox Network Services

qos-groupqos-group-index

12.2

Matches a specified QoS group, ran ging from 0 to 99.

source-address machex-address

12.2

Matches a source MAC address in hexadecimal format (xxxx.xxxx.xxxx).

Not all protocols are available in all versions of Cisco IOS Software.

Not all protocols are available in all versions of Cisco IOS Software.

After you h ave en tered class map configuration mod e, you can do a number of thin gs bes ides enter nommand. To configure a description oor your c i 3ss map), use the descri ption aom man d. To renam without re movi ng it, use t he reCame command.

After defining the class map, you must then define a policy map to make the policy that will be app map. Poli cy maps are defined usmg the po lioy- mappolicy-name command, whicf enters yo u into configuration mode, specified bby tfie (config-pmap)# promp e. The poi icy map i s app oe d to interf policy. To enter- policy map configuration mod e, use the policy-map oommand. In this mode, you description eo the pdicy m ap, alt er ohe configura tion, or rename the po i ¡cy map.

NOTE

Using the Cisco Modular QoS command-line interface, you can also embed policies and classes policies and classes, by which you can create very granular QoS configurations without the ne each class or policy definition.

After you are in policy map configuration mode, you must define the class that the policy will apply class-name command, which enters you into policy map class configuration mode specified by the prompt.

After you are in policy map class configuration mode, the mode used to configure the policy for the specified, you can define the parameters for the service policy. Table 6-21 shows the service policy

Table 6-21. Service Policy Parameters

Policy Command

Version

Description

bandwidth {bandwidth-limit| percent percentage| remaining percent remaining-percentage)

12.1

Assigns a bandwidth limit for the class. This limit can be either an amount specified in kbps or a percentage (not to exceed Ch% of the interfaces bandwidth).

To use a specific amount of bandwidth, enter the amount, ra ngmg from 8 to 2,000, 000 in kbps.

To specify a percentage of interface bandwidt h, use tfie percent og remaining percent keywords, followed by a value ranging from 1-100 percent.

police {rate-bps{[normal-burst-] [excess-burst]|[bcnormal-burst] [bcexcess-burst] Icirrate-bps [normal-burst] [excess-burst] [bc normal-burst] [beexcess-burst| pir [peak-rate]excess-burst]} [conform-actionaction] [exceed-actionaction] [violate-action action] }

12 .2

Enables tranfic f?oIicingj for the traffic defined in this class.

Class-Based poMcicg is covered later in thi s c hapte r.

priority {bandwidth burst| percent percentage burst}

12.1

Creates a strict-priority queue within the service policy, referred to as fow fatency Queuing (ffQ), which is covered later in this chapter.

bandwidth defines a limit for the strict-priority queue, ranging from 8 to 2,000,000 in kbps.

burst 32 to 2,000,000 in bytes.

percent defines a percentage of bandwidth, from 1-100 percent.

burst ranges from 32 to 200000 in bytes.

queue-limitnumber-of-packets

12.1

Defines a maximum queue size. After the queue size has been exceeded, all packets are dropped using tail drop.

The range is from 1 to 512 packets. The defa ult vpIuo is 64 o n all non-VIP-based platforms.

random-detect [dscpdscp-value minimum-threshold max-threshold mark-probability-denominator| dscp-based |ecn |exponential-weighing-constantweighed-average| prec-based |precedence [precedence-value minimum-threshold max-threshold mark-probability-denominator| rsvp minimum-threshold max-threshold mark-probability-denominator]

12.11*1

Enables WRED for packets that exce o1 the maximu m queue size.

dscpvalua matches (up to 4 valuesr a [DSCP value from 0 to 63, one of the of the 12 AF classes, one oft he 7 C |ass Selector (CS) codepoints corresponding to an IP precedence value (1-7), the default DSCP value, the Expedited Forwarding (EF) PHB value, or RSVP traffic specifying a minimum and maximum threshold in packets and optionally the RSVP mark prob- abi lity denaminafor . You can fi — d the AF , CS, and EF value descnptiors in Table 7-1!.

dscp-based enables DSCP-based WRED rather than precedence-ba sed WRE D.

ecn—Explicit congestion notification.

exponential-weighting-constant specifies the weight to be used by WRED when calculating average queue length; the default weight factor is 9.

Ranges from 1 to 16 in the format 2^[number].

prec-based enables precedence-based WRED, the default WRED behavior.

precedence configures the parameters for the IS precedence values—for each IS precedence value from 0 to 7, the minimum and maximum threshold of a packet that must be reached for packet drop, and the mark probability denomi- nator that defines the fraction of packets that are dropped when the thresholds have been exceeded.

service-policy

12.2

Specifies another nested policy map name.

shape

12.2

Configures class-based shaping, covered later in this chapter.

averageCIR[Bc] [Be].

max-buffers configures a maxi mum uuffe r limit.

peakCIR[Bc] [Be].

DSCS c°mmcnSn do not appear eh1il 12.2

DSCS c°mmcnSn do not appear eh1il 12.2

By def^alt, all traffic th at has n ot been denned as belonging to s class io provided with be st-effort s Ciefau lt c 1 axs ca s a iso be defined. Defaul t classes a1 low fon ghe configct°rio e of any unclassified traf unclassified traffic in the default class con eithes be given the same level of1 serv|ce that would achi nna bied inlieface, with each uscl ass^e h traffic flow/ receiv|n g a fair share oI1 the re maining bandwii hfnue(f on a FI FO basis w ith a bardwidth restricts os

The default class is defined by creating a class-default class, using the command class class-defa psecy ma ( conl'igurat ion mode, whic h enters yo u mto policy map class Cation mode for the

Router(config-pmap)#class class-default

When you are defining the class-default class, the fair-queue command becomes available, allowi unclassified traffic to be queued using WFQ. This command is available only for the default class:

fai r-queuedynamic- queue -1 imit

Using the fair-queue command, you can define a dynamic queue limit for all WFQ traffic in the del dynamic-queue-limit ranges from 16 to 4096 and can be entered in powers of 2 (2^[number]).

Alternatively, instead of configuring WFQ for the remaining unclassified traffic, you can set a bandw FIFO best-effort queuing with the bandwidth command.

NOTE

When configuring the default class, it is important to note that either WFQ or a bandwidth lim configured, Put both commands cannot be configured togeth er.

The default class can also have class parameters, such as traffic policing, IP RTP Priority, tail dropp limits, WRED, and class-based s^faing, as mentio ned prtevio usly in Ta ble 6-21.

Aft er the clcss map has beeri oharacte^ zed a nd the policy map h as b een ci^f^ ned, you now ha ve a « C^ly ahe service poMcy to an ihterfac^h us e the service-policy command in interface configuration cheservice policy command on either mbound or outbound interface traffic by using the input or > e-guments:

Interface serial0

service-policy {input | output} policy-name

Using CBWFQ, you can classify traffic types into service groups and apply the appropriate policies t traffic limitations or prioritization. In the following example, two classes are defined. ClassIP provi< interface bandwidth to IP traffic and also uses WRED as a congestion-avoidance mechanism. Class:

25 percent of the interface bandwidth to IPX traffic; because IPX is not supported by WRED, howev congestion, tail drop is used to discard packets. Any other reeaining unclassified traffic is to be qu queues:

Step 1. The first step required for CBWFQ configuration is to define the class. In this exaepl to eatch all IP traffic:

Simpson(config)#class-map ClassIP

Step 2. After the class has been defined, from within the class map configuration mode, defi characteristics. The ClassIP class must match all IP packets, so the match protocol ip state the match criteria has been defined, you can exit class map configuration mode:

Simpson(config-cmap)#match protocol ip Simpson(config-cmap)#exit

Step 3. (Optional) Create any other required classes, up to 64. This step is required for each will be used for the service policy. In this example, ClassIPX is defined to match all IPX traffic

Simpson(config)#class-map ClassIPX

Simpson(config-cmap)#match protocol ipx Simpson(config-cmap)#exit

Step 4. Create a policy map. The policy map is used to define class policies. One policy map classes and their policies. In this example, the myPolicy policy is used for the class policy del and ClassIPX:

Simpson(config)#policy myPolicy

Step 5. Specify the class map to be used with the service policy under the policy map. To cr< for the IP traffic, ClassIP is specified under myPolicy:

Simpson(config-pmap)#class ClassIP

Step 6. Within the policy map class configuration mode, specify the policy parameters. As m ClassIP is assigned 50 percent of the interface Oandwidth. This is accomplished using the bai 50 command. To configu se the policy to use WRED hro ig cong estion avoi daBœ, the random ased without any parameters :

Simpson(config-pmap-c)#bandwidth percent 50 Simpson(config-pmap-c)#random-detect Simpson(config-pmap-c)#exit

Step 7. (Optional) If necessary, repeat Steps 5 and 6 for each class definition. Next, ClassIP percent of the interface Oandwidth:

Simpson(config-pmap)#class ClasslPX Simpson(config-pmap-c)#bandwidth percent 25 Simpson(config-pmap-c)#exit

Step 8. (Optional) Create a default class for all unclassified traffic. In this example, a default queu e anm uncla ssified traffic using up to 16 dynamic WFQ queues:

Simpson(config-pmap)#class class-default Simpson(config-pmap-c)#fair-queue 16 Simpson(config-pmap-c)#exit Simpson(config-pmap)#exit

Step 9. After you enish crea ting) the class map and por cy, apply the policy to an interface us policy coreruandi To ectivate the serv^e policy, it is a implied Bo an interface, In this Sxample, outb ound traffic on inte rface serinl 0/1:

Simpson(config)#int s 0/1

Simpson(config-if)#service-policy output myPolicy

Step 10. Example 6-28 shows the complete configuration for the example from the precedin

Was this article helpful?

0 0

Post a comment