华为端口隔离高级用法经典案例

最终效果:

pc4不能ping通pc5,pc5能ping通pc4

pc1不能和pc2、pc3通,但pc2和pc3能互通

vlan batch 2

interface Vlanif1

ip address 10.0.0.254 255.255.255.0

interface Vlanif2

ip address 192.168.2.1 255.255.255.0

interface MEth0/0/1

interface GigabitEthernet0/0/1 //一个口子能加入多个隔离组

port-isolate enable group 1

port-isolate enable group 2

interface GigabitEthernet0/0/2

port-isolate enable group 1

interface GigabitEthernet0/0/3

port-isolate enable group 2

interface GigabitEthernet0/0/4

interface GigabitEthernet0/0/5

am isolate GigabitEthernet0/0/4

//配置单通4口的pc不能访问5口的pc,但5口可以访问4口的pc

interface GigabitEthernet0/0/6

port link-type access

port default vlan 2

相关推荐
木木子221 小时前
# 待办事项应用深度解析:ForEach 列表渲染与 CRUD 操作实战
windows·华为·harmonyos
zjxcq5204 小时前
【共创季稿事节】鸿蒙原生ArkTS布局之道——layoutWeight权重分配机制深度解析
华为·harmonyos
2501_943782358 小时前
【共创季稿事节】 倒计时器:时分秒选择器与定时器的协同工作
前端·华为·harmonyos·鸿蒙·鸿蒙系统
独守一片天8 小时前
HarmonyOS 6.1.0 Call Service 来电识别与安全通信怎么设计?
安全·华为·harmonyos
AI创界者8 小时前
【硬核教程】鸿蒙 HarmonyOS 4.2 / 4.3 完美配置 GMS 运行环境(纯净版/不弹窗/全机型通用)
华为·harmonyos
2501_9423895511 小时前
小米寥寥几家车企设计汽车顶棚
华为·编辑器·时序数据库·harmonyos
2501_9437823511 小时前
【共创季稿事节】摩斯电码转换器:编码表与双向转换的实现
android·华为·鸿蒙·鸿蒙系统
芒鸽13 小时前
在仓颉语言里造一个没有反射的服务端框架
开发语言·华为·harmonyos
binbin_5213 小时前
UIAbility 与 WindowStage:窗口创建、加载、销毁的完整链路
开发语言·javascript·深度学习·华为·harmonyos