Quick VLAN Question.

Answered Question
May 26th, 2009

I've noticed in my L2 2960 Cisco switch that you can configure a VLAN by typingg in (from global config mode):

vlan #

or

int vlan #

My question is, why is there these two options?

I can assign a name to my VLAN when i type in

vlan 20

name (name)

but not when I go

interface vlan 20

name (name)

unrecognized command.

So my question is, what's the difference between the two?

Thanks a lot =)

Correct Answer by Jon Marshall about 7 years 9 months ago

Nelson

Apologies, should have been more specific :-).

Where i said

"The 2960 is a L2 switch only so you can only create 1 L3 vlan interface and this interface is used so you can remotely connect to the switch."

i should have said that you can create more than 1 L3 vlan interface but only one can be active ie up/up at one time.

Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (2 ratings)
Loading.
Jon Marshall Tue, 05/26/2009 - 12:23

Nelson

They are not the same thing.

1) vlan in global config mode creates the vlan at layer 2. You can create multiple vlans at layer 2 on the 2960 switch and you can then allocate ports into these vlans.

2) int vlan 20

this does not create a L2 vlan. It creates a L3 vlan interface or SVI (Switched Virtual Interface). To route between vlans you need L3 vlan interfaces. The 2960 is a L2 switch only so you can only create 1 L3 vlan interface and this interface is used so you can remotely connect to the switch.

A L3 switch such as the 3560/3750/4500/6500 can have multiple L3 vlan interfaces.

So L2 switch can have multiple L2 vlans + 1 L3 vlan interface.

L3 switch can have multiple L2 vlans + multiple L3 vlan interfaces.

Jon

nelson.garcia Tue, 05/26/2009 - 12:53

Just a quick followup Jon. While I don't deny that your answer was correct. I tested out what you said about L2 switches only allowing 1 L3 VLAN interface.

I went into global config mode and created

int vlan 20

ip address # subnet #

and

int vlan 30

ip address # subnet #

I then (from privileged exec mode) typed

sh ip int bri

and both interface vlan 20 and interface vlan 30 showed up on the list, albeit down.

Is this supposed to happen?

Correct Answer
Jon Marshall Tue, 05/26/2009 - 13:15

Nelson

Apologies, should have been more specific :-).

Where i said

"The 2960 is a L2 switch only so you can only create 1 L3 vlan interface and this interface is used so you can remotely connect to the switch."

i should have said that you can create more than 1 L3 vlan interface but only one can be active ie up/up at one time.

Jon

Actions

This Discussion