端口隔离port-isolate(二层隔离)
port-isolate mode
S2720-EI、S5720-LI、S5735-L、S5735S-L、S5735S-L-M、S5720S-LI、S6720-LI、S6720S-LI仅支持二层隔离三层互通,因此不支持此命令配置。
#HX
interface GigabitEthernet1/0/1
eth-trunk 1
#
interface GigabitEthernet1/0/2
eth-trunk 2
#
interface GigabitEthernet2/0/1
eth-trunk 1
#
interface GigabitEthernet2/0/2
eth-trunk 2
#
interface Eth-Trunk1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 4094
port-isolate enable group 1
port-isolate enable group 2
#
interface Eth-Trunk2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 4094
port-isolate enable group 1
#
#接入汇聚层仅配置上联交换机的下联口port-isolate
interface GigabitEthernet1/0/3
port link-type access
port default vlan 10
port-isolate enable group 1
#
interface GigabitEthernet1/0/4
port link-type access
port default vlan 10
port-isolate enable group 1
#
interface GigabitEthernet1/0/5
port link-type access
port default vlan 10
port-isolate enable group 1
#
interface GigabitEthernet1/0/6
port link-type access
port default vlan 10
port-isolate enable group 1
#
interface GigabitEthernet1/0/7
port link-type access
port default vlan 10
port-isolate enable group 1
这里使用的都是华为S5720系列,仅支持二层隔离
测试结果
同交换机
相同vlan相同group 隔离
相同vlan不同group 互通
不同vlan相同group 互通
不同vlan不同group 互通
跨交换机(上联交换机下联口没有配置port-isolate)
全部互通
跨交换机(上联交换机下联口配置port-isolate)
相同vlan相同group 隔离
相同vlan不同group 互通
不同vlan相同group 互通
不同vlan不同group 互通