准备实验环境
首先在三台交换机建立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