配置Eth-Trunk接口流量本地优先转发示例(堆叠)
组网图形
图1 接口流量本地优先转发组网图
- 组网需求
- 配置思路
- 操作步骤
- 配置文件
组网需求
S5720I-10X-PWH-SI-AC和S5720I-6X-PWH-SI-AC不支持此配置。
如图1所示,为了增加设备的容量采用设备堆叠技术,将Switch3和Switch4通过专用的堆叠电缆链接起来,对外呈现为一台逻辑交换机。为了实现设备间的备份、提高可靠性,采用跨堆叠设备Eth-Trunk接口技术,将不同设备上的物理接口加入同一个Eth-Trunk接口。在网络无任何故障情况下,在PE设备上查看成员口信息时,发现VLAN2的数据流量会通过成员口GE1/0/1和GE1/0/2转发,VLAN3的数据流量通过成员口GE1/0/1和GE1/0/2转发。增加了堆叠设备之间的带宽承载能力,也降低了流量转发效率。
为了有效保证VLAN2的数据流量通过成员口GE1/0/1转发,VLAN3的数据流量通过成员口GE1/0/2转发,可在堆叠设备上使能Eth-Trunk接口流量本地优先转发功能。
配置思路
采用如下的思路配置Eth-Trunk接口流量本地优先转发功能:
- 创建Eth-Trunk接口。
- 加入Eth-Trunk的成员接口。
- 使能Eth-Trunk接口流量本地优先转发功能。
- 配置各接口加入相应VLAN,实现二层互通。
操作步骤
1.创建Eth-Trunk接口,并配置允许通过的VLAN
# 配置Stack。
代码语言:javascript复制<HUAWEI> system-view
[HUAWEI] sysname Stack
[Stack] interface eth-trunk 10
[Stack-Eth-Trunk10] port link-type trunk
[Stack-Eth-Trunk10] port trunk allow-pass vlan all
[Stack-Eth-Trunk10] undo port trunk allow-pass vlan 1
[Stack-Eth-Trunk10] quit
2.配置PE
代码语言:javascript复制<HUAWEI> system-view
[HUAWEI] sysname PE
[PE] interface eth-trunk 10
[PE-Eth-Trunk10] port link-type trunk
[PE-Eth-Trunk10] port trunk allow-pass vlan all
[PE-Eth-Trunk10] undo port trunk allow-pass vlan 1
[PE-Eth-Trunk10] quit
2.加入Eth-Trunk的成员接口
# 配置Stack。
代码语言:javascript复制[PE]display interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
Eth-Trunk10 up up 0% 0% 0 0
GigabitEthernet0/0/1 up up 0% 0% 0 0
GigabitEthernet0/0/2 up up 0% 0% 0 0
GigabitEthernet0/0/3 down down 0% 0% 0 0
GigabitEthernet0/0/4 down down 0% 0% 0 0
GigabitEthernet0/0/5 down down 0% 0% 0 0
GigabitEthernet0/0/6 down down 0% 0% 0 0
GigabitEthernet0/0/7 down down 0% 0% 0 0
GigabitEthernet0/0/8 down down 0% 0% 0 0
GigabitEthernet0/0/9 down down 0% 0% 0 0
GigabitEthernet0/0/10 down down 0% 0% 0 0
GigabitEthernet0/0/11 down down 0% 0% 0 0
GigabitEthernet0/0/12 down down 0% 0% 0 0
GigabitEthernet0/0/13 down down 0% 0% 0 0
GigabitEthernet0/0/14 down down 0% 0% 0 0
GigabitEthernet0/0/15 down down 0% 0% 0 0
GigabitEthernet0/0/16 down down 0% 0% 0 0
GigabitEthernet0/0/17 down down 0% 0% 0 0
GigabitEthernet0/0/18 down down 0% 0% 0 0
GigabitEthernet0/0/19 down down 0% 0% 0 0
GigabitEthernet0/0/20 down down 0% 0% 0 0
GigabitEthernet0/0/21 down down 0% 0% 0 0
GigabitEthernet0/0/22 down down 0% 0% 0 0
GigabitEthernet0/0/23 down down 0% 0% 0
具体配置
代码语言:javascript复制# 配置Stack。
[Stack] interface gigabitethernet 1/0/4
[Stack-GigabitEthernet1/0/4] eth-trunk 10
[Stack-GigabitEthernet1/0/4] quit
[Stack] interface gigabitethernet 2/0/4
[Stack-GigabitEthernet2/0/4] eth-trunk 10
[Stack-GigabitEthernet2/0/4] quit
# 配置PE。
[PE] interface gigabitethernet 1/0/1
[PE-GigabitEthernet1/0/1] eth-trunk 10
[PE-GigabitEthernet1/0/1] quit
[PE] interface gigabitethernet 1/0/2
[PE-GigabitEthernet1/0/2] eth-trunk 10
[PE-GigabitEthernet1/0/2] quit
代码语言:javascript复制对于S2730S-S、S5735-L-I、S5735-L1、S300、S5735-L、S5735S-L1、S5735S-L、S5735-S 、S5735S-S、S5735S-L-M、S500:
[Stack] local-preference enable
对于除S2730S-S、S5735-L-I、S5735-L1、S300、S5735-L、S5735S-L1、S5735S-L、S5735-S 、S5735S-S、S5735S-L-M、S500之外的设备:
[Stack] interface eth-trunk 10
[Stack-Eth-Trunk10] local-preference enable
[Stack-Eth-Trunk10] quit
具体的配置文件:
代码语言:javascript复制Stack的配置文件
#
sysname Stack
#
vlan batch 2 3
#
interface Eth-Trunk10
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet1/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2
#
interface GigabitEthernet2/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 3
#
interface GigabitEthernet1/0/4
eth-trunk 10
#
interface GigabitEthernet2/0/4
eth-trunk 10
#
return
PE的配置文件
#
sysname PE
#
interface Eth-Trunk10
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet1/0/1
eth-trunk 10
#
interface GigabitEthernet1/0/2
eth-trunk 10
#
return
Switch1的配置文件
#
sysname Switch1
#
vlan batch 2
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2
#
return
Switch2的配置文件
#
sysname Switch2
#
vlan batch 3
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 3
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 3
#
return
我正在参与2024腾讯技术创作特训营最新征文,快来和我瓜分大奖!