3

How can I delete a VLAN config from a Cisco 887VA with IOS 15.3?

For some testing I have created VLAN2 and no longer need it but now I can't get rid of it from show running-config.

From config mode I tried:

  • interface vlan 2shutdown
  • no vlan 2
  • write mem

But even after reload the VLAN is still showing up running-config.

Not that it's a big issue but it's polluting the config...

4 Answers 4

11

no vlan 2 deletes VLAN 2 from the VLAN database. If you want to delete the VLAN2 SVI, you need to type no interface vlan2.

0
2

Some versions of the Cisco IOS for 87x routers have the vlan 2 hardcoded, you cannot delete it!

Router(config)#no vlan 2
%Default VLAN 2 may not be deleted.
Router(config)#
0

There are two ways how to do it.

1.) Check the whole configuration of SVI Vlan 2 - is there command switchport access vlan 2 ? If yes, just change it to default - switchport access vlan 1, then remove vlan 2 again and verify via show vlan command.

2.) If you are using only default Vlans 1 and 1002 - 1005 you can just delete the whole vlan.dat from flash and reload the switch. This will delete your unwanted Vlan for sure.

3
  • There is no vlan.dat on Cisco routers, only on switches.
    – Elektordi
    Aug 16, 2019 at 14:46
  • @Elektordi You may want to look at Routers with integrated switches, such as the 880 and 890 series, and then revise your comment. They do have vlan.dat files. Aug 18, 2019 at 9:43
  • Just tested on a C1111 router with integrated switch, there is indeed a vlan.dat, you are right... Sorry!
    – Elektordi
    Aug 26, 2019 at 18:18
0

Just in case anyone looks for an answer relating to a similar router.

Some Cisco devices use the VLAN database.

router#vlan database

% Warning: It is recommended to configure VLAN from config mode,
  as VLAN database mode is being deprecated. Please consult user
  documentation for configuring VTP/VLAN in config mode.

! Once in the VLAN database you can then delete the VLANs you no longer need.

router(vlan)#no vlan 2

router(vlan)#apply

router(vlan)#exit

That will remove the VLAN

To view VLANS you may need to use the show vlan-switch brief command, that will show you all the VLANs that have been configured on the device.

1
  • That is true for very old devices and mostly routers with switch-port linecards. Feb 28, 2020 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.