为语音 VLAN 配置 Dell PowerConnect 5500 系列交换机

摘要: 本文提供了为语音 VLAN 配置 Dell PowerConnect 5500 系列交换机的必要步骤。

本文适用于 本文不适用于 本文并非针对某种特定的产品。 本文并非包含所有产品版本。

症状

语音 VLAN 是 PowerConnect 55xx 系列交换机上的一项功能,它使用服务类别 (CoS) 自动排定交换机内 VoIP 流量的优先级。当交换机上存在混合流量环境和高带宽利用率时,此功能有助于防止通话质量差。此外,它还使得向网络添加 VoIP 电话的流程变得简单,只需进行极少配置或根本不需要配置。

要配置交换机,管理员需要执行以下添加操作:

  • 将电话的 MAC 组织唯一标识符 (OUI) 添加到交换机的 OUI 表。
  • 在 VLAN 数据库中创建 VLAN 后,全局添加语音 VLAN ID。

原因

在此示例中,00:03:b5 是 MAC OUI,Joes_VoIP_Phones 是供应商名称。

Console(config)# voice vlan oui-table add 0003b5 Joes_VoIP_Phones

在此示例中,VLAN 10 是 VoIP 流量所在的位置。

Console(config)# vlan database
Console(config-vlan)# vlan 10
Console(config-vlan)# exit
Console(config)# voice vlan id 10

在将连接 VoIP 电话的端口上,为了启用语音 VLAN,该端口不能是 VLAN 的静态成员。

在端口 13 交换机设备 1 上,从主干中删除 VLAN 10,并启用语音 VLAN。

Console(config)# interface gigabitethernet 1/0/13
Console(config-if)# switchport mode trunk
Console(config-if)# switchport trunk allowed vlan remove 10
Console(config-if)# voice vlan enable

管理员将电话插入为语音 VLAN 配置的交换机接口。带有与语音 VLAN ID 和 MAC OUI 相匹配标记的电话流量进入交换机时,会被动态分配到语音 VLAN。默认情况下,交换机会自动将 VoIP 流量指定为 CoS 6,并把它优先安排在较低队列中的其他流量的前面。进入交换机端口的任何无标记的流量(例如,PC 数据)都被指定给本机 VLAN。默认情况下,当端口处于主干模式时,本机是 VLAN 1。

您可以将语音 VLAN 的 CoS 设置更改为默认值之外的其他数值,并在出口处对流量进行备注,但这不是必需的。CoS 6 是建议用于 VoIP 流量的最高优先级。CoS 7 是可指定的最高优先级,但通常只用于控制流量,并不建议用于大多数传输流量。如果您决定使用差分服务代码点 (DSCP) 来排定优先级,则可以将“trust CoS”设置更改为“trust DSCP”。这使交换机可信赖指定的 DSCP 值,并根据所指定的值排定它的优先级。通常 DSCP 46 或加速转发是用于排定 VoIP 优先级的值。交换机已具有 DSCP 至队列的映射,可将 DSCP 46 映射到高优先级队列 6。默认情况下,DSCP 46 已指定给与 CoS 6 相同的交换队列。在 QoS 高级模式下,可以更改此映射表。可信 DSCP 设置会全局影响交换机,并对可信模式下进入交换机端口的所有流量负责。如果进入端口的其他流量的 DSCP 值高于该流量的相对应数值,则将会得到优先处理。有关 QoS 设置的更多信息,请参阅 PowerConnect 5548 支持页面上的《PowerConnect 5548 用户指南》。 

默认情况下未启用语音 VLAN 安全设置。这意味着,一旦在端口上激活语音 VLAN,具有无法识别的 OUI 的帧就可访问语音 VLAN。如果语音 VLAN 安全设置在端口上已启用,则标记用于语音 VLAN 的具有无法识别的 OUI 的任何帧都会被丢弃。

这里,我们将在端口 13 交换机设备 1 上启用语音 VLAN 安全性。如果设备已插入该端口的用户试图将其 PC 流量标记用于 VLAN 10(即,语音 VLAN),则交换机将丢弃该流量。

Console(config)# interface gigabitethernet 1/0/13
Console(config-if)# voice vlan secure

在配置连接有其他 VoIP 设备(如电话系统服务器 (PBX) 或 VoIP 交换机)的接口时,最佳实践是静态分配端口。这是因为:这些类型的设备大多数是 VLAN 不知道的设备,这意味着它们不支持 VLAN 标记。为了在端口上激活语音 VLAN,或者为了动态添加设备,您必须将流量标记用于语音 VLAN。将设备静态添加到 VLAN 时,连接有静态添加的设备的端口上未激活语音 VLAN 功能。默认情况下,不会为来自该设备的流量排定优先级。要为此流量排定优先级,可以使用 CoS 和 DSCP 可信模式,只要入站流量已指定 CoS 或 DSCP 值即可。如果尚未为入口流量指定 CoS 或 DSCP 值,则必须为交换机定义 QoS 策略,以排定流量的优先级。

