Print

S3X00V2/S3110系列交换机Voice Vlan自动模式配置方法(命令行版)

2020-07-01发表

组网及说明

1 配置需求或说明

1.1  适用产品系列

本案例适用于如S3100V2-26TP-SIS3100V2-26TP-EIS3600V2-28TP-EIS3600V2-28TP-SIS3110-26TP-PWRS3100V2S3600V23110系列的交换机。

1.2  配置需求及实现的效果

 为了保障语音数据能够优先转发,需要将语音电话和PC地址区分开,将语音电话地址设置成192.168.2网段划分到VLAN2,将PC地址设置成192.168.10网段划分到VLAN10,路由器器作为DHCP服务器给语音电话和PC下发IP地址。

 

2 组网图


配置步骤

3 配置步骤

3.1  配置交换机

#开启POE,为话机供电

<H3C>system-view

[H3C]interface GigabitEthernet1/0/1

[H3C-GigabitEthernet1/0/1]poe enable

[H3C-GigabitEthernet1/0/1]quit

#创建话机所属VLAN2以及PC所属VLAN10

[H3C]vlan 2

[H3C-vlan2]quit

[H3C]vlan 10

[H3C-vlan10]quit

#设置允许通过的OUI地址为MAC地址前缀为6ca8-4900-0000,即当报文的前缀为6ca8-4900-0000时,设备会把它当成语音报文来处理

[H3C]voice vlan mac-address 6ca8-4900-0000 mask ffff-ff00-0000 description avaya

#将端口GigabitEthernet1/0/1设定为Hybrid端口,开启使能端口Voice VLAN功能

[H3C]interface GigabitEthernet 1/0/1

[H3C-GigabitEthernet1/0/1]port link-type hybrid

[H3C-GigabitEthernet1/0/1]voice vlan 2 enable

#设置PC所属vlanvlan10

[H3C-GigabitEthernet1/0/1]port hybrid pvid vlan 10

[H3C-GigabitEthernet1/0/1]port hybrid vlan 10 untagged

[H3C-GigabitEthernet1/0/1]quit

#设备连接dhcp服务器的接口1/0/17,允许VLAN2VLAN10通过

[H3C]interface GigabitEthernet 1/0/17

[H3C-GigabitEthernet1/0/17]port link-type trunk

[H3C-GigabitEthernet1/0/17]port trunk permit vlan 2 10

[H3C-GigabitEthernet1/0/17]quit

#保存配置

[H3C]save force

3.2  配置DHCP服务器

#创建VLAN2VLAN10及其对应的VLAN接口,为该虚接口配置IP地址

<H3C> system-view

[H3C]vlan 2

[H3C-vlan2]quit

[H3C]vlan 10

[H3C-vlan10]quit

[H3C] interface Vlan-interface 2

[H3C-Vlan-interface2]ip address 192.168.2.1 255.255.255.0

[H3C-Vlan-interface2]quit

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10]ip address 192.168.10.1 255.255.255.0

[H3C-Vlan-interface2]quit

#设备连接交换机的接口1/0/7,允许VLAN2VLAN10通过

[H3C]interface GigabitEthernet 1/0/7

[H3C-GigabitEthernet1/0/7]port link-type trunk

[H3C-GigabitEthernet1/0/7]port trunk permit vlan 2 10

[H3C-GigabitEthernet1/0/7]quit

#设置话机VLAN2DHCP地址池

[H3C]dhcp server ip-pool vlan2

[H3C-dhcp-pool-vlan2]network 192.168.2.0 mask 255.255.255.0

[H3C-dhcp-pool-vlan2]gateway-list 192.168.2.1

[H3C-dhcp-pool-vlan2]quit

#设置PCVLAN10DHCP地址池

[H3C]dhcp server ip-pool vlan10

[H3C-dhcp-pool-vlan10]network 192.168.10.0 mask 255.255.255.0

[H3C-dhcp-pool-vlan10]gateway-list 192.168.10.1

[H3C-dhcp-pool-vlan10]dns-list 114.114.114.114

[H3C-dhcp-pool-vlan10]quit

#保存配置

[H3C]save force

4 实验结果验证

#交换机上查验证结果,查看话机是否加入到VLAN2

dis mac-address

MAC ADDR      VLAN ID  STATE           PORT INDEX          AGING TIME(s)

3897-d630-676b  10       Learned         GigabitEthernet1/0/17     AGING

3897-d630-676b  2        Learned         GigabitEthernet1/0/17     AGING

6ca8-4986-6d59  2        Learned         GigabitEthernet1/0/1      AGING

0068-eb95-3683  10       Learned         GigabitEthernet1/0/1      AGING 

 

#查看voice vlan 配置是否生效

dis voice  vlan oui

Oui Address     Mask            Description

0003-6b00-0000  ffff-ff00-0000  Cisco phone

00e0-7500-0000  ffff-ff00-0000  Polycom phone

6ca8-4900-0000  ffff-ff00-0000  avaya

 

#默认voice vlan默认为auto(自动模式)

 dis voice  vlan state

 Maximum of Voice VLANs: 1

 Current Voice VLANs: 1

 Voice VLAN security mode: Security

 Voice VLAN aging time: 1440 minutes

 Voice VLAN enabled port and its mode:

 PORT                        VLAN        MODE        COS        DSCP

 --------------------------------------------------------------------

 GigabitEthernet1/0/1        2           AUTO        6          46

 

#DHCP服务器上查看话机和PC获取的动作

%Jan  1 06:49:59:662 2013 DHCP DHCPS/5/DHCPS_ALLOCATE_IP: DHCP server information: Server IP = 192.168.2.1, DHCP client IP = 192.168.2.2, DHCP client hardware address = 6ca8-4986-6d59, DHCP client lease = 86400.

dis dhcp server ip-in-use all

Pool utilization: 0.59%

 IP address       Client-identifier/    Lease expiration          Type

                  Hardware address

 192.168.2.2      6ca8-4986-6d59        Jan  2 2013 06:49:59      Auto:COMMITTED

 192.168.10.4     0068-eb95-3683        Jan  2 2013 06:49:42      Auto:COMMITTED

                                                                                 

             

 

配置关键点