Wireless Access

Contributor I

Deleting multiple vlans and ip's from the cli

Hi Guys,

Any idea is theres a way to delete the multiple ip address associated to the vlans at mass?  I have 300+ vlans to delete from 2 controllers each and each one of those vlans have ips on them.




Re: Deleting multiple vlans and ip's from the cli

First you need to remove the IP under the Layer 3 VLAN to be able to remove the Layer 2 VLAN


The easiest way is to go into the CLI run the show running-config | begin interface
Once you obtain all the information already configured, just copy and paste in Notepad ++

For example
Interface vlan 2
Ip address x.x.x.x x.x.x.x

Grab the "ip address" and replace it with "no ip address" and that will replace all the IPs under each Layer 3 VLAN

Interface vlan 2
No ip address

And the copy and paste


Then go back to the CLI and do a show vlan and that will provide all the VLANs configured in the controller, just copy and paste in Notepad ++

For example
vlan 2

And grab the "v" and replace it with "no v" and then that will remove all the VLANs.

No vlan 2

And the copy and paste
Thank you

Victor Fabian
Lead Mobility Architect @WEI
Contributor I

Re: Deleting multiple vlans and ip's from the cli

Thanks Victor!!  Your suggestion ended up leading me to the right path.  Another method I found was with the use of excel and notepad ++.  the cli command i was after interms of scripting was


interface vlan <ID> no ip address

but i needed to do this 600 times per controller x 4 :-)


- On an Excel spread sheet. I did the following;

  - column 1 : interface vlan

  - column 2 : <vlan id>

  - column 3 : no ip address

I did a file down from so i was able to get vlan id's 10-11 for instanace

so essentially it looked like this


no vlan 10 ipaddress

no vlan 11 ip address

no vlan 12 ip address



Copied and pasted all the filled cells in notepadd++

select all, edit -> Blank operations -> TAB to Space

copied the text/cli commands from notepad ++


pated in cli via putty and and voila.


It seems more convuleded than it really is.  It took roughly 5 minutes to get rid of 600 vlans on each of our 4 of my controllers.


I attached a test excel sheet along with the test txt file that has had the TAB converted in notepadd++.

NOTE: You will need to convert the TAB to spaces so the cli commands will work properly.  If you have not converted the TAB to spaces the controller will not like the pasted commands :-) 

Search Airheads
Showing results for 
Search instead for 
Did you mean: