cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3946
Views
0
Helpful
9
Replies

Cisco 3750 QoS problem: why packets leave interface not marked?

Anton Pestov
Level 1
Level 1

Qos configuration on 3750:

...

mls qos map cos-dscp 0 8 16 24 32 46 48 56

mls qos

...

policy-map POLICY-VOIP-LAN17

class class-default

  trust cos

...

interface GigabitEthernet1/0/1

description *** Uplink ***

no switchport

ip address 172.18.254.250 255.255.255.252

mls qos trust dscp

!

...

interface GigabitEthernet1/0/24

description *** Downlink ***

switchport trunk encapsulation dot1q

switchport trunk native vlan 4094

switchport trunk allowed vlan 31,33,41,101,102,117,1101,4094

switchport mode trunk

switchport nonegotiate

mls qos vlan-based

!

...

interface Vlan117

description *** LAN ***

ip address 10.254.32.3 255.255.254.0

service-policy input POLICY-VOIP-LAN17

!

...

Show mls qos interface statistic:

DSW1-2#sh mls qos interface g1/0/24 statistics

GigabitEthernet1/0/24 (All statistics are in packets)

  dscp: incoming

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

  0 -  4 :        9579            0            0            0            0

  5 -  9 :           0            0            0            0            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            0            0            0            0

20 - 24 :           0            0            0            0           6

25 - 29 :           0            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :         364            0            0            0            0

45 - 49 :           0            0            0           30            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  dscp: outgoing

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

  0 -  4 :        7781            0            0            0            0

  5 -  9 :           0            0            0          100            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            1            0           30            0

20 - 24 :           0            0            0            0            0

25 - 29 :           9            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0            0            0           48            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  cos: incoming

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

  0 -  4 :        9609            1            0            6            1

  5 -  7 :         364           30           22

  cos: outgoing

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

  0 -  4 :        7911          100           31            9            0

  5 -  7 :           0           48            0

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:        7914         160          93

queue 2:          40           0           0

queue 3:           6           0          14

  output queues dropped:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:           0           0           0

queue 2:           0           0           0

queue 3:           0           0           0

Policer: Inprofile:            0 OutofProfile:            0

DSW1-2#sh mls qos interface g1/0/1 statistics

GigabitEthernet1/0/1 (All statistics are in packets)

  dscp: incoming

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

  0 -  4 :        3370            0            0            0            0

  5 -  9 :           0            0            0          338            0

10 - 14 :          11            0            0            0            0

15 - 19 :           0            4            0          139            0

20 - 24 :           0            0            0            0           94

25 - 29 :        1233            5            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0            0            0            2            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  dscp: outgoing

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

  0 -  4 :        3271            0            0            0            0

  5 -  9 :           0            0            0            0            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            0            0            0            0

20 - 24 :           0            0            0            0           0

25 - 29 :           0            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0            0            0            2            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  cos: incoming

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

  0 -  4 :        5198            0            0            0            0

  5 -  7 :           0            0            0

  cos: outgoing

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

  0 -  4 :        3271            0            0                      0

  5 -  7 :           0            2            0

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:        3273         163          80

queue 2:           0           0           0

queue 3:           2           0           0

  output queues dropped:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:           0           0           0

queue 2:           0           0           0

queue 3:           0           0           0

Policer: Inprofile:            0 OutofProfile:            0

Why packets leave interface g1/0/1 not marked with DSCP 46 and 24?

1 Accepted Solution

Accepted Solutions

smehrnia
Level 7
Level 7

Hi Anton,

you set your cos-dscp mapping so CoS 3 and 5 maps to DSCP 24 and 46 respectively. but be advised, u use the CoS-to-DSCP map to map CoS values in incoming packets to a DSCP value that QoS uses internally to represent the priority of the traffic.

So, it does NOT mean that at the egress point ur switch changes the incomming CoS to the mapped DSCP value, actually when you trust CoS on a dot1q ingress port, switch uses that value or its equivalent dscp mapping for the QoS and queueing uses. it removes the dot1q tag and the CoS value, and at the egress rewrites it in order to retain the same value (trust), since here your egress point is a Layer 3 interface, there is no dot1q tag, so no CoS!

I think it is a best practice to trust DSCP instead of CoS since you'r changing to Layer 3 network (egress) or explicty configure to Set the dscp value of the packets you want for that interface.

plz Rate if it helped,

Soroush.

Hope it Helps!

Soroush.

View solution in original post

9 Replies 9

smehrnia
Level 7
Level 7

