华为交换机简单拓扑结构框架
目录
-
拓扑结构图
-
IP地址规划表
-
设备命令配置详情
3.1. LSW1
3.2. LSW2
3.3. LSW3
-
总结分析
-
拓扑结构图
-
IP地址规划表
-
设备命令配置详情
3.1. LSW1
在LSW1上创建vlan10,20,30,1000
[sw1]vlan b
[sw1]vlan batch 10 20 30 1000
Info: This operation may take a few seconds. Please wait for a moment…done.
在LSW1上把vlan10,20,30,1000添加IP地址
[sw1]int vlan 10
[sw1-Vlanif10]ip add 192.168.1.254 24
[sw1-Vlanif10]int vlan 20
[sw1-Vlanif20]ip add 192.168.2.254 24
[sw1-Vlanif20]int vlan 30
[sw1-Vlanif30]ip add 192.168.3.254 24
[sw1-Vlanif30]int vlan 1000
[sw1-Vlanif1000]ip add 10.0.0.254 24
[sw1-Vlanif1000]q
在LSW1上配置接口的类型和vlan
[sw1]int GigabitEthernet 0/0/1
[sw1-GigabitEthernet0/0/1]port l
[sw1-GigabitEthernet0/0/1]port link-t
[sw1-GigabitEthernet0/0/1]port link-type tr
[sw1-GigabitEthernet0/0/1]port link-type trunk
[sw1-GigabitEthernet0/0/1]port tr
[sw1-GigabitEthernet0/0/1]port trunk a
[sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20 30 1000
[sw1-GigabitEthernet0/0/1]q
3.2. LSW2
在LSW2上创建vlan10,20,30,1000
[sw2]vlan b
[sw2]vlan batch 10 20 30 1000
Info: This operation may take a few seconds. Please wait for a moment…done.
在LSW2上配置接口的类型和vlan
[sw2]int Ethernet 0/0/1
[sw2-Ethernet0/0/1]port l
[sw2-Ethernet0/0/1]port link-t
[sw2-Ethernet0/0/1]port link-type tr
[sw2-Ethernet0/0/1]port link-type trunk
[sw2-Ethernet0/0/1]port tr
[sw2-Ethernet0/0/1]port trunk a
[sw2-Ethernet0/0/1]port trunk allow-pass vlan 10 20 30 1000
[sw2-Ethernet0/0/1]int e
[sw2-Ethernet0/0/1]int e
[sw2-Ethernet0/0/1]q
[sw2]int Ethernet 0/0/2
[sw2-Ethernet0/0/2]port
[sw2-Ethernet0/0/2]port l
[sw2-Ethernet0/0/2]port link-t
[sw2-Ethernet0/0/2]port link-type a
[sw2-Ethernet0/0/2]port link-type tr
[sw2-Ethernet0/0/2]port link-type trunk
[sw2-Ethernet0/0/2]port tr
[sw2-Ethernet0/0/2]port trunk a
[sw2-Ethernet0/0/2]port trunk allow-pass vlan 10 20 30 1000
[sw2-Ethernet0/0/2]q
[sw2]int Ethernet 0/0/3
[sw2-Ethernet0/0/3]port l
[sw2-Ethernet0/0/3]port link-t
[sw2-Ethernet0/0/3]port link-ty
[sw2-Ethernet0/0/3]port link-type a
[sw2-Ethernet0/0/3]port link-type access
[sw2-Ethernet0/0/3]port de
[sw2-Ethernet0/0/3]port default vlan 10
[sw2-Ethernet0/0/3]int e 0/0/4
[sw2-Ethernet0/0/4]port
[sw2-Ethernet0/0/4]port l
[sw2-Ethernet0/0/4]port link-t
[sw2-Ethernet0/0/4]port link-type a
[sw2-Ethernet0/0/4]port link-type access
[sw2-Ethernet0/0/4]port de
[sw2-Ethernet0/0/4]port default vlan 20
[sw2-Ethernet0/0/4]q
3.3. LSW3
在LSW3上创建vlan10,20,30,1000
[sw3]vlan b
[sw3]vlan batch 10 30 1000
Info: This operation may take a few seconds. Please wait for a moment…done.
在LSW3上配置接口的类型和vlan
[sw3]int Ethernet 0/0/1
[sw3-Ethernet0/0/1]port l
[sw3-Ethernet0/0/1]port link-t
[sw3-Ethernet0/0/1]port link-type tr
[sw3-Ethernet0/0/1]port link-type trunk
[sw3-Ethernet0/0/1]port tr
[sw3-Ethernet0/0/1]port trunk a
[sw3-Ethernet0/0/1]port trunk allow-pass vlan 10 20 30 1000
[sw3-Ethernet0/0/1]q
[sw3]int Ethernet 0/0/2
[sw3-Ethernet0/0/2]port l
[sw3-Ethernet0/0/2]port link-t
[sw3-Ethernet0/0/2]port link-type a
[sw3-Ethernet0/0/2]port link-type access
[sw3-Ethernet0/0/2]port de
[sw3-Ethernet0/0/2]port default vlan 10
[sw3-Ethernet0/0/2]int e 0/0/3
[sw3-Ethernet0/0/3]port link-t
[sw3-Ethernet0/0/3]port link-type a
[sw3-Ethernet0/0/3]port link-type access
[sw3-Ethernet0/0/3]port de
[sw3-Ethernet0/0/3]port default vlan 30
[sw3-Ethernet0/0/3]q
- 总结分析
PC1尝试设备全ping,不同vlan也全通,到交换机LSW1的网关都有
PC2尝试设备全ping,不同vlan也全通,到交换机LSW1的网关都有
PC3尝试设备全ping,不同vlan也全通,到交换机LSW1的网关都有
PC4尝试设备全ping,不同vlan也全通,到交换机LSW1的网关都有