<Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sys sw1 #把LSW1交換機名字修改為SW1 <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sys sw2 #把LSW5交換機名字修改為SW2 -------先看SW1的配置------- [SW1]interface vlan 1 [SW1-Vlanif1]ip address 192.168.10.254 255.255.255.0 [SW1-Vlanif1]quit [SW1]interface Eth-Trunk 1 #建立匯聚端口1 [SW1-Eth-Trunk 1]port link-type trunk #更改端口為訪問端口,如果下面是兩臺交換機,則需要更改為port link-type trunk模式。 [SW1-Eth-Trunk 1]port trunk allow-pass vlan 10 [SW1-Eth-Trunk 1]quit [SW1]interface GigabitEthernet 0/0/23 [SW1-GigabitEthernet0/0/23]eth-trunk 1 #將端口0/0/23加入eth-trunk 1 [SW1]interface GigabitEthernet 0/0/20 [SW1-GigabitEthernet0/0/20]eth-trunk 1 #將端口0/0/20加入eth-trunk 1 -------先看SW2的配置(與SW1一樣)------- [SW2]interface vlan 1 [SW2-Vlanif1]ip address 192.168.10.1 255.255.255.0 [SW2-Vlanif1]quit [SW1]interface Eth-Trunk 1 #建立匯聚端口1 [SW1-Eth-Trunk 1]port link-type trunk #更改端口為訪問端口,如果下面是兩臺交換機,則需要更改為port link-type trunk模式。 [SW1-Eth-Trunk 1]port trunk allow-pass vlan 10 [SW1-Eth-Trunk 1]quit [SW1]interface GigabitEthernet 0/0/10 [SW1-GigabitEthernet0/0/10]eth-trunk 1 #將端口0/0/10加入eth-trunk 1 [SW1]interface GigabitEthernet 0/0/24 [SW1-GigabitEthernet0/0/24]eth-trunk 1 #將端口0/0/24加入eth-trunk 1 -----------注意測試命令-------- 1、執(zhí)行:display eth-trunk 1,查看配置結(jié)果: [sw1]display eth-trunk 1 Eth-Trunk1's state information is: WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8 Operate status: up Number Of Up Port In Trunk: 2 -------------------------------------------------------------------------------- PortName Status Weight GigabitEthernet0/0/23 Up 1 GigabitEthernet0/0/20 Up 1 [SW1]interface GigabitEthernet 0/0/20 [SW1-GigabitEthernet0/0/20]shutdown [SW1-GigabitEthernet0/0/20]quite [sw1]display eth-trunk 1 Eth-Trunk1's state information is: WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8 Operate status: up Number Of Up Port In Trunk: 2 -------------------------------------------------------------------------------- PortName Status Weight GigabitEthernet0/0/23 Up 1 GigabitEthernet0/0/20 down 1 3、打開關(guān)閉的接口命令 [SW1]interface GigabitEthernet 0/0/20 [SW1-GigabitEthernet0/0/20]undo shutdown |
|