华为HCIA-VLAN单臂路由、子接口

VLAN路由-单臂路由

image

[SW]vlan batch 10 20
[SW-GigabitEthernet0/0/1]port link-type access
[SW-GigabitEthernet0/0/1]port default vlan 10
[SW-GigabitEthernet0/0/2]port link-type access
[SW-GigabitEthernet0/0/2]port default vlan 20
[SW-GigabitEthernet0/0/3]port link-type trunk
[SW-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20
[R1]int g0/0/0.1
[R1-GigabitEthernet0/0/0.1]dot1q termination vid 10
[R1-GigabitEthernet0/0/0.1]ip address 192.168.1.1 24
[R1-GigabitEthernet0/0/0.1]arp broadcast enable
[R1-GigabitEthernet0/0/0.1]int g0/0/0.2
[R1-GigabitEthernet0/0/0.2]dot1q termination vid 20
[R1-GigabitEthernet0/0/0.2]ip address 192.168.2.1 24
[R1-GigabitEthernet0/0/0.2]arp broadcast enable

配置三层交换

image

[SW]int vlanif 10
[SW-Vlanif10]ip address 192.168.1.1 24
[SW-Vlanif10]int vlanif 20
[SW-Vlanif20]ip address 192.168.2.1 24
posted @ 2022-05-03 10:42  xl4ng  阅读(138)  评论(0编辑  收藏  举报