Wireless Access

last person joined: 23 hours ago 

Access network design for branch, remote, outdoor, and campus locations with HPE Aruba Networking access points and mobility controllers.
Expand all | Collapse all

Deleting multiple vlans and ip's from the cli

This thread has been viewed 10 times
  • 1.  Deleting multiple vlans and ip's from the cli

    Posted Jan 12, 2017 06:33 PM

    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.

     

    Thanks,

    Alfredo



  • 2.  RE: Deleting multiple vlans and ip's from the cli
    Best Answer

    Posted Jan 17, 2017 11:15 AM
    First you need to remove the IP under the Layer 3 VLAN to be able to remove the Layer 2 VLAN

    REMOVE IP ADDRESS:

    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

    REMOVE VLAN:

    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


  • 3.  RE: Deleting multiple vlans and ip's from the cli
    Best Answer

    Posted Feb 01, 2017 07:10 AM
      |   view attached

    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

    etc......

     

    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 :-) 

    Attachment(s)