Sunday, January 26, 2014

ProCurve VoIP, LLDP-MED, and QoS



Link Layer Discovery Protocol (LLDP) is an ieee standard protocol defined in 802.1AB.  It's used to discover directly attached devices (switches, routers, IP Phones, etc.). LLDP advertisements are encapsulated in LLDP Data Units (LLDPDU) via Type Length Values (TLV).  The standard defines two types of TLVs: Standard and Optional.


LLDP devices must support the advertisement of Standard TLVs (Chassis ID, Port ID, TTL, etc.), and may also include optional TLVs'.  These optional TLVs' are where vendor specific advertisements would be defined (model, firmware, PoE, QoS, etc.).

VLANs

Typically IP Phones have a single port that supports both a PC and the phone vlan. Generally the data VLAN is left untagged and the voice VLAN is tagged.  There are three ways that the IP telephone can learn its voice VLAN:



1) Manually set it on the phone.

2) DHCP options – The phone sends DHCP requests over the data VLAN, and the DHCP server offer will include vendor specific DHCP options including the voice VLAN.

3) Use a discovery protocol – LLDP-MED or CDPv2.  Here, the phone will discover the voice VLAN from the switch. 



On Provision switches using LLDP-MED, you must first enable lldp globally and then set the parameter “voice” in the vlan context for the switch to accept LLDP-MED TLV advertisements.   

hpe(config)# lldp run

hpe(config)# vlan 100
hpe(vlan-100) name "VOICE"
hpe(vlan-100) tagged <interfaces >
hpe(vlan-100) voice  ß Use lldp-med TLVs sent from the phone
hpe(vlan-100) exit

QoS

The two commonly used QoS marking methods are:
  • Class‐of‐Service (CoS) at Layer 2, and
  • Differentiated Service Code Point (DSCP) at Layer 3.

CoS (aka 802.1p) has 8 levels, numbered 0‐7 which map to 8 priority queues on the (egress) of each Ethernet port.  The CoS marking is set in tagged frames only since the priority (802.1p) field is part of the VLAN tag.  Untagged frames are placed in the CoS level 0 priority queue (or normal queue)

On most HPE switches CoS values 0‐7 map to priority queues like so:
 
 [1] [2] [0] [3] [4] [5] [6] [7]
 
Therefore, a CoS 0 priority will be mapped to hardware output queue Q3 and take precedence over frames marked 1 & 2.   Most HP edge switches have 8 output queues and is configurable to have 4 or 2 if desired.

hpe(config)# qos queue-config
 2-queues              Set the number of egress queues for each port.
 4-queues              Set the number of egress queues for each port.
 8-queues              Set the number of egress queues for each port.



hpe(config)# qos queue-config 4-queues
 This command will modify the current running configuration,
 execute 'write memory' to replace the startup configuration,
 and then reboot.

 Egress queues will be configured as follows:
  4-queues


Do you want to save current configuration [y/n/^C]?


The default mapping of CoS values to output queues on an HP edge switch looks like this:
   +-------------+-----------------+-----------------+-----------------+
   | Cos Value   | 8 Output Queues | 4 Output Queues | 2 Output Queues |
   +-------------+-----------------+-----------------+-----------------+
   |      1      |        1        |        1        |        1        |
   |      2      |        2        |        1        |        1        |
   |      0      |        3        |        2        |        1        |
   |      3      |        4        |        2        |        1        |
   |      4      |        5        |        3        |        2        |
   |      5      |        6        |        3        |        2        |
   |      6      |        7        |        4        |        2        |
   |      7      |        8        |        4        |        2        |
   +-------------+-----------------+-----------------+-----------------+

 
In voice deployments, generally the Ethernet switch port is configured to support 2 VLANs, one for voice and one for data.  LLDP is enabled on these Ethernet ports and can be configured to advertise voice VLAN ID and QoS information using the Network Policy LLDP TLV. 



Generally set prioritization queues for voice, video, and switch control plane traffic on edge switches as:



Priority  Traffic
7              Control plane
6              Routing
5              IP voice
4              IP video
3              Voice signaling
0              Normal Data
1              http, bulk transfer, etc.
2              http, bulk transfer, etc.



The priority can either be set on the interface or the vlan. If you set the priority at the interface level, the switch will not be able to distinguish normal data traffic from voice. 


QoS can also be used to prioritize traffic globally on TCP/UDP port based traffic.  This can be used on soft phones since the switch doesn’t know the difference between normal data traffic and soft phone voice traffic.



