链路聚合综合实验
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