VLAN configuration on Catalyst switch

My default, all VLANs configured in Catalyst switch can be communicated with each other and I  don't need to put "ip routing", correct ?

How to configure switch such that VLAN 3 can't communicate with VLAN 4?

Tks
AXISHKAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NetExpert Network Solutions Pte LtdTechnical SpecialistCommented:
Ip routing command is default in all the catalyst switched except Cisco 3560 and 3750 switches

If you don't want to communicate between vlans then you need to apply access list on the vlan interface
0
AXISHKAuthor Commented:
Any configuration example to follow ? Tks
0
AkinsdNetwork AdministratorCommented:
If you do "no ip routing", neither of the vlans will be able to communicate any where

Here's an example
- Assuming vlan 3 is 192.168.3.0 /24 and vlan 4 is 192.168.4.0 /24

- Create an access-list, you can call it anything. I used NO-VLAN4-COMM
ip access-list extended NO-VLAN4-COMM
 deny ip 192.168.3.0 0.0.0.255 192.168.4.0 0.0.0.255
 permit ip any any

- Apply the access-list to either vlan 3 or vlan 4. If vlan 3 (in), if vlan 4 (out). I applied it to vlan 3
interface vlan3
ip access-group NO-VLAN4-COMM in

Note the statement on the access-list. If you reverse it 4 eg to  
deny ip 192.168.4.0 0.0.0.255 192.168.3.0 0.0.0.255
Interpretation
deny ip source to destination

Then the direction when applying the access list would change also.
for vlan 3, out (for outbound), for vlan 4, in (for inbound)

The concept of inbound and outbound is a little confusing but you'll get used to it after a while of practice
0
AkinsdNetwork AdministratorCommented:
Here is a good explanation of how the traffic is treated.
See the link below and read through to Ahmed's comments
https://learningnetwork.cisco.com/thread/37163

In traffic: traffic that arrived on the Interface on which the ACL is applied on and then if permitted goes through the router.

Out traffic: traffic that has already been through the router and is leaving the interface on which the ACL is being applied on.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AXISHKAuthor Commented:
Tks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Switches / Hubs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.