CBWFQ Configuration

CBWFQ configuration uses the same MQC commands as does CB marking, with a few additional commands added. If you remember how to configure CB marking from Chapter 3, CBWFQ configuration will be easy for you. The commands used for CP marking and CBWFQ configuration are repeated here in Tables 4-11 and 4-12.

Table 4-11 Command Reference for CBWFQ

Command

Mode and Function

class-map class-map-name

Global config; names a class map, where classification options are configured.

match ...

Class map subcommand; defines specific classification parameters.

match access-group {access-group | name access-group-name}

Access-control list (ACL).

match source-address mac address

Source MAC address.

match ip precedence ip-precedence-value [ip-precedence-value ip-precedence-value ip-precedence-value]

IP precedence.

match mpls experimental number

MPLS Experimental.

match cos cos-value [cos-value cos-value cos-value]

CoS.

match destination-address mac address

Destination MAC address.

match input-interface interface-name

Input interface.

match ip dscp ip-dscp-value [ip-dscp-value ip-dscp-value ip-dscp-value ip-dscp-value ip-dscp-value ip-dscp-value ip-dscp-value]

IP DSCP.

match ip rtp starting-port-number port-range

RTP's UDP port number range.

match qos-group qos-group-value

QoS group.

Table 4-11 Command Reference for CBWFQ (Continued)

Command

Mode and Function

match protocol protocol-name

NBAR protocol types.

match protocol citrix [app application-name-string].

NBAR Citrix applications.

match protocol http [url url-string | host hostname-string | mime MIME-type]

Host name and URL string.

match any

Matches any and all packets.

policy-map policy-map-name

Global config; names a policy, which is a set of actions to perform.

class name

Policy map subcommand; identifies the packets to perform QoS actions on by referring to the classification logic in a class map

bandwidth {bandwidth-kbps | percent percent}

Class subcommand; sets literal or percentage bandwidth for the class. Must use either use actual bandwidth or percent on all classes in a single policy map.

fair-queue [queue-limit queue-value]

Class subcommand; enables WFQ in the class (class-default only).

random-detect dscp dscpvalue min-threshold max-threshold [mark-probability-denominator]

Class subcommand; enables DSCP-based WRED in the class.

random-detect precedence precedence min-threshold max-threshold mark-prob-denominator

Class subcommand; enables precedence-based WRED in the class.

max-reserved-bandwidth percent

Interface subcommand; defines the percentage of link bandwidth that can be reserved for CBWFQ queues besides class-default.

Table 4-12 Exec Command Reference for CBWFQ

Command

Function

show policy-map policy-map-name

Lists configuration information about all MQC-based QoS tools

show policy-map interface-spec [input | output] [class class-name]

Lists statistical information about the behavior of all MQC-based QoS tools

The remainder of this section includes several familiar lab scenarios, with example configurations and show commands. In the first CBWFQ example, R3 uses CBWFQ on its S0/0 interface. The engineer configuring R3 decided that voice traffic could benefit from being placed into a different queue than all other traffic, so a simple QoS policy has been devised, which includes the following:

• All VoIP payload traffic is placed in a queue.

• All other traffic is placed in another queue.

• Give the VoIP traffic 50 percent of the bandwidth.

• WFQ and WRED should be used on the non-VoIP traffic.

Figure 4-20 reminds you of the now-familiar example network, which shows the router in which the configuration is applied. Example 4-4 shows the configuration and show commands.

Figure 4-20 Network Used with CBWFQ Configuration Examples

Figure 4-20 Network Used with CBWFQ Configuration Examples

Example 4-4 CBWFQ, VoIP in High Queue, Everything Else in Normal Queue

R3#show running-config

Building configuration...

! Portions omitted for brevity

!

ip cef

!

class-map match-all voip-rtp match ip rtp 16384 16383

Example 4-4 CBWFQ, VoIP in High Queue, Everything Else in Normal Queue (Continued)

policy-map queue-voip class voip-rtp bandwidth percent 50 class class-default fair-queue

! Portions omitted for brevity !

interface Serial0/0 description connected to FRS port S0. Single PVC to R1. no ip address encapsulation frame-relay load-interval 30 bandwidth 128

service-policy output queue-voip clockrate 128000

