Creating Telnet Macros for Re-Use
In the Macro Editor you can create user-defined variables that can then be used in the macro to allow
run-time input of information (for example, a VLAN name) to the running macro. The Macro Editor
also provides a set of system variables for parameters such as the device IP address, device name, date,
time, port index, EPICenter server IP address, and so on. When the macro is run, these variables are
replaced with actual values from the devices on which the macro is being run.
Example 1: A Macro to Configure EPICenter as a Syslog Server on a Device
One example of a macro you would re-use is a macro to configure EPICenter as a Syslog server for your
Extreme Networks switches. You could create and save a macro that used a system variable to specify
the EPICenter server's host name or IP address. To configure EPICenter as a syslog server with facility
level local0, you could create the following macro:
config syslog add $serverIP local0
enable syslog
Once you've saved this macro, any time you want to configure EPICenter as a Syslog server on a
switch, you just need to run the macro on that device. When the macro runs, the EPICenter server will
substitute its own IP address for the
Using Interactive CLI Commands in a Macro
For interactive commands used in a command macro, you need to supply the response to the command
in a separate line. The following examples illustrate usage of some of these commands.
• To create a user account with the name "joesmith" and a password of "2joe3," enter the following
commands:
create account user joesmith
2joe3
2joe3
NOTE
If you type a command that requires a password, you need to enter the password twice. In a
command macro, the first "password" sets the password, and the second "password" confirms the
password.
• To use the
save
yes
• To delete a user-defined STPD domain (stpd2) from the switch:
delete stpd2
yes
• To reboot the switch:
reboot
yes
EPICenter Concepts and Solutions Guide
$serverIP
command to save a configuration to the switch, enter the following commands:
save
variable in the
config syslog
User-Defined Telnet Macros
command.
79
Need help?
Do you have a question about the EPICenter Guide and is the answer not in the manual?