您的位置:首页 > 其它

CCIE试验备考之交换Voice VLAN

2008-09-10 11:35 375 查看
[align=left]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类电缆。[/align]
[align=left] [/align]
[align=left]Vo IP电话推荐特性
1. Qos
VoIP通信流对延迟和抖动(数据包延迟的变化)有严格要求。为满足IP电话的要求,Cisco使用大量的IP Qos特性,对通信流进行分类、排队、拥塞监测和流量整形和压缩保障最大限度地降低数据包丢失、延迟和抖动。当网络发生拥赛后,Qos配置赋予关键应用较高的服务优先级,以便在网络发生拥塞时,关键应用的服务质量降低的较少。[/align]
[align=left]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。[/align]
[align=left] [/align]
[align=left]>网络带宽供应
如果希望设计成功的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接口。[/align]
[align=left] [/align]
[align=left]语音VLAN的配置
配置接入VLAN和语音VLAN
1) 进入全局模式 configure terminal
2) 配置接入VLAN和语音VLAN
vlan vlan号
3) 配置接入VLAN接口和语音VLAN接口,用于第3层路由选择
interface vlan vlan号
ip address 地址 掩码
no shut[/align]
[align=left] [/align]
[align=left]配置接入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[/align]
[align=left]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[/align]
[align=left] [/align]
[align=left]配置接口的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[/align]
[align=left] [/align]
[align=left]配置流量的优先级
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...[/align]
[align=left]Current configuration : 139 bytes
!
interface FastEthernet0/4
switchport voice vlan dot1p
switchport priority extend trust
mls qos trust cos
spanning-tree portfast
end[/align]
[align=left]案例:
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[/align]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: