cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6373
Views
18
Helpful
2
Replies

Why is Scavenger traffic (CS1) dropped before Best Effort traffic (CS0)

Hi,

According to many documents (i.e. http://www.cisco.com/c/en/us/td/docs/solutions/Enterprise/WAN_and_MAN/QoS_SRND/QoS-SRND-Book/QoSIntro.html#pgfId-46835)  Scavenger traffic should be marked to DSCP CS1.

Also it should be assigned a minimal bandwidth of 1%.

I am trying to understand why Scavenger class is dropped before Best Effort.

Default (BE) traffic shows a binary value of 000000, where CS1 is 001000.Why is 001000 (CS1) dropped before 000000 (CS0). I thought this is a mathematical approach. Shouldn't it be the other way around ?

 

If i setup a QOS like following:

 

policy-map WAN_QOS_SHAPE
  class class-default
  shape average 30000000
  service-policy WAN_QOS


policy-map WAN_QOS
  class CM_BUSINESS
  set dscp af31
  bandwidth 5000
  class CM_VOICE
  priority 800
  set dscp ef
  class CM_CRITICAL
  bandwidth 5000
  set dscp af41
  class NETWORK-CONTROL
  bandwidth 512
  class CM_SCAVENGER
  bandwidth 5000
  set dscp af11
  class class-default
  fair-queue
  queue-limit 2000 packets


class-map match-all NETWORK-CONTROL
  match ip dscp cs6
  match ip dscp cs7
class-map match-all CM_SCAVENGER
  match access-group name ACL_SCAVENGER
class-map match-any CM_BUSINESS
  match access-group name ACL_BUSINESS
class-map match-any CM_CRITICAL
  match dscp af41
class-map match-any CM_VOICE
  match dscp ef

Class CM_SCAVENGER is assigned 5M.

If now 2 packets arrive at the egress queue. 1 packet is for Best Effort (000000) and 1 packet is for Scavenger (001000). Wouldn't the scavenger paket win the battle because of its higher Class Selector ? Isn't this like a normal class ?

Question 2: In the example above Scavenger traffic is marked with AF11 (set dscp af11). This is not equal to CS1. Does it need to be CS1 ?

Many thanks,

Oliver

2 Replies 2

Peter Paluch
Cisco Employee
Cisco Employee

Oliver,

Keep in mind that before we had any QoS models and implementations, IP operated in the best effort mode, and for that case, the ToS octet in the IP header was set to 0. For a better-than-best-effort service, IP defined precedence levels and special treatments (throughput, delay, reliability, monetary cost), and every one of them was intended to signify a service better than best effort, consequently resulting into a ToS octet value that was higher than 0 for any traffic that required a different-than-best-effort treatment.

When QoS and DiffServ came in, they maintained the basic logic that a best effort class should be marked with DSCP 0, and a class better than a best effort should be marked with a non-zero DSCP value. In addition, the DSCP values were selected so that to routers not supporting DSCP, the reinterpretation of the DSCP value as a ToS octet more or less closely reflected on the real treatment the class should receive.

Eventually, someone noticed that it would be useful to have a class that is actually worse than best effort - the scavenger class. Technically, there is no problem in having such a class - but how should it be marked? The lowest allowed DSCP value is 0 (best effort), and the DSCP cannot be a negative number. So the only option of marking a scavenger class is to use a non-zero number that obviously will be positive, and so it will give off an impression that it is actually a more important, more significant class than the best effort.

Admittedly, it is a kludge, but in DiffServ, it is perfectly valid - there is no rule in DiffServ that would state that just because one class has a higher DSCP than the other, it is more important. Once again, DSCP values have been designed in a special way to provide reasonable backward compatibility with routers still interpreting the DSCP field as a ToS octet. Beyond that, there is little science to DSCP values.

As for dropping the scavenger class sooner than best effort, this actually depends on the way the policy-map is set up. Dropping is not guaranteed just because of some DSCP value; you need to activate a mechanism that causes the drops. This would be either explicit policing, tail drops (shortening the hold-queue for the scavenger class) and Random Early Detection. Your policy-map does not seem to use any of these mechanisms.

As for marking the scavenger traffic with AF11, I would call it unfortunate, as AF11 is used for traffic that requires certain guarantees. However, if all devices in the network were configured to treat AF11 as a scavenger class, it would work.

Keep in mind - it is you who defines how a particular class is going to be treated. How you mark that class is up to you. You may do it in a standards-compliant way, making it easy for you and someone else to understand, or you may do it according to your personal preference, with the risk that you'll have hard times maintaining it.

Best regards,
Peter

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Just to add to Peter's information, and as he also noted, DSCP classes don't really have implied behavior, using one class for less than best effort (AKA scavenger) makes sense.

If we were to do the same with IP Precedence markings, since higher values have "priority" over lower values, assuming we're not using all eight IPPrec markings, we could "promote" BE traffic to IPPrec1 (and adjust other IPPrec markings, as needed) and leave the Scavenger traffic to use IPPrec 0.

A problem arises if we're running across a network that has devices that uses the old IP Precedence rules and those that use the newer DSCP rules.

If you're thinking, couldn't we also promote DSCP value zero traffic to a CS value, and then use DSCP value zero for Scavenger?  Well, you could, but in DSCP, value zero is BE, and Scavenger is less than best effort.

Basically, Scavenger, or less than best effort, precludes using DSCP values in a way that's not contrary to IP Precedence.

Assuming we'll migrate IP Precedence devices to DSCP usage, long term, we should be okay.  (Also, in practice, many devices don't bother using the ToS byte at all.)

If there is a "kludge" with the Scavenger marking of CS1, it's probably more to due with AF1y markings not being related to CS1.