5.3 VLAN:语音VLAN
程序员文章站
2024-02-12 10:36:22
...
1.简介
在生产环境中,一般IP语音电话,网络视频这一类的数据,都希望延迟,抖动小一点,流量传输优先级高一点。于是可以通过配置voice vlan对数据进行标记,以便满足对数据流的传输要求。voice vlan配置很简单,思科和华为公用一个拓扑图。
2.思科
1.创建数据vlan和语音vlan
Switch(config)#vlan 30 ---->数据vlan
Switch(config)#vlan 40 ----->语音vlan
2.启动LLDP
Switch(config)#lldp run ----->思科也可以用CDP发现语音vlan配置
3.配置语音和数据vlan
Switch(config)#int ether0/1 ---->不要纠结端口与拓扑图不一致,以实际端口为准
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
Switch(config-if)#switchport voice vlan 40
是不是觉得很奇怪,一般access不是只能通过一个vlan吗?voice不受影响哦!
4.查看配置
Switch#show int ether0/1 switchport
Name: Et0/1
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Access Mode VLAN: 30 (VLAN0030)
Voice VLAN: 40 (VLAN0040)
3.华为
1.创建数据和语音vlan
[SW1]vlan batch 30 40
2.开启lldp
[SW1]lldp enable
3.配置端口
[SW1] interface gigabitethernet 0/0/1 ----->别纠结端口与拓扑不一致,以实际端口为准
[SW1-GigabitEthernet0/0/1]port link-type trunk
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 30 ----->这里不能将40加进来,不然报错哦!
[SW1-GigabitEthernet0/0/1]voice-vlan 40 enable
[SW1-GigabitEthernet0/0/1] voice-vlan remark-mode vlan ----->这里设置voice vlan的默认qos优先级,不过eNSP不支持该命令!
4.查看配置
[SW1]display voice-vlan 40 status
Voice VLAN Configurations:
-----------------------------------------------------------
Voice VLAN ID : 40
Voice VLAN status : Enable
Voice VLAN aging time : 1440(minutes)
Voice VLAN 8021p remark : 6 ------>这里是2层qos (即cos)优先级
Voice VLAN dscp remark : 46 ------>这里就是3层qos (即dscp)优先级
-----------------------------------------------------------
Port Information:
-----------------------------------------------------------
Port Add-Mode Security-Mode Legacy
-----------------------------------------------------------
GigabitEthernet0/0/1 Auto Security Disable