拓扑图如下

wKioL1S7mH_wo6mAAACWvC5A9cM390.jpg
wKiom1S7l-2BRvNJAAKt3vXhrr8262.jpg

配置如下:


#

sysname Huawei

#

undo info-center enable

#

vlan batch 10 20

#

interface Vlanif1

#

interface Vlanif10

 ip address 10.0.1.1 255.255.255.0 

 arp-proxy enable #开启arp代理

#

interface Vlanif20

 ip address 10.0.2.1 255.255.255.0 

 arp-proxy enable #开启arp代理

#

interface MEth0/0/1

#

interface GigabitEthernet0/0/1

 port link-type access

 port default vlan 10

#

interface GigabitEthernet0/0/2

 port link-type access

 port default vlan 20

#

interface NULL0

#

user-interface con 0

user-interface vty 0 4

#

return