SW1:
[Huawei]vlan batch 10 20
[Huawei]int e0/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
[Huawei]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type trunk
[Huawei-Ethernet0/0/3]port trunk allow-pass vlan 10 20
[Huawei]int e0/0/5
[Huawei-Ethernet0/0/5]port link-type trunk
[Huawei-Ethernet0/0/5]port trunk allow-pass vlan 10 20
SW2:
[Huawei]vlan batch 10 20
[Huawei]int e0/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
[Huawei]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type trunk
[Huawei-Ethernet0/0/3]port trunk allow-pass vlan 10 20
AR1:
[Huawei]int g0/0/0.10
# 配置子接口终结的VLAN。
# 不同主接口下的子接口可以关联相同的VLAN ID,但是同一主接口下的不同子接口一定 不能关联相同的VLAN ID。
[Huawei-GigabitEthernet0/0/0.10]dot1q termination vid 10
# 使能子接口的ARP广播功能。
# 使能或去使能子接口的ARP广播功能,会使该子接口的路由状态发生一次先Down再 Up的变化,从而可能导致整个网络的路由发生一次震荡,影响正在运行的业务。
[Huawei-GigabitEthernet0/0/0.10]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.10]ip address 192.168.1.254 24
[Huawei]int g0/0/0.20
[Huawei-GigabitEthernet0/0/0.20]dot1q termination vid 20
[Huawei-GigabitEthernet0/0/0.20]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.20]ip address 192.168.2.254 24
标签:20,int,Ethernet0,vlan,Huawei,port,路由,单臂 From: https://www.cnblogs.com/Wesuiliye/p/17197420.html