andrew.burns
Level 7
Level 7

Hi,

It's impossible to give a generic answer to this question because so much of QoS is dependent on hardware capabilities of different switches and routers and also on your exact network topology and traffic distribution.

However, there are two parts to the question, one is identifying P2P traffic and the second is dealing with it.

Identifying P2P on a Cisco is usually done using NBAR, something like "match protocol kazaa" in a class-map. One advantage of NBAR is that you can also write your own modules but one disadvantage is that it's all done in software (unless you're an early adopter of PISA..) so performance can be an issue.

Once identified you have two main options to deal with it depending on your topology, etc. The first is simply to police it directly under the same input service policy, the second is to mark it with a particular dscp value (e.g. CS1) and deal with it as it passes through the network. It's this second option that is usually referred to as putting it into the scavenger class.

Now the tricky bit - if you have, for example, a 4Q1T queuing structure on the uplink ports (e.g. on a 2950) then you need to configure the lowest queue to catch the scavenger traffic (something like wrr-queue cos-map 1 1) and then assign a low percentage of traffic to it (using wrr-queue bandwidth 1 33 33 33). The problem here is that there are a lot of different queuing structures (some with priority queues, some without) and also different drop methods (the above is for tail-drop but you can also have wred). You also need to partition the transmit buffers correctly and assign bandwidth to each queue correctly as the defaults are unlikely to match your own traffic distribution.

There are a lot of caveats and gotchas that hamper understanding, such as the default dscp-to-cos mappings are never how you want them, you never seem to have enough queues (let alone a common queuing structure), should you police or not, should you mark down or drop, how much bandwidth to assign to queues, what ratio to split the buffers, and on and on. It seems to be more art than science.

The reason why there are no good examples is simply because there are too many variables - the best place to look is in the "Configuring QoS" section of the particular piece of hardware you have. If you have a lot of 6500's for example then your bible should be (assuming IOS):

http://www.cisco.com/en/US/products/hw/switches/ps708/products_configuration_guide_chapter09186a00801679f8.html

HTH

Andrew.