09-25-2024 09:57 AM
I have a question about HSRP and ACL configuration on Cisco 4506 and 4506E switches.
Initially, without HSRP enabled, I configured the following ACL on the VLAN 55 interface:
Extended IP access list vlan55
10 permit ip any 192.168.104.32 0.0.0.15
20 permit ip any 192.168.165.32 0.0.0.15
With this configuration, VLAN 55 could successfully ping VLAN 104.
However, after enabling HSRP, this ACL stopped working. After some testing, I modified the ACL to:
Extended IP access list vlan55
10 permit ip any 192.168.104.32 0.0.0.15 log
20 permit ip any 192.168.165.32 0.0.0.15 log
30 permit ip 192.168.104.32 0.0.0.15 any log
40 permit ip 192.168.165.32 0.0.0.15 any log
50 permit ip 172.1.22.0 0.0.0.255 172.1.22.0 0.0.0.255
60 permit udp any host 224.0.0.2 eq 1985
70 permit udp host 224.0.0.2 any eq 1985
With this new configuration, VLAN 55 can now ping VLAN 104 again. As you can see, I added bidirectional traffic rules and HSRP-specific rules.
Can someone explain why this change was necessary when HSRP was enabled? Why didn't the original ACL work with HSRP, and why does this new configuration solve the problem?
09-25-2024 12:31 PM
Hello @poi05291 ,
there is an important detail missing : in which direction have you applied the extended ACL with name vlan55 ?
if applied inbound with
int vlan 55
ip access-group vlan55 in
the ACL will block HSRP hello packets sent by the neighbor in vlan 55.
the second info missing is : what is the IP address of SVI interface vlan 55 ?
Are there secondary IP addresses applied ?
In any case a multicast IP address like the all routers on segment 224.0.0.2 can never be an IP source in an IP packet so the following statement
70 permit udp host 224.0.0.2 any eq 1985
this is useless and it should have zero hits.
The best practice for inbound ACLs are :
allow traffic coming from directly connected IP subnet (s) more then one if there are secondary IP addresses.
having source any allows ip source spoofing attacks so the first two statements are not ideal:
10 permit ip any 192.168.104.32 0.0.0.15 log
20 permit ip any 192.168.165.32 0.0.0.15 log
the following lines can be good if the subnets are associated to vlan55 :
30 permit ip 192.168.104.32 0.0.0.15 any log
40 permit ip 192.168.165.32 0.0.0.15 any log
the next line:
50 permit ip 172.1.22.0 0.0.0.255 172.1.22.0 0.0.0.255
this is not useful if the ACL is applied to interface vlan55 ( routed ACL applied to SVI)
traffic is between hosts in the same subnet and it is bridged. A line like this can be used in a VACL that is a feature applied to the L2 VLAN 55 broadcast domain.
Hope to help
Giuseppe
09-26-2024 01:40 AM
Dear Giuseppe,
Thank you for your detailed analysis and suggestions. I appreciate your input and have made some changes based on your advice:
Thank you again for your helpful insights. Your expertise has been valuable in optimizing our ACL configuration.
09-25-2024 01:03 PM - edited 09-26-2024 01:45 AM
Before hsrp there was one GW
After hsrp and without permit hsrp in acl there are two GW
This traffic drop it because each host in different vlan use different GW
Check that by show standby
Check if both SW is active status
This case called dual active hsrp
MHM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide