链路聚合综合实验

1 问题
如何在庞大的网络环境中设置链路聚合模式?
步骤
实现此案例需要根据如下步骤举行。

1)路由器设置 r1、r2

每个路由器上各建两个eth-trunk端口,划分毗邻路由器和三层交流机
2)设置三层交流机 sw3、sw6

每个三层交流机上各建三个eth-trunk端口,划分毗邻路由器和二层交流机,vlan 10 20 100
3)设置二层交流机 sw3、sw4、sw5、sw6

每个二层交流机建立一个eth-trunk端口,毗邻到三层交流机,vlan 10
4)设置PC机的IP地址

5)测试网络毗邻

[r2]int Eth-Trunk 1 /设置聚合链路1
[r2-Eth-Trunk1]undo portswitch
-undo portswitch是把二层接口切换成三层接口
,然后就可以在接口下面设置IP地址了!
[r2-Eth-Trunk1]mode lacp-static /设置lacp自动模式
[r2-Eth-Trunk1]trunkport g0/0/0 /加入接口
Info: This operation may take a few seconds. Please wait for a moment...done.
[r2-Eth-Trunk1]trunkport g0/0/1
Info: This operation may take a few seconds. Please wait for a moment...done.
[r2-Eth-Trunk1]q
[r2]int Eth-Trunk 2
[r2-Eth-Trunk2]undo portswitch
[r2-Eth-Trunk2]mode l
[r2-Eth-Trunk2]mode lacp-static
[r2-Eth-Trunk2]trunkport g2/0/1
Info: This operation may take a few seconds. Please wait for a moment...done.
[r2-Eth-Trunk2]trunkport g2/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
[r2-Eth-Trunk2]ip addres 192.168.3.1 24
[r2]int Eth-Trunk 1
[r2-Eth-Trunk1]ip add 192.168.2.2 24
<r2>dis ip routing-table
Enter system view, return user view with Ctrl+Z.
[r2]ip route-static 192.168.30.0 24 192.168.3.2 设置静态路由
[r2]ip route-static 192.168.40.0 24 192.168.3.2
[r2]ip route-static 192.168.10.0 24 192.168.2.1
[r2]ip route-static 192.168.20.0 24 192.168.2.1
[r2]ip route-static 192.168.1.0 24 192.168.2.1
[r2]dis ip routing-table

[sw3]vlan batch 10 20 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw3]int Eth-Trunk 1
[sw3-Eth-Trunk1]mode lacp-static
[sw3-Eth-Trunk1]trunkport g0/0/3
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw3-Eth-Trunk1]trunkport g0/0/4
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw3-Eth-Trunk1]port link-type trunk
[sw3-Eth-Trunk1]port trunk allow-pas vlan all
[sw3-Eth-Trunk1]q
[sw3]int Eth-Trunk 2
[sw3-Eth-Trunk2]mode lacp-static
[sw3-Eth-Trunk2]trunkport g0/0/5
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw3-Eth-Trunk2]trunkport g0/0/6
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw3-Eth-Trunk2]port link-type trunk
[sw3-Eth-Trunk2]port trunk allow-pas vlan all
[sw3-Eth-Trunk2]q
[sw3]int Eth-Trunk 3
[sw3-Eth-Trunk3]mode lacp-static
[sw3-Eth-Trunk3]trunkport g0/0/1
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw3-Eth-Trunk3]trunkport g0/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw3-Eth-Trunk3]port link-type acces
[sw3-Eth-Trunk3]port default vlan 100
[sw3-Eth-Trunk3]q
[sw3]int Vlanif 10
[sw3-Vlanif10]ip addres 192.168.10.1 24
[sw3-Vlanif10]int Vlanif 20
[sw3-Vlanif20]ip addres 192.168.20.1 24
[sw3-Vlanif20]int Vlanif 100
[sw3-Vlanif100]ip addres 192.168.1.2 24
[sw3]dis port vlan
[sw3]dis ip int b

[sw3]ip route-static 192.168.2.0 24 192.168.1.1
[sw3]ip route-static 192.168.3.0 24 192.168.1.1
[sw3]ip route-static 192.168.30.0 24 192.168.1.1
[sw3]ip route-static 192.168.40.0 24 192.168.1.1
[sw3]q

[sw1]vlan batch 10
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1]int Eth-Trunk 1
[sw1-Eth-Trunk1]mode lacp-static
[sw1-Eth-Trunk1]trunkport e0/0/3
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1-Eth-Trunk1]trunkport e0/0/4
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1-Eth-Trunk1]port link-type trunk
[sw1-Eth-Trunk1]port trunk allow-pas vlan all
[sw1-Eth-Trunk1]q
[sw1]int e0/0/1
[sw1-Ethernet0/0/1]port link-type acces
[sw1-Ethernet0/0/1]port default vlan 10