1

I had a question about a vlan I accidentally added a port to. I have a cisco 2960x 48 port switch. I entered the incorrect port and added it to our wireless vlan. The port is a trunked port to my router in the MDF. I entered the following command

sw1(config-if)#switchport access vlan 12

now I get the following from

sw1#show run inter gi1/0/49

interface GigabitEthernet1/0/49
 description ->MDF-RT01
 switchport access vlan 12
 switchport mode trunk
 logging event spanning-tree
 srr-queue bandwidth share 1 50 30 20
 srr-queue bandwidth shape 5 0 0 0
 priority-queue out 
 mls qos trust dscp

I want to remove the vlan 12 from the config without disallowing it across the trunk.

my only idea is to use the command

sw1(config-if)#no switchport access vlan 12

Does anyone have any advice?

4

In Cisco devices you can do the command with no in front of it: no switchport access vlan 12.

Putting the access VLAN on a trunk port does nothing unless the trunk goes down and the port reverts to an access port. You have it nailed up as a trunk port. The access VLAN statement is doing nothing.

3
  • Yep because you haven't specific your trunk allowed list - you are ultimately trunking ALL VLANS - removing access VLAN will not affect this.
    – Smithy2k3
    Sep 23 '15 at 21:18
  • 1
    The other option in most versions of IOS besides using the no in front is to set it back to the default, in this case it would be switchport access vlan 1.
    – YLearn
    Sep 24 '15 at 4:14
  • Thank you for your prompt reply. This was precisely the information I needed. Sep 24 '15 at 6:51
-1

Not exactly an answer, but on IOS you define a vlan as "native" if you want it to go out a trunkport not dot1q tagged.

As the above comments have stated, removing the access statement should be harmless and is good housekeeping.

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.