Re: CAR

From: Chris Hugo (chrishugo@xxxxxxxxx)
Date: Mon Jul 29 2002 - 22:26:21 GMT-3


   
Hi Charles,
That book has a lot of errors. BUYER BEWARE. I posted a neg on that one at amaz
on.
He is right on that one though.
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120lim
it/120st/120st14/mct1214t.htm#15477
Here is an excerpt on CCO
Usage Guidelines

Use this command to classify packets by the specified IP precedence, MAC addres
s, or MPLS experimental field values for a particular CAR access list. You can
then apply CAR policies, using the rate-limit command, to individual rate-limit
 access lists. This causes packets with different IP precedences, MAC addresses
, or MPLS experimental field values to be treated differently by the CAR proces
s.

You can specify only one command for each rate-limit access list. If you enter
this command multiple times with the same access list number, the new command o
verwrites the previous command.

Use the mask keyword to assign multiple IP precedences or MPLS experimental fie
ld values to the same rate-limit list. To ascertain the mask value, perform the
 following steps:

---------------------------------

Step 1 Decide which precedences you want to assign to this rate-limit access
list.

Step 2 Convert the precedences or MPLS experimental field values into 8-bit n
umbers with each bit corresponding to one value. For example, an MPLS experimen
tal field value of 0 corresponds to 00000001, 1 corresponds to 00000010, 6 corr
esponds to 01000000, and 7 corresponds to 10000000.

Step 3 Add the 8-bit numbers for the selected MPLS experimental field values.
 For example, the mask for MPLS experimental field values 1 and 6 is 01000010.

Step 4 The command expects hexadecimal format. Convert the binary mask into t
he corresponding hexadecimal number. For example, 01000010 becomes 42. This val
ue is used in the access-list rate-limit command. Any packets that have an MPLS
 experimental field value of 1 or 6 will match this access list.

end of excerpt

Now let me put your problem in a example....
You Must Classify Precedence Bits for 0,1, and 2
0000 0000
7654 3210 - Precedence Values is defined by Cisco this way
8421 8421- This is the format that will be used for the calculation. After, you
 must convert the value to hex.
You must also seperate the octet into a nibble for the calculation. The output
will be
0 - FOR 1st nibble since we don't need to worry about any precedence values of
4,5,6,7
7- FOR 2nd nibble since we need to worry about precedence values of 0,1,2
Now let's combine the values that will make the mask value of: 07
hth,
chris hugo

  Charles Carley <ccarley@columbus.rr.com> wrote: I am using the Administering
Cisco QOS book by Syngress and have a question
about an access list to match precedence values. The author wants to match
precedence values 0, 1 and 2 and uses the following access list:

access-list rate-limit 25 mask 07

If I do the binary conversion I get a mask of 12, can someone explain why
the correct anser is 07? Thank you.



This archive was generated by hypermail 2.1.4 : Sat Sep 07 2002 - 19:36:48 GMT-3