IP
电话网络设计
*
为
IP
电话组件(如
cisco IP
电话、
cisco CallManager
、
Cisco IP Softphone
客户端、
IP
网关等)实现
Qos
分类、标记和拥塞管理。
Qos
要将
VoIP
通信流设置为高优先级,并优先传输高优先级队列中的通信流。
*
将
VoIP
通信流放在一个独立的
VLAN
中。为给
Cisco IP
电话部署一个独立的
VLAN
,一种简单的方法是使用语音
VLAN
(辅助
VLAN
)。
*
考虑使用线上供电(
inline power
)给
Cisco IP
电话供电。
Cisco IP
电话要求由交换机电源或线上供电。
*
核实物理电缆是否支持
IP
电话。
IP
电话和
VoIP
解决方案要求电缆至少是
5
类电缆。
Vo IP
电话推荐特性
1. Qos
VoIP
通信流对延迟和抖动(数据包延迟的变化)有严格要求。为满足
IP
电话的要求,
Cisco
使用大量的
IP Qos
特性,对通信流进行分类、排队、拥塞监测和流量整形和压缩保障最大限度地降低数据包丢失、延迟和抖动。当网络发生拥赛后,
Qos
配置赋予关键应用较高的服务优先级,以便在网络发生拥塞时,关键应用的服务质量降低的较少。
2.
语音
VLAN
(辅助
VLAN
)
Cisco IP
电话有一个用于连接
PC
的端口,因此很多
Cisco IP
电话配置都让
cisco IP
电话串连一台
PC
。由于
Cisco IP
电话和工作站连接的是同一个交换机接口,因此将该接口加入
VLAN
中后,相应的
Cisco IP
电话和工作站将位于同一个
VLAN
中。
Cisco
交换机支持一种独特的功能,这种功能在
cisco IOS
中被称为语音
VLAN
,它将
Cisco IP
和工作站加入不同的
vlan
中。通过使用语音
VLAN
,可将接口端口的
VoIP
通信流加入到另一个
VLAN
中。如果希望使用语音
VLAN
,那么只需要配置交换机,而无需在
cisco IP
电话上做额外的配置。
具体工作原理:
1.
用于将
cisco IP
电话连接到配置了语音
VLAN
的交换机
2.
链路被激活后,交换机立刻向
cisco IP
电话发送
cisco
发现协议
(CDP)
消息,其中包含典型的
CDP
消息,包括语音
VLAN-ID
3.cisco IP
电话收到
CDP
帧后,解释语音
VLAN-ID
,并开始给
VoIP
通信流加上
802.1q
标记,然后将其发送给该语音
VLAN
。
4. Cisco IP
电话还指定出站帧标记的
DSCP(Differentiated Services Code Point
,区分服务编码点
)
和
Cos(Class of Service
,服务类别
)
值。使用语音
VLAN
时,对于来自其
PC
端口连接的工作站的入站帧,
CiscoIP
电话不添加
VLAN
标记。因此工作站仍位于接入的
VLAN
。
>
网络带宽供应
如果希望设计成功的
IP
电话网络,正确的供应网络带宽至关重要。所有应用(包括语音、视频和数据应用)的总带宽不能超过链路可用带宽的
75%
。即使所有应用的带宽总需求低于可用带宽的
75%
,仍必须采用
Qos
设计,然而,如果应用的需求超过了可用带宽的
75%
,应增加链炉火使用带宽更高地链路。
从通信流的角度看,单个
IP
电话呼叫由两个流组成。
1.
语音载波流
---
由包含实际语音样本的
RTP(Real-Time Transport Protocol
,实时传输协议
)
数据包组成
2.
呼叫控制信令
---
由属于多种协议之一(如
H.323
或
MGCP media Gateway Control Protocol
,媒体网关控制协议)的数据包组成。具体属于那种协议,取决于参与呼叫的端点,呼叫控制功能包括建立、维护、拆除和重定向呼叫等
VoIP
数据包由第
2
层链路报头(
14
字节)、
IP
报头(
20
字节)、用户数据报(
UDP
)报头(
8
字节)、
RTP
报头(
12
字节)和语音负载组成。链路报头的长度随使用的第
2
层介质而异。
VoIP
数据报传输的开销很重要。此外,语音采样率决定了比特率。采样率随语音编码
/
解码器而异。最常见的编码
/
解码器是
G.711
和
G.729
,它们使用的总带宽(包括
IP
报头和第
2
层链路报头)分别是
87.2kbit/s
和
31.2kbit/s
。在提出
IP
电话的解决方案时,必须使用包括所有报头在内的总比率,计算并行语音呼叫数量多时所需要的带宽量,尤其对于低速
WAN
接口。
语音
VLAN
的配置
配置接入
VLAN
和语音
VLAN
1
)
进入全局模式
configure terminal
2
)
配置接入
VLAN
和语音
VLAN
vlan vlan
号
3
)
配置接入
VLAN
接口和语音
VLAN
接口,用于第
3
层路由选择
interface vlan vlan
号
ip address
地址
掩码
no shut
配置接入
VLAN
和语音
VLAN
的接口
1
)进入接口模式
interface
接口
2
)将接口加入到接入
VLAN
switchport access vlan
接入
VLAN
号
3
)
接口加入到语音
VLAN
switchport voice vlan vlan
号
|dot1p|none|untagged
vlan
号:在指定的
VLAN
中转发所有的语音流量。缺省下,
IP
电话转发语音流量通过
802.1Q
及优先级为
5
标记
VLAN
,用于来自
/
前往
Cisco IP
电话的通信流。
Dot1p
:对于
IP
电话通信流,使用
802.1p
优先级标记,对于其它通信流,使用默认的本地
vlan
(
vlan0
)转发。对于不支持
CDP
的第
3
方
IP
电话,常采用这种配置
None
:禁用语音
VLAN
功能,
cisco IP
电话将根据自己的配置来发送未标记的帧
Untagged
:
Cisco IP
电话显式的使用未标记的帧
4
)
启用
portfast
功能
spanning-tree portfast
n
配置相应的
Qos
1
)
启用
Qos
mls qos
2
)
配置接口,将语音帧的
Cos
值映射到出站队列
wrr-queue cos-map 4 5
wrr-queue cos-map 3 4 6 7
3
)
将队列
4
配置为严格优先级队列
priority-queue out
配置接口的
Qos
分类
1
)
进入接口模式
interface
接口
2
)
配置接口基于那种信任类型的分类
mls qos trust cos|dscp
验证:
Switch#show interface f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: down
Administrative Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: dot1p
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
配置流量的优先级
1
)
进入全局模式
configure terminal
2
)
进入接口模式
ineterface
接口
3
)
设置从
IP
电话接入端口收到数据报的优先级
switchport priority extend [cos
值
|trust]
cos
值:取值为
0-7
,
7
为最高
trust
:配置电话接入端口信任从
PC
收到的数据优先级
案例:
Switch(config)#inter f0/4
Switch(config-if)#switchport priority extend cos 7
Switch#show interface f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: down
Administrative Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: dot1p
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: 7
----------------------------------------------------------------------------
Switch(config-if)#switchport priority extend trust
Switch#show interf f0/4 switch
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: down
Administrative Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: dot1p
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: trusted
----------------------------------------------------------------
Switch#show running interfa f0/4
Building configuration...
Current configuration : 139 bytes
!
interface FastEthernet0/4
switchport voice vlan dot1p
switchport priority extend trust
mls qos trust cos
spanning-tree portfast
end
案例:
CCIE-LAB
(
YY
)
题目要求:
Configure SW1 interface f0/15 to support a future cisco 7960 IP phone connection.The Cisco 7960 IP phone supports 802.1q. Voice traffic uses VLAN 200 named VLAN_VOICE. Data traffic uses VLAN A (VLAN 4).Configure the switch so that traffic on PC connects.
配置:
SW1
config terminal
mls qos
vlan 200
name VLAN_VOICE
inteface f0/15
switchport trunk encapsulation 802.1q
switchport mode trunk
switchport trunk native vlan 4
switchport voice vlan 200