Allied Telesis Support Portal

How to load AW+ commands from a server

There can be cases when only parts of a switch configuration shall be loaded from a server in a controlled way making sure that the rest of the configuration remains under our control.
This script is an example of how this can be achieved with AW+ and a starting point for building more elaborate and complete mechanisms.
This script can be improved with further controls on text file content in order to avoid configuration errors because of wrong commands or for limiting the set of accepted commands.

This script can be run automatically on a daily basis (or whatever interval will be suitable for the specific task to be performed) using a periodic trigger.
Once activated, it will:
  • Download a fragment of configuration commands using tftp
  • If the downloaded script is unchanged from yesterday then
    • Nothing need be done - just exit
  • otherwise
    • Delete an existing config fragment (this is specific to a scenario & will need to be changed as required)
    • Recreate what must be done manually (this is also specific to a scenario & will need to be changed as required)
    • Tweak the downloaded file if necessary to ensure it has Linux line endings (as windows files containing CR LF will not run properly in IMISH)
    • Feed the commands in the downloaded text file into IMISH (in your case to populate the required DHCP reservations in the DHCP pool)
This script is available for download as attachment to this article.

Disclaimer
The scripts presented here are provided solely as examples. Allied Telesis gives no warranty that such scripts are accurate, up-to-date, effective, complete or suitable for your purposes. You acknowledge that use of these scripts and documentation is entirely at your own risk and remains solely your responsibility. In no event will Allied Telesis be liable for any damages whatsoever, arising out of the use of or inability to use the sample scripts or documentation.

Attachments

Previous MonthNext Month
SunMonTueWedThuFriSat