interface Serial0/0.1 point-to-point description point-point subint global DLCI 103, connected via PVC to DLCI 101 ( R1)

ip address 192.168.2.253 255.255.255.0 frame-relay interface-dlci 101 ! Portions omitted for brevity

R3#show policy-map int s 0/0

Serial0/0

Service-policy output: queue-voip

Class-map: voip-rtp (match-all) 136435 packets, 8731840 bytes

30 second offered rate 51000 bps, drop rate 0 bps Match: ip rtp 16384 16383 Weighted Fair Queueing

Output Queue: Conversation 265 Bandwidth 50 (%) Max Threshold 64 (packets) (pkts matched/bytes matched) 48550/3107200 (depth/total drops/no-buffer drops) 14/0/0

Class-map: class-default (match-any) 1958 packets, 1122560 bytes

30 second offered rate 59000 bps, drop rate 0 bps Match: any

Weighted Fair Queueing Flow Based Fair Queueing Maximum Number of Hashed Queues 256 (total queued/total drops/no-buffer drops) 15/0/0

Example 4-4 CBWFQ, VoIP in High Queue, Everything Else in Normal Queue (Continued)

R3#show policy-map int s 0/0 output class class-default Serial0/0

Service-policy output: queue-voip

Class-map: class-default (match-any) 2217 packets, 1417985 bytes

30 second offered rate 71000 bps, drop rate 0 bps Match: any

Weighted Fair Queueing Flow Based Fair Queueing Maximum Number of Hashed Queues 256 (total queued/total drops/no-buffer drops) 10/0/0

R3#show policy-map

Policy Map queue-voip Class voip-rtp

Weighted Fair Queueing

Bandwidth 50 (%) Max Threshold 64 (packets) Class class-default Weighted Fair Queueing

Flow based Fair Queueing Max Threshold 64 (packets)

R3#show interface s 0/0

Serial0/0 is up, line protocol is up Hardware is PowerQUICC Serial

Description: connected to FRS port S0. Single PVC to R1. MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 9/255, rxload 8/255 Encapsulation FRAME-RELAY, loopback not set Keepalive set (10 sec)

LMI enq sent 132, LMI stat recvd 132, LMI upd recvd 0, DTE LMI up LMI enq recvd 0, LMI stat sent 0, LMI upd sent 0 LMI DLCI 1023 LMI type is CISCO frame relay DTE FR SVC disabled, LAPF state down

Broadcast queue 0/64, broadcasts sent/dropped 307/0, interface broadcasts 285 Last input 00:00:02, output 00:00:00, output hang never Last clearing of "show interface" counters 00:22:02

Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: weighted fair

Output queue: 16/1000/64/0 (size/max total/threshold/drops) Conversations 4/8/256 (active/max active/max total) Reserved Conversations 1/1 (allocated/max allocated) Available Bandwidth 1158 kilobits/sec 30 second input rate 52000 bits/sec, 102 packets/sec 30 second output rate 59000 bits/sec, 101 packets/sec 126301 packets input, 8141304 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 126197 packets output, 8550371 bytes, 0 underruns 0 output errors, 0 collisions, 2 interface resets 0 output buffer failures, 0 output buffers swapped out

Example 4-4 CBWFQ, VoIP in High Queue, Everything Else in Normal Queue (Continued)

0 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up R3#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

R3(config)#policy-map queue-voip

R3(config-pmap)#class class-default

R3(config-pmap-c)#no fair-queue

R3(config-pmap-c)#~Z

R3#show policy-map

Policy Map queue-voip Class voip-rtp

Weighted Fair Queueing

Bandwidth 50 (%) Max Threshold 64 (packets) Class class-default

The configuration for CBWFQ requires many commands, but the logic is straightforward. class-map voip-rtp matches all VoIP payload by matching with the match ip rtp 16384 16383 command. The policy-map queue-voip policy assigns VoIP traffic 50 percent of the bandwidth based on the bandwidth percent 50 command. But 50 percent of what? Well, the actual bandwidth is derived from the percentage of the bandwidth configured on the bandwidth interface subcommand. In this case, the bandwidth is set to 128, so the voip-rtp class gets 64 kbps, which is enough for the two G.729a VoIP calls. Just like with CB marking, the service-policy output command enables the policy on the interface, in this case S0/0.

