Switchport mode trunk & switchport access

Unanswered Question
Jun 24th, 2007
User Badges:

Hi, I am just wondering why the config I am looking at has both of these commands:

switchport access vlan 13

switchport mode trunk

I thought the only command required to make a trunk was:

switchport mode trunk

Why would you need to add a port to VLAN before making it a trunk link seeing as though the trunk aggregates all VLANs anyway?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
farkascsgy Sun, 06/24/2007 - 22:57
User Badges:
  • Silver, 250 points or more


To set a port to trunk you don't need the switchport access vlan 13 command, but if this command is there it will not cause any problem since the switcport mode access command is not applied.

To use a port as trunk you need the following command:

switchport trunk encapsulation dot1q | isl

(on 29xx series device this command is not needed, they support only dot1q encapsultion, while higher ranges eg:3560,3750 support ISL and dot1q too)

switchport mode trunk

switcport trunk native vlan "vlan id" - if you want to change the native vlan (optional)

All in all you don't need add access vlan command if you use trunk mode.



Please rate me if I helped

royalblues Mon, 06/25/2007 - 00:16
User Badges:
  • Green, 3000 points or more

In addition to the above post, the port will fall back to the access vlan configuration if it were to lose the trunk status by some means.

You will also see this configuration on the ports connecting to a avaya VoIP phone where the port is configured as dot1q trunk with voice vlan and the data vlan is configured as an access vlan.

HTH, rate if it does


mohammedmahmoud Mon, 06/25/2007 - 01:03
User Badges:
  • Green, 3000 points or more


Totally agree with Narayan, i've seen this kind of configuration with Avaya VoIP phones, but as you know for Cisco IP phones you can always go to the auxiliary VLAN solution.


Mohammed Mahmoud.

upendra07 Mon, 06/25/2007 - 03:47
User Badges:


i have 20 vlan.can i give two number of vlan acess on the switchport


I have 1-20 vlan

can i give 1,2 vlan acess on the switchport.

it's not possible

I want to give two number of vlan acess on the switchport how can i do.

royalblues Mon, 06/25/2007 - 04:14
User Badges:
  • Green, 3000 points or more


you cannot assign two access vlan to a switch port. A switch port can only be a memeber of one vlan.

When you use VoIP phone and connect the PC to the Phone PC port, the switchport can be configured for an auxilary/voice vlan along with the access vlan.

HTH, rate if it does



This Discussion