目的:华为路由器与二层交换机连接使用单臂路由使PC1 PC2不通vlan互通
AR1配置
[Huawei]int g0/0/0.10
[Huawei-GigabitEthernet0/0/0.10]dot1q termination vid 10
[Huawei-GigabitEthernet0/0/0.10]ip address 10.10.10.1 24
[Huawei-GigabitEthernet0/0/0.10]arp broadcast enable
[Huawei]int g0/0/0.20
[Huawei-GigabitEthernet0/0/0.20]dot1q termination vid 20
[Huawei-GigabitEthernet0/0/0.20]ip address 10.10.20.1 24
[Huawei-GigabitEthernet0/0/0.20]arp broadcast enable
LSW1配置
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1] port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei]vlan batch 10 20
[Huawei]int Eth0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 10
[Huawei]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 20
PC1配置:能ping通PC2
PC2配置:能ping通PC1