Wireless Access

Reply
Highlighted
Occasional Contributor II

provision ap ip address via the controller command line

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

Guru Elite

Re: provision ap ip address via the controller command line

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....

 



Colin Joseph
Aruba Customer Engineering

Looking for an Answer? Search the Community Knowledge Base Here: Community Knowledge Base

Occasional Contributor II

Re: provision ap ip address via the controller command line

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!

Re: provision ap ip address via the controller command line


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.

Occasional Contributor II

Re: provision ap ip address via the controller command line

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?

Guru Elite

Re: provision ap ip address via the controller command line

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.



Colin Joseph
Aruba Customer Engineering

Looking for an Answer? Search the Community Knowledge Base Here: Community Knowledge Base

Occasional Contributor II

Re: provision ap ip address via the controller command line

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.

Guru Elite

Re: provision ap ip address via the controller command line

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.



Colin Joseph
Aruba Customer Engineering

Looking for an Answer? Search the Community Knowledge Base Here: Community Knowledge Base

Occasional Contributor II

Re: provision ap ip address via the controller command line

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

Frequent Contributor I

Re: provision ap ip address via the controller command line


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 "\n" 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.

 

 

 

 

 

 

 

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