09-27-2023 02:16 AM - last edited on 10-25-2023 04:33 AM by Translator
Hi All,
I have multiple VLANs and OSPF running on a L3 Switch. I want to prevent VLAN's 1,2 and 3 communicating with each other but each of the VLAN's should reach an external network via OSPF.
I tried configuring an ACL to prevent inter-VLAN routing but in that case my connection to the external network is also lost.
ip access-list extended AAA
deny ip any <SVI of VLAN B>
permit ip any any
exi
int vlan A
ip access-group AAA in
exi
I have tried to block just one VLAN for now but not successful.
Could anyone please help me with it?
Solved! Go to Solution.
09-27-2023 07:45 AM - last edited on 10-25-2023 04:06 AM by Translator
deny ip 10.169.10.128 255.255.255.192
any (check @Richard Burts note about wildcard)
permit ip any any
int vlan 100
ip access-group VLAN_A OUT
09-28-2023 12:30 AM
09-27-2023 02:27 AM - last edited on 10-25-2023 05:23 AM by Translator
From a high level your access list looks appropriate. But we do not have enough detailed information to identify the issue you are experiencing. Assuming that your vlans are using private addressing please tell us the IP addressing of the vlans (there is no need to disguise private addressing). And please post the exact syntax of your acl (
<SVI of VLAN B>
hides details that we need to know).
09-27-2023 02:36 AM - last edited on 10-25-2023 03:57 AM by Translator
Hi,
Thanks for the response,let me add that in
ip access-list extended VLAN_A
deny ip any 10.169.10.128 255.255.255.192
permit ip any any
exit
int vlan 100
ip access-group VLAN_A in
exit
09-27-2023 02:30 AM
Acl apply to SVI can not filter traffic toward SVI İp but it can filter traffic bypass SVI.
Here you can config acl in link toward aaa server not in SVI.
09-27-2023 02:36 AM
Hi ,
Thanks for the response,that was just a poor way of naming my ACL.
I have posted the exact config,please check above thread.
09-27-2023 02:45 AM - last edited on 10-25-2023 04:02 AM by Translator
10.169.10.128 <<- this for SVI vlan B?
If yes then only make acl direction OUT not IN
09-27-2023 03:40 AM - last edited on 10-25-2023 05:25 AM by Translator
Yes it is the
SVI for VLAN B
,do we have to retain the
permit ip any any?
I can still communicate between VLANs even after I change acl to OUT
09-27-2023 03:57 AM - last edited on 10-25-2023 05:26 AM by Translator
Can I see last config and
IP of svi vlan a and b
09-27-2023 07:41 AM - last edited on 10-25-2023 04:05 AM by Translator
The biggest issue is the mask used
deny ip any 10.169.10.128 255.255.255.192
which is a subnet mask. ACL should use
mask 0.0.0.127.
The access-group could be applied either IN or OUT. Whether the vlan B subnet is the source address or the destination address will depend on whether it is applied IN or OUT. If applied IN then it examines traffic come from connected hosts into the switch and vlan B wold be destination. If applied OUT then it examines traffic going from switch out to connected hosts and vlan B source.
And yes you do need to keep the
permit ip any any
09-27-2023 07:45 AM - last edited on 10-25-2023 04:06 AM by Translator
deny ip 10.169.10.128 255.255.255.192
any (check @Richard Burts note about wildcard)
permit ip any any
int vlan 100
ip access-group VLAN_A OUT
09-28-2023 12:03 AM
Hi
Thanks for the help.
I tried the suggested solutions on Packet Tracer and it worked. However I missed a very important detail.
I am running HSRP on two L3 switches where I am applying the ACL. Should I use the HSRP VIP or the SVI of each VLAN in the ACL.
09-28-2023 12:30 AM
Both.
09-28-2023 03:36 AM - last edited on 10-25-2023 04:07 AM by Translator
Hi,
Thanks that worked.
But as I am running HSRP I believe the HSRP packets are getting filtered out as well.
%HSRP-5-STATECHANGE: Vlan10 Grp 2 state Standby -> Active
*Sep 28 11:25:44.902 UTC: %OSPF-5-ADJCHG: Process 3, Nbr 10.169.10.227 on Vlan410 from INIT to DOWN, Neighbor Down: Dead timer expired
I believe this is the reason my hosts cannot reach the network.
Could you please help me fix this?
09-28-2023 04:21 AM - last edited on 10-25-2023 04:09 AM by Translator
Instead of deny the
IP deny udp 1812/1813
the
udp port
use by
aaa radius server
09-28-2023 03:17 AM - edited 09-28-2023 07:57 AM
@MHM Cisco World wrote:
Acl apply to SVI can not filter traffic toward SVI İp but it can filter traffic bypass SVI.
Oh? Hmm, I didn't know that. I'll set up a lab to confirm that.
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