The show policy-map interface serial 0/0 command lists the most interesting statistical information about CBWFQ. (This paragraph, and the rest of the text that describes Example 4-4, explains the commands in the example in the same sequence as they are shown in the example.) It lists a stanza of information for each class, listing the configured matching parameters and bandwidth percentages. The offered rate of traffic that has been classified into each queue is listed, along with drop statistics. These values are useful when monitoring the configuration to decide whether the configuration values should be changed. Also note that in class-default, the output implies that Flow-Based WFQ is in use inside the queue.

The command also has other options that reduce the amount of output, which can be large. For instance, the show policy-map int s 0/0 output class class-default shown in the example lists only information about class class-default.

The show policy-map command just lists a summary of the configured policy maps. Interestingly, the class-default stanza of the command output lists Weighted Fair Queuing, and then says it is "flow based." In this case, the command output is reminding you that inside the class-default queue, Flow-Based WFQ is applied to each flow. For comparison, at the end of the example, the configuration has been changed to disable WFQ in the class-default queue. The show policy-map command no longer lists Flow-Based WFQ for class-default.

NOTE Although some of the CBWFQ command output references WFQ in sections describing queues other than class-default, CBWFQ does not use Flow-Based WFQ inside any of these queues. CBWFQ can only use Flow-Based WFQ inside one queue—the class-default queue.

Good QoS design calls for the marking of packets close to the source of the packet. Example 4-5 accomplishes the same queuing goals as the preceding example, but CBWFQ relies on the fact that the packets have been marked before reaching R3's S0/0 interface. In a real network, the packets could be marked on one of the LAN switches, or in an IP Phone, or by the computers in the network. This example shows the packets being marked upon entering R3's E0/0 interface, just like Example 3-1 in Chapter 3. Example 4-5 shows the revised configuration based on the following criteria:

• All VoIP payload traffic has been marked with DSCP EF; place this traffic in a queue.

• All other traffic has been marked with DSCP BE; place this traffic in a different queue.

• Give the VoIP traffic 58 kbps of the bandwidth on the link.

• Use WRED and WFQ on the non-VoIP traffic.

Example 4-5 CBWFQ, DSCP EF in One Queue, Everything Else in Another Queue

• Use WRED and WFQ on the non-VoIP traffic.

Example 4-5 CBWFQ, DSCP EF in One Queue, Everything Else in Another Queue

Example 4-5 CBWFQ, DSCP EF in One Queue, Everything Else in Another Queue (Continued) !

interface serial0/0 clock rate 128000 bandwidth 128

service-policy output queue-on-dscp R3#

R3#show policy-map interface serial 0/0

Serial0/0

Service-policy output: queue-on-dscp

Class-map: dscp-ef (match-all) 8654 packets, 553856 bytes

30 second offered rate 51000 bps, drop rate 0 bps Match: ip dscp ef Weighted Fair Queueing

Output Queue: Conversation 41 Bandwidth 58 (kbps) Max Threshold 64 (packets) (pkts matched/bytes matched) 8442/540288 (depth/total drops/no-buffer drops) 8/0/0

Class-map: class-default (match-any) 673 packets, 779357 bytes

30 second offered rate 71000 bps, drop rate 0 bps Match: any

Weighted Fair Queueing Flow Based Fair Queueing Maximum Number of Hashed Queues 32 (total queued/total drops/no-buffer drops) 14/0/0 exponential weight: 9

dscp

Transmitted

Random drop

Tail drop

Minimum

Maximum

Mark

pkts/bytes

pkts/bytes

pkts/bytes

thresh

thresh

prob

af11

0/0

0/0

0/0

32

40

1/10

af12

0/0

0/0

0/0

28

40

1/10

af13

0/0

0/0

0/0

24

40

1/10

af21

0/0

0/0

0/0

32

40

1/10

af22

0/0

0/0

0/0

28

40

1/10

af23

0/0

0/0

0/0

24

40

1/10

af31

0/0

0/0

0/0

32

40

1/10

af32

0/0

0/0

0/0

28

40

1/10

af33

0/0

0/0

0/0

24

40

1/10

af41

0/0

0/0

