举例:配置二层端口隔离

组网需求
如图1所示,PC1、PC2和PC3同属于VLAN10,用户希望PC1与PC2之间在VLAN10内不能互相访问,PC1与PC3之间可以互相访问,PC2与PC3之间可以互相访问。

本例中interface1、interface2、interface3分别代表10GE1/0/1、10GE1/0/2、10GE1/0/3。
操作步骤
- 创建VLAN10,并将接口加入VLAN10。
<HUAWEI> system-view [HUAWEI] sysname DeviceA [DeviceA] vlan 10 [DeviceA-vlan10] quit [DeviceA] interface 10ge 1/0/1 [DeviceA-10GE1/0/1] portswitch [DeviceA-10GE1/0/1] port link-type access [DeviceA-10GE1/0/1] port default vlan 10 [DeviceA-10GE1/0/1] quit [DeviceA] interface 10ge 1/0/2 [DeviceA-10GE1/0/2] portswitch [DeviceA-10GE1/0/2] port link-type access [DeviceA-10GE1/0/2] port default vlan 10 [DeviceA-10GE1/0/2] quit [DeviceA] interface 10ge 1/0/3 [DeviceA-10GE1/0/3] portswitch [DeviceA-10GE1/0/3] port link-type access [DeviceA-10GE1/0/3] port default vlan 10 [DeviceA-10GE1/0/3] quit
- 配置二层端口隔离功能。
# 配置10GE1/0/1的二层端口隔离功能。
[DeviceA] interface 10ge 1/0/1 [DeviceA-10GE1/0/1] port-isolate enable group 1 [DeviceA-10GE1/0/1] quit
# 配置10GE1/0/2的二层端口隔离功能。
[DeviceA] interface 10ge 1/0/2 [DeviceA-10GE1/0/2] port-isolate enable group 1 [DeviceA-10GE1/0/2] quit
配置脚本
DeviceA的配置文件
# sysname DeviceA # vlan batch 10 # interface 10GE1/0/1 port link-type access port default vlan 10 port-isolate enable group 1 # interface 10GE1/0/2 port link-type access port default vlan 10 port-isolate enable group 1 # interface 10GE1/0/3 port link-type access port default vlan 10 # return
阅读剩余
版权声明:
作者:SE_YT
链接:https://www.cnesa.cn/2823.html
文章版权归作者所有,未经允许请勿转载。
THE END