Classifying and Marking Traffic with CAR

Committed access rate (CAR) is a traffic policy classification and marking method used to police IS on IS precedence, DSCS value, MAC addresses, or access lists.

Traffic policy clas sif ication involves defining a traffic policy and using CAR to enforce rate limits. Tr; conforms to the configured rate limit can be forwarded as is, or it can be marked to provide QoS at points all the way through the network.

Marking changes the value of the IS precedence or DSCS in the ToS byte from the IS header. The t marking action is defined eityer when a packet conforms to a value or when a packet exceeds a va marking traffic, CAR affects how traffic is treated at points later in the network because WFQ and V the CAR-as signed ToS values, giving higher-priority traffic a better weight.

CAR uses the token-bucket scheme, similar to that used by traffic shaping to determine whether ar has resources available to transmit a packet by checking to see whether there are enough tokens ii If the interface has the resources to forward the packet (tokens are available), the tokens are remc bucket, the packet is transmitted, and, after the interval has elapsed, the tokens are added back in bucket. If the interface does not have resources available, no tokens are available; CAR defines the take on the packet. The actions that CAR matches are conform actions, where the packet conforms specified traffic trait, or exceed values, where traffic exceeds a certain traffic trait value. CAR uses qefin ittons to d efine traffic rates:

• Normal rate— tike the CIR in traffic shaping, the normal rate in CAR can be described as the rate of traffic, or th e average rate rlaat tokens aae added to the b ucket.

• Normal burst— tike the sustained bit rate (Bc) in traffic shaping, the normal burst is the am allowed to ex ceed t he normal tra ffic rate during an interv al of time.

• Exce ss b urst— Tra ffic chat exceeds the nofmal burst. When excess burst is configured, token borrowed and added to the bucket to allow for a certain amount of traffic bursts. After the bo! tokens have been used, any further traffic received on that interface is dropped. Traffic bursts only for short periods of time, before causing the token bucket to run out of tokens:

- Cisco recommsnds tha t the normal ttraffti c ratp be equa: to the ave rage; traffic ngte ove oimtie. The norm^ bugs! nate shou^ equal the n ormal rate in b°tes (t ime s 8 for bits) * 1 you are planning to use an extended rate, the extended rate must be greater than the f egte. If1 tlie extecded buest rate is not greater than the nosmn I surht rat e (Bc = Be), the not allow for extes ded bursts. So the extended rate should be the nurmal burst rate tim Isave a rate of L544 Mbps, the nor mal burnt is 23 16 Mbps, and the excess burst is 4.63

NOTE

When determining which shaping or policing method you should deploy on your network, alwa follow one rule of thumb: Traffic shapers shape traffic using buffers, so shaping should always on an egress interface where excess traffic can be buffered. Traffic policing or CAR is more effe when applied to inbound traffic because policing and rate limiting do not buffer traffic.

To configure CAR, use the rate-limit command in interface configuration mode as shown here. Tat shows the rate-limit command arguments and their descriptions in Cisco IOS Software Release 12

rate-limit {input | output} {rate | access-group {access-list-number | rate-limit list-number} | dscp dscp-value | qos-group qos-group-index } normal-burst maximum-conform-action {continue | drop | set-dscp-continue dscp-value | set-dscp-transmit value | set-mpls-exp-continue mpls-exp-value | set-mpls-exp-transmit mpls-exp-valu prec-continueprecedence-value | set-prec-transmit precedence-value | set-qos-conti qos-group-index | set-qos-transmit qos-group-index | transmit) exceed-action {cont | drop | set-dscp-continue dscp-value | set-dscp-transmit dscp-value | set-mpls-ex mpls-exp-value | set-mpls-exp-transmit mpls-exp-value | set-prec-continue preceden value | set-pres-transmit precedence-value | set-qos-continue qos-group-index | se transmitqos-group-index | transmit)

Table 6-17. CAR Command Arguments and Their Descriptions

Command Argument

Description

input | output

S pecifies the traffi c direction.

normal-rate

The average traffic ra te, under normal circumstan ces, for a period bits/second eanging from 8000 to 2,000,000,e00.

access-group {access-list-number | rate-limit rate-list-number}

Specifies either a standard or extended access list, ranging from 1 a rate list.

Rate lists 0-99 are used to specify IP precedence values, and rate 100-199 are used to specify MAC addresses.

dscpdscp-value

Specifies a DSCP value ranging from 0 to 63.

qos-groupqos-group-index

Specifies a QoS group ranging from 0 to 99.

normal-burst

