Tại sao cần native vlan
11 Replies
Cisco switches always have VLAN 1 as the default VLAN, which is needed for many protocol communication between switches like spanning-tree protocol for instance.
You can't change or even delete the default VLAN, it is mandatory. The native VLAN is the only VLAN which is not tagged in a trunk, in other words, native VLAN frames are transmitted unchanged. Per default the native VLAN is VLAN 1 but you can change that: #show interface Fa0/8 trunk Port Mode Encapsulation Status Native vlan Fa0/8 on 802.1q other 1 (config-if)#switchport trunk native vlan 2 (config-if)#do show interface f0/8 trunk Port Mode Encapsulation Status Native vlan Fa0/8 on 802.1q other 2 The default VLAN is still VLAN 1. #show vlan id 1 VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/8, Gi0/1 HTH Rolf
HI Pradeep, This has already been discussed amny times: As for answering the initial question, let's make thing simple:
Let's get into some details now:
The error message can be seen in multiple situations:
Regards please rate if it helps. Hi Sandeep, Could you please give some more details on the scenario with native VLAN mismatch and the CDP warning? How could this produce any kind of loops? Natative VLAN is used for untagged traffic. If native VLAN differe between switches then it wont break the trunk rather CDP throws error message. for example you connect switch A to switch B, their native VLAN must be VLAN x on both switches.But if any Switch A has VAN x and Switch B has VLAN Y then you get error message. By default VLAN 1 i.e default VLAN is used as native VLAN. Thank you for the feedback sathvik. However, this does not answer my question. My question is how a L2 loop can happen while using CDP and different native VLANs across switches. An example or maybe a graph would certainly help a lot. Thank you It doesn't, by itself, create a loop. It's just when you start interconnecting switches, unintentionally interconnecting different VLANs (whether via a trunk's native VLAN [or via access port]) you may end up creating a loop or mixing VLAN traffic you didn't intend. What CDP does, it "flags" the VLAN mismatch. Thx Sandeep Choudhary for the explaination. I understand the theory. But I still have a hard time understanding the benefits of the Native Vlan. In what scenario will I want to have devices connected in an acces port x with vlan y that his my Native Vlan.... Thx Well you might have a scenario where different devices connect to a hub, and the hub connects to the switch port. The native VLAN would support devices using the hub that don't understand VLAN tags while other devices on the hub do support VLAN tags. (This isn't much of a common set up today, but during the transition from hubs to switches, it might have been encountered.)
Here is a CONCISE and UP TO THE POINT explanation and I quote:- Default VLAN: This can refer to one of two types. Typically, the default VLAN refers to the one that all of the ports on a device belong to when it is switched on. On most switches, this default is VLAN 1 and should be changed for security reasons. Some network managers may use the term “default VLAN” to refer to a VLAN to which all ports are assigned when they’re not being used. Native VLAN: The native VLAN is the one into which untagged traffic will be put when it’s received on a trunk port. This makes it possible for your VLAN to support legacy devices or devices that don’t tag their traffic like some wireless access points and simply network attached devices. Source: https://www.summitir.com/2017/08/30/vlans-types-benefits/ THIS answer actually answers the question for anyone confused by how the most upvoted answer. Very helpful definition. Thank you, Sandeep. Customers Also Viewed These Support Documents |