目录
一、实验目标
- 掌握VLAN的创建方法;
- 掌握Trunk、Access链路的接口配置方法;
- 掌握Hybird接口的配置方法;
- 掌握将接口与VLAN相关联的配置方法。
二、实验拓扑
三、基本配置
在S1、S2上创建Eth-Trunk 1,并配置为静态LACP模式,然后将这两台交换机的两个接口分别加入Eth-Ttrunk 1:
S1:
[S1]int Eth-Trunk 1
[S1-Eth-Trunk1]mode lacp
[S1-Eth-Trunk1]q
Apr 4 2022 15:25:33-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 5, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S1]int g0/0/1
[S1-GigabitEthernet0/0/1]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[S1-GigabitEthernet0/0/1]
Apr 4 2022 15:25:53-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 6, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S1-GigabitEthernet0/0/1]
[S1-GigabitEthernet0/0/1]q
[S1]int g0/0/4
[S1-GigabitEthernet0/0/4]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[S1-GigabitEthernet0/0/4]q
[S1]
Apr 4 2022 15:26:03-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 7, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S1]
S2:
[S2]int Eth-Trunk 1
[S2-Eth-Trunk1]mode lacp
[S2-Eth-Trunk1]
Apr 4 2022 15:26:33-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 5, the ch
ange loop count is 0, and the maximum number of records is 4095.q
[S2]int g0/0/1
[S2-GigabitEthernet0/0/1]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[S2-GigabitEthernet0/0/1]
Apr 4 2022 15:26:39-08:00 S2 %%01IFNET/4/IF_STATE(l)[0]:Interface Eth-Trunk1 ha
s turned into UP state.
Apr 4 2022 15:26:43-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 6, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S2-GigabitEthernet0/0/1]q
[S2]int g0/0/4
[S2-GigabitEthernet0/0/4]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[S2-GigabitEthernet0/0/4]q
[S2]
Apr 4 2022 15:27:03-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 7, the ch
ange loop count is 0, and the maximum number of records is 4095.
华为交换机端口默认为Hybrid模式,这里要配置Eth-Trunk接口类型为Trunk,并允许所有VLAN通过该端口:
S1:
[S1]int Eth-Trunk 1
[S1-Eth-Trunk1]port link-type trunk
Apr 4 2022 15:33:53-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 8, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S1-Eth-Trunk1]port trunk allow-pass vlan all
[S1-Eth-Trunk1]
Apr 4 2022 15:34:03-08:00 S1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 9, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S1-Eth-Trunk1]
S2:
[S2]int Eth-Trunk 1
[S2-Eth-Trunk1]port link-type trunk
[S2-Eth-Trunk1]
Apr 4 2022 15:34:23-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 8, the ch
ange loop count is 0, and the maximum number of records is 4095.
[S2-Eth-Trunk1]port trunk allow-pass vlan all
[S2-Eth-Trunk1]
Apr 4 2022 15:34:43-08:00 S2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The curr