Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

"switchport access vlan" on a trunk?

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
Hall of Fame Super Bronze

Re: "switchport access vlan" on a trunk?

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.

2 REPLIES
Hall of Fame Super Bronze

Re: "switchport access vlan" on a trunk?

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.

Bronze

Re: "switchport access vlan" on a trunk?

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.

2157
Views
4
Helpful
2
Replies
CreatePlease login to create content