一起学习如何配置端口隔离(配置了端口隔离)

2022-04-30 15:53:04

端口隔离简介:

1、要实现报文之间的二层隔离,需要将不同的端口加入不同的VLAN,但是这样会浪费有限的VLAN资源。

2、如采用端口隔离技术,可实现同一VLAN内端口之间的隔离。只需将端口加入到隔离组中,可实现隔离组内端口之间二层数据的隔离。

3、为用户提供了更安全、更灵活的组网方案。

端口隔离分为两种模式:

1、二层隔离三层互通:如希望隔离同一VLAN内的广播报文,但是不同端口下的用户可以进行三层通信,则可以将隔离模式设置为二层隔离三层互通。

2、二层三层都隔离:如希望同一VLAN不同端口下用户彻底无法通信,则可以将隔离模式配置为二层三层均隔离。

华为

1.配置端口隔离功能。

#配置GE1/0/1的端口隔离功能。

system-view

sysname switch

vlan 10

quit

interface gigabitethernet 1/0/1

port link-type access #配置GE1/0/1的接口类型为access。

port default vlan 10 #配置GE1/0/1加入VLAN 10。

port-isolate enable #缺省加入端口隔离组1,且隔离模式为二层隔离三层互通。

quit

#配置GE1/0/2的端口隔离功能。

interface gigabitethernet 1/0/2

port link-type access #配置GE1/0/1的接口类型为access。

port default vlan 10 #配置GE1/0/1加入VLAN 10。

port-isolate enable #缺省加入端口隔离组1,且隔离模式为二层隔离三层互通。

quit

#配置GE1/0/3加入VLAN10。

interface gigabitethernet 1/0/3

port link-type access #配置GE1/0/1的接口类型为access。

port default vlan 10 #配置GE1/0/1加入VLAN 10。

quit

2.验证配置,相互访问。

ping 测试略。


H3C

1.创建隔离组2。

system-view

port-isolate group 2

quit

2.将端口加入隔离组2。

interface gigabitethernet 1/0/1

port-isolate enable group 2

quit


interface gigabitethernet 1/0/2

port-isolate enable group 2

quit


interface gigabitethernet 1/0/3

port-isolate enable group 2

quit

3.验证配置。

display port-isolate group 2 #显示隔离组2中的信息。

ping 测试略。


锐捷

1.配置端口1的转发端口为3,10。

configure terminal

config traffic_segmentation 1 forword_list 3,10

2.配置端口2的转发端口为3,10。

configure terminal

config traffic_segmentation 2 forword_list 3,10

3.验证配置。

show traffic_segmentation

ping 测试略。