<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sys LWS0
[LWS0]vlan 10
[LWS0-vlan10]quit
[LWS0]vlan 20
[LWS0-vlan20]vlan 30
[LWS0-vlan30]vlan 40
[LWS0-vlan40]quit
[LWS0]int vlan 10
[LWS0-Vlan-interface10]ip add 192.168.10.1 255.255.255.0
[LWS0-Vlan-interface10]quit
[LWS0]int vlan 20
[LWS0-Vlan-interface20]ip add 192.168.20.1 255.255.255.0
[LWS0-Vlan-interface20]int vlan 30
[LWS0-Vlan-interface30]ip add 192.168.30.1 255.255.255.0
[LWS0-Vlan-interface30]int vlan 40
[LWS0-Vlan-interface40]ip add 192.168.40.1 255.255.255.0
[LWS0-Vlan-interface40]quit
[LWS0]int g1/0/1
[LWS0-GigabitEthernet1/0/1]port link-type trunk
[LWS0-GigabitEthernet1/0/1]port trunk permit vlan all
[LWS0-GigabitEthernet1/0/1]no sh
[LWS0-GigabitEthernet1/0/1]int g1/0/2
[LWS0-GigabitEthernet1/0/2]no sh
[LWS0-GigabitEthernet1/0/2]port link-ty t
[LWS0-GigabitEthernet1/0/2]port t p vlan all
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sys LWS1
创建vlan
[LWS1]vlan 10
[LWS1-vlan10]vlan 20
[LWS1-vlan20]quit
与交换机相连的接口设为 trunk,允许所有 vlan 通过
[LWS1-GigabitEthernet1/0/1]no sh
[LWS1-GigabitEthernet1/0/1]port link-ty t
[LWS1-GigabitEthernet1/0/1]port t p vlan all
[LWS1-GigabitEthernet1/0/1]quit
[LWS1]int g1/0/2
[LWS1-GigabitEthernet1/0/2]port link-ty a
[LWS1-GigabitEthernet1/0/2]port a vlan 10
[LWS1-GigabitEthernet1/0/2]int g1/0/3
[LWS1-GigabitEthernet1/0/3]no sh
[LWS1-GigabitEthernet1/0/3]port link-ty a
[LWS1-GigabitEthernet1/0/3]port a vlan 20
[LWS1-GigabitEthernet1/0/3]quit
[LWS2]vlan 30
[LWS2-vlan30]vlan 40
[LWS2-vlan40]quit
[LWS2]int g1/0/1
[LWS2-GigabitEthernet1/0/1]port link-ty t
[LWS2-GigabitEthernet1/0/1]port t p vlan all
[LWS2-GigabitEthernet1/0/1]quit
[LWS2]int g1/0/2
[LWS2-GigabitEthernet1/0/2]port link-ty a
[LWS2-GigabitEthernet1/0/2]port a vlan 30
[LWS2-GigabitEthernet1/0/2]int g1/0/3
[LWS2-GigabitEthernet1/0/3]port link-ty a
[LWS2-GigabitEthernet1/0/3]port a vlan 40
[LWS2-GigabitEthernet1/0/3]quit