VLAN based prioritization applies to the 802.1p flag in a tagged (trunked) packet.  Therefore it will only prioritize tagged traffic for the vlan it is set in.  As such, the untagged vlan doesn’t have the 802.1p header and therefore will remain at normal priority (priority 0). 







Trust Model
In TRUST model, the edge switch accepts (or trusts) the phones QoS markings without modifying the priority.   Procurve switches default setting is “trust”.



If the frame is routed, the MAC header is stripped before routing the packet to its destination.  To keep the priority across routers use DSCP.  To prevent users over-riding priority settings, use strict priority provisioning with CoS and/or DSCP as well.



Non-Trusted Model
In most environments the trust model is fine.  Otherwise you can strictly provision COS priority per interface or vlan.  You can also globally prioritize traffic based on TCP/UDP port numbers.  Additionally you can create a Classifier base QoS Policy to prioritize traffic.



The following example shows the use of LLDP-MED and strict QoS provisioning to modify the default settings.  The VoIP VLAN is set through LLDP-MED and qos is set via DSCP:




Enable LLDP globally
2920(config)# lldp run



Enable Differential Code Services proritization
2920(config)# qos type-of-service diff-services



Create and configure the telephony VLAN where all of the telephony equipment will run
2920(config)# vlan 10
2920 (vlan-10)# name VOICE_SIGNALING
2920 (vlan-10)# qos dscp 011000     (802.1p pri 3)



Create and configure the voice VLAN
2920(config)# vlan 20
2920 (vlan-20)# name VOICE
2920 (vlan-20)# qos dscp 011110             (802.1p pri 5)
2920 (vlan-20)# voice                                        ßAccept lldp-med TLV's



Create and configure the VIDEO VLAN
2920(config)# vlan 30
2920 (vlan-30)# name VIDEO
2920 (vlan-30)# qos dscp 011100                           (802.1p pri 4)



Create and configure the data VLAN.
2920(config)# vlan 40
2920 (vlan-40)# name DATA

2920 (vlan-40)# qos dscp 010010                     (802.1p pri 0 - Normal)


Advanced QoS on Provision

In some cases you may want to reduce the number of hardware queues to 4 or 2. This would allow resources that are by default shared across 8 queues to be shared across 4 or 2 queues.  Example:

hp(config)# qos queue-config 4-queues

This changes the switch to only use 4 queues (needs a reboot to take affect). You use the show qos queue to verify

hp# show qos queue-config
802.1p
Queue Pri   Memory %
----- ---   --------
1     1–2   10
2     0,3   70
3     4–5   10
4     6–7   10


The amount of packet buffer memory allocated to the queues is pre-defined and not user configurable.


However, the user can change the amount of Guaranteed Minimum Bandwidth (GMB) allocated to each queue. The default GMB queue settings are:




These defaults can be viewed with the following command:

hp# show bandwidth output 1-5

 Outbound Guaranteed Minimum Bandwidth %

  Port   Q1  Q2  Q3  Q4  Q5  Q6  Q7  Q8
  ------ --- --- --- --- --- --- --- ---
  1      2   3   30  10  10  10  15  20
  2      2   3   30  10  10  10  15  20
  3      2   3   30  10  10  10  15  20
  4      2   3   30  10  10  10  15  20
  5      2   3   30  10  10  10  15  20



These GMB values can be changed on interfaces. This command is for interface 1 through to 5:



hp(config)# int 1-5 bandwidth-min output 2 3 30 10 20 15 10 10



TThis is for 8-queues, if you had the switch set to 4-queues then then only 4 GMB values is used. The percentages allowed to the queues should add up to 100%. In the above example GMB for Q5 (video) and Q6 (voice) pulls bandwidth from the default settings of Q7 (routing traffic) and Q8 (net mgmt).




hp(config)# show bandwidth output 1-5

 Outbound Guaranteed Minimum Bandwidth %

  Port   Q1  Q2  Q3  Q4  Q5  Q6  Q7  Q8
  ------ --- --- --- --- --- --- --- ---
  1      2   3   30  10  20  15  10  10
  2      2   3   30  10  20  15  10  10
  3      2   3   30  10  20  15  10  10
  4      2   3   30  10  20  15  10  10
  5      2   3   30  10  20  15  10  10



