创建VLAN,建立内网
LSW2配置
- 创建vlan10,绑定端口
sys
sysname LSW2
vlan batch 10
interface Ethernet0/0/3
port link-type access
port default vlan 10
- 设置vlanif,ip address作为vlan网关
interface vlanif 10
ip address 192.168.10.254 24
- 交换机之间设置trunk接口
interface Ethernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 10
LSW3配置于LSW2类似
system-view
vlan batch 20 30
interface Ethernet 0/0/2
port link-type access
port default vlan 20
interface Ethernet 0/0/3
port link-type access
port default vlan 30
interface vlanif 20
ip address 192.168.20.254 24
interface vlanif 30
ip addres 192.168.30.254 24
interface Ethernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 20 30
LSW1配置
sys
sysname LSW1
vlana batch 10 20 30 40 100
interface g0/0/1
port link-type access
port default vlan 40
interface g0/0/2
port link-type trunk
port trunk allow-pass vlan 10
interface g0/0/3
port link-type trunk
port trunk allow-pass vlan