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

最终效果:

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

相关推荐
风华圆舞37 分钟前
鸿蒙语音识别为什么要区分 startListening 和 stopListening
华为·语音识别·harmonyos
YM52e1 小时前
鸿蒙PC ArkTS 声明合并问题深度解析与最佳实践
学习·华为·harmonyos·鸿蒙·鸿蒙系统
互联网散修1 小时前
鸿蒙实战:网络状态监听与诊断工具
网络·华为·harmonyos·网络状态监听
祭曦念2 小时前
从零开始构建鸿蒙纪念日提醒 App:ArkTS + API 24 实战
华为·harmonyos
浮芷.2 小时前
鸿蒙HarmonyOS 6.1新特性之沉浸式光感效果实现过程中的各类问题解决-鸿蒙PC版(一)
华为·harmonyos·鸿蒙·鸿蒙系统
轻口味3 小时前
轻规划鸿蒙开发实战7:接管 Ability Kit 跨设备流转,EntryAbility 全链路 onContinue 数据打包与无缝接
华为·harmonyos·鸿蒙
nashane4 小时前
HarmonyOS 6学习:深入解析冷启动中的ArkCompiler
学习·华为·harmonyos
风满城335 小时前
【鸿蒙原生应用开发实战】第四篇:相册与提醒——AlbumPage + ReminderPage 完整实现
华为·harmonyos
不羁的木木5 小时前
《HarmonyOS 6.1 新能力实战之智感握姿》第三篇:实战案例——单手操作优化
华为·harmonyos
浮芷.5 小时前
HarmonyOS 6.1 沉浸式光感效果-样式切换效果问题解决方案-鸿蒙PC方向
华为·harmonyos·鸿蒙