cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
97692
Views
40
Helpful
9
Replies

What is Layer 2 and Layer 3 VLAN

Hi Friends,

In an interview I have been asked "What is Layer 2 and Layer 3 VLAN ".

I answered them, Layer 2 VLAN is a single broadcast domain. It works on layer 2 (Datalink Layer). They can communicate only within it. 

And L3 VLAN is an Interface, that works on Network Layer. In order to do inter VLAN routing/ communication we need L3 interface (SVI).

But the interviewer wasn't happy and looking for some other answer from me.

Could any one please share the exact difference between Layer 2 and Layer 3 VLAN ?

 

9 Replies 9

Carlos Villagran
Cisco Employee
Cisco Employee

Hi!

I do not know if the interviewer had a lot of knowledge or it was just trying to confuse you, however please be aware that I consider your L2 VLAN answer partially correct (I will take it as correct in an interview). 

VLAN is a technology which defines broadcast domains in a layer 2 network. There is no such a thing as a L3 VLAN. 

Please refer to the following documentation for actual detail definition of it:

http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst4500/12-2/25ew/configuration/guide/conf/vlans.html

VLANs define broadcast domains in a Layer 2 network. A broadcast domain is the set of all devices that will receive broadcast frames originating from any device within the set.

Hope it helps, best regards!

JC

chad patterson
Level 1
Level 1

There actually are l2 VLANs and  L3 VLANs, according to Cisco canon.   So your answer was correct.

 

 

Capture.PNG

referenced from here:

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst4500/12-2/25ew/configuration/guide/conf/l3_int.pdf

 

This is late,but I felt I had to chime in for future readers. I believe Carlos may be right when it comes to "Layer 3 VLANS". A Layer 3 VLAN interface is different then an actual VLAN you create on a layer two switch. In other words, you wouldn't call it a "Layer 2 VLAN interface" because it's not an interface. And typically you wouldn't call an SVI a "Layer 3 VLAN". 

Joseph W. Doherty
Hall of Fame
Hall of Fame
I recall (?) a L3 VLAN being a VLAN dynamically built upon some kind of L3 information. (There's also L4 protocol based dynamically assigned VLANs.) For example, a port assigns its VLAN based on an IP address seen in the packet.

It's also possible the interviewer might have being thinking of a VRF, which is somewhat the L3 equivalent of a L2 VLAN.

In answering a question like this we should recognize that sometimes we are precise about terminology and sometimes we are sloppy and blur distinctions about terms such as vlan and whether it is layer 2 or layer 3. I agree that the technically correct and precise definition of vlan is that it a layer 2 entity. A vlan was introduced in switching technology to reduce the size of the broadcast domain and operates at layer 2. If we are going to be precise about our terms then a vlan operates only at layer 2 and not at layer 3. If we decide to get a bit sloppy about our terminology then we can consider the vlan interface which operates at layer 3 and provides services for the layer 2 operation. 

 

HTH

 

Rick

HTH

Rick

 

 


@Richard Burts wrote:

In answering a question like this we should recognize that sometimes we are precise about terminology and sometimes we are sloppy and blur distinctions about terms such as vlan and whether it is layer 2 or layer 3.



Hence I posted that this is Cisco canon, and then I used a reference from Cisco to show where I 
retrieved the canonical terminology. Since it is Cisco that we all get  our certifications from, there is no ambiguity here; there are definitely Layer 2 and Layer 3 VLAN interfaces. 

 

There are L2 vlans and L3 vlan interfaces but there is no such thing as a L3 vlan. 

 

The interviewer asked what a L3 vlan is and the answer should have been there is no such thing. 

 

Not wishing to start an argument but it is a key concept that people often get confused precisely because of this terminology. 

 

Jon

 

 

OP has:

"In an interview I have been asked "What is Layer 2 and Layer 3 VLAN "."
and
"Could any one please share the exact difference between Layer 2 and Layer 3 VLAN ?"

Since the OP also notes the interviewer wasn't satisified with the OP's answer, also describing a L3 VLAN interface, one cannot know what the interviewer might have had in mind. Probably the L2 VLAN is what we all expect. However, a L3 VLAN is ???

I remember a good question on these forums, years ago, is a switch L2 or L3 that cannot route but can do "things" with L3 information.  (EDIT - reason I mention this, I not aware of any specifc terminology, besides marketing terminolog, that precisely "defines" what kind of switch this is.   It's not just a "plain Jane" L2 switch, but it's not a MLS or L3 switch.  Usage of the term "L3 VLAN", might be a similar situation.  To the OP, if you encounter a similar situation in the future, ask the other party what they have in mind.)

BTW, I should have noted, my description of a L3 VLAN might have been from a non-Cisco vendor. Occassionally other vendors use different terms for the same concept.

Oh, I have come across some references using a VLAN solely as a L3 p2p link might call it a L3 VLAN.

Review Cisco Networking for a $25 gift card