在此示例中,交换机处于 QoS 高级模式,从而提供更精细的 QoS 功能并允许配置 QoS 策略。

console(config)# qos advanced

首先,必须配置允许 VoIP 流量的访问控制列表 (ACL)。为了简单起见,根据子网来匹配流量。目前仍有许多其他可用于匹配特定流量的参数,它们不在此次讨论范围之内。

console(config)# ip access-list extended voip
console(config-ip-al)# permit ip any 192.168.10.0 0.0.0.255
console(config-ip-al)# exit

现在,我们创建 ACL 来匹配 LAN 数据流量或 VoIP 之外的任何流量。这假设 VoIP 流量被隔离到单独的子网和 VLAN 中,通常这样是最佳做法。

console(config)# ip access-list extended LAN
console(config-ip-al)# permit ip any any
console(config-ip-al)# exit

此步骤配置名为 voip 的类别映射(与 voip ACL 匹配)以及名为 LAN 的类别映射(与先前创建的 LAN ACL 匹配)。

console(config)# class-map voip
console(config-cmap)# match access-group voip
console(config-cmap)# exit
console(config)# class-map LAN
console(config-cmap)# match access-group LAN
console(config-cmap)# exit

现在,我们创建名为 voice 的策略映射,它首先匹配类别映射 voip,然后再匹配类别映射 LAN。

console(config)# policy-map voice
console(config-pmap)# class voip

这里,我们为策略映射提供某个操作(设置队列 6)。如果流量与类别映射 voip 相匹配,则该流量的优先级被排定到交换机队列 6。

console(config-pmap-c)# set queue 6
console(config-pmap-c)# exit


在指定给策略映射的下一个操作中,如果流量与类别映射 LAN 相匹配,则交换机会被设置为信任已指定给入站数据包或帧的 CoS 或 DSCP 值。如果您没有为入站流量指定 CoS 或 DSCP 值,则交换机默认情况下会将该流量置于队列 2。队列 2 主要是“尽最大努力”,这意味着它在“先到先得”的基础上转发流量。

console(config-pmap)# class LAN
console(config-pmap-c)# trust cos-dscp
console(config-pmap-c)# exit
console(config-pmap)# exit

现在,QoS 策略已创建,我们将其指定给交换机设备 1 上的端口 1 和 2。端口 1 是我们到网络上另一交换机或路由器的上行链路,并且端口 2 已连接到我们的 PBX 服务器。

console(config)# interface range gigabitethernet 1/0/1-2
console(config-if-range)# service-policy input voice
console(config-if-range)# exit

端口 2 已连接到 VLAN 不知道的 PBX。为了发送无标记的流量,在访问模式下配置该接口。

console(config)# interface gigabitethernet 1/0/2
console(config-if)# switchport access vlan 10
console(config-if)# exit  

端口 1 是我们的上行链路,它将发送和接收两个 VLAN 上的流量。这在主干模式下进行配置,以将所有 VLAN 添加到接口。VLAN 1 是无标记的 VLAN(因为在默认情况下它是本机 VLAN),而 VLAN 10 是带有标记的 VLAN。

console(config)# interface gigabitethernet 1/0/1
console(config-if)# switchport mode trunk
console(config-if)# exit

最后一步涉及与生成树协议 (STP) 相关的设置。当网络拓扑中涉及两个或更多交换机时,我们建议在访问层的所有交换机上全局启用 STP。最好使用 IEEE 802.1w 快速生成树协议 (RSTP)(而非 IEEE 802.1d STP),以实现更快的网络收敛时间。RSTP 作为 PowerConnect 55xx 系列交换机上的默认设置启用。为了释放交换资源并降低网络复杂性,全局禁用 RSTP 或 STP 也许是可以接受的。警告!!!未经事先咨询网络管理员和/或全面评估禁用此协议的风险,尤其是在生产环境中,不应禁用 RSTP。

在处理运行 RSTP 或 STP 的网络时,我们建议所有终端设备都应启用生成树 PortFast。Portfast 允许在网络拓扑更改期间立即聚合,并防止端口在链路状态更改时触发拓扑更改。 

这里,我们在已连接到 VoIP 电话的端口 13 交换机设备 1 上禁用 STP。

