04-27-2022 11:01 PM
Hi everyone,
I have got two vlans:
VLAN1 and VLAN2
I want to access only one pc(192.168.206.20) in VLAN2 from devices of VLAN1 and want to deny to other devices in VLAN2.
I tried with access list as below:
ip access list extended VLAN1
permit ip any host 192.168.206.20()
deny ip any any
Int vlan1
ip access-group VLAN1 out
But its not working.
Where i did wrong?
Thanks
04-27-2022 11:58 PM
Assuming 192.168.206.20 is in vlan 2 then you should apply the acl to the vlan 2 interface ie.
int vlan 2
ip access-group VLAN1 out
an acl applied inbound applies to traffic from the clients in that vlan and an acl applied outbound is for traffic to those clients.
Jon
04-28-2022 05:01 AM
ip access list extended VLAN1
permit ip any host 192.168.206.20-> permit ip host 192.168.206.20 any <-this change only
deny ip any any
Int vlan1
ip access-group VLAN1 out
04-28-2022 05:32 AM
That won't stop any client in vlan 1 sending traffic to vlan 2 devices which is the original requirement.
It will block return traffic but some traffic does not need the return traffic eg. SNMP commands etc.
Jon
04-28-2022 06:20 AM
04-28-2022 06:53 AM
Agreed, it does depend on which vlan that host is in.
Jon
04-28-2022 02:22 PM
Helo
It seems like this post is just an extension from a previous post - here
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