2

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?

2 Answers 2

5

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. Commented Sep 23, 2015 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. Commented Sep 24, 2015 at 4:14
  • Thank you for your prompt reply. This was precisely the information I needed. Commented Sep 24, 2015 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.