Table of Contents

Voice QoS

Typy QoS:

QoS musí být implementován na všech zařízeních v síti, jimiž citlivý provoz prochází, aby měl smysl.

Best-effort

Integrated Services model

Differentiated services model

Layer 2 QoS

Layer 3 QoS

IP Precedence (3 Bits)DSCP (6 Bits)
NameValueBitsPer-Hop
Behavior
Class
Selector
Drop
Precedence
Code-
point
Name
DSCP Bits
(Decimal)
Routine0000Default Default000 000 (0)
Priority1001AF11:LowAF11001 010 (10)
2:MediumAF12001 100 (12)
3:HighAF13001 110 (14)
Immediate2010AF21:LowAF21010 010 (18)
2:MediumAF22010 100 (20)
3:HighAF23010 110 (22)
Flash3011AF31:LowAF31011 010 (26)
2:MediumAF42100 100 (36)
3:HighAF43100 110 (38)
Flash Override4100AF41:LowAF41100 010 (34)
2:MediumAF42100 100 (36)
3:HighAF43100 110 (38)
Critical5101EF EF101 110 (46)
Internetwork Control6110 (48-55)
Network Control7111 (56-63)

Př. AF21 = AF level 2 s drop precedence 1 (low)

Implementing QoS for Voice

Konfigurace trust boundary

Switch(config)# mls qos
Switch(config)# interface type mod/num
Switch(config-if)# mls qos trust {cos | ip-precednce | dscp}
Switch(config-if)# mls qos trust device cisco-phone
Switch(config-if)# switchport priority extend {cos value | trust}

Konfigurace důvěryhodného uplinku:

Switch(config)# interface type mod/num
Switch(config-if)# mls qos trust cos

Auto-QoS

Makro obstará:

Switch(config)# interface type mode/num
Switch(config-if)# auto qos voip {cisco-phone | cisco-softphone | trust}
Switch# debug auto qos
AutoQoS debugging is on

Switch# config term
Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)# interface fastethernet 0/37
Switch(config-if)# auto qos voip cisco-phone
Switch(config-if)#

*Sep 7 04:14:41.618 EDT: mls qos map cos-dscp 0 8 16 26 32 46 48 56
*Sep 7 04:14:41.622 EDT: mls qos min-reserve 5 170
*Sep 7 04:14:41.622 EDT: mls qos min-reserve 6 85
*Sep 7 04:14:41.622 EDT: mls qos min-reserve 7 51
*Sep 7 04:14:41.626 EDT: mls qos min-reserve 8 34
*Sep 7 04:14:41.626 EDT: mls qos
*Sep 7 04:14:42.598 EDT: interface FastEthernet0/37
*Sep 7 04:14:42.598 EDT:    mls qos trust device cisco-phone
*Sep 7 04:14:42.602 EDT:    mls qos trust cos
*Sep 7 04:14:42.606 EDT: wrr-queue bandwidth 10 20 70 1
*Sep 7 04:14:42.610 EDT: wrr-queue min-reserve 1 5
*Sep 7 04:14:42.618 EDT: wrr-queue min-reserve 2 6
*Sep 7 04:14:42.626 EDT: wrr-queue min-reserve 3 7
*Sep 7 04:14:42.634 EDT: wrr-queue min-reserve 4 8
*Sep 7 04:14:42.642 EDT: no wrr-queue cos-map
*Sep 7 04:14:42.646 EDT: wrr-queue cos-map 1  0 1
*Sep 7 04:14:42.650 EDT: wrr-queue cos-map 2  2 4
*Sep 7 04:14:42.654 EDT: wrr-queue cos-map 3  3 6 7
*Sep 7 04:14:42.658 EDT: wrr-queue cos-map 4  5
*Sep 7 04:14:42.662 EDT: priority-queue out

Switch(config-if)# interface gigabitethernet 0/1
Switch(config-if)# auto qos voip trust
Switch(config-if)#
*Sep 7 15:05:50.943 EDT: interface GigabitEthernet0/1
*Sep 7 15:05:50.947 EDT: mls qos trust cos
*Sep 7 15:05:50.951 EDT: wrr-queue bandwidth 10 20 70 1
*Sep 7 15:05:50.955 EDT: wrr-queue queue-limit 50 25 15 10
*Sep 7 15:05:50.959 EDT: no wrr-queue cos-map
*Sep 7 15:05:50.963 EDT: wrr-queue cos-map 1  0 1
*Sep 7 15:05:50.967 EDT: wrr-queue cos-map 2  2 4
*Sep 7 15:05:50.971 EDT: wrr-queue cos-map 3  3 6 7
*Sep 7 15:05:50.975 EDT: wrr-queue cos-map 4  5
*Sep 7 15:05:50.979 EDT: priority-queue out

Show příkazy:

Switch# show mls qos interface type mode/num

Switch důvěřuje CoS z připojeného telefonu:

Switch# show mls qos interface fastethernet 0/1
FastEthernet0/1
trust state: trust cos
trust mode: trust cos
trust enabled flag: ena
COS override: dis
default COS: 0
DSCP Mutation Map: Default DSCP Mutation Map
Trust device: none          //vztah k CoS PC dat
Switch# show interface type mod/num switchport
Switch# show interface fastethernet 0/1 switchport
Name: Fa0/1
Switchport: Enabled
[output deleted...]
Voice VLAN: 2 (VLAN0002)
Appliance trust: none          //vztah k CoS PC dat

Konfigurace portu s telefonem:

Switch# show running-config interface fastethernet 0/47
Building configuration...
Current configuration : 219 bytes
!
interface FastEthernet0/47
  switchport access vlan 10
  switchport trunk encapsulation dot1q
  switchport mode access
switchport voice vlan 100
  mls qos trust device cisco-phone
  mls qos trust cos
  no mdix auto
  end
Switch#

IP telefon není připojen:

Switch# show mls qos interface fastethernet 0/1
FastEthernet0/1
trust state: not trusted
trust mode: trust cos
trust enabled flag: dis
COS override: dis
default COS: 0
DSCP Mutation Map: Default DSCP Mutation Map
Trust device: cisco-phone
Switch#

Po připojení tlefonu:

6d18h: %ILPOWER-7-DETECT: Interface Fa1/0/1: Power Device detected: Cisco PD
6d18h: %ILPOWER-5-POWER_GRANTED: Interface Fa1/0/1: Power granted
6d18h: %LINK-3-UPDOWN: Interface FastEthernet1/0/1, changed state to up
6d18h: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/1, changed state to up
6d18h: %SWITCH_QOS_TB-5-TRUST_DEVICE_DETECTED: cisco-phone detected on port Fa1/0/1, port trust enabled.
Switch# show mls qos interface fastethernet 1/0/1
FastEthernet1/0/1
trust state: trust cos
trust mode: trust cos
trust enabled flag: ena
COS override: dis
default COS: 0
DSCP Mutation Map: Default DSCP Mutation Map
Trust device: cisco-phone
Switch#
Switch# show auto qos interface fastethernet 0/37
FastEthernet0/37
auto qos voip cisco-phone