1 comment:

  1. HI

    I have cisco switch config for Voice and qos . i am looking for the same HP switch 2920.

    *****************cisco Config**************


    !
    mls qos map cos-dscp 0 8 16 26 32 46 48 56
    mls qos srr-queue input bandwidth 90 10
    mls qos srr-queue input threshold 1 8 16
    mls qos srr-queue input threshold 2 34 66
    mls qos srr-queue input buffers 67 33
    mls qos srr-queue input cos-map queue 1 threshold 2 1
    mls qos srr-queue input cos-map queue 1 threshold 3 0
    mls qos srr-queue input cos-map queue 2 threshold 1 2
    mls qos srr-queue input cos-map queue 2 threshold 2 4 6 7
    mls qos srr-queue input cos-map queue 2 threshold 3 3 5
    mls qos srr-queue input dscp-map queue 1 threshold 2 9 10 11 12 13 14 15
    mls qos srr-queue input dscp-map queue 1 threshold 3 0 1 2 3 4 5 6 7
    mls qos srr-queue input dscp-map queue 1 threshold 3 32
    mls qos srr-queue input dscp-map queue 2 threshold 1 16 17 18 19 20 21 22 23
    mls qos srr-queue input dscp-map queue 2 threshold 2 33 34 35 36 37 38 39 48
    mls qos srr-queue input dscp-map queue 2 threshold 2 49 50 51 52 53 54 55 56
    mls qos srr-queue input dscp-map queue 2 threshold 2 57 58 59 60 61 62 63
    mls qos srr-queue input dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31
    mls qos srr-queue input dscp-map queue 2 threshold 3 40 41 42 43 44 45 46 47
    mls qos srr-queue output cos-map queue 1 threshold 3 5
    mls qos srr-queue output cos-map queue 2 threshold 3 3 6 7
    mls qos srr-queue output cos-map queue 3 threshold 3 2 4
    mls qos srr-queue output cos-map queue 4 threshold 2 1
    mls qos srr-queue output cos-map queue 4 threshold 3 0
    mls qos srr-queue output dscp-map queue 1 threshold 3 40 41 42 43 44 45 46 47
    mls qos srr-queue output dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31
    mls qos srr-queue output dscp-map queue 2 threshold 3 48 49 50 51 52 53 54 55
    mls qos srr-queue output dscp-map queue 2 threshold 3 56 57 58 59 60 61 62 63
    mls qos srr-queue output dscp-map queue 3 threshold 3 16 17 18 19 20 21 22 23
    mls qos srr-queue output dscp-map queue 3 threshold 3 32 33 34 35 36 37 38 39
    mls qos srr-queue output dscp-map queue 4 threshold 1 8
    mls qos srr-queue output dscp-map queue 4 threshold 2 9 10 11 12 13 14 15
    mls qos srr-queue output dscp-map queue 4 threshold 3 0 1 2 3 4 5 6 7
    mls qos queue-set output 1 threshold 1 138 138 92 138
    mls qos queue-set output 1 threshold 2 138 138 92 400
    mls qos queue-set output 1 threshold 3 36 77 100 318
    mls qos queue-set output 1 threshold 4 20 50 67 400
    mls qos queue-set output 2 threshold 1 149 149 100 149
    mls qos queue-set output 2 threshold 2 118 118 100 235
    mls qos queue-set output 2 threshold 3 41 68 100 272
    mls qos queue-set output 2 threshold 4 42 72 100 242
    mls qos queue-set output 1 buffers 10 10 26 54
    mls qos queue-set output 2 buffers 16 6 17 61
    mls qos
    !
    !
    no file verify auto
    !
    spanning-tree mode pvst
    spanning-tree loopguard default
    spanning-tree extend system-id
    !
    vlan internal allocation policy ascending

    !
    interface GigabitEthernet0/1
    description VoIP Phone
    switchport access vlan 123
    switchport mode access
    switchport voice vlan 224
    srr-queue bandwidth share 10 10 60 20
    srr-queue bandwidth shape 10 0 0 0
    queue-set 2
    mls qos trust cos
    auto qos voip trust
    spanning-tree portfast
    !
    interface GigabitEthernet0/2
    description VoIP Phone
    switchport access vlan 123
    switchport mode access
    switchport voice vlan 224
    srr-queue bandwidth share 10 10 60 20
    srr-queue bandwidth shape 10 0 0 0
    queue-set 2
    mls qos trust cos
    auto qos voip trust
    spanning-tree portfast

    ********************END*************

    only looking voice and qos config for HP switch 2920

    ReplyDelete

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