console(config)# interface gigabitethernet 1/0/13
console(config-if)# spanning-tree disable
console(config-if)# exit


 
在连接到 PBX 服务器的端口 2 交换机设备 1 上,我们启用 STP PortFast。

console(config)# interface gigabitethernet 1/0/2
console(config-if)# spanning-tree portfast
console(config-if)# end

这总结了 PowerConnect 55xx 系列交换机上语音 VLAN 的基本配置。请记住,上述配置只是示例,可能并非所有网络环境都需要。在 55xx 系列交换机和整个网络上,除了语音 VLAN 之外,还有其他方式来排定 VoIP 流量的优先级。此功能旨在对交换机内的本地流量进行优先级排定,可能无法解决所有服务质量问题。以下部分列出了对语音 VLAN 故障处理有用的命令,以及反映所讨论命令的示例配置。

提醒:本文档是为 PowerConnect 55xx 固件代码 4.0.1.0 编写的。未来的固件版本可能会更改设备功能、命令语法以及与本文档范围相关的其他内容。

可用的故障处理命令:

 

console# show voice vlan console#show interfaces switchport
console# show qos map dscp-queue console#show interfaces access-lists counters
console# show qos interface buffers console#show interfaces access-lists
console# show qos interface queuing console#show mac address-table
console# show access-lists console#show mac address-table count
console# show policy-map console#show vlan
console# show spanning-tree detail console#show cpu utilization
console# show spanning-tree bpdu console#show logging
console# show rmon statistics <interface> console#show tech-support
console# show interfaces status console#show tech-support memory
console# show interfaces configuration console#show tech-support config

 

解决方案

交换机配置示例: 

提醒:您必须获得交换机 MAC 地址的前 6 位数字,才能在以下示例中修改 OUI 表。前 6 位数字后面的名称是别名,因此可以接受任何名称。在本例中:
“voice vlan oui-table add 0001e3 Siemens_AG_phone”
  • 0001e3 是西门子交换机 MAC 地址的前 6 位数字
  • Siemens_AG_phone 是用户分配的任意名称。
console# conf t
console(config)# vlan database
console(config)# vlan 10 exit
console(config)# voice vlan oui-table add 000181 Nortel
console(config)# voice vlan oui-table add 0001e3 Siemens_AG_phone
console(config)# voice vlan oui-table add 00036b Cisco_phone
console(config)# voice vlan oui-table add 0003b5 Joes_VoIP_Phones
console(config)# voice vlan oui-table add 00096e Avaya
console(config)# voice vlan oui-table add 000fe2 H3C_Aolynk
console(config)# voice vlan oui-table add 001049 Shoretel
console(config)# voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone
console(config)# voice vlan oui-table add 00907a Polycom/Veritel_phone
console(config)# voice vlan oui-table add 00e0bb 3Com_phone
console(config)# voice vlan id 10
 
console(config)# qos advanced
console(config)# ip access-list extended voip
console(config)# permit ip any 192.168.10.0 0.0.0.255
console(config)# exit
 
console(config)# ip access-list extended LAN
console(config)# permit ip any any exit

console(config)# class-map voip
console(config)# match access-group voip
console(config)# exit
 
console(config)# class-map LAN
console(config)# match access-group LAN
console(config)# exit
 
console(config)# policy-map voice
console(config)# class voip
console(config)# set queue 6
console(config)# exit
 
console(config)# class LAN
console(config)# trust cos-dscp exit
console(config)# exit

console(config)# interface gigabitethernet1/0/1
console(config)# service-policy input voice
console(config)# switchport mode trunk

console(config)# interface gigabitethernet1/0/2
console(config)# spanning-tree portfast
console(config)# service-policy input voice
console(config)# switchport access vlan 10

console(config)# interface gigabitethernet1/0/13
console(config)# spanning-tree disable
console(config)# switchport mode trunk
console(config)# switchport trunk allowed vlan remove 10
console(config)# voice vlan enable
console(config)# voice vlan secure

 

Default settings: Service tag:
SW version 4.0.1.0 (date 12-Apr-2011 time 17:40:25) Gigabit Ethernet Ports
=============================
no shutdown speed 1000 duplex full
negotiation
flow-control on
mdix auto
no back-pressure interface vlan 1
interface port-channel 1 - 32
spanning-tree
spanning-tree mode RSTP qos basic
qos trust cos
eee enable 

受影响的产品

PowerConnect 5524, PowerConnect 5524P, PowerConnect 5548, PowerConnect 5548p
文章属性
文章编号: 000140837
文章类型: Solution
上次修改时间: 01 5月 2026
版本:  8
从其他戴尔用户那里查找问题的答案
支持服务
检查您的设备是否在支持服务涵盖的范围内。