Hi Anton,

you set your cos-dscp mapping so CoS 3 and 5 maps to DSCP 24 and 46 respectively. but be advised, u use the CoS-to-DSCP map to map CoS values in incoming packets to a DSCP value that QoS uses internally to represent the priority of the traffic.

So, it does NOT mean that at the egress point ur switch changes the incomming CoS to the mapped DSCP value, actually when you trust CoS on a dot1q ingress port, switch uses that value or its equivalent dscp mapping for the QoS and queueing uses. it removes the dot1q tag and the CoS value, and at the egress rewrites it in order to retain the same value (trust), since here your egress point is a Layer 3 interface, there is no dot1q tag, so no CoS!

I think it is a best practice to trust DSCP instead of CoS since you'r changing to Layer 3 network (egress) or explicty configure to Set the dscp value of the packets you want for that interface.

plz Rate if it helped,

Soroush.

Hope it Helps!

Soroush.

No, I am not confident that is true, because...

1. On the egress interface (g1/0/1) configured with 'mls qos trust dscp' (not 'mls qos trust cos'!) and it doesn't influence the egress traffic, only for ingress.

2. In "Implementing Cisco Quality of Service" it is told that switch remarks ingress packets with configured maps, for example, CoS-to-DSCP, and send egress packets with new QoS-marks (CoS and DSCP).

3. See another example QoS configurations and it's result statistics (which confirm told in above), but device is Cisco 2960 LanLite IOS. In this IOS mapping CoS-to-DSCP in manual it is not possible to configure and used default maps, see below:

   Cos-dscp map:

        cos:   0  1  2 3  4  5  6  7

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

       dscp:   0  8 16 24 32 40 48 56

and two tests: with trust cos, and with trust dscp:

3.1. With 'mls trust cos' on access mode interface, where connected to IP-phone with default QoS parameters Signal/Voice: CoS - 3/5, DSCP - 26/46.

QoS configuration on Cisco 2960:

...

mls qos

...

interface FastEthernet0/1

description *** Host VoIP and Data ***

switchport access vlan 102

switchport mode access

switchport voice vlan 117

mls qos trust cos

!

...

interface GigabitEthernet0/1

description *** Uplink ***

switchport trunk native vlan 4094

switchport trunk allowed vlan 31,33,101,102,117,1101,4094

switchport mode trunk

switchport nonegotiate

mls qos trust cos

!

Show mls qos interface statistic:

ASW1-5#sh mls qos int f0/1 statistics

FastEthernet0/1 (All statistics are in packets)

  dscp: incoming

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

  0 -  4 :           1            0            0            0            0

  5 -  9 :           0            0            0            0            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            0            0            0            0

20 - 24 :           0            0            0            0            0

25 - 29 :           0           11            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0          977            0            0            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  dscp: outgoing

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

  0 -  4 :        1008            0            0            0            0

  5 -  9 :           0            0            0            0            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            0            0            0            0

20 - 24 :           0            0            0            0            0

25 - 29 :           0            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0            0            0           68            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  cos: incoming

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

  0 -  4 :           2            0            0           12            0

  5 -  7 :         977            0            0

  cos: outgoing

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

  0 -  4 :        1010            0            0            0            0

  5 -  7 :           0           68            0

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:        1010          15          46

queue 2:           0           0           0

queue 3:          68           0           0

  output queues dropped:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:           0           0           0

queue 2:           0           0           0

queue 3:           0           0           0

ASW1-5#sh mls qos int g0/1 s

GigabitEthernet0/1 (All statistics are in packets)

  dscp: incoming

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

  0 -  4 :       10470            0            0            0            0

  5 -  9 :           0            0            0           57            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0           10            0            0            0

20 - 24 :           0            0            0            0            4

25 - 29 :         213            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0            0            0          157            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  dscp: outgoing

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

  0 -  4 :        7529            0            0            0            0

  5 -  9 :           0            0            0            0            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            0            0            0            0

20 - 24 :           0            0            0            0           12

25 - 29 :           0            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :         977            0            0            0            0

45 - 49 :           0            0            0           96            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  cos: incoming

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

  0 -  4 :       10892           57           10          217            0

  5 -  7 :           2          157          101

  cos: outgoing

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

  0 -  4 :        7584            0            0           12            0

  5 -  7 :         977           96            3

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

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

queue 0:         977           0           0

queue 1:        8031          18          79

queue 2:         225           0           0

queue 3:         256           0          48

  output queues dropped:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:           0           0           0

queue 2:           0           0           0

