3

I have a situation where I have a switch with 2 vlans, that needs to connect to an upstream router -- which does not and will not know abut my VLANS (this is in a datacenter, where I cant change this directly).

I have 2 vlans:

  1. VLAN 1 - Internal management traffic
  2. VLAN 24 - External traffic

Essentially, I want the port which connects upstream to

  1. Assign untagged incoming traffic as VLAN 24.
  2. Untag all outgoing traffic (only VLAN24, VLAN1 can be dropped).

I have read many conflicting things online as to what happens when untagged traffic arrives on an ACCESS or TRUNK port. How does this behave for each?

I currently have this set to ACCESS UNTAGGED with a PVID of 24. Is this correct?

  • 1
    For Cisco devices: "When a Cisco switch trunk port receives untagged frames (which are unusual in a well-designed network), it forwards those frames to the native VLAN. If there are no devices associated with the native VLAN and there are no other trunk ports (which is not unusual), then the frame is dropped." – Adam Hornyak Apr 8 '15 at 1:57
  • 1
    Your configuration is correct: access port, pvid 24. – Ron Trunk Apr 8 '15 at 3:16
2

As Adam stated, generally in a well designed network, you should not be receiving untagged frames on a trunk port. Based on your description, you only want and expect to send and receive VLAN 24 on the uplink port. Thus, configure the port as an access port in VLAN 24:

interface gig0/1
 switchport access vlan 24

If for whatever reason this needs to remain a trunk port, but you still only want VLAN 24 (untagged), then configure as a trunk, but set the native VLAN to 24:

interface gig0/1
 switchport trunk encapsulation dot1q  !may not be necessary depending on hardware
 switchport mode trunk
 switchport trunk native vlan 24
  • Based on his question, I doubt he's using a Cisco switch. – Ron Trunk Apr 8 '15 at 13:08
  • Good point. My bad. – Ryan Apr 8 '15 at 13:56
  • I do have a cisco switch on hand. However, this one in particular isn't a cisco one, but is heavily inspired by it -- these configs are similar and still useful. – Adam Thomas Apr 8 '15 at 17:33
0

As others ave already indicated to some extent, when you choose to use an access port with a single VLAN and configure it with vlan 24 native vlan. Technically it somewhat of a misnomer to use the term access port, I still use thee term also but it is easier for me to think of it as a native access link. Similar to what occurs with vlan 1 if we were to use it in a production environment and it was the only VLAN in town, switchports wouldnt tag the frames and the data would be sent to VLAN 1 for handling and the traffic would be untagged.

I dont know for sure but it makes sense to me logically that when they came up with the concept it made it easier to have the default native vlan (#1) not tag its trafficfor simplification of communication. The true story, I will probably never know.

I'm sending over a link to a site which explains the concept rather thoroughly, it is a site I found a few years ago and it generally has some good info.

https://rednectar.net/2012/03/11/the-access-vlan-is-dead-long-live-the-native-vlan/

Hope that helps,

Enjoy!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.