03-端口隔离配置举例
本章节下载: 03-端口隔离配置举例 (162.45 KB)
本文档介绍了端口隔离的配置举例。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解端口隔离特性。
同一端口不能同时配置为业务环回组成员端口和隔离组端口,即业务环回组成员端口不能加入隔离组,而隔离组成员端口不能再配置为业务环回组的成员端口。
如图1所示,小区用户Host A、Host B、Host C分别与Device的端口HundredGigE1/0/1、HundredGigE1/0/2、HundredGigE1/0/3相连,Device设备通过HundredGigE1/0/4端口与外部网络相连。现需要实现小区用户Host A、Host B和Host C彼此之间二层报文不能互通,但可以和外部网络通信。
本举例是在R2825版本上进行配置和验证的。
· 在设备上将端口加入到指定的隔离组中前,必须先完成该隔离组的创建。
· 一个端口最多只能加入一个隔离组。
· 缺省情况下,本设备的接口处于ADM(Administratively Down)状态,请根据实际需要在对应接口视图下使用undo shutdown命令开启接口。
# 创建隔离组1。
<Device> system-view
[Device] port-isolate group 1
# 将端口HundredGigE1/0/1、HundredGigE1/0/2、HundredGigE1/0/3加入隔离组1。
[Device] interface hundredgige 1/0/1
[Device-HundredGigE1/0/1] port-isolate enable group 1
[Device-HundredGigE1/0/1] quit
[Device] interface hundredgige 1/0/2
[Device-HundredGigE1/0/2] port-isolate enable group 1
[Device-HundredGigE1/0/2] quit
[Device] interface hundredgige 1/0/3
[Device-HundredGigE1/0/3] port-isolate enable group 1
[Device-HundredGigE1/0/3] quit
# 显示隔离组1中的信息。
[Device] display port-isolate group 1
Port isolation group information:
Group ID: 1
Group members:
HundredGigE1/0/1
HundredGigE1/0/2
HundredGigE1/0/3
以上信息显示Device上的端口HundredGigE1/0/1、HundredGigE1/0/2、HundredGigE1/0/3已经加入隔离组1,从而实现二层隔离,Host A、Host B和Host C彼此之间不能ping通。
#
port-isolate group 1
#
interface HundredGigE1/0/1
port link-mode bridge
port-isolate enable group 1
#
interface HundredGigE1/0/2
port link-mode bridge
port-isolate enable group 1
#
interface HundredGigE1/0/3
port link-mode bridge
port-isolate enable group 1
#
· H3C S12500X-AF系列交换机 基础配置指导-R28xx
· H3C S12500X-AF系列交换机 基础配置命令参考-R28xx
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!