Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

policy-map not rewriting DSCP from 2 to 46

Assume the following configuration on a 2970 running 12.2(25)SEB4:

!

no mls qos rewrite ip dscp

mls qos

!

class-map match-any IPTube

match ip dscp 2

!

policy-map IPTube

class IPTube

set dscp ef

!

interface GigabitEthernet0/16

description IPTUBE01

switchport access vlan 31

service-policy input IPTube

!

interface GigabitEthernet0/12

description 3845 Router

switchport trunk encapsulation dot1q

switchport mode trunk

!

G0/16 sees DSCP 2 coming in, but it doesn't seem to rewrite it to DSCP 46 before it sends it to the router (G0/12) and I'm quite stumped.

Note: I'm not trying to police or queue yet, I'm just trying to classify and mark, incase you're wondering about the half-done cofig.

2970#show mls qos int g0/16 statistics | i /|dscp|cos|0 - 4|45 - 49

GigabitEthernet0/16

dscp: incoming

0 - 4 : 0 0 99891 0 0

45 - 49 : 0 0 0 0 0

dscp: outgoing

0 - 4 : 123 0 99891 0 0

45 - 49 : 0 0 0 0 0

cos: incoming

0 - 4 : 99900 0 0 0 0

cos: outgoing

0 - 4 : 100023 0 0 0 0

2970#show mls qos int g0/12 statistics | i /|dscp|cos|0 - 4|45 - 49

GigabitEthernet0/12

dscp: incoming

0 - 4 : 28671 0 119927 0 731

45 - 49 : 0 0 0 416 0

dscp: outgoing

0 - 4 : 21614 0 119927 0 12

45 - 49 : 0 0 0 542 0

cos: incoming

0 - 4 : 149837 0 0 180 0

cos: outgoing

0 - 4 : 142317 0 0 0 0

5 REPLIES
Hall of Fame Super Blue

Re: policy-map not rewriting DSCP from 2 to 46

You have DSCP transparency enabled ie. in your config

no mls qos rewrite ip dscp

this tells the switch not to rewrite the DSCP value found in an incoming packet. Try disabling this ie.

mls qos rewrite ip dscp

and see if that fixes your problem.

Jon

New Member

Re: policy-map not rewriting DSCP from 2 to 46

Hi Jon,

If I disable DSCP transparency, the DSCP value is set to 0:

2970#show mls qos int g0/16 statistics | i /|dscp|0 - 4|45 - 49

dscp: incoming

0 - 4 : 0 0 4145 0 0

45 - 49 : 0 0 0 0 0

dscp: outgoing

0 - 4 : 4151 0 0 0 0

45 - 49 : 0 0 0 0 0

2970#show mls qos int g0/12 statistics | i /|dscp|0 - 4|45 - 49

dscp: incoming

0 - 4 : 346 0 4148 0 111

45 - 49 : 0 0 0 59 0

dscp: outgoing

0 - 4 : 4609 0 0 0 0

45 - 49 : 0 0 0 59 0

I also tried a dscp-mutation map, and got the same results as the priority-map while DSCP transparency is enabled and disabled:

!

mls qos map dscp-mutation IPTube 2 to 46

mls qos

!

interface GigabitEthernet0/16

description AMSQ9IPTUBE01

switchport access vlan 31

mls qos trust dscp

mls qos dscp-mutation IPTube

!

2970#show mls qos int g0/16 statistics | i /|dscp|0 - 4|45 - 49

dscp: incoming

0 - 4 : 0 0 5146 0 0

45 - 49 : 0 0 0 0 0

dscp: outgoing

0 - 4 : 5151 0 0 0 0

45 - 49 : 0 0 0 0 0

2970#show mls qos int g0/12 statistics | i /|dscp|0 - 4|45 - 49

dscp: incoming

0 - 4 : 862 0 5149 0 48

45 - 49 : 0 0 0 27 0

dscp: outgoing

0 - 4 : 6043 0 0 0 0

45 - 49 : 0 0 0 27 0

!

no mls qos rewrite ip dscp

!

2970#show mls qos int g0/16 statistics | i /|dscp|0 - 4|45 - 49

dscp: incoming

0 - 4 : 0 0 5976 0 0

45 - 49 : 0 0 0 0 0

dscp: outgoing

0 - 4 : 7 0 5976 0 0

45 - 49 : 0 0 0 0 0

2970#show mls qos int g0/12 statistics | i /|dscp|0 - 4|45 - 49

dscp: incoming

0 - 4 : 965 0 7649 0 37

45 - 49 : 0 0 0 23 0

dscp: outgoing

0 - 4 : 977 0 7648 0 2

45 - 49 : 0 0 0 31 0

Silver

Re: policy-map not rewriting DSCP from 2 to 46

But won't the lack of trust rewrite dscp?

Logic is that there is no trust, so everything is set to 0. But when no rewrite was off, it passed through DSCP.

Now rewrite is on, so incoming state is not trusted so internally cos/dscp is 0 (as before) but now there is rewrite on output.

Jason, try to enable trust dscp on the incoming interface where the map is applied.

New Member

Re: policy-map not rewriting DSCP from 2 to 46

Enabling trust dscp in the ingress interface removes the service-policy from the interface.

As a workaound, I tried to use a DSCP mutation map, but that didn't even work:

!

mls qos map dscp-mutation IPTube 2 to 46

no mls qos rewrite ip dscp

mls qos

!

interface GigabitEthernet0/16

description IPTUBE01

switchport access vlan 31

mls qos trust dscp

mls qos dscp-mutation IPTube

!

2970#show mls qos interface g0/12 statistics | i /|dscp|0 - 4|45 - 49

GigabitEthernet0/12

dscp: incoming

0 - 4 : 71584 0 239989 0 735

45 - 49 : 0 0 0 529 0

dscp: outgoing

0 - 4 : 52419 0 239989 0 103

45 - 49 : 0 0 0 812 0

2970#show mls qos interface g0/16 statistics | i /|dscp|0 - 4|45 - 49

GigabitEthernet0/16

dscp: incoming

0 - 4 : 0 0 244994 0 0

45 - 49 : 0 0 0 0 0

dscp: outgoing

0 - 4 : 308 0 244994 0 0

45 - 49 : 0 0 0 0 0

New Member

Re: policy-map not rewriting DSCP from 2 to 46

I am not sure I would trust the counters on egress. I would check to see if the packets are arriving at the routers ingress interface with the proper DSCP markings. Switches and counters don't always get along.

651
Views
0
Helpful
5
Replies
CreatePlease to create content