Example for Configuring Interface Isolation
Networking Requirements
As shown in Figure 2-2, PC1, PC2, and PC3 belong to VLAN 10. PC1 and PC2 are not allowed to communicate with each other in VLAN 10, but they are allowed to communicate with PC3.
Configuration Roadmap
The configuration roadmap is as follows:
# By default, interfaces are isolated at Layer 2 but can communicate at Layer 3. You can add interfaces to an isolation group to implement Layer 2 isolation between these interfaces.
Procedure
- Configure interface isolation.
# Configure interface isolation on Ethernet2/0/0.
<Huawei> system-view [Huawei] interface ethernet 2/0/0 [Huawei-Ethernet2/0/0] port-isolate enable [Huawei-Ethernet2/0/0] quit
# Configure interface isolation on Ethernet2/0/1.
<Huawei> system-view [Huawei] interface ethernet 2/0/1 [Huawei-Ethernet2/0/1] port-isolate enable [Huawei-Ethernet2/0/1] quit
- Verify the configuration.
PC1 and PC2 cannot ping each other; PC1 and PC3 can ping each other; PC2 and PC3 can ping each other.
Configuration Files
Configuration file of Huawei
# sysname Huawei # interface Ethernet2/0/0 port link-type access port default vlan 10 port-isolate enable group 1 # interface Ethernet2/0/1 port link-type access port default vlan 10 port-isolate enable group 1 # interface Ethernet2/0/2 port link-type access port default vlan 10 # return