cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1435
Views
11
Helpful
12
Replies

Native Vlan Missmatch

graphicdego
Level 1
Level 1

BEFORE YOU READ ! THIS IS JUST A QUESTION FOR UNDESTANDING HOW THE VLAN WORKS , THIS IS NOT HOW NATIVE VLAN ARE SUPPOSTED TO WORK ! DONT DO THIS ON YOUR NETWORK !!!!

Hello ,

Okay so i am learning still for networking and i google everything that i could possibly find for this kind of problem that i have , but i couldn't find anything that gives me the answer 100 % 

So my question is if we have 2 Switches and are configured like this 

SW 1 has a Native Vlan of 10 , and SW 2 has a Native vlan of 30 for ex .
A PC1 from SW 1 access port ( witch is assigned with a vlan 10 ) try to ping a pc in the SW 2 ( who is also at the vlan 30 or native vlan of the SW2 )

Will the SW2 forward the traffic , that arrives because the packed that SW1 sent is without any encapsulation and it actually pairs with the PC 2 ( the destination of the packet ) . 

Can someone explain me in detail , because i couldn't find any answer to my questions .

 

Best regards 
W1zz1 

1 Accepted Solution

Accepted Solutions

Sw1-trunk- SW2 

You use different native vlan 

And disable cdp (disable the notify of native vlan mismatch)

The PC in SW1 can connect to PC in SW2 BUT that not healthy at all.

View solution in original post

12 Replies 12

Sw1-trunk- SW2 

You use different native vlan 

And disable cdp (disable the notify of native vlan mismatch)

The PC in SW1 can connect to PC in SW2 BUT that not healthy at all.

M02@rt37
VIP
VIP

Hello @graphicdego,

The native VLAN is used for untagged traffic on trunk ports. It does not affect traffic on access ports. Access ports, like the ones connected to PCs, do not have VLAN tags on their frames. Therefore, the native VLAN setting is not relevant to the direct communication between PC1 and PC2.

Since PC1 and PC2 are in different VLANs (VLAN 10 and VLAN 30, respectively), they are considered to be in different Layer 2 broadcast domains. By default, switches will not forward traffic between different VLANs.

When a switch receives an untagged frame (like the ping packet from PC1), it associates it with the VLAN configured on the access port where it was received. In this case, PC1's traffic will be associated with VLAN 10 on SW1.

When the switch on SW1 receives a packet destined for PC2 (in VLAN 30), it doesn't have information about the destination MAC address in its MAC address table for VLAN 30. Therefore, it will treat it as an unknown unicast and flood the frame out to all ports in VLAN 10, excluding the port it was received on (this is known as unknown unicast flooding).

SW2, where PC2 is connected, will also receive the flooded packet in VLAN 10, but since PC2 is in VLAN 30, the switch will not have information about the destination MAC address in its MAC address table for VLAN 10. As a result, it will drop the packet.

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Hi @graphicdego 

 The scenario you propose will not work as the communication between vlan is not possible without a layer3 device.

 

It will work if the switch were Layer3 switch and have the command "ip routing" configured.

Furthermore, it need to have interface vlan on both vlans 10 and 30.  This way, if you setup vlan 10 as native on the switch1 it will complain about  vlan mismatch but the communication will happen.

FlavioMiranda_0-1690143230874.png

FlavioMiranda_1-1690143258243.png

FlavioMiranda_2-1690143292885.png

 

 

graphicdego
Level 1
Level 1

Okay so apparently if i turn off the STP & CDP there i could access the native Vlan in between . 

But with them ON its not doable , so it means that those two work as some detection of miss Native Vlan . 

So it means that if only the trunk port is in question it will pass , otherwise it wont . 

 

@MHM Cisco World , i did it on the lab so you actually need STP and CDP disable .
Cuz your answer was closes one , and gave me a hit where i should focus i think you need to know

@graphicdego,

Native VLAN is used for untagged traffic on trunk ports. It does not affect traffic on access ports. Access ports, like the ones connected to PCs, do not have VLAN tags on their frames. Therefore, the native VLAN setting is not relevant to direct communication between PCs connected to access ports.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

I understand that its a bad practice to put PC's with the access port of Native Vlan or to miss match the Vlan , i just tried to see worst scenarios and to make sure i understand VLANS in depth for myself . I understand the Native Vlan purpose , just my autistic head makes me wondering a lot of stuff .

Trunk or access port connect occurs.

Disable or enable cdp connect occurs' but with a lot of mismatch log in your console.

STP can be problem it can BLK ports but I think not all mode' I think RSTP can make connect occurs.

Note:- this not healthy please dont do that in real network.

No i just have stupid question in my head i mark that its not good for a real network , but my brain dont want just dont do it i want to learn it in depth thats why i asked this question  

Sure I know you want to learn not to apply to real network' but this post in cisco community' later if one see our answer without this note he may try it and that what I dont want.

We are here brothers and friends share our acknowledge and if there is small issue in our suggestion we must clarify it.

Thanks a lot 

Have a nice summer 

MHM

I edited the post , thanks for the help and opening eyes .

Peace , 

Thanks you to . 

With love ,
W1zz1

Joseph W. Doherty
Hall of Fame
Hall of Fame

Overlapping other posters . . .

Once you interconnect the trunk ports, they will exchange native VLAN traffic, much the same as two access ports, in two different VLANs also would.  I.e. in both cases, at L2, you've on the same broadcast domain.  (I'm ignoring CDP complaints and/or Cisco PVST considerations.)

I've just set up a quick test in Packet Tracer, PC0 <192.168.1.2/24 v10> switch1 <trunk - native 10:native 30 trunk> switch2 <v30 192.168.1.3/24> PC1, disabled STP on switch1 trunk, for V10, able to ping between PCs (on different VLANs).  CDP complains on both switches about a VLAN trunk mismatch (but you don't need to disable it to pass traffic), and PVST will block a VLAN, on trunk, if active, due to a VLAN mismatch in its BPDU.

As you're trying to understand VLANs, they are like separate L2 broadcast domain (logically same wire), but with multiple possible instances on a single switch.  VLAN tagging, is the way we can convey what VLAN a frame belongs to when passed between switches (internally to a switch, a switch can track VLAN membership, however it desires).  Cisco proprietary CDP and/or PVST are VLAN aware, or also use its own VLAN tagging, respectively, and will have issues when it "sees" unexpected VLAN mixing.

BTW, forgot to mention a trunk's native VLAN will also accept frames tagged for its VLAN.

For such tagged frames, you would be unable to intermix VLANs.

Also BTW, I believe most, if not all, other vendors do not support an untagged frame on their "trunks".

Also, VLAN tagged frames do not need a non-zero VLAN ID.  Such tagged frames can be used for CoS (including on access ports).

Lasty, access ports with a voice VLAN are also (special) trunk ports.

Review Cisco Networking for a $25 gift card