cisco 2960 change default dscp value

Answered Question
Jan 24th, 2008
User Badges:

Hi, when qos is enabled on the switch (mls qos). It will rewrite anything that is not trusted of classified to 0. How would I change that to af11 0x28?


thx jason

Correct Answer by Jon Marshall about 9 years 3 months ago

Jason


We may be talking cross purposes here.


My understanding is this. All Catalyst switches generate an internal DCSP value for the packet regardless of whether the packet is IP or non-IP. This internal value is used for QOS decisions but is not written into the packet itself.


How this internal DCSP value is generated depends on a number of things


1) If the port is set to Trust DSCP then the internal DCSP value is simply the same value as the value in the packet header.


2) If port is set to Trust IP Precedence then the internal DCSP value is obtained from the IPP to DCSP map.


3) If port is set to Trust CoS then the internal DSCP value is obtained from the CoS to DSCP map


4) If the port is set to Untrusted the received packet has a default CoS setting applied to it which is then mapped to an internal DSCP value using the CoS to DCSP map.


Now my understanding is that if you have "mls qos trust cos" on a port and the packet received has a DSCP value that is irrelevant. What will happen is that the packet either has


a) a CoS value, in which case that will be used and mapped to an internal DSCP value using the Cos to DSCP value.


b) No CoS value, in which case you assign the default CoS value of the port and then map that to an internal DSCP value using the Cos to DSCP map.


As far as i am aware the DSCP to CoS map is only used on the egress because the switch does not use an internal CoS value.


Perhaps i have misunderstood.


Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Jon Marshall Thu, 01/24/2008 - 10:16
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Hi Jason


You can't really because you are talking about a default COS value ie. 0 and changing that to a DSCP value


What you can do though is change the default COS value ie.


switch(conf t)#interface range fa0/1 - 24

switch(config-if)# mls qos cos "COS value"


where COS value is between 1 & 7.


This would then set the COS value for all frames entering the switch to whatever value you chose.


http://www.cisco.com/en/US/docs/switches/lan/catalyst2960/software/release/12.2_37_se/configuration/guide/swqos.html#wp1032169



and then you can map that in the COS to DCSP map ie. you could choose value 3 and map to 28.


http://www.cisco.com/en/US/docs/switches/lan/catalyst2960/software/release/12.2_37_se/configuration/guide/swqos.html#wp1027339


I suppose you could just directly modify the COS to DSCP map and the DSCP to COS map if you wanted but i have never tried this.


HTH


Jon

avtechs19 Thu, 01/24/2008 - 11:49
User Badges:

If qos is enabled and the port is untrusted, what map is the switch using to determine the cos,dscp value?


jason

Jon Marshall Thu, 01/24/2008 - 14:15
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Jason


It will use the COS to DSCP map as this is used on ingress ports. The DSCP to COS map is used on egress ports. But it doesn't use the map per se to determine the COS value. If the port is untrusted it sets the default COS value and then uses the COS to DSCP map to generate an internal DSCP value.


Jon

avtechs19 Thu, 01/24/2008 - 14:38
User Badges:

hi, from the documentation it says that the cos-dscp,dscp-cos map is only dependent on what is trusted dscp,cos and what is availible in the packet. For example, if dscp is set on a ingress packet, and 'mls qos trust cos' is trusted on that port, it will do a it will do a dscp-to-cos map.


if the trust as 'mls qos trust dscp' it will just remark the packet with the same dscp.


jason

Correct Answer
Jon Marshall Fri, 01/25/2008 - 01:38
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Jason


We may be talking cross purposes here.


My understanding is this. All Catalyst switches generate an internal DCSP value for the packet regardless of whether the packet is IP or non-IP. This internal value is used for QOS decisions but is not written into the packet itself.


How this internal DCSP value is generated depends on a number of things


1) If the port is set to Trust DSCP then the internal DCSP value is simply the same value as the value in the packet header.


2) If port is set to Trust IP Precedence then the internal DCSP value is obtained from the IPP to DCSP map.


3) If port is set to Trust CoS then the internal DSCP value is obtained from the CoS to DSCP map


4) If the port is set to Untrusted the received packet has a default CoS setting applied to it which is then mapped to an internal DSCP value using the CoS to DCSP map.


Now my understanding is that if you have "mls qos trust cos" on a port and the packet received has a DSCP value that is irrelevant. What will happen is that the packet either has


a) a CoS value, in which case that will be used and mapped to an internal DSCP value using the Cos to DSCP value.


b) No CoS value, in which case you assign the default CoS value of the port and then map that to an internal DSCP value using the Cos to DSCP map.


As far as i am aware the DSCP to CoS map is only used on the egress because the switch does not use an internal CoS value.


Perhaps i have misunderstood.


Jon

avtechs19 Fri, 01/25/2008 - 09:25
User Badges:

Thank you, That clears up the the confusion.


much appreciated

jason

aciscolook Wed, 07/16/2008 - 00:50
User Badges:

Excellent explanation..


I have a few follow-up questions if you don't mind?


a) So one typically wouldn't use the command "mls qos trust cos" on a port that is simply acting as a switchport (i.e. not trunking)? Since there's no CoS to trust anyway, right?


b) You only see the DSCP to COS mapping played out if the egress is a trunked port?

As such it would derive a 'new' (albeit possibly the same) COS value regardless of the original ingress trunk COS value or even ingress switchport 'non-value'?


c) Is an exception to (b) when such packet is egressing a switchport interface that has WRR configured since placement into appropriate WRR queues is based on COS values not DSCP? Therefore the DSCP to COS map must be invoked?


d) To clarify the scenario in (c): WRR can be configured on both switchport and trunked egress interfaces?


It's a fairly confusing subject...Thanks for the help you've already provided.

Actions

This Discussion