Specifies the normal burst size in bytes, ranging from 1000 to 512 The normal burst is found using the following formula:

Normal burst (Bc) = normal rate (CIR in bytes) * 1.5 seconds

maximum-burst

Specifies the excess burst size in bytes, ranging from 2000 to 1,02 If used, you can find the excess burst by using the following formu

Otherwise, excess burst equals normal burst, as shown here:

Excess burst (Be) = normal burst (Bc)

conform-action

Any packets conforming to the normal rate will do the activity spec n ext va lue.

continue

Co ntinues proc essing torough the rest o! the lis t.

drop

Im mediately drops the packet and exits the list.

set-dscp-continuedscp-value

Sets the DSCP value to the specified value, ranging from 0 to 63, a cont inues proce ssing ohe rest of the list.

set-dscp-transmitdscp-value

Sets the DSCP value, ranging from 0 and 63, transmits the packet the list without further processing.

set-mpls-exp-continue mpls-exp-value

Sd!s th e MPLS exp^^enta! va lue, ranging from 0 no 7, aud contin processing the rest of1 hhe Ms!.

set-mpls-exp-transmit mpls-exp-value

Sets the MPLS experimental value, ranging from 0 to 7, immediate the packet, and exits the list without any further processing.

set-prec-continue precedence-value

Sets the IP precedence value, ranging from 0 to 7, and continues p rest of the list.

set-prec-transmit precedence-value

Sets the IP precedence value, ranging from 0 to 7, transmits the p exits the list without further processing.

set-qos-continueqos-group-index

Sets the QoS group number, ranging from 0 to 99, for the packet a continues processing the rest of the list.

set-qos-transmitqos-group-index

Sets the QoS group number for the packet, ranging from 0 to 99, t packet, and exits the list without further processing.

transmit

Transmits the packet and stops evaluating the list.

exceed-action

Specifies the action to take if the normal rate has been exceeded.

The action to take upon an exceeded action.

continue

Continues processing through the rest of the list.

drop

Immediately drops the packet and exits the list.

set-dscp-continuedscp-value

Sets the DSCP value to the specified value, ranging from 0 to 63, a continues processing the rest of the list.

set-dscp-transmitdscp-value

Sets the DSCP value, ranging from 0 and 63, transmits the packet the list without further processing.

set-mpls-exp-continue mpls-exp-value

Sets the MPfS experimental value, ranging from 0 to 7, and contii processing the rest of the list.

set-mpls-exp-transmit mpls-exp-value

Sets the MPfS experimental value, ranging from 0 to 7, immediate the packet, and exits the list without any further processing.

set-prec-continue precedence-value

Sets the IP precede nce valusr ranging fni>m y to 7, and continues p the rost of the list.

set-pres-transmit precedence-value

Seta the I y pre cedence vsIs—, rahping from 0 to 7, transmits the p exits the list without further processing.

set-qos-continue qos-group-index

Sets the QoS group number for the packet, ranging from 0 to 99, a continu as pnocessiag the rest oh the l pst.

set-qos-transmit qos-group-index

Sets the QoS group number for the packet, ranging from 0 to 99, t packet, and exits the list without further processing.

transmit

Transmits the packet and stops evaluating the list.

InExample 6-22, th e rate-limit command is used with access list 101 to ^irT— rIt ircomm g tra—fi c for h 195.42.48,155 to 2 Mbps with a 375,a00-bete oormal burst a ltd )R0,000-byte excess burst. Any tr conformi nq to the cormal toa ffic rate wiH have iss IP prece dence valus s et -o Flash -override (4) anc kransmitted immediately, Praffic exceedlnq the normal busst rate will be continue to be p^tcessed.

Next, CAR is ds—d to polire and morlr traffin. First, this -ate-limit command is used with access list all passive FTP traffic to host 195.42.48.7 to 4 Mbps. Then, it is also used to set the normal burst r bytes and the extended burst rate to 1,500,000 bytes. Any traffic that conforms to the rate limits s transmitted, and the router should continue on with CAR list processing. Any FTP traffic that exceed will be dropped.

NOTE

The following formulas were used to find the CAR parameters for the FTP example:

1. Normal rate in bytes = normal rate in bps * (1 byte / 8 bits = 125) 4,000,000 bits * 125 = 500,000,000 bits = 500,000 bytes

2. Normal burst = normal rate in bytes * 1.5 seconds 500,00p bytes * 1.5 = 750,000 bytes

3. Excess burst = normal burst * 2 750,000 * 2 = 1,500,000 bytes

0 0

Post a comment