Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Understanding VLAN

I am having some trouble understanding VLANs... i know their benefits of cutting down on broadcasts, security, subnetting (layer 3) etc.

Here's what i dont get. In an enterprise network do you ever really use layer 2 vlans? For example if i put my servers on 1 vlan and workstations on another they will have to route between them. So when would we use the layer 2 vlans?

Also, how do we turn a layer 2 vlan into layer 3, is it simply by saying "int vlan x" ?

8 REPLIES

Re: Understanding VLAN

To route between vlans, you need a device thats capable of doing it. (Be it external router or be it a layer 3 switch). You create SVI interfaces such as "int vlan x" to route between them. If you dont create an SVI interface (and not assign ip addresses to that vlan), the vlan remains as layer 2 vlan. Ports assigned to this particular vlan will be in its own broadcast domain. There are situations where you want to segment devices to its own vlan (or preferably use an isolated switch). Using an isolated switch for this purpose can be expensive. If you have a switch already,you can carve out a few ports and assign them to an isolated layer 2 vlan.

HTH

New Member

Re: Understanding VLAN

so if you say "int vlan x, no ip address" what does this effectively do?

also why do we add to layer 3 vlans to the vlan database by saying

conf t

vlan 2

int vlan 2

Re: Understanding VLAN

Before you assign a port to a vlan, that vlan has to be created in the database. Thats when you do

R#conf t

R(config)#vlan 2 <--- creates vlan 2 in database.

R(config-vlan)#name TestVlan <-- gives a name to vlan 2

This has to be done regardless of whether you want to use this as a layer 2 only vlan, or you want to route traffic coming from vlan 2 to other vlans.

Once you decide to route this vlan, thats when you create an SVI interface by,

int vlan 2

ip add 172.16.1.1 255.255.255.0

if you remove this ip address off of the vlan 2 interface, traffic wont route from vlan 2 to other vlans..

HTH

New Member

Re: Understanding VLAN

this was incredibly helpful. so just to recap if i have a public VLAN that should not see the private vlans instead of making it layer 3 and using ACLs i would just not give the vlan an ip and it wont see it correct?

Re: Understanding VLAN

That's correct.

New Member

Re: Understanding VLAN

ok what is the difference from saying "vlan 2" and just naming it and assingning ports to "vlan 2, name some_name, int vlan 2, no ip address" ?

Purple

Re: Understanding VLAN

The term vlan 2 is a layer 2 vlan which creates your broadcast domain , any port assigned to "switchport access vlan2 is in this broadcast domain . The term "interface vlan 2" is for adding a layer 3 SVI for adding a address to the switch. If the switch is strictly a layer 2 switch then the only thing you can do with this address is to manage the switch , nothing else. If the switch is L2/L3 switch then this is how you create your subnets so that you can route between your subnets .

New Member

Re: Understanding VLAN

so on "int vlan x" by saying "no ip address" all i am doing is simply not giving a method to directly access that vlan by IP?

320
Views
0
Helpful
8
Replies
CreatePlease login to create content