0/0

32

40

1/10

af42

0/0

0/0

0/0

28

40

1/10

af43

0/0

0/0

0/0

24

40

1/10

cs1

0/0

0/0

0/0

22

40

1/10

cs2

0/0

0/0

0/0

24

40

1/10

cs3

0/0

0/0

0/0

26

40

1/10

cs4

0/0

0/0

0/0

28

40

1/10

cs5

0/0

0/0

0/0

30

40

1/10

cs6

23/2219

0/0

0/0

32

40

1/10

cs7

0/0

0/0

0/0

34

40

1/10

Example 4-5 CBWFQ, DSCP EF in One Queue, Everything Else in Another Queue (Continued)

ef rsvp default

36 36 20

R3#show policy-map

Policy Map voip-and-be Class voip-rtp set ip dscp ef Class class-default set ip dscp default

Policy Map queue-on-dscp Class dscp-ef

Weighted Fair Queueing

Bandwidth 58 (kbps) Max Threshold 64 (packets) Class class-default Weighted Fair Queueing

Flow based Fair Queueing exponential weight 9

dscp min-threshold max-threshold mark-probability

The configuration is again detailed, but straightforward. policy-map voip-and-be marks packets as they enter E0/0, matching and marking VoIP packets with DSCP EF, and matching and marking all other packets, marking them with DSCP BE. The class-map match-all dscp-ef command creates a class that matches all DSCP EF traffic. Policy-map queue-on-dscp refers af11

af12

af13

af21

af22

af23

af31

af32

af33

af41

af42

af43

rsvp default to class dscp-ef in order to match all VoIP traffic, giving the voice traffic 58 kbps with the bandwidth 58 command. CBWFQ uses tail drop in each class by default, so under the class class-default command, the random-detect dscp-based command is used to enable WRED in the default class. In addition, of course, the service-policy command enables the service policy on the interface.

The show commands do not provide much new information, other than the statistics about WRED operation. The details about this part of the output are covered in Chapter 6.

You may have found it strange to see a configuration with classification and marking happening as the packet entered E0/0 in R3, and then another round of classification for packets exiting R3's S0/0 interface. One of the great advantages of classification and marking is that after the packets are marked, the configuration of the tools providing each per-hop behavior (PHB) is simple. Another advantage is that after the packet has been marked, other devices can perform the simpler matching of just looking for DSCP or IP precedence.

If the QoS policy calls for applying PHBs only for packets exiting WAN interfaces, and the policy does not call for PHBs between packets entering and exiting LAN interfaces, the classification and marking, and the queuing, may be performed with a single configuration. Example 4-6 shows a similar configuration to the preceding example, but with both the marking and queuing performed for packets exiting R3's S0/0 interface.

Example 4-6 CBWFQ and CB Marking Combined

R3#show running-config class-map match-all voip-rtp match ip rtp 16384 16383

policy-map mark-and-queue class voip-rtp set ip dscp ef

bandwidth 58

class class-default

set ip dscp 0

random-detect dscp

fair-queue

interface Ethernet0/0

description connected

to SW2, where Server1 is connected

! No service policy on

E

interface serial0/0

clock rate 128000

bandwidth 128

service-policy output

mark-and-queue

Two classes are used in this example: voip-rtp, which matches all VoIP payload UDP ports; and class-default, which matches all other packets. Inside policy-map mark-and-queue, each class includes a set command to set the DSCP value. The voip-rtp class includes a bandwidth command to reserve bandwidth; class-default automatically gets 25 percent of the bandwidth. The service-policy output mark-and-queue command enables the policy for packets exiting R3's S0/0 interface. In this example, you get the benefits of classification and marking, a shorter configuration, and only one classification step inside this router, reducing overhead. Also keep in mind that CEF must be enabled with the ip cef global command for CB marking to work at all.

The configuration section for CBWFQ ends with a final example that has a larger number of classes. The same familiar traffic flows are used—two VoIP calls, a NetMeeting video conference, HTTP with two different frames (important.jpg and not-so.jpg), and an FTP download. The configuration shows CB marking on ingress of R3's E0/0, and CBWFQ on egress at R3's S0/0. The criteria for each type of traffic is as follows:

