一、实验拓扑图
二、实验配置
1.配置各主机IP地址、子网掩码和网关
2.配置交换机LSW1和LSW2
交换机LSW1的配置如下:
<Huawei>sys
[Huawei]sysname S1
[S1]vlan batch 10 20 30
[S1]int vlan20
[S1-Vlanif20]ip address 192.168.2.1 24
[S1-Vlanif20]quit
[S1]int vlan10
[S1-Vlanif10]ip address 192.168.1.2 24
[S1-Vlanif10]quit
[S1]int vlan30
[S1-Vlanif30]ip address 192.168.3.1 24
[S1-Vlanif30]quit
[S1]int GigabitEthernet 0/0/2
[S1-GigabitEthernet0/0/2]port link-type access
[S1-GigabitEthernet0/0/2]port default vlan 20
[S1-GigabitEthernet0/0/2]quit
[S1]int GigabitEthernet 0/0/3
[S1-GigabitEthernet0/0/3]port link-type access
[S1-GigabitEthernet0/0/3]port default vlan 30
[S1-GigabitEthernet0/0/2]quit
[S1]int GigabitEthernet 0/0/1
[S1-GigabitEthernet0/0/1]port link-type access
[S1-GigabitEthernet0/0/1]port default vlan 10
[S1-Giga