準備實驗環境
首先在三臺交換機建立vlan而且將各個接口加入到各自vlan,單數爲vlan10,複數爲vlan20
而後配置鏈路聚合和lacp,(之間是含有前後順序的,先進入eth-trunk組,配置中繼鏈路即容許全部vlan經過,而後配置lacp,最後再將接口加入到eth-trunk組中)
R1路由器的鏈路配置即單臂路由,(路由器的鏈路聚合配置首先加入eth-trunk組,使用命令(undo portswitch)讓路由二層變三層。以後再將接口捆綁起來,最後配置單臂路由)在AR1配置dhcp使pc機能夠自動得到IP地址
其餘路由器的鏈路聚合都是一樣的操做,先進入eth-trunk組讓二層變三層,而後配置ip地址,指路由
所有都作好後在pc上點擊dhcp,查看是否可以自動獲取到,能獲取到就說明配置完成了
測試lacp是否配置正確,隨便在一個交換機上關閉接口來模擬網絡測試
這邊看到接口已經模擬完成
使用pc來ping通測試,能夠看到一開始一直超時,以後恢復正常說明lacp配置正確(-t能夠一直ping ctrl+c是中止測試)
網絡
sys
un in en(關閉提示信息)
vlan batch 10 20(建立vlan)
exit
int e0/0/1
port link-type access
port default vlan 10
int e0/0/2
port link-type access
port default vlan 20ide
int Eth-Trunk 2
port link-type trunk
port trunk allow-pass vlan all
mode lacp-static
lacp timeout fast
lacp preempt enable
max active-linknumber 2
bpdu enable
q
interface Eth-Trunk 2
trunkport Ethernet 0/0/3 to 0/0/5
q測試
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]int e
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]undo portswitch
[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/0 to 0/0/1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk1]int Eth-Trunk 1.10
[Huawei-Eth-Trunk1.10]dot1q termination vid 10
[Huawei-Eth-Trunk1.10]arp broadcast enable
[Huawei-Eth-Trunk1.10]ip add 192.168.10.1 24
[Huawei-Eth-Trunk1.10]q
[Huawei]dhcp e
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]int Eth-Trunk 1.10
[Huawei-Eth-Trunk1.10]dhcp select interface
[Huawei-Eth-Trunk1.10]dhcp server dns-list 1.1.1.1
[Huawei-Eth-Trunk1.10]int Eth-Trunk 1.20
[Huawei-Eth-Trunk1.20]dot1q termination vid 20
[Huawei-Eth-Trunk1.20]arp broadcast enable
[Huawei-Eth-Trunk1.20]ip add 192.168.20.1 24
[Huawei-Eth-Trunk1.20]dhcp select interface
[Huawei-Eth-Trunk1.20]dhcp server dns-list 2.2.2.2
[Huawei-Eth-Trunk1.20]q3d
(ar1)[Huawei]int Eth-Trunk 3
[Huawei-Eth-Trunk3]undo portswitch
[Huawei-Eth-Trunk3]trunkport GigabitEthernet 4/0/0
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk3]trunkport GigabitEthernet 0/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk3]ip add 12.0.0.1 24
[Huawei-Eth-Trunk3]q
[Huawei]ip route-static 0.0.0.0 0.0.0.0 12.0.0.2orm
(ar2)[Huawei]int Eth-Trunk 3
[Huawei-Eth-Trunk3]undo portswitch
[Huawei-Eth-Trunk3]trunkport g4/0/0
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk3]trunkport g0/0/0
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk3]ip add 12.0.0.2 24
[Huawei-Eth-Trunk3]q
[Huawei]int Eth-Trunk 4
[Huawei-Eth-Trunk4]undo portswitch
[Huawei-Eth-Trunk4]trunkport g0/0/1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk4]trunkport g0/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk4]ip add 23.0.0.2 24
[Huawei-Eth-Trunk4]q
[Huawei]ip route-static 192.168.10.0 24 12.0.0.1
[Huawei]ip route-static 192.168.20.0 24 12.0.0.1‘server
(ar3)<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]int Eth-Trunk 4
[Huawei-Eth-Trunk4]undo portswitch
[Huawei-Eth-Trunk4]trunkport g0/0/1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk4]trunkport g0/0/0
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk4]ip add 23.0.0.3 24
[Huawei-Eth-Trunk4]q
[Huawei]ip route-static 0.0.0.0 0.0.0.0 23.0.0.2blog