华为单臂路由实现VLAN间通信
SW:
<Huawei>sys
<Huawei>system-view
[Huawei]sysname SW[SW]VLAN batch 10 20 //批量划分VLAN
[SW]int g0/0/1
[SW-GigabitEthernet0/0/1]port link-type trunk[SW-GigabitEthernet0/0/1]port trunk allow-pass vlan all //允许所有vlan通过
[SW-vlan20]int g0/0/2
[SW-GigabitEthernet0/0/2]port link-type access
[SW-GigabitEthernet0/0/2]port default vlan 10[SW-GigabitEthernet0/0/2]int g0/0/3
[SW-GigabitEthernet0/0/3]port link-type access[SW-GigabitEthernet0/0/3]port default vlan 20
R:
<Huawei>system-view .
[Huawei]sysname R
[R]int g0/0/0.10 //进入g0/0/0的子接口g0/0/0.10
[R-GigabitEthernet0/0/0.10]dot1q termination vid 10 //该子接口处理VLAN 10的流量[R-GigabitEthernet0/0/0.10]arp broadcast enable //开启arp广播功能
[R-GigabitEthernet0/0/0.10]ip address 1.1.1.254 24
[R-GigabitEthernet0/0/0.10]int g0/0/0.20
[R-GigabitEthernet0/0/0.20]dot1q termination vid 20
[R-GigabitEthernet0/0/0.20]ip address 2.2.2.254 24
[R-GigabitEthernet0/0/0.20]arp broadcast enable
Ping测试