• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 740
  • Last Modified:

Cisco Switch Vlan question

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,
Dave
0
dsterling
Asked:
dsterling
  • 2
  • 2
2 Solutions
 
mmichaCommented:
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.
0
 
dsterlingAuthor Commented:
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?

r/
Dave
0
 
usslindstromCommented:
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).
0
 
mmichaCommented:
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 #
0
 
dsterlingAuthor Commented:
Great answers, thank you
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now