拓扑图
路由器为AR2220
交换机型号为S5700
交换机下的不同VLAN间主机通信,通过配置单臂路由实现相互通信
配置LSW2
<Huawei>system-view
[Huawei]vlan batch 20 30
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 20
[Huawei-GigabitEthernet0/0/2]quit
[Huawei]interface GigabitEthernet 0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 30
[Huawei-GigabitEthernet0/0/3]quit
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 20 30
配置AR2
<Huawei>system-view
[Huawei]interface GigabitEthernet 0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]ip address 192.168.2.1 24
[Huawei-GigabitEthernet0/0/0.1]dot1q termination vid 20
[Huawei-GigabitEthernet0/0/0.1]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.1]quit
[Huawei]interface GigabitEthernet 0/0/0.2
[Huawei-GigabitEthernet0/0/0.2]dot1q termination vid 30
[Huawei-GigabitEthernet0/0/0.2]ip address 192.168.3.1 24
[Huawei-GigabitEthernet0/0/0.2]arp broadcast enable
配置两台PC机
测试
成功