实验需求,主机A,B,C同属于vlan10,现在想让主机A和B不能互访,然后主机C可以分别与他们通信。
我们可以通过ACL4000来实现。
拓补图如下

代码如下
LSW1:
#
sysname test
#
undo info-center enable
#
vlan batch 10
#
dhcp enable
#
acl number 4000
rule 5 deny destination-mac 5489-98c0-055a source-mac 5489-9832-6eef
#
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
dhcp select interface
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
traffic-filter inbound acl 4000
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
#
#
interface GigabitEthernet0/0/24
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10
#
LSW2:
#
sysname test2
#
undo info-center enable
#
vlan batch 10
#
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/24
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10
#
本文介绍如何通过华为交换机的ACL4000配置,实现主机A和B在vlan10中相互隔离,同时允许主机C与它们进行通信。实验配置包括在LSW1和LSW2上设置MAC地址过滤,以达到访问控制目的。

2187

被折叠的 条评论
为什么被折叠?



