Print

S5000PV2/S5120系列交换机端口隔离配置方法(命令行版)

2018-11-24发表

组网及说明

配置需求或说明

1.1 适用产品系列

       本案例适用于如S5008PV2-EI、S5024PV2-EI-PWR、S5048PV2-EI-HPWR、S5120-52P-LI、S5120-28P-SI、S5120-48P-EI等S5000PV2、S5120系列的交换机。


1.2 配置需求及实现的效果

      应用要求小区用户Host A、Host B、Host C分别与交换机的端口1/0/1、1/0/2、1/0/3相连;设备通过1/0/4端口与外部网络相连端口1/0/1、1/0/2、1/0/3和1/0/4属于同一VLAN;请实现小区用户Host A、Host B和Host C彼此之间二层/三层报文不能互通,但可以和外部网络通信。


1.3 注意事项

      注意:部分交换机只支持一个端口隔离组,部分交换机支持多个端口隔离组。只支持一个端口隔离组的交换机和支持多个端口隔离组的交换机配置端口隔离的时候方法有所不同。

 

组网图

  


配置步骤

只支持一个隔离组的交换机配置端口隔离

3.1 配置步骤

# 将端口GigabitEthernet1/0/1、GigabitEthernet1/0/2、GigabitEthernet1/0/3加入隔离组。

 system-view

[Device] interface GigabitEthernet1/0/1

[Device-GigabitEthernet1/0/1] port-isolate enable

[Device-GigabitEthernet1/0/1] quit

[Device] interface GigabitEthernet1/0/2

[Device-GigabitEthernet1/0/2] port-isolate enable

[Device-GigabitEthernet1/0/2] quit

[Device] interface GigabitEthernet1/0/3

[Device-GigabitEthernet1/0/3] port-isolate enable

[Device-GigabitEthernet1/0/3]quit

# 保存配置

[Device] save force

# 显示隔离组中的信息。

 display port-isolate group

 Port-isolate group information:

 Uplink port support: NO

 Group ID: 1

    GigabitEthernet1/0/1     GigabitEthernet1/0/2     GigabitEthernet1/0/3


支持多隔离组的交换机配置端口隔离

4.1 配置步骤

# 创建隔离组2。

 system-view

[Device] port-isolate group 2

# 将端口GigabitEthernet1/0/1、GigabitEthernet1/0/2、GigabitEthernet1/0/3加入隔离组2。

[Device] interface gigabitethernet 1/0/1

[Device-GigabitEthernet1/0/1] port-isolate enable group 2

[Device-GigabitEthernet1/0/1] quit

[Device] interface gigabitethernet 1/0/2

[Device-GigabitEthernet1/0/2] port-isolate enable group 2

[Device-GigabitEthernet1/0/2] quit

[Device] interface gigabitethernet 1/0/3

[Device-GigabitEthernet1/0/3] port-isolate enable group 2

[Device-GigabitEthernet1/0/3]quit

# 保存配置

[Device] save force

# 显示隔离组2中的信息。

[Device] display port-isolate group 2

 Port isolation group information:

 Group ID: 2

 Group members:

    GigabitEthernet1/0/1

    GigabitEthernet1/0/2

    GigabitEthernet1/0/3

以上信息显示Device上的端口GigabitEthernet1/0/1、GigabitEthernet1/0/2、GigabitEthernet1/0/3已经加入隔离组2,从而实现二层隔离,分别对应的Host A、Host B和Host C彼此之间不能Ping通。


配置关键点