实验拓扑:
实验思路:
1、PC机配置IP 、掩码、网关
2、创建vlan 进入接口修改为Access链路 配置vlanif 网关
实验步骤:
[Huawei]vlan batch 2 3
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 2
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 3
[Huawei]interface Vlanif 2
[Huawei-Vlanif2]ip address 192.168.10.254 24
[Huawei-Vlanif2]undo shutdown
[Huawei]interface Vlanif 3
[Huawei-Vlanif3]ip address 192.168.20.254 24
[Huawei-Vlanif3]undo shutdown