Cisco Switch Vlan question

Posted on 2012-08-15
Last Modified: 2012-08-15
I'm asking this to get a better understating of how vlans on Cisco switches work.

If two layer 2 switches (SW 1, SW2) are connected and both have the same vlan50, when a user on SW 1 vlan 50 wants to communicate to another user on  SW2  vlan 50 will they be able to communicate or do they need a router/layer 3 switch to communicate?  

Thank you,
Question by:dsterling
    LVL 7

    Accepted Solution

    They would be able to communicate.  A router or layer 3 switch would be needed for intervlan communication though.

    You have to just setup trunk ports between the switches.

    Author Comment

    I should of mentioned that a trunk port was being used between the switches. So if a vlan 50 on one switch is a totally separate vlan50  from a valn 50 on a directly connected (over a trunk port) switch?  Meaning that vlans are only local to the switch not the domain? Also if layer 2 switches are directly connected (trunked), then any vlan on one switch can communicate with any vlan on the other switch, it's only when a vlan on one switch tries to communicate with a different vlan on the same switch that it needs a router?

    LVL 5

    Assisted Solution

    mmicha's right.

    In your network, as long as all of your switches have the same VLANs configured, everybody would be able to communicate to everyone else who's in the same VLAN.

    In your scenario, everyone in vlan 50 would be able to communicate to everyone else in the same vlan, regardless where they are in your physical topology.  The only caveat is that your going between multiple switches, that you "trunk" them - just like mmicha's instructing you to do.

    Basically, you connect the switches together just like normal, then issue these commands:

    interface fa0/1
      switchport trunk encap dot1q
      switchport mode trunk

    The next step would be to make sure that both switches actually have vlan 50.  Either use VTP to get the vlan information between the switches, or just create it manually on both sides.

    As soon as you do that, anybody on Switch A can talk to anybody on Switch B, as long as they're in the same vlan.

    That being said, to elaborate on what mmicha is saying on the "layer 3 switch" - is that if your device is only capable of running vlans at layer 2, you won't be able to have your clients in vlan "A" to talk to users that are in vlan "B" without some device in the middle that knows how to get to both networks.  If that makes sense.

    Basically, you'd either need a switch that's capable of putting IP Addresses on your vlans, or "trunk" a link to an upstream router that can then in turn do the routing between the newtorks for you.  (To be honest, a Layer 3 switch is the way to go if you can).
    LVL 7

    Expert Comment

    usslindstrom gave a great explanation.  Below is just a bit more if you don't know how to add a port to a vlan on a switch:

    int fa0/2
    switchport access vlan #

    Author Closing Comment

    Great answers, thank you

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Problem Description:   Couple of months ago we upgraded the ADSL line at our branch office from Home to Business line. The purpose of transforming the service to have static public IP’s. We were in need for public IP’s to publish our web resour…
    Getting hacked is no longer a matter or "if you get hacked" — the 2016 cyber threat landscape is now titled "when you get hacked." When it happens — will you be proactive, or reactive?
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now