• VoIP payload is marked with DSCP EF, and placed in its own queue, using tail drop. This class gets 58 kbps.

• NetMeeting voice and video from Serverl to Clientl is marked with DSCP AF41, and placed in its own queue, using tail drop. This class gets 22 kbps.

• Any HTTP traffic whose URL contains the string "important" anywhere in the URL is marked with AF21, and placed in its own queue, using WRED. This class gets 20 kbps.

• Any HTTP traffic whose URL contains the string "not-so" anywhere in the URL is marked with AF23, and placed in its own queue, using WRED. This class gets 8 kbps.

• All other traffic is marked with DSCP BE, and placed in its own queue, using WRED and WFQ. This class gets the remaining 20 kbps.

Example 4-7 shows the configuration.

Example 4-7 CBWFQ—Classes for VoIP, NetMeeting, HTTP "important,"HTTP "not-so" Important, and Everything Else

Example 4-7 shows the configuration.

Example 4-7 CBWFQ—Classes for VoIP, NetMeeting, HTTP "important,"HTTP "not-so" Important, and Everything Else

R3#show running

config

Building configuration..

! Portions omitted for brevity

ip cef !

class-map match

all dscp

ef

match ip dscp

ef

class-map match

all dscp

af41

match ip dscp

af41

class-map match

all dscp

af21

match ip dscp

af21

class-map match

all dscp

af23

match ip dscp

af23

Example 4-7 CBWFQ—Classes for VoIP, NetMeeting, HTTP "important,"HTTP "not-so"Important, and Everything Else (Continued)

class-map match-all http-impo match protocol http url "*important*" class-map match-all http-not match protocol http url "*not-so*"

class-map match-all voip-rtp match ip rtp 16384 16383

class-map match-all NetMeet

match access-group 101

!

policy-map laundry-list

class voip-rtp

set ip dscp ef

class NetMeet

set ip dscp af41

class http-impo

set ip dscp af21

class http-not

set ip dscp af23

class class-default

set ip dscp default

policy-map queue-on-dscp

class dscp-ef

bandwidth 58

class dscp-af41

bandwidth 22

class dscp-af21

bandwidth 20

random-detect dscp-based

class dscp-af23

bandwidth 8

random-detect dscp-based

class class-default

fair-queue

random-detect dscp-based

interface Ethernet0/0

description connected to SW2

where Server1 is connected

ip address 192.168.3.253 255

255.255.0

ip nbar protocol-discovery

half-duplex

service-policy input laundry

list

interface Serial0/0

description connected to FRS

port S0. Single PVC to R1.

bandwidth 128

no ip address

encapsulation frame-relay

load-interval 30

Example 4-7 CBWFQ—Classes for VoIP, NetMeeting, HTTP "important,"HTTP "not-so"Important, and Everything Else (Continued)

max-reserved-bandwidth 85 service-policy output queue-on-dscp clockrate 128000

interface Serial0/0.1 point-to-point description point-point subint global DLCI 103, connected via PVC to DLCI 101 ( R1)

ip address 192.168.2.253 255.255.255.0 frame-relay interface-dlci 101

! Portions omitted for brevity access-list 101 permit udp host 192.168.3.100 range 16384 32767 192.168.1.0 0.0.0.255 range 16384 32767

The QoS policy requires the various queues to be assigned a total of 108 kbps of the 128 kbps of link bandwidth, which is about 84 percent of the link bandwidth. By default, CBWFQ only allows 75 percent of the link bandwidth to be explicitly assigned, reserving 25 percent for class class-default. Cisco recommends that you not change the setting, but you can with the max-reserved-bandwidth command, as shown in the configuration. By changing the max-reserved-bandwidth to 85 percent, the amounts of bandwidth that were suggested in the policy statements can be assigned. The danger is that the class-default, where important overhead such as keepalives and routing updates are queued, may not get enough bandwidth.

Advance SEO Techniques

Advance SEO Techniques

Turbocharge Your Traffic And Profits On Auto-Pilot. Would you like to watch visitors flood into your websites by the 1,000s, without expensive advertising or promotions? The fact is, there ARE people with websites doing exactly that right now. How is that possible, you ask? The answer is Advanced SEO Techniques.

Get My Free Ebook


Post a comment