1 問題
如何在複雜的網絡環境中配置鏈路聚合模式?
步驟
實現此案例須要按照以下步驟進行。網絡
1)路由器配置 r一、r2ide
每一個路由器上各建兩個eth-trunk端口,分別鏈接路由器和三層交換機
2)配置三層交換機 sw三、sw6測試
每一個三層交換機上各建三個eth-trunk端口,分別鏈接路由器和二層交換機,vlan 10 20 100
3)配置二層交換機 sw三、sw四、sw五、sw6blog
每一個二層交換機建立一個eth-trunk端口,鏈接到三層交換機,vlan 10
4)配置PC機的IP地址接口
5)測試網絡鏈接ip
[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 bit
[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 io
[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 10table