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

How to alter the cos vaule on the frame switched by the c4500?

jozef.mozolik
Level 1
Level 1

Hi All,

I have the following topology:

DEVICE X <---- trunk vlan 10,20,30 ---->  in.p C4500 out.p <---- trunk vlan 10,20,30,40,50 ----> DEVICE Y

I need to change the cos value for specific vlan (vlan 20) on Catalyst 4500. But only for vlan 20.

Received cos vaule on input port of c4500 for vlan 20 is 0,

output cos value on output port of c4500 for vlan 20 have to be 5.

According documentation i need to set internal dscp, which have to be copied to the cos field on output port.

But it doesn't work as it is expected.

Any idea?

Thanks

BR

jm.,

9 Replies 9

Jon Marshall
Hall of Fame
Hall of Fame

jm

Might help if you can -

1) post config you are currently working with

2) specify IOS and supervisor model

In principle you should be able to match the vlan 20 traffic, mark it as CoS 5. You then need to look at the following maps -

CoS-to-DSCP - this map is used to determine which internal DSCP value is derived from your CoS value

DSCP-to-CoS - this map is used to determine the CoS value used on the outgoing interface and is derived from the internal DCSP value.

How are you verrifying it is not setting the correct value ?

Jon

HI,

1, config - pls. see below

2, Sup II+10GE 10GE (X2), 1000BaseX (SFP) WS-X4013+10GE    12.2(31r)SGA 12.2(50)SG3

I'm able to match vlan 20 traffic, but It's not possible to set the cos value, only the dscp or ip prec (on input).

Thanks

jm.,

class-map match-any ANY
match any
!
policy-map P66
class ANY
  set ip dscp ef
class class-default
  set ip dscp ef
!
interface GigabitEthernet3/15
description c7600, g4/15
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 10,20,30
switchport mode trunk
switchport nonegotiate
qos vlan-based
!
interface Vlan20
no ip address
service-policy input P66
!
class-map match-all CS0
match cos  0
class-map match-all CS1
match cos  1
class-map match-all CS2
match cos  2
class-map match-all CS3
match cos  3
class-map match-all CS4
match cos  4
class-map match-all CS5
match cos  5
class-map match-all CS6
match cos  6
class-map match-all CS7
match cos  7
!        
policy-map TEST2
class CS0
  set dscp default
class CS1
  set dscp cs1
class CS2
  set dscp cs2
class CS3
  set dscp cs3
class CS4
  set dscp cs4
class CS5
  set dscp cs5
class CS6
  set dscp cs6
class CS7
  set dscp cs7
class class-default
!
interface GigabitEthernet3/16
description c7600, g4/16
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 10,20,30,40,50
switchport mode trunk
switchport nonegotiate
service-policy output TEST2
!
c4500-lab#show policy-map interface vl 20
Vlan20

  Service-policy input: P66

    Class-map: ANY (match-any)
      100 packets
      Match: any
        100 packets
      QoS Set
       ip dscp ef

    Class-map: class-default (match-any)
      0 packets
      Match: any
        0 packets
      QoS Set
       ip dscp ef
c4500-lab#
c4500-lab#sh policy-map interface g3/16 
GigabitEthernet3/16

  Service-policy output: TEST2

    Class-map: CS0 (match-all)
      0 packets
      Match: cos  0
      QoS Set
       ip dscp default

    Class-map: CS1 (match-all)
      0 packets
      Match: cos  1
      QoS Set
       ip dscp cs1

    Class-map: CS2 (match-all)
      0 packets
      Match: cos  2
      QoS Set
       ip dscp cs2

    Class-map: CS3 (match-all)
      0 packets
      Match: cos  3
      QoS Set
       ip dscp cs3

    Class-map: CS4 (match-all)
      0 packets
      Match: cos  4
      QoS Set
       ip dscp cs4

    Class-map: CS5 (match-all)
      0 packets
      Match: cos  5
      QoS Set
       ip dscp cs5

    Class-map: CS6 (match-all)
      0 packets
      Match: cos  6
      QoS Set
       ip dscp cs6

    Class-map: CS7 (match-all)
      0 packets
      Match: cos  7
      QoS Set
       ip dscp cs7

    Class-map: class-default (match-any)
      1686 packets
      Match: any
        1686 packets

I can see what you are doing on the input ie. vlan based QOS for vlan 20 setting to DSCP value to 5. But what are you trying to do on the output interface with your policy map ?

Also -

1) can you post the output of "sh qos maps dscp to cos"

and can you confirm how you know the CoS value is not being set properly on the output queue ?

Jon


Hi,

QOS map dscp to cos has default values

c4500-lab#show qos maps dscp cos
DSCP-CoS Mapping Table (dscp = d1d2)
d1 : d2  0  1  2  3  4  5  6  7  8  9
-------------------------------------
0 :    00 00 00 00 00 00 00 00 01 01
1 :    01 01 01 01 01 01 02 02 02 02
2 :    02 02 02 02 03 03 03 03 03 03
3 :    03 03 04 04 04 04 04 04 04 04
4 :    05 05 05 05 05 05 05 05 06 06
5 :    06 06 06 06 06 06 07 07 07 07
6 :    07 07 07 07

I'm checking the policy map on the output intf.

c4500-lab#show policy-map interface g3/16
GigabitEthernet3/16

  Service-policy output: TEST2

    Class-map: CS0 (match-all)
      0 packets
      Match: cos  0
      QoS Set
       ip dscp default

    Class-map: CS1 (match-all)
      0 packets
      Match: cos  1
      QoS Set
       ip dscp cs1

    Class-map: CS2 (match-all)
      0 packets
      Match: cos  2
      QoS Set
       ip dscp cs2

    Class-map: CS3 (match-all)
      0 packets
      Match: cos  3
      QoS Set
       ip dscp cs3

    Class-map: CS4 (match-all)
      0 packets
      Match: cos  4
      QoS Set
       ip dscp cs4

    Class-map: CS5 (match-all)
      0 packets
      Match: cos  5
      QoS Set
       ip dscp cs5

    Class-map: CS6 (match-all)
      0 packets
      Match: cos  6
      QoS Set
       ip dscp cs6

    Class-map: CS7 (match-all)
      0 packets
      Match: cos  7
      QoS Set
       ip dscp cs7

    Class-map: class-default (match-any)
      8608 packets
      Match: any
        8608 packets

JM.,

Is there any chance you can run a packet capture tool on device Y and check the CoS value there ?

Jon

I can do it, but tomorrow. I'll let You know.

Thanks

BR

jm.,

Jon,

it is working as it is expected, cos remarking is done for IP traffic and non-IP traffic too (ARP packets). The only way how to check it was to configure local monitor session on c4500 (with 802.1q support) and to sniff traffic under linux/wireshark.

Thank You

BR

Jm.,

Hi All


applied configuration works well when the input port is on the linecard, IP traffic(icmp) and non-IP traffic (ARP) is remarked by cos=5 as it is expected.


But the same configuration is not working if the input port for vlan 20 is on the supervisor (Sup II+10GE), IP traffic is marked by cos=5, but the non-IP traffic has default cos value=0 (as it is received).


Any idea?


Thank You


BR

jm.,

Hi All,

by mistake I've omitted the line in the config qos map cos 0 to dscp 46, the result was - wrong conslusion. Finally the conclusion is:

- it's not possible to change COS value (example incomming cos=0, outgoing cos=5) using the configuration above for non-IP trafik (ARP packets)

- the only way how to do it, is to define qos trust cos on the input intf. and change the qos map: qos map cos 0 to dscp 46

jm.,

Review Cisco Networking for a $25 gift card