Changing Switchport Mode From Access To Trunk

Answered Question
Jun 24th, 2009

hi experts,

i have 2 3560 trunked together and currently working (by show cdp neighbor and ping). i would like to verify with you guys if changing the switchport mode from access (removing the switchport mode access and switchport access vlan x lines) to trunk (switchport mode trunk) will cause a temporary disconnection or outage on the other switch. below is the config i want to accomplish:

AS-01-ALPHA#sh run int g0/24

Building configuration...

Current configuration : 316 bytes

!

interface GigabitEthernet0/24

switchport access vlan 111

switchport trunk encapsulation dot1q

switchport trunk allowed vlan 111,1076

switchport mode access

switchport voice vlan 1076

no logging event link-status

priority-queue out

mls qos trust dscp

no snmp trap link-status

spanning-tree portfast

end

AS-02-ALPHA#sh run int g0/24

Building configuration...

Current configuration : 316 bytes

!

interface GigabitEthernet0/24

switchport access vlan 111

switchport trunk encapsulation dot1q

switchport trunk allowed vlan 111,1076

switchport mode access

switchport voice vlan 1076

no logging event link-status

priority-queue out

mls qos trust dscp

no snmp trap link-status

spanning-tree portfast

end

CHANGE TO:

interface GigabitEthernet0/24

switchport trunk encapsulation dot1q

switchport trunk allowed vlan 111,1076

switchport mode trunk

no logging event link-status

priority-queue out

mls qos trust dscp

no snmp trap link-status

I have this problem too.
0 votes
Correct Answer by Giuseppe Larosa about 7 years 5 months ago

Hello John,

in the same session if you wait a few seconds after having added switchport mode trunk on the core facing switch (but before you did on remote end).

I did several times this kind of operation follow the steps on my first post.

Hope to help

Giuseppe

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (3 ratings)
Loading.
Giuseppe Larosa Thu, 06/25/2009 - 00:49

Hello John,

configure remote switch first and give the

swithport mode trunk as last command.

You may lose it.

Note A little refinement could be:

switchport trunk native vlan 111 to handle untagged frames in vlan111.

this should allow you to keep the connection to remote site switch

On another vty session configure the other switch port as L2 trunk.

At this point you should get them working.

Hope to help

Giuseppe

johnlloyd_13 Thu, 06/25/2009 - 23:14

hi guiseppe,

on your statement, "You may lose it."

does this mean i would lose my telnet session on the remote switch after issuing the 'switchport mode trunk command'? am i able to re-connect on the same session (after waiting for few seconds) or do i need to open another one?

Correct Answer
Giuseppe Larosa Fri, 06/26/2009 - 01:00

Hello John,

in the same session if you wait a few seconds after having added switchport mode trunk on the core facing switch (but before you did on remote end).

I did several times this kind of operation follow the steps on my first post.

Hope to help

Giuseppe

johnlloyd_13 Fri, 06/26/2009 - 03:24

thanks giuseppe!!! just wana make sure. before i config for speed and i lost my telnet session.

mariorui Thu, 06/25/2009 - 17:05

johnlloyd_13,

Forming a trunk between the 3560's would require:

"switchport mode trunk"

One thing to note, is that this will also enable Dynamic Trunking Protocol or DTP. This is important to note because the 3560 default is to be "dynamic auto". This essentially means that the switch will wait for the opposing end to initiate the trunk. If both ends are set to "dynamic auto" a trunk will not form. To disable DTP frame from being generated on the trunk:

"switchport nonegotiate"

Entering this command will force the port to trunk. You would want to put this on both ends of a trunk.

To be safe, copy the vlan numbers that are currently traversing those interfaces that are to be modified to trunk, and make sure that you explicitly allow those on the trunk. To be safe, allow all vlans through, so to ensure connectivity. Once you have confirmed that both ends of the trunk are properly working and you can ping devices on those respective vlan, manually prune the trunk links by removing the unnecessary vlans from the trunk using the command:

"switchport trunk allowed vlan {add|all|except|remove} "

To verify the trunk is working properly issue the command:

"show interface trunk"

This will show you the port, mode, encapsulation, status, and native vlan.

You can also issue:

"show interface status"

If you need more info, see here:

http://www.cisco.com/en/US/docs/switches/lan/catalyst3560/software/release/12.2_46_se/configuration/guide/swvlan.html#wp1200245

Hope this helps!

- Mario Ruiz

Actions

This Discussion