queue 3:           0           0           0

3.2. With 'mls trust dscp' on access mode interface,  where connected to IP-phone with same default QoS parameters.

QoS configuration on Cisco 2960:

...

mls qos

...

interface FastEthernet0/1

description *** Host VoIP and Data ***

switchport access vlan 102

switchport mode access

switchport voice vlan 117

mls qos trust dscp

!

...

interface GigabitEthernet0/1

description *** Uplink ***

switchport trunk native vlan 4094

switchport trunk allowed vlan 31,33,101,102,117,1101,4094

switchport mode trunk

switchport nonegotiate

mls qos trust cos

!

Show mls qos interface statistic:

ASW1-5#sh mls qos int f0/1 s

FastEthernet0/1 (All statistics are in packets)

  dscp: incoming

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

  0 -  4 :           0            0            0            0            0

  5 -  9 :           0            0            0            0            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            0            0            0            0

20 - 24 :           0            0            0            0            0

25 - 29 :           0            6            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0          944            0            0            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  dscp: outgoing

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

  0 -  4 :         968            0            0            0            0

  5 -  9 :           0            0            0            0            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            0            0            0            0

20 - 24 :           0            0            0            0            0

25 - 29 :           0            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0            0            0           39            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  cos: incoming

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

  0 -  4 :           0            0            0            6            0

  5 -  7 :         944            0            0

  cos: outgoing

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

  0 -  4 :         968            0            0            0            0

  5 -  7 :           0           39            0

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:         968          29          25

queue 2:           0           0           0

queue 3:          39           0           0

  output queues dropped:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:           0           0           0

queue 2:           0           0           0

queue 3:           0           0           0

ASW1-5#sh mls qos int g0/1 s

GigabitEthernet0/1 (All statistics are in packets)

  dscp: incoming

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

  0 -  4 :        8198            0            0            0            0

  5 -  9 :           0            0            0           29            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            3            0            0            0

20 - 24 :           0            0            0            0            0

25 - 29 :         366            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0            0            0           79            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  dscp: outgoing

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

  0 -  4 :        6174            0            0            0            0

  5 -  9 :           0            0            0            0            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            0            0            0            0

20 - 24 :           0            0            0            0            0

25 - 29 :           0            6            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0          944            0           49            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  cos: incoming

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

  0 -  4 :        8448           29            3          366            0

  5 -  7 :           3           79           51

  cos: outgoing

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

  0 -  4 :        6223            1            0            6            1

  5 -  7 :         944           50            3

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

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

queue 0:         944           0           0

queue 1:        6440          35          41

queue 2:         372           0           0

queue 3:         133           0          51

  output queues dropped:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:           0           0           0

queue 2:           0           0           0

queue 3:           0           0           0

How it to explain? Or in switches 2960 and 3750 different principles of QoS?

If in QoS configuration on 3750 (the first config) I change 'policy-map POLICY-VOIP-LAN17' to set DSCP (46), see below:

...

policy-map POLICY-VOIP-LAN17

class class-default

  set dscp ef

...

, that egress traffic also remains not marked DSCP = ef (46).

If I configure this policy-map on physical ingress interface (g1/0/24), that all traffic is marked on egress interface, but if configure mls qos trust cos or dscp on physical ingress interface, that traffic remains not marked on egress.

Anton Pestov wrote:

No, I am not confident that is true, because...

1. On the egress interface (g1/0/1) configured with 'mls qos trust dscp' (not 'mls qos trust cos'!) and it doesn't influence the egress traffic, only for ingress.

2. In "Implementing Cisco Quality of Service" it is told that switch remarks ingress packets with configured maps, for example, CoS-to-DSCP, and send egress packets with new QoS-marks (CoS and DSCP).

before you read this, read my previous reply, once again, with a little patience

** the only thing about ur egress point is that it is a LAYER 3 (no switchport) interface. in none of you examples with the other switch a Layer 3 port was involved, so its different scenario !

when i say Trust dscp instead of cos, i mean on your ingress port. it is not important whats ur trust status on egress n i know it

the whole mistake of yours is that you are NOT considering this Layer (2 and 3) change between your ingress and egress ports.

i hope you find this link useful:

https://supportforums.cisco.com/thread/2099118

plz Rate if it helped,

Soroush.

Hope it Helps!

Soroush.

Please, give an example for my configuration that the traffic was marked DSCP (24 and 46) on egress L3-interface...

I guess the problem is with the sequence of the actions n when they happen.

try this:

