任务:将Hybrid类型接口加入vlan
认为已经建立好vlan 10 20
1.进入系统视图 system-view
2.进入接口视图 interface giga 0/0/2
3.设置接口为hybrid类型 port link-type hybrid
4.将接口以tagged方式加入vlan 10 port hybrid tagged vlan 10
5.将接口以untagged方式加入vlan 20 port hybrid untagged vlan 20
6.退出并保存
注意:默认情况下接口类型为hybrid类型,以untagged方式加入vlan
tagged与untagged的区别,电脑网卡可以直接识别untagged方式的数据而无法识别tagged方式的数据
在eNSP模拟器上的命令如下
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]interface giga 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type hybrid
[Huawei-GigabitEthernet0/0/2]port hybrid tagged vlan 10
[Huawei-GigabitEthernet0/0/2]port hybrid untagged vlan 20
[Huawei-GigabitEthernet0/0/2]return
<Huawei>save The current configuration will be written to the device. Are you sure to continue?[Y/N]y Now saving the current configuration to the slot 0. Save the configuration successfully.