Skip to main content

Mon, Mar 27, 2017 12:39 AM

Answered

Scripting commands in the CLI

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?

Responses

2 Messages

 • 

72 Points

3 years ago

I see there are no replies here.  I would interested in the same thing.  I assume the answer is no?

6 Messages

 • 

160 Points

3 years ago

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

2 Messages

 • 

72 Points

Thanks.  That will come in handy.

1 Message

 • 

64 Points

Use symbol ";" to separate your commands in one line.
How to set AP description?

1 Message

 • 

80 Points

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

1 Message

 • 

64 Points

a year ago

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

Employee

 • 

633 Messages

 • 

10.3K Points

a year ago

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        Sets the device name.
  bonjour-gateway
                       bind a bonjour gateway policy
  bonjour-fencing      Contains commands that can be executed from within the context.
  description    Sets the device description.
  gps
                       Sets the GPS coordinates.
  location       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      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
                       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         Sets ipmode of the AP.
  radio-band     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     Sets the PoE mode of the AP.
  802.3af-txchain
                       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).

Regards,

Syamantak Omer