小区用户hostA、hostB、hostC分别与Device的端口GigabitEthernet 1/0/1、GigabitEthernet 1/0/2、GigabitEthernet 1/0/3相连Device设备通过GigabitEthernet 1/0/4端口与外部网络相连现需要实现 小区用户hostA、hostB和hostC彼此之间二层报文不能互通,但可以和外部网络通信。
配置步骤:
创建隔离组
<Devic>system-view
[Device]port-isolate group 2
#将端口GigabitEthement 1/0/1、GigabitEthernet 1/0/2、GigabitEthernet 1/0/3加入隔离组2.
[Device] interface gigabitetherent 1/0/1
[Device-GigabitEtherent1/0/1] port-isolate enable group 2
[Device-GigabitEtherent1/0/1]quit
[Device] interface gigabitetherent 1/0/2
[Device-GigabitEtherent1/0/2] port-isolate enable group 2
[Device-GigabitEtherent1/0/2]quit
[Device] interface gigabitetherent 1/0/3
[Device-GigabitEtherent1/0/3] port-isolate enable group 2
验证配置
#显示隔离组2中的信息。
[Device]display port-isolate group 2
结果显示Device上的端口GigabitEthement 1/0/1、GigabitEthernet 1/0/2、GigabitEthernet 1/0/3已经加入隔离组2,从而实现二层隔离,分别对应的HostA、HostB、HostC彼此之间不能Ping通
转载于:https://blog.51cto.com/14220594/2385833