policy-map POLICY-VOIP-LAN17

class class-default

  trust dscp

see if you get results.

are you testing something or you are working on a production network? whats ur final goal? (to see if there is a work arround)

plz Rate if it helped,

Soroush.

Hope it Helps!

Soroush.

I test QoS for future VoIP infrastructure. By your example I see the following results:

DSW1-2#sh mls qos interface g1/0/24 statistics

GigabitEthernet1/0/24 (All statistics are in packets)

  dscp: incoming

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

  0 -  4 :       20488            0            0            0            0

  5 -  9 :           0            0            0            0            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            0            0            0            0

20 - 24 :           0            0            0            0           32

25 - 29 :           0            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :        1873            0            0            0            0

45 - 49 :           0            0            0          104            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  dscp: outgoing

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

  0 -  4 :       32572            0            0            0            0

  5 -  9 :           0            0            0          493            0

10 - 14 :           0            0          270            0            0

15 - 19 :           0          153            0            0            0

20 - 24 :           0            0            0            0            3

25 - 29 :         332            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0            0            0          174            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  cos: incoming

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

  0 -  4 :       20622            2            0           32            0

  5 -  7 :        1875          104           87

  cos: outgoing

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

  0 -  4 :       33037          763          153          335            0

  5 -  7 :           1          174            0

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:       33361         591         378

queue 2:         488           0           0

queue 3:          23           0         134

  output queues dropped:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:           0           0           0

queue 2:           0           0           0

queue 3:           0           0           0

Policer: Inprofile:            0 OutofProfile:            0

DSW1-2#sh mls qos interface g1/0/1 statistics

GigabitEthernet1/0/1 (All statistics are in packets)

  dscp: incoming

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

  0 -  4 :        2003            0            0            0            0

  5 -  9 :           0            0            0         2278            0

10 - 14 :          49            0          290            0            0

15 - 19 :           0          219            0          175            0

20 - 24 :           0            0            0            0            6

25 - 29 :       10346           13            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0            0            0            7            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  dscp: outgoing

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

  0 -  4 :        1273            0            0            0            0

  5 -  9 :           0            0            0            0            0

10 - 14 :           0            0            0            0            0

15 - 19 :           0            0            0            0            0

20 - 24 :           0            0            0            0            0

25 - 29 :           0            0            0            0            0

30 - 34 :           0            0            0            0            0

35 - 39 :           0            0            0            0            0

40 - 44 :           0            0            0            0            0

45 - 49 :           0            0            0            6            0

50 - 54 :           0            0            0            0            0

55 - 59 :           0            0            0            0            0

60 - 64 :           0            0            0            0

  cos: incoming

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

  0 -  4 :       15393            0            0            0            0

  5 -  7 :           0            0            0

  cos: outgoing

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

  0 -  4 :        1273            0            0            0            0

  5 -  7 :           0            6            0

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:        1279         532         263

queue 2:           0           0           0

queue 3:           6           0           0

  output queues dropped:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0           0

queue 1:           0           0           0

queue 2:           0           0           0

queue 3:           0           0           0

Policer: Inprofile:            0 OutofProfile:            0

, but egress traffic also remains not marked DSCP...

Anton Pestov
Level 1
Level 1

Somebody knows in what the reason and how it is correct to mark traffic on 3750?

Only the following config works (but marks all traffic entering into ingress port (g1/0/24)):

...

Policy Map POLICY-MARK-TRAFFIC

    Class class-default

      set ip dscp ef

...

interface GigabitEthernet1/0/24

description *** Downlink ***

switchport trunk encapsulation dot1q

switchport trunk native vlan 4094

switchport trunk allowed vlan 31,33,41,101,102,117,1101,4094

switchport mode trunk

switchport nonegotiate

ip arp inspection trust

load-interval 30

udld port aggressive

storm-control broadcast level 10.00

storm-control action trap

service-policy input POLICY-MARK-TRAFFIC

ip dhcp snooping trust

...

interface GigabitEthernet1/0/1

description *** Uplink ***

no switchport

ip address 172.18.254.250 255.255.255.252

mls qos trust dscp

...

if I add the new class enveloping a VoIP subnet in a policy, the traffic by class-default is marked only on egress g1/0/1!

Anton Pestov
Level 1
Level 1

There is an original configuration of QoS works perfectly!

The problem was that voice data were transferred through PBX (being in other subnet) instead of by P2P principle between IP phones. And on SVI of a subnet of PBX service-policy aren't set.

Review Cisco Networking for a $25 gift card