工作模式

voice-vlan配置步骤_第1张图片

图例

voice-vlan配置步骤_第2张图片

配置

system-view
[Huawei]vlan 2 #配置VLAN 2为Voice VLAN
[Huawei-vlan2]description Iphone
[Huawei-vlan2]vlan 3
[Huawei-vlan3]description PC-office
[Huawei-vlan3]quit    
[Huawei]interface vlan 2
[Huawei-Vlanif2]ip add 192.168.2.254 24
[Huawei-Vlanif3]interface vlan 3
[Huawei-Vlanif3]ip add 192.168.3.254 24
[Huawei-Vlanif3]quit
[Huawei]dhcp enable
[Huawei]lldp enable #开启LLDP,实现IP Phone能通过LLDP协议获取到Voice VLAN信息
[Huawei]ip pool voice-ip    
[Huawei-ip-pool-voice-ip]network 192.168.2.0 mask 24
[Huawei-ip-pool-voice-ip]gateway-list 192.168.2.254
[Huawei-ip-pool-voice-ip]option184 voice-vlan 2
[Huawei-ip-pool-voice-ip]quit
[Huawei]ip pool wired-office
[Huawei-ip-pool-wired-office]network 192.168.3.254 mask 24
[Huawei-ip-pool-wired-office]gateway-list 192.168.3.254
[Huawei-ip-pool-wired-office]quit
[Huawei]interface vlan 2
[Huawei-Vlanif2]dhcp select global
[Huawei-Vlanif2]quit
[Huawei]interface vlan 3    
[Huawei-Vlanif3]dhcp select global     
[Huawei-Vlanif3]quit
[Huawei]interface GigabitEthernet0/0/1  #配置IP电话接口

[Huawei-GigabitEthernet0/0/1]lldp enable

[Huawei-GigabitEthernet0/0/1]port link-type hybrid
[Huawei-GigabitEthernet0/0/1] port hybrid pvid vlan 3 #pvid为数据vlan            
[Huawei-GigabitEthernet0/0/1] port hybrid tagged vlan 2 #语言打标签
[Huawei-GigabitEthernet0/0/1] port hybrid untagged vlan 3 #数据不打标签
[Huawei-GigabitEthernet0/0/1] voice-vlan 2 enable #开启voice-vlan功能
[Huawei-GigabitEthernet0/0/1] voice-vlan mode manual #配置接口加入Voice VLAN的模式
[Huawei-GigabitEthernet0/0/1] undo voice-vlan security enable
[Huawei-GigabitEthernet0/0/1] trust 8021p #配置接口信任报文的802.1p值
[Huawei-GigabitEthernet0/0/1]stp edged-port enable
[Huawei-GigabitEthernet0/0/1]voice-vlan remark-mode vlan

[Huawei-GigabitEthernet0/0/1]quit
[Huawei]interface GigabitEthernet0/0/2  #配置有线办公接口
[Huawei-GigabitEthernet0/0/2]lldp enable
[Huawei-GigabitEthernet0/0/2] voice-vlan 2 enable #开启voice-vlan功能
[Huawei-GigabitEthernet0/0/2] voice-vlan mode manual #配置接口加入Voice VLAN的模式
[Huawei-GigabitEthernet0/0/2] undo voice-vlan security enable
[Huawei-GigabitEthernet0/0/2]port link-type hybrid
[Huawei-GigabitEthernet0/0/2] port hybrid pvid vlan 3             
[Huawei-GigabitEthernet0/0/2] port hybrid tagged vlan 2
[Huawei-GigabitEthernet0/0/2] port hybrid untagged vlan 3
[Huawei-GigabitEthernet0/0/2] trust 8021p #配置接口信任报文的802.1p值
display voice-vlan 2 status,查看Voice VLAN的配置是否正确


注意:DHCP server服务Option选项66