L2 指定端口隔离模式为二层隔离三层互通。
All 指定端口隔离模式为二层三层都隔离。
拓扑如下:
<s1>dis cu
#
sysname s1
#
undo info-center enable
#
vlan batch 10 20
#
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
#
interface Vlanif20
ip address 192.168.20.254 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10
#
ip route-static 192.168.10.0 255.255.255.0 192.168.20.0
<s2>dis cu
#
sysname s2
#
undo info-center enable
#
vlan batch 10
#
interface Ethernet0/0/1
port link-type access
port default vlan 10
port-isolate enable group 1
#
interface Ethernet0/0/2
port link-type access
port default vlan 10
port-isolate enable group 1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
<s3>dis cu
#
sysname s3
#
undo info-center enable
#
vlan batch 20
#
interface Ethernet0/0/1
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 20
<s4>dis cu
#
sysname s4
#
undo info-center enable
#
vlan batch 10
#
interface Ethernet0/0/1
port link-type access
port default vlan 10
port-isolate enable group 1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10