Other commands of system configuration
The
command "alias" is used to configure the alias of command.use the
"no"format of the
command
may delete alias.
[no]
alias [alias_name command_line]
Parameter:
alias_name is a command alias, which may replace command line
command_line is a command line which
command alias replaces.
Default:
none
configuration mode
you
can use alias to appoint an alias to a command when some complex command
line is frequently used.
Example:
Router_config#alias c copy tftp:router.bin flash:router.bin
192.2.2.1
Relevant command:
show
alias
Use command “boot system flash” can designate the system
image file to execute when the system starts, use command “no system flash” to
delete the former configuration.
boot system flash filename
no boot system flash filename
Filename is the designated filename and the length of it cannot exceed 20
characters.
none
global configuration mode
If the user has not configured this command, the system will execute
the first system image file in the flash file system. If the user configures
several commands, the system will execute the configured image file in
sequence, if this file does not exist or check error, execute the next file. If
all of them are not successful, the system joins into supervision mode.
config#boot system flash router.bin
none
Use command “copy” can read file to the router from
tftpserver, and can also write a certain file in the router file system to the
tftpserver.
copy {tftp<:filename>
| flash <:filename>} {flash <:filename>
| tftp<:filename>} <blksize>
tftp<:filename> |
When it is the first parameter, it means to read file from tftpserver; when it is the second parameter, it means to write file to tftpserver. File name points out the corresponding file name, if not designated, after the command copy executed, it prompts the user to input the file name. |
flash <:filename> |
When it is the first parameter, it means to read the file from the router flash; when it is the second parameter, it means to write file to router flash. File name points out the corresponding file name, if not designated, after the command copy is executed, it prompts the user to input the file name. |
blksize |
Designate the block size during tftp transmitting process |
none
supervisor
The user can key in a question mark after flash:, and it will prompt
the matching file name. Such as :
Execute “copy
flash:s?” and it will prompt the user all file names starts with letter “s”
under current directory:
flash:startup-config flash:sample
“copy flash:startup-config
tftp:config.txt 600”
will copy the file in the flash:startup-config to the tftpserver, and names
it config.txt. Meanwhile designate the block size of transmission to be 600bits.
Relevant command:
none
Use command “date” can configure the absolute time of the system.
none
none
supervisor
or global configuration mode
Use command “date” can configure the absolute time of the system, even if the electricity power is off, this timer gets power supplies from the battery, if the time is incorrect, please change the battery.
Example:
config#date
The current date is
2000-7-27 21:17:24
Enter the new
date(yyyy-mm-dd):2000-7-27
Enter the new
time(hh:mm:ss):21:17:00
none
Trace the debug execution situation of the job.
none
supervisor
After opening the job debug information switch, it outputs the
allocation and execution situation of the job.
config#debug job
JOB: <showver> fired
JOB: job <showver>, cmd
"show ver" is parsing
Relevant command:
This
command is to copy the file from the host to the flash of the system by serial
communication protocol zmodem
download c0 filename
filename the file name in the local flash
Default:
Identical
to the host file name
supervisor
none
After the user keys in the command, the system will prompt the user
to input port speed.。
Router#download c0 router.bin
Prompt::speed[9600]?115200
Then,
modify the speed to 115200, after reconnection, select the send file option in
the transfer menu of super terminal (terminal simulation), after the file has
been transferred, it will prompt the following information:
Zmodem receive process completed.
Relevant command:
none
This command is used to display the help system of the router
help
Parameter:
none
none
supervisor
none
After
the user keys in the command, it will display the help system of the router
Router# help
Help may be requested at any point in a command
by entering a question mark '?',If nothing matches, the help list will be empty
and you must backup until entering a '?' shows the available options.
Two styles of help are provided:
1. Full help is available when you
are ready to enter a command
argument(e.g.'show ?') and describes each possible argument.
2. Partial help is provided when an
abbreviated argument is entered and you want to know what arguments match the
input (e.g. 'interface e?'.)
Relevant command:
none
this command is used to
examine the historical command, use “no” form of this command to delete the
historical command
[no] history [ + <count> | - <count> | clear]
Parameter:
+ <count> |
Display the historical commands with number
count <1-20> from the top to the bottom |
- <count> |
Display the historical commands with number
count <1-20> from the bottom to the top |
Default:
IF the historical commands number is not more than 20, display in
full from top to bottom; if it is more than 20, display the 20 most recent historical
commands from top to bottom.
Any command mode
Modular
router series can save a maximum of 20 historical commands, the user can easily
use upper and lower direction key to get the commands or to directly use them
after edition.
Example:
In the following example, it displays the 5 most
recent historical commands from bottom to top:
Router#history - 5
config
int e1/1
no ip addr
ip addr 192.2.2.49
255.255.255.0
exit
Relevant command:
none
This command is used to define and modify the
allocation execution of the job, use no form of this command to delete the
defined job.
[no] job {[interval fireinterval | one-shot] |
sleep sleeptime |
stop jobname}
Parameter:
exec jobname |
Executes a job immediately |
jobname definaton |
Define a job |
restart jobname |
Restart a job |
schedule jobname |
Configure the job if allocation executed |
at firsttime |
Configure the interval of the first execution
after job starts |
interval fireinterval |
Configure the interval between the two execution
of the job |
one-shot |
Configure the job to execute only once |
sleep sleeptime |
Configure the sleep time |
Stop jobname |
Stop the allocated job |
Default:
none
global
configuration mode
Job is
a section of script, defines the command combination to be executed, and can
configure the time of the job to be executed and the interval of execution.
Example:
The following example
defines to shutdown of all jobs on the port:
job shutall “int
s1/0;shut;int s1/1;shut;int s1/2;shut;int s1/3;shut”
The following
example defines not to shutdown all jobs on the port:
job noshutall “int
s1/0; no shut;int s1/1;no shut;int s01/2;no shut;int s1/3;no shut”
The following example
defines to periodically execute shutdown and no shutdown operation on all
ports:
job schedule shutall at 100 interval 60
job schedule noshutall at 130 interval 60
( then, after the jobd
starts for 100 seconds, shutall this job starts, restarts every 60 seconds;
after the router starts for 130 seconds, noshutall shutall this job starts,
restarts every 60 seconds.)
if you want to execute the
sequence of shutall and noshutall, you can define and schedule as follows:
job reshut “job
exec shutall;job
exec noshutall”
job schedule reshut at 100
interval 30
if shutall error during
execution, execute the next command(pause by default)
job shutall on-error next
if executes noshutall:(no
recursion of the job)
job shutall on-error exec noshutall
The following example, pause
a job
job stop shutall
The following example,
restart a paused job:
job restart shutall
Relevant command:
This command is
used to start the guarding process of the execution of the job. Input no form
of the command can stop the guarding process of the job.
[no] jobd
none
none
global
configuration mode
The execution of
the job needs jobd to schedule, the execution time of the job is based on the
start time of the jobd. Input q,Q or Ctrl+shift+6 can stop
jobd.
The following example shows
how to enable jobd.
Router_config#jobd
Job daemon started. No commands can be entered. End with q, Q, or Ctrl+Shift+6.
Relevant command:
This command is used to show all alias or designated alias
show alias [<alias name>]
Parameter:
alias name |
Name alias |
Default:
Show all alias according to format alias name=command line
supervisor or configuration mode
none
Example:
The following example, shows all aliases in the current system
Router_config#show
alias
hualab=date
router=snmp
Relevant command:
alias
This command
is used to upload from the system flash to the host by serial communication protocolzmodem
upload c0 filename
Parameter:
filename filename
in local flash
none
supervisor
none
After the user keys in the command, the system will prompt the user
to input port speed.
Router#upload
c0 router.bin
Prompt: speed[9600]?115200
Then, modify the speed to 115200, after reconnection, select the send file option in the transfer menu of the super terminal (terminal simulation).
After the
file has been transferred, it will prompt the following information:
Zmodem send
process completed.
none