
华为VLAN协议透传配置示例
1、组网需求
图1 华为VLAN协议透传组网示例图
如上图1所示,某公司拥有多个子公司,子公司与总部之间通信通过核心交换机转发时,核心交换机需要先对数据进行处理。
如果多个子公司同时和总部通信,将导致核心交换机处理能力下降,从而影响通信效果,也增加了通信成本。
为了解决此问题,可在核心交换机上部署VLAN透传功能。
在Switch上使能VLAN透传功能后,指定VLAN内的数据到达Switch后直接被转发出去,而不上送CPU处理,从而提高了设备的运行性能、降低了通信成本、也减少了设备受到恶意数据攻击。
2、配置思路
2.1、创建相关VLAN。
2.2、使能VLAN协议透传功能。
2.3、配置各以太网接口以正确的方式加入VLAN。
3、操作步骤
3.1、配置Switch
# 创建VLAN
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 10 20
# 使能VLAN协议透传功能
[Switch] vlan 20
[Switch-vlan20] protocol-transparent
[Switch-vlan20] quit
# 配置接口加入VLAN
[Switch] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type hybrid
[Switch-GigabitEthernet1/0/1] port hybrid tagged vlan 10
[Switch-GigabitEthernet1/0/1] quit
[Switch] interface gigabitethernet 1/0/2
[Switch-GigabitEthernet1/0/2] port link-type hybrid
[Switch-GigabitEthernet1/0/2] port hybrid tagged vlan 10 20
[Switch-GigabitEthernet1/0/2] quit
[Switch] interface gigabitethernet 1/0/3
[Switch-GigabitEthernet1/0/3] port link-type hybrid
[Switch-GigabitEthernet1/0/3] port hybrid tagged vlan 20
[Switch-GigabitEthernet1/0/3] quit
3.2、配置SwitchA和SwitchB。在SwitchA、SwitchB上配置上行接口分别以tagged方式加入VLAN10、VLAN20,下行接口分别以缺省方式加入VLAN10、VLAN20,配置过程略。
4、检查配置结果
# 配置完成后,进入VLAN20视图,使用命令display this可以查看到该VLAN是否已经使能了VLAN协议透传功能。
[Switch] vlan 20
[Switch-vlan20] display this
#
vlan 20
protocol-transparent
#
Return
5、配置文件
5.1、Switch的配置文件。
#
sysname Switch
#
vlan batch 10 20
#
vlan 20
protocol-transparent
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid tagged vlan 10
#
interface GigabitEthernet1/0/2
port link-type hybrid
port hybrid tagged vlan 10 20
#
interface GigabitEthernet1/0/3
port link-type hybrid
port hybrid tagged vlan 20
#
return



本文地址:http://www.023wg.com/vlan/158.html
版权声明:若无注明,本文皆为“Swiers思唯网络博客”原创,转载请保留文章出处。

