華為
1)創(chuàng)建eth-trunk接口,并配置允許通過的VLAN。
#配置Stack。
system-view
sysname stack
interface eth-trunk 10
port link-type trunk
port trunk allow-pass vlan all
quit
#配置PE。
system-view
sysname PE
interface eth-trunk 10
port link-type trunk
port trunk allow-pass vlan all
quit
2)加入eth-trunk的成員接口。
#配置Stack。
interface gigabitethernet 1/0/4
eth-trunk 10
quit
interface gigabitethernet 2/0/4
eth-trunk 10
quit
#配置PE。
interface gigabitethernet 1/0/1
eth-trunk 10
quit
interface gigabitethernet 1/0/2
eth-trunk 10
quit
3)在堆疊設(shè)備上開啟eth-trunk接口流量本地優(yōu)先轉(zhuǎn)發(fā)功能。
local-preference enable
interface eth-trunk 10
local-preference enable
quit
4)配置二層轉(zhuǎn)發(fā)功能。
#配置Stack。
vlan batch 2 3
interface gigabitethernet 1/0/3
port link-type trunk
port trunk allow-pass vlan 2
quit
interface gigabitethernet 2/0/3
port link-type trunk
port trunk allow-pass vlan 3
quit
#配置Switch1。
system-view
sysname switch1
vlan 2
quit
interface gigabitethernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 2
quit
interface gigabitethernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 2
quit
#配置Switch2。
system-view
sysname switch2
vlan 3
quit
interface gigabitethernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 3
quit
interface gigabitethernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 3
quit
5)檢測配置結(jié)果。
display trunkmembership eth-trunk 10 #查看eth-trunk接口的成員口信息。
H3C
配置二層動態(tài)聚合。
1)配置Device A。
#創(chuàng)建VLAN 10,并將端口FortyGig1/0/4加入到該VLAN中。
system-view
vlan 10
port fortygige 1/0/4
quit
#創(chuàng)建VLAN 20,并將端口FortyGig1/0/5加入到該VLAN中。
vlan 20
port fortygige 1/0/5
quit
#創(chuàng)建二層聚合接口1,并配置該接口為動態(tài)聚合模式。
interface bridge-aggregation 1
link-aggregation mode dynamic
quit
#分別將端口FortyGige1/0/1至FortyGige1/0/3加入到聚合組1中。
interface fortygige 1/0/1
port link-aggregation group 1
quit
interface fortygige 1/0/2
port link-aggregation group 1
quit
interface fortygige 1/0/3
port link-aggregation group 1
quit
#配置二層聚合接口1為Trunk端口,并允許VLAN 10和20的報文通過。
interface bridge-aggregation 1
port link-type trunk
port trunk permit vlan 10 20
quit
2)配置Device B。
#創(chuàng)建VLAN 10,并將端口FortyGig1/0/4加入到該VLAN中。
system-view
vlan 10
port fortygige 1/0/4
quit
#創(chuàng)建VLAN 20,并將端口FortyGig1/0/5加入到該VLAN中。
vlan 20
port fortygige 1/0/5
quit
#創(chuàng)建二層聚合接口1,并配置該接口為動態(tài)聚合模式。
interface bridge-aggregation 1
link-aggregation mode dynamic
quit
#分別將端口FortyGige1/0/1至FortyGige1/0/3加入到聚合組1中。
interface fortygige 1/0/1
port link-aggregation group 1
quit
interface fortygige 1/0/2
port link-aggregation group 1
quit
interface fortygige 1/0/3
port link-aggregation group 1
quit
#配置二層聚合接口1為Trunk端口,并允許VLAN 10和20的報文通過。
interface bridge-aggregation 1
port link-type trunk
port trunk permit vlan 10 20
quit
3)驗(yàn)證配置。
display link-aggregation verbose #查看設(shè)備上所有聚合組的詳細(xì)信息。
銳捷
鏈路聚合配置。
1)在Ruijie1上設(shè)置系統(tǒng)優(yōu)先級為4096,在端口Gi 0/1、Gi 0/2、Gi 0/3上啟用動態(tài)鏈路聚合協(xié)議,并設(shè)置端口的LACP端口優(yōu)先級為4096。
configure terminal
lacp system-priority 4096
interface range gigabitethernet 0/1-3
lacp port-priority 4096
port-group 3 mode active
end
2)在Ruijie2上設(shè)置系統(tǒng)優(yōu)先級為61440,在端口Gi 0/1、Gi 0/2、Gi 0/3上啟用動態(tài)鏈路聚合協(xié)議,并設(shè)置端口的LACP端口優(yōu)先級為61440。
configure terminal
lacp system-priority 61440
interface range gigabitethernet 0/1-3
lacp port-priority 61440
port-group 3 mode active
end
3)驗(yàn)證配置。
show lacp summary #查看聚合組內(nèi)成員的狀態(tài)。