基于VLAN的ACL

网络工程 VLAN ACL 生命值
2021-07-16 03:03:26

我正在尝试在 hp 2530 上学习 ACL。当我使用 : sh access-list命令时,将显示以下内容:

ACL-NAME-STR          Show detailed information for an ACL.
 config                Show all configured ACLs on the switch with the CLI
                       syntax used to create them.
 ports                 Show ACLs applied to the specified ports.
 radius                Show ACLs applied via RADIUS.
 resources             Show ACL resource usage and availability.
 vlan                  Show ACLs applied to the specified VLAN.

我不知道如何配置基于 vlan 的 ACL。有人请帮助。

1个回答

首先定义规则,例如拒绝任何地方的 192.168.1.1 DNS 访问,允许其他所有内容: ip access-list extended "rulename" 10 deny udp 192.168.1.1/32 any eq 53 log 9999 permit ip any any exit

然后将规则应用到 VLAN 99: vlan 99 ip access-group "rulename"

编辑:deny ip any any如果没有明确覆盖,有一个隐式的最后一个条目将丢弃 VLAN 中的所有剩余流量。由于您仍然熟悉 ACL,因此我想说明这一点。