华为三层交换机VLAN间通信

华为三层交换机VLAN间通信

Sw1:

[SW1]SYS Sw1
[Sw1]int g0/0/1
[Sw1]vlan batch 100 200
[Sw1-GigabitEthernet0/0/1]port link-type trunk
[Sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Sw1-GigabitEthernet0/0/1]qu
[Sw1]int Vlanif 100
[Sw1-Vlanif100]ip add 1.1.1.254 24
[Sw1-Vlanif100]quit
[Sw1]int Vlanif 200
[Sw1-Vlanif200]ip add 2.2.2.254 24
[Sw1-Vlanif200]quit
[Sw1]

Sw2:

[Huawei]sys SW2
[Sw2]vlan batch 100 200
[Sw2]interface e0/0/1
[Sw2-Ethernet0/0/1]port trunk allow-pass vlan all
[Sw2-Ethernet0/0/1]quit
[Sw2]int E0/0/2
[Sw2-Ethernet0/0/2]port link-type acc
[Sw2-Ethernet0/0/2]port def vlan 100
[Sw2-Ethernet0/0/2]quit
[Sw2]int e0/0/3
[Sw2-Ethernet0/0/3]port link-type acc
[Sw2-Ethernet0/0/3]port def vlan 200
[Sw2-Ethernet0/0/2]quit
[Sw2]