cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3753
Views
4
Helpful
2
Replies

"switchport access vlan" on a trunk?

markc.williams
Level 1
Level 1

I need confirmation of the "switchport access vlan" command below when the interface is configured as a trunk.

If a PC is connected to this interface, and it isn't trunking, traffic will be sent on VLAN 53 (Native)... right?

so, therefore, the "switchport access vlan 600" isn't being used? or does it serve another purpose when the interface is configured as a trunk?

(i know what the command does when the interface is configured as an access port)

!

interface FastEthernet2/0/27

switchport access vlan 600

switchport trunk encapsulation dot1q

switchport trunk native vlan 53

switchport trunk allowed vlan 53,600

switchport mode trunk

end

thanks in advance.

Mark

1 Accepted Solution

Accepted Solutions

Edison Ortiz
Hall of Fame
Hall of Fame

You have the command

"switchport mode trunk"

which means the switch will form an unconditional trunk. Even if the connected device does not support trunking, the switchport will be in trunk status. The connected device will discard the tagged Vlans if trunking is not supported but it will be able to connect by using the native Vlan which is untagged.

On your example, the connected device is using Vlan 53 and not Vlan 600 and having 'access vlan 600' serves no purpose.

HTH,

__

Edison.

View solution in original post

2 Replies 2

Edison Ortiz
Hall of Fame
Hall of Fame

You have the command

"switchport mode trunk"

which means the switch will form an unconditional trunk. Even if the connected device does not support trunking, the switchport will be in trunk status. The connected device will discard the tagged Vlans if trunking is not supported but it will be able to connect by using the native Vlan which is untagged.

On your example, the connected device is using Vlan 53 and not Vlan 600 and having 'access vlan 600' serves no purpose.

HTH,

__

Edison.

Yes, all that matters is what "switch mode" is set to.

Likewise, if you set "switch mode access", the native VLAN trunk setting will be ignored.

It would be nice if IOS took out the unused lines for you, but on the other hand it makes switching between trunk and access easy.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco