Scripting commands in the CLI

  • 3
  • Question
  • Updated 1 month ago
  • Answered
I'm looking to create a script to fill each AP's device name and description fields. I want to be able to rename them all with a few clicks, not manually change each AP in the CLI/GUI. However, there doesn't seem to be a way for me to send a string of commands in one go.

Is there a way to feed a bunch of commands to the unit?
Photo of CFJ

CFJ

  • 1 Post
  • 0 Reply Likes

Posted 3 years ago

  • 3
Photo of James Britt

James Britt

  • 2 Posts
  • 0 Reply Likes
I see there are no replies here.  I would interested in the same thing.  I assume the answer is no?
Photo of tjeerd kootstra

tjeerd kootstra

  • 6 Posts
  • 1 Reply Like
maybe not perfect but...
from the ssh shell to the controller i could do :
- remote ap-cli 0C:F4:D5:19:92:60 "set device-name abc"

now... all we need is a way to copy multiple lines to an ssh shell.. but have a few sec delay between each line

you can find the commands between the quotes by accessing an ap directly thru ssh
Photo of James Britt

James Britt

  • 2 Posts
  • 0 Reply Likes
Thanks.  That will come in handy.
Photo of Okaho Xiti

Okaho Xiti

  • 1 Post
  • 0 Reply Likes
Use symbol ";" to separate your commands in one line.
How to set AP description?

Photo of Alex Scott

Alex Scott

  • 1 Post
  • 1 Reply Like
I use an Excel table to auto fill all of the variables for the following commands and then I drop it right into the ZD CLI (need to be in enable and config modes). This also assumes that you have set your AP Group to IPv4 Only.

ap AA:BB:CC:DD:EE:FF
group name 'GroupABC'
devname 'AP-DEF'
description 'GHI'
location 'JKL'
ip mode static
ip addr 192.168.1.x 255.255.255.0
ip name-server 8.8.8.8
exit

Photo of Tangaki

Tangaki

  • 1 Post
  • 0 Reply Likes
I know this topic might be old, but I need an answer. I work in a company which sets up many Ruckus Wireless solutions. 
It would be very useful for later, and today I have to rename 500 APs...I can't do this by hand
Photo of Syamantak Omer

Syamantak Omer, Employee

  • 71 Posts
  • 32 Reply Likes
Hi Tangaki,

You can create a script (it is more of a copy paste job) and you can modify number of APs in one go (I will suggest to do 20-30 AP at a time).

Please follow the steps:

1- SSH into the ZD
2- Go to enable mode (enable)
3- Go to config mode (config)
4- Now use below command to enter into specific AP's configuration mode (where xx:xx:xx:xx:xx:xx is AP's MAC address)

ap xx:xx:xx:xx:xx:xx 

5- Now modify AP's name

devname AP1
end

6- Change description

description Backyard
end

7- Now repeat the steps 4  to 6 to modify next AP and so on...

Note: Below AP details/configuration can be modified by above procedure.

devname <WORD>       Sets the device name.
  bonjour-gateway <WORD>
                       bind a bonjour gateway policy
  bonjour-fencing      Contains commands that can be executed from within the context.
  description <WORD>   Sets the device description.
  gps <GPS-COORDINATE>
                       Sets the GPS coordinates.
  location <WORD>      Sets the device location.
  group                Contains commands that can be executed from within the context.
  ip                   Contains commands that can be executed from within the context.
  ipv6                 Contains commands that can be executed from within the context.
  radio                Contains commands that can be executed from within the context.
  mesh                 Contains commands that can be executed from within the context.
  maxhops <NUMBER>     Sets mesh max hops number (0-3) of the AP.(0:unlimited)
  status-leds          Contains commands that can be executed from within the context.
  status-lacp          Contains commands that can be executed from within the context.
  usb-port             Contains commands that can be executed from within the context.
  poe-out              Contains commands that can be executed from within the context.
  external-antenna     Contains commands that can be executed from within the context.
  spectra-analysis     Contains commands that can be executed from within the context.
  internal-heater      Contains commands that can be executed from within the context.
  cband-channels       Contains commands that can be executed from within the context.
  cband-license        Contains commands that can be executed from within the context.
  usb-software <VID-PID-VERSION>
                       Sets VID-PID and VERSION of the AP USB Software Pacakge.
  port-setting         Configures the AP port and overrides the global AP mode configuration.Enters
                       ruckus(config-ap-model)#
  ipmode <WORD>        Sets ipmode of the AP.
  radio-band <WORD>    Sets radio band of the AP.
  show                 Displays the Device's current settings.
  venue-name           Contains commands that can be executed from within the context.
  lldp                 Contains commands that can be executed from within the context.
  power-mode <WORD>    Sets the PoE mode of the AP.
  802.3af-txchain <WORD>
                       Sets the 2.4GHz radio transmit chains in 802.3af PoE mode of the AP.

======================================================

Example display:

Please login: admin
Password:
Welcome to the Ruckus Wireless ZoneDirector 1200 Command Line Interface
ruckus> enable
ruckus# config
You have all rights in this mode.
ruckus(config)# ap 18:7c:0b:19:15:10
The AP '18:7c:0b:19:15:10' has been loaded. To save the AP, type 'end' or 'exit'                                   
ruckus(config-ap)# devname AP1
The command was executed successfully. To save the changes, type 'end' or 'exit'.
ruckus(config-ap)# description Backyard
The command was executed successfully. To save the changes, type 'end' or 'exit'.
ruckus(config-ap)# end
The device information has been updated.
Your changes have been saved.
ruckus(config)# ap 58:b6:33:14:33:30
The AP '58:b6:33:14:33:30' has been loaded. To save the AP, type 'end' or 'exit'.
ruckus(config-ap)# devname AP2
The command was executed successfully. To save the changes, type 'end' or 'exit'.
ruckus(config-ap)# description Garden
The command was executed successfully. To save the changes, type 'end' or 'exit'.
ruckus(config-ap)# end
The device information has been updated.
Your changes have been saved.

========================================================

Command script format:

ap xx:xx:xx:xx:xx:xx
devname AP1
description Backyard
end

ap xx:xx:xx:xx:xx:yy
devname AP2
description Garden
end
.
.
.
ap xx:xx:xx:xx:xx:zz
devname AP3
description Reception
end

Add more entries like above and just copy paste it in ZD CLI (make sure you are in config mode before you paste).
(Edited)