Friday, April 12, 2013

Cisco, ProCurve, Comware - Classifier based QoS



 In all cases below, the voice vlan is 610



qos
qos dbl
qos map dscp 24 25 26 27 28 29 30 31 to tx-queue 4
qos map dscp 32 33 34 35 36 37 38 39 to tx-queue 4
qos map cos 5 to dscp 46
!
class-map match-all AutoQoS-VoIP-RTP-Trust
match ip dscp ef
!
class-map match-all AutoQoS-VoIP-Control-Trust
match ip dscp cs3 af31
!
policy-map AutoQoS-Police-CiscoPhone
class AutoQoS-VoIP-RTP-Trust
set dscp ef
police 320000 8000 exceed-action policed-dscp-transmit
class AutoQoS-VoIP-Control-Trust
set dscp cs3
police 32000 8000 exceed-action policed-dscp-transmit
!
interface range GigabitEthernet4/13 - 48
des MDF_DATA
switchport host
switchport access vlan 178
switchport voice vlan 610
auto qos voip cisco-phone


H3C

traffic classifier AutoQoS-VoIP-Control-Trust operator or
 if-match dscp 24 26
#
traffic classifier AutoQoS-VoIP-RTP-Trust
 if-match dscp 46
#
traffic behavior remark_to_ef
 remark dscp 46
#
traffic behavior remark_to_cs3
 remark dscp 26
#
qos policy AutoQoS-Police-CiscoPhone
 classifier AutoQoS-VoIP-Control-Trust behavior remark_to_cs3
 classifier AutoQoS-VoIP-RTP-Trust behavior remark_to_ef

Set on vlan from gloabal context
 qos vlan-policy AutoQoS-Police-CiscoPhone vlan 610 inbound

Set on bridge interface
interface GigabitEthernet1/0/17
 qos apply policy AutoQoS-Police-CiscoPhone inbound

Set on routed interface
interface Ethernet0/2
 port link-mode route
 qos apply policy AutoQoS-Police-CiscoPhone inbound
 qos apply policy AutoQoS-Police-CiscoPhone outbound


Procurve

qos type-of-service diff-services

class ipv4 "AutoQoS-VoIP-Control-Trust"
10 match ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255 ip-dscp cs3
20 match ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255 ip-dscp af31
exit

class ipv4 "AutoQoS-VoIP-RTP-Trust"
10 match ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255 ip-dscp ef
exit

policy qos "AutoQoS-Police-CiscoPhone"
10 class ipv4 "AutoQoS-VoIP-RTP-Trust" action dscp ef
20 class ipv4 "AutoQoS-VoIP-Control-Trust" action dscp cs3
exit

vlan 610
service-policy "AutoQoS-Police-CiscoPhone" in
exit

Can also be set on interface(s)

6 comments:

  1. Thanks a lot!
    In the H3C commands I don't undestand the meaning of the parenthesis in lines:
    if-match dscp 24 26 (cs3 or af31)
    if-match dscp 46 (ef)

    Besides, does the first classifier use the (default) operator and?

    ReplyDelete
    Replies
    1. Parenthesis arent actual parameters. Just a way for me to equate the dscp to old af, cs, ef values. default operator is AND

      Delete
  2. The Comware classifier only marks traffic as it comes inbound from the Cisco phone to the H3C switch. What about egress queuing?

    ReplyDelete
    Replies
    1. egress can be applied to routed ports
      interface Ethernet0/2
      port link-mode route
      qos apply policy AutoQoS-Police-CiscoPhone inbound
      qos apply policy AutoQoS-Police-CiscoPhone outbound

      Delete
  3. Jeff, your comware/H3C example has me confused. It appears that you are remarking VoIP traffic on ingress to the VLAN interface (it could be applied to a physical interface too I guess). But I don't see any way to ensure that VoIP traffic goes into the dot1p voice queue. Does that happen by default? And also, I don't see any mechanism to set the amount of bandwidth that is allocated to that queue. Is that something that happens by default by the comware dot1p friendly queuing too? I ask this because the typical Cisco Catalyst 4500 AutoQos commands do all of that. First, the qos map commands ensure that VoIP traffic winds up in the tx-queue 4 and the policy-map ensures that policing to a specific amount of bandwidth occurs too. Or am I missing something?

    ReplyDelete
    Replies
    1. http://www.snackarelli.com/2014/10/voip-qos-for-mitel-cisco-non-trust.html
      http://www.snackarelli.com/2014/10/comware-qos-policy.html

      Delete

Please add comments so I may update the material to accommodate platform modification to various commands. Also if you have some real-world caveats, do please share.

Search Duke

About the Author

My photo
Central Florida, United States