端口隔离应用场景和配置

拓扑图2021-02-08_004223.png

端口隔离可以实现同一个vlan内端口之间隔离

命令 备注
port-isolate enable group 1 加入隔离组,同一个组内端口隔离
disp port-isolate group 1 验证隔离端口
[Huawei-GigabitEthernet0/0/3]am isolate GigabitEthernet 0/0/1 单向隔离

实验需求

1.    pc1 pc2 pc3属于同一个vlan,要求pc1和pc2不能互访

[Huawei-GigabitEthernet0/0/1]port-isolate enable group 1
[Huawei-GigabitEthernet0/0/2]port-isolate enable group 1

验证隔离端口

[Huawei]disp port-isolate group 1
  The ports in isolate group 1:
GigabitEthernet0/0/1     GigabitEthernet0/0/2

2.    配置g0/0/3和g0/0/1的单向隔离

[Huawei-GigabitEthernet0/0/3]am isolate GigabitEthernet 0/0/1

此时pc1 pc3因为arp请求被隔离,拿不到两边的mac地址,pc1 ping pc3提示目标主机不可达,

PC>ping 1.0.0.3
Ping 1.0.0.3: 32 data bytes, Press Ctrl_C to break
From 1.0.0.1: Destination host unreachable

此时在vlan1接口开启arp代理,pc1,pc2,pc3实现互相通信

[Huawei-Vlanif1]ip address 1.0.0.5 24
[Huawei-Vlanif1]arp-proxy inner-sub-vlan-proxy enable


猜你喜欢

转载自blog.51cto.com/13708834/2621898