二層交換機鏈路聚合、三層交換機鏈路聚合和三層交換機的單臂路由專案

明月人倚樓發表於2020-10-17

二層交換機的鏈路聚合:

 

啟動裝置,配置PC的IP地址與子網掩碼

SW5配置資訊

<Huawei>undo terminal monitor

<Huawei>system-view

[Huawei]user-interface console 0

[Huawei-ui-console0]idle-timeout 0 0

[Huawei-ui-console0]sysname SW5

[SW5]int Eth-Trunk 1

[SW5-Eth-Trunk1]port link-type trunk

[SW5-Eth-Trunk1]port trunk allow-pass vlan all

[SW5-Eth-Trunk1]int e0/0/2

[SW5-Ethernet0/0/2]eth-trunk 1

[SW5-Eth-Trunk1]int e0/0/3

[SW5-Ethernet0/0/3]eth-trunk 1

[SW5-Eth-Trunk1]int e0/0/4

[SW5-Ethernet0/0/4]eth-trunk 1

[SW5-Ethernet0/0/4]quit

[SW5]vlan 2

[SW5-vlan2]int e0/0/1

[SW5-Ethernet0/0/1]port hybrid pvid vlan 2

[SW5-Ethernet0/0/1]port hybrid untagged vlan 2

[SW5-Ethernet0/0/1]quit

SW6配置資訊

<Huawei>undo terminal monitor

<Huawei>system-view

[Huawei]user-interface console 0

[Huawei-ui-console0]idle-timeout 0 0

[Huawei-ui-console0]sysname SW6

[SW6]int Eth-Trunk 1

[SW6-Eth-Trunk1]port link-type trunk

[SW6-Eth-Trunk1]port trunk allow-pass vlan all

[SW6-Eth-Trunk1]int e0/0/2

[SW6-Ethernet0/0/2]eth-trunk 1

[SW6-Eth-Trunk1]int e0/0/3

[SW6-Ethernet0/0/3]eth-trunk 1

[SW6-Eth-Trunk1]int e0/0/4

[SW6-Ethernet0/0/4]eth-trunk 1

[SW6-Ethernet0/0/4]quit

[SW6]vlan 2

[SW6-vlan2]int e0/0/1

[SW6-Ethernet0/0/1]port hybrid pvid vlan 2

[SW6-Ethernet0/0/1]port hybrid untagged vlan 2

[SW6-Ethernet0/0/1]quit

 

三層交換機的鏈路聚合:

 

CE3配置資訊

<Huawei>undo terminal monitor

<Huawei>system-view

[Huawei-ui-console0]sysname CE3

[~CE3]int Eth-Trunk 1

[*CE3-Eth-Trunk1]undo portswitch

[*CE3-Eth-Trunk1]ip add 10.1.1.1 24

[*CE3-Eth-Trunk1]int g1/0/0

[*CE3-GE1/0/0]eth-trunk 1

[*CE3-GE1/0/0]undo shutdown

[*CE3-Eth-Trunk1]int g1/0/1

[*CE3-GE1/0/1]eth-trunk 1

[*CE3-GE1/0/1]undo shutdown

[*CE3-Eth-Trunk1]int g1/0/2

[*CE3-GE1/0/2]eth-trunk 1

[*CE3-GE1/0/2]undo shutdown

[*CE3-GE1/0/2]quit

[*CE3]quit

[~CE3]int LoopBack 0

[*CE3-LoopBack0]ip add 192.168.1.100 32

[*CE3-LoopBack0]quit

[*CE3]quit

Warning: Uncommitted configurations found. Are you sure to commit them before ex

iting? [Y(yes)/N(no)/C(cancel)]:y

[*CE3]ip route-static 192.168.2.100 32 10.1.1.2    (設定靜態路由,設定路由下一跳地址)

CE4配置資訊

<Huawei>undo terminal monitor

<Huawei>system-view

[Huawei-ui-console0]sysname CE4

[~CE4]int Eth-Trunk 1

[*CE4-Eth-Trunk1]undo portswitch

[*CE4-Eth-Trunk1]ip add 10.1.1.2 24

[*CE4-Eth-Trunk1]int g1/0/0

[*CE4-GE1/0/0]eth-trunk 1

[*CE4-GE1/0/0]undo shutdown

[*CE4-Eth-Trunk1]int g1/0/1

[*CE4-GE1/0/1]eth-trunk 1

[*CE4-GE1/0/1]undo shutdown

[*CE4-Eth-Trunk1]int g1/0/2

[*CE4-GE1/0/2]eth-trunk 1

[*CE4-GE1/0/2]undo shutdown

[*CE4-GE1/0/2]quit

[*CE4]quit

[~CE4]int LoopBack 0

[*CE4-LoopBack0]ip add 192.168.2.100 32

[*CE4-LoopBack0]quit

[*CE4]quit

Warning: Uncommitted configurations found. Are you sure to commit them before ex

iting? [Y(yes)/N(no)/C(cancel)]:y

[*CE4]ip route-static 192.168.1.100 32 10.1.1.1    

配置資訊需要到使用者試圖儲存才能生效

 

 

三層交換機的單臂路由

 

SW4配置資訊

<Huawei>undo terminal monitor

<Huawei>system-view

[Huawei]user-interface console 0

[Huawei-ui-console0]idle-timeout 0 0

[Huawei-ui-console0]sysname SW4

[SW4]vlan batch 10 20

[SW4]int g0/0/1

[SW4-GigabitEthernet0/0/1]port hybrid pvid vlan 10

[SW4-GigabitEthernet0/0/1]port hybrid untagged vlan 10

[SW4-GigabitEthernet0/0/1]int g0/0/2

[SW4-GigabitEthernet0/0/2]port hybrid pvid vlan 20

[SW4-GigabitEthernet0/0/2]port hybrid untagged vlan 20

[SW4-GigabitEthernet0/0/2]quit

[SW3]int vlanif 10

[SW3-Vlanif10]ip add 192.168.10.1 24

[SW3-Vlanif10]int vlanif 20

[SW3-Vlanif20]ip add 192.168.20.1 24

[SW3-Vlanif20]quit

相關文章