Automatic Provisioning using USB Flash Drive
The device can be automatically provisioned using an external USB hard drive or flash drive (disk on key) connected to its USB port. To do this, you need to create a CLI script file named "ac_autorun.txt" that contains your desired configuration based on CLI commands, and then save it to your USB flash drive. Once you plug the USB flash drive into the device's USB port, the device automatically runs the commands in the "ac_autorun.txt" file, line-by-line similar to a Telnet connection (CLI session).
The CLI script file can contain any type of configuration - system, voice, and/or data-router. This can include, for example, automatic update settings such as URLs from where software and Auxiliary files can be downloaded. URLs can also point to the USB flash drive itself, where the files to be downloaded are located. The CLI script file can also include commands that are related to device status and diagnostics such as show and debugging commands. The device provides you with the results (CLI output) of running these commands in a text file named ac_output.txt, which it sends to the USB flash drive upon completion of the process. Therefore, you can also use this tool for fast-and-easy troubleshooting. Note that the ac_output.txt file also includes the CLI output of the configuration commands, providing you feedback on the success or failure of each command.
As the device treats the commands in the ac_autorun.txt file as a regular console input, the CLI script must be written in the same format as if you are in a "live" CLI session with the device, but without the CLI prompts. In other words, you need to provide the following:
|
■
|
Login credentials for accessing the CLI session and the "privileged" (enabled) mode. |
|
■
|
Full path to each command, including navigation between commands using the exit command for leaving command paths. |
An example of a CLI script format in the ac_autorun.txt file is shown below. The example provides basic configuration to the device for the administrator to log on remotely. The configuration sets the WAN Gigabit Ethernet interface IP address to 100.0.10.10 and allows SSH connection from the WAN interface.
Admin
Admin
en
Admin
configure data
interface GigabitEthernet 0/0
ip address 100.0.10.10 255.255.0.0
exit
exit
configure system
cli-terminal
set ssh on
set wan-ssh-allow on
exit
exit
reload now
The CLI output of the above example which the device sends to the USB flash drive in the ac_output file is shown below:
Welcome to AudioCodesCLI
Username: Admin
Password:
MSBR> en
Password:
MSBR# configure data
MSBR(config-data)# interface GigabitEthernet 0/0
MSBR(conf-if-GE 0/0)# ip address 100.0.10.10 255.255.0.0
MSBR(conf-if-GE 0/0)# exit
MSBR(config-data)# exit
MSBR# configure system
MSBR(config-system)# cli-terminal
MSBR(cli-terminal)#
activate defaults exit help
history list pwd quit
set
MSBR(cli-terminal)# set ssh on
MSBR(cli-terminal)#
activate defaults exit help
history list pwd quit
set
MSBR(cli-terminal)# set wan-ssh-allow on
Note: Setting the parameter requires a reset.
MSBR(cli-terminal)*# exit
MSBR(config-system)*# exit
MSBR*# write
Writing configuration...done
MSBR*#
|
➢
|
To automatically provision the device using a USB flash drive: |
|
1.
|
Using a basic text-editing program such as Notepad, create a new text file. |
|
2.
|
Type the desired CLI commands in the file. |
|
3.
|
Save the file as "ac_autorun.txt". |
|
4.
|
Copy the file to a USB flash drive. The USB must be formatted to the FAT32 file system. |
|
6.
|
Plug the USB flash drive into the device's USB port, located on the front panel; the device runs the "CLI session". |
|
7.
|
When the STATUS LED starts to flash red, remove the USB flash drive from the USB port. This indicates that the device has finished running the CLI script. |
|
8.
|
If required, view the results (output) of the "CLI session" in the ac_output.txt, which the device sent to the USB flash drive. |