//可選,關閉終端輸出,敲著命令突然來一堆文字,思路都被打斷了呢 un t m <Huawei>undo terminal monitor //進入系統檢視 <Huawei>system-view //設定交換機的名稱 [Huawei]sysname S1 //建立臨時組方便同時設定(類似於思科交換機的range命令),當然也可以建立永久組 [S1]port-group group-member GigabitEthernet 0/0/9 GigabitEthernet 0/0/10 //關閉自動協商模式 [S1-port-group]undo negotiation auto [S1-GigabitEthernet0/0/9]undo negotiation auto [S1-GigabitEthernet0/0/10]undo negotiation auto //設定介面速率為 1000Mbit/s [S1-port-group]speed 1000 [S1-GigabitEthernet0/0/9]speed 1000 [S1-GigabitEthernet0/0/10]speed 1000 //設定雙工模式為全雙工 [S1-port-group]duplex full [S1-GigabitEthernet0/0/9]duplex full [S1-GigabitEthernet0/0/10]duplex full >quit
//建立鏈路聚合介面1,並進入。這個編號本地有效,S1和S2可以設定不一樣的編號,範圍0-63 [S1]interface Eth-Trunk 1 //模式為手工負載均衡 [S1-Eth-Trunk1]mode manual load-balance //LACP模式模式在這裡有所不同,為mode lacp-static >quit //進到埠去設定鏈路聚合的繫結(eth-trunk命令在port-group下用不了,老老實實這樣操作吧) [S1]interface GigabitEthernet 0/0/9 //將介面 0/0/9 接入到聚合鏈路 1 中 [S1-GigabitEthernet0/0/9]eth-trunk 1 >quit //同理 [S1]interface GigabitEthernet 0/0/10 //將介面 0/0/10 接入到聚合鏈路 1 中 [S1-GigabitEthernet0/0/10]eth-trunk 1 >quit
[S1]display interface Eth-Trunk 1 Eth-Trunk1 current state : UP Line protocol current state : UP Description: Switch Port, PVID : 1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW: 2G, Current BW: 2G, The Maximum Frame Length is 9216 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc78-1170 Current system time: 2022-08-14 18:32:18-08:00 Input bandwidth utilization : 0% Output bandwidth utilization : 0% ----------------------------------------------------- PortName Status Weight ----------------------------------------------------- GigabitEthernet0/0/9 UP 1 GigabitEthernet0/0/10 UP 1 ----------------------------------------------------- The Number of Ports in Trunk : 2 The Number of UP Ports in Trunk : 2
//可以參考上部分 <Huawei>un t m Info: Current terminal monitor is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sys R1 //######################### //建立鏈路聚合介面1,並進入。三層裝置的鏈路聚合埠需要設定ip [R1]interface Eth-Trunk 1 //切換鏈路聚合埠為三層模式 [R1-Eth-Trunk1]undo portswitch //這裡最重要之一啦 //set ip [R1-Eth-Trunk1]ip address 192.168.1.1 24 >q //進入到目標物理埠來繫結吧 [R1]interface GigabitEthernet 0/0/1 [R1-GigabitEthernet0/0/1]eth-trunk 1 >q [R1]interface GigabitEthernet0/0/0 [R1-GigabitEthernet0/0/0]eth-trunk 1 >q
[S1]interface Eth-Trunk 1 //LACP模式模式 [S1-Eth-Trunk1]mode lacp-static >quit //進到埠去設定鏈路聚合的繫結 [S1]interface GigabitEthernet 0/0/1 [S1-GigabitEthernet0/0/1]eth-trunk 1 >q //同理 [S1]interface GigabitEthernet 0/0/2 [S1-GigabitEthernet0/0/2]eth-trunk 1 >q //同理 [S1]interface GigabitEthernet 0/0/3 [S1-GigabitEthernet0/0/3]eth-trunk 1 >q