Wireless Access

last person joined: 17 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

provision ap ip address via the controller command line

This thread has been viewed 5 times
  • 1.  provision ap ip address via the controller command line

    Posted Mar 25, 2014 05:05 PM

    Does anybody know how to provision an ap and give it a static ip address using the controller command line?

     

    I have 500 AP's that I would like to convert from DHCP over to static IP's, but I dont want to do them one by one in the controller GUI.  I would like to provision an ap via the controller command line and give each AP a static ip and subnet mask (I dont need a gateway or dns).

     

    I would also be interested in any other method of automating the assignment of static IP's to an AP.

     

    Thanks in advance!

     

    Tobias



  • 2.  RE: provision ap ip address via the controller command line
    Best Answer

    EMPLOYEE
    Posted Mar 25, 2014 06:14 PM

    You have a problem.

     

    This is the list of commands generated when you convert an AP from DHCP to Static:

    provision-ap copy-provisioning-params ap-name "Office-225"
    provision-ap installation default
    provision-ap ipaddr 192.168.1.197
    provision-ap netmask 255.255.255.0
    provision-ap gateway 192.168.1.254
    provision-ap dns-server-ip 8.8.8.8
    provision-ap domain-name none.com
    provision-ap no external-antenna
    provision-ap no usb-dev
    provision-ap no usb-dial
    provision-ap no usb-init
    provision-ap no usb-modeswitch
    provision-ap no usb-passwd
    provision-ap no usb-tty
    provision-ap no usb-type
    provision-ap no usb-user
    provision-ap server-name aruba-master
    provision-ap ap-group "default"
    provision-ap ap-name "Office-225"
    provision-ap no syslocation
    provision-ap no remote-ap
    provision-ap reprovision ap-name "Office-225"

     You would have to (1) identify the list of ap names you would need to convert (2) identify the range of static ip addresses you want to provision (3) write a script to merge the two (4) Hope you do not make any mistakes, because statically addressed access points do not recover themselves.

     

    Before embarking on this, the big question is why you would want to convert from DHCP to static, because statically ip addresses access points do not recover themselves.  In addition, if you accidentally configure a duplicate ip address for two, you probably will have to get into the ceiling to pull them down to reset them.  Also, if you ever decide to change the existing network below the access points to expand or re-number the network, you must manually change all 500 access points again.

     

    Aruba access points were designed to have DHCP addresses and the controller will keep track of the DHCP-assigned address, even if the access points are down.  If you have Airwave, that will also keep track of all the access points, in addition to historical information.  You are a couple mis-assigned static addresses from climbing into a ceiling if you do not use DHCP.  I would say that on a small scale, static ip addresses for access points is not bad.  On a large scale, it makes it much much more difficult, because you have to maintain a list of ip addresses to names of APs manually, which can be brutal....

     



  • 3.  RE: provision ap ip address via the controller command line

    Posted Mar 25, 2014 06:51 PM

    Thanks very much for this - it settles it for me - no statics on AP's.  I was trying to develop the script below and got very scared thinking about the damage I could do.

     

    This all started because we have the DHCP server for the AP's on the controller.  When adding a second controller for redundancy we discovered that you must split the DHCP scope between the controllers if you want DHCP to persist when one controller is down.  This means that in a controller outage, at least some AP's will get new IP addresses, forcing an AP reboot.  We did not have another redundant DHCP option so I started exploring static IP's on the AP's.

     

    We will get a redundant DHCP server setup going on a pair of new routers that will be going in soon.

     

    Thanks!



  • 4.  RE: provision ap ip address via the controller command line

    Posted Mar 27, 2014 03:41 PM

    @Canucklehead wrote:

    We will get a redundant DHCP server setup going on a pair of new routers that will be going in soon.

     

    Thanks!


    just my opinion, get a dedicated DHCP server. aruba mobility controller should control access points and transfer traffic, not hand out IPs, firewalls should block access, not hand out IPs, routers should route traffic not hand out IPs. if you cant do it any other way, sure you can combine things, but if you can, just use an actual DHCP server.



  • 5.  RE: provision ap ip address via the controller command line

    Posted Nov 13, 2017 12:45 AM

    Hi... Am in too same situation. need to configure 450 AP's as static IP address as per client standards.

    How did you create a scripts?



  • 6.  RE: provision ap ip address via the controller command line

    EMPLOYEE
    Posted Nov 13, 2017 03:19 AM

    Convince your customer that it is the wrong approach to use static ip addresses.  You would have to do the work up front, but when your customer has to maintain it, things like keeping track of static ip addresses can consume alot of time and are not worth it.



  • 7.  RE: provision ap ip address via the controller command line

    Posted Nov 13, 2017 07:39 AM

    I tried my best but no use, This is as per "Company" standards they are following the same world wide.

    I have another project with them were i have 1000 AP's. feeling clueless!!! if i get the script i will try it out to save some times.



  • 8.  RE: provision ap ip address via the controller command line

    EMPLOYEE
    Posted Nov 13, 2017 07:51 AM

    Please work with your local Aruba representative.  There is no existing script to convert from DHCP to static.  Even if there was a script, you are not just renaming an AP, you are changing the ap-group and also provisioning a static ip address, subnet mask and default gateway and dns sever which would make the script very complicated.

     

    Maybe there is a way, depending on your specific requirements, to do this easier.



  • 9.  RE: provision ap ip address via the controller command line

    Posted Nov 13, 2017 08:04 AM

    yeah got your point!

    Usually i used to create scripts in excel sheet to rename the AP's,once you prepare just copy and paste it in controller. you can rename all AP's just like that.

     

    So i was thinking to create similar kind of scripts in excel sheet and paste it in controller. wonder to know if anyone did this before :)



  • 10.  RE: provision ap ip address via the controller command line

    Posted Nov 14, 2017 08:50 PM

    @anish2018 wrote:

     

    So i was thinking to create similar kind of scripts in excel sheet and paste it in controller. wonder to know if anyone did this before :)



    yes, using scripts be it bash, perl, python to quickly generate complex CLI commands including the required "
    " and "!" is frequently used. It's relatively safe, just follow a couple of rules

     

    a) always test out your first one by itself, e.g. if your script generated the output for changing 1000 APs, just copy paste the very first one to make sure it works (e.g. verify it) since you are changing critical params which can maroon an AP

     

    b) always take chunks of the list, e.g. perhaps just do the work on 20-50 APs are a time, not more than that - e.g. do it in batches (despite that you have generated the CLI commands for 1000 APs)

     

    this can easily be done with whatever tool youre familar with, mind you as are doing ip addressing you would maybe take advantage of something like python or perl which have ip address libraries so you are doing something slightly more sophisticated than just $ipaddr += 1 between each AP

     

    just remember for IP addressing that if you get it wrong, the AP is stuck, so be cautious and test test test before pasting to the CLI.

     

     

     

     

     

     

     



  • 11.  RE: provision ap ip address via the controller command line

    EMPLOYEE
    Posted Nov 15, 2017 02:40 AM

    @anish2018 wrote:

    yeah got your point!

    Usually i used to create scripts in excel sheet to rename the AP's,once you prepare just copy and paste it in controller. you can rename all AP's just like that.

     

    So i was thinking to create similar kind of scripts in excel sheet and paste it in controller. wonder to know if anyone did this before :)


    It is not simple.  If you were going to boot up the APs using DHCP first, you would have to know:

     

    1 - What ip address the AP got via dhcp (the AP will not show up on the controller without an ip address).

    2 - What ip address, ap name and ap-group do you want the AP to have

    3 - Make sure the AP is terminated on the controller before running the script (the command will not work unless the AP is up, has an ip address and is terminated on the controller.

     

    By the time you do all three, you are pretty much doing what you just did manually.  Companies have standards, but they can be convinced of best practices if it is in their best interest.  Please work with your local Aruba Engineer to ensure that you are doing everything in your and your customer's best interest.  Having access points at scale in the 1000s can be very difficult to manage day 2 if you are using static ip addresses.