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

最终效果:

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

相关推荐
hunterandroid19 小时前
HarmonyOS 长列表滚动性能优化:预渲染、离屏缓存与 GPU 合成策略
华为·前端框架
熊猫钓鱼>_>1 天前
Kotlin Multiplatform for OpenHarmony 实战:kotlinx-serialization JSON 适配
开发语言·华为·kotlin·华为云·json·harmonyos·code
马剑威(威哥爱编程)1 天前
【共创稿事节】HarmonyOS 7 Agent 开发实战 11:并发多会话隔离
华为·harmonyos
马剑威(威哥爱编程)2 天前
【共创稿事节】HarmonyOS 7 Agent 开发实战 03:Tool Calling 让 AI 查实时订单与库存
华为·harmonyos
倔强的石头1062 天前
把 Typst 搬上开源鸿蒙 PC:一次“干净”的移植记录
华为·开源·harmonyos
hqzing2 天前
把 glibc 移植到鸿蒙 PC 上:它能用来做什么
华为·harmonyos
OH_TPC3 天前
HarmonyOS APP开发---“习惯猫“习惯打卡App,需要用到这个库
华为·harmonyos·鸿蒙
熊猫钓鱼>_>3 天前
开源鸿蒙平台 KMP 三方库 kotlin-csv 适配全流程:从编码假设到沙箱真机互通验证
开发语言·人工智能·华为·kotlin·harmonyos·鸿蒙
马剑威(威哥爱编程)3 天前
【共创稿事节】HarmonyOS 7 Agent 开发实战 09:Agent 测试评测集
华为·harmonyos