You are on page 1of 22

Command Manual – Getting Started

VRP3.4 Table of Contents

Table of Contents

Chapter 1 Basic Configuration Commands................................................................................ 1-1


1.1 Basic Configuration Commands ........................................................................................ 1-1
1.1.1 clock datetime ......................................................................................................... 1-1
1.1.2 clock summer-time .................................................................................................. 1-2
1.1.3 clock timezone......................................................................................................... 1-3
1.1.4 command-privilege .................................................................................................. 1-3
1.1.5 display clipboard...................................................................................................... 1-5
1.1.6 display clock ............................................................................................................ 1-5
1.1.7 display cpu-usage ................................................................................................... 1-6
1.1.8 display history-command ........................................................................................ 1-8
1.1.9 display memory ....................................................................................................... 1-8
1.1.10 display version....................................................................................................... 1-9
1.1.11 header ................................................................................................................. 1-10
1.1.12 hotkey.................................................................................................................. 1-11
1.1.13 language-mode ................................................................................................... 1-13
1.1.14 lock ...................................................................................................................... 1-14
1.1.15 quit....................................................................................................................... 1-14
1.1.16 return ................................................................................................................... 1-15
1.1.17 super ................................................................................................................... 1-16
1.1.18 super password ................................................................................................... 1-17
1.1.19 sysname .............................................................................................................. 1-18
1.1.20 system-view......................................................................................................... 1-18
1.1.21 vrbd ..................................................................................................................... 1-19
1.2 Command-Alias Configuration Commands ..................................................................... 1-19
1.2.1 command-alias enable .......................................................................................... 1-20
1.2.2 command-alias mapping ....................................................................................... 1-20
1.2.3 display command-alias.......................................................................................... 1-21

i
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

Chapter 1 Basic Configuration Commands

1.1 Basic Configuration Commands

1.1.1 clock datetime

Syntax

clock datetime time date

View

User view

Parameter

time: Current time in the format of HH:MM:SS. HH is in the range 0 to 23, and MM and
SS in the range 0 to 59.

date: Current date in the format of MM/DD/YYYY. MM is the month of the year in the
range 1 to 12, DD is the day of the month in the range 1 to 31, and YYYY is a year in the
range 1993 to 2035.

Description

Using the clock datetime command, you can set the current time and date of the
router.

The current time and date of the router must be set in an environment that requires the
acquisition of absolute time.

You may choose not to provide seconds when inputting the time parameters.

For the related command, see display clock.

Example

# Set the current system time to 00:00:00 01/01/2001.


<Quidway> clock datetime 0:0:0 01/01/2001

1-1
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

1.1.2 clock summer-time

Syntax

clock summer-time zone_name { one-off | repeating } start-time start-date end-time


end-date add-time

undo clock summer-time

View

User view

Parameter

zone_name: Name of the daylight saving time, a character string of 1 to 32 characters.

one-off: Only sets the daylight saving time of some year.

repeating: Sets the daylight saving time of every year starting from some year.

time: In the format of HH:MM:SS (hours/minutes/seconds).

date: In the format of MM/DD/YYYY (months/days/years).

Description

Using the clock summer-time command, you can set the name, starting and ending
time of the daylight saving time. Using the undo clock summer-time command, you
can cancel the configuration of the daylight saving time.

After the configuration takes effect, you can use the display clock command to view it.
Besides, the time of the log or debug information is the local time of which the time zone
and daylight saving time has been adjusted.

For the related command, see clock timezone.

Example

# During daylight saving time in z2 between 06:00:00 on 2002/06/08 and 06:00:00 on


2002/09/01, set the system clock ahead one hour.
<Quidway> clock summer-time z2 one-off 06:00:00 06/08/2002 06:00:00 09/01/2002
01:00:00

# During daylight saving time in z2 between 06:00:00 on 06/08 and 06:00:00 on 09/01
every year since 2002, set the system clock ahead one hour.
<Quidway> clock summer-time z2 repeating 06:00:00 06/08/2002 06:00:00
09/01/2002 01:00:00

1-2
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

1.1.3 clock timezone

Syntax

clock timezone zone_name { add | minus } time

undo clock timezone

View

User view

Parameter

zone_name: Time zone name, a string of 1 to 32 characters.

add: Positive offset to universal time coordinated (UTC) time.

minus: Negative offset to UTC time.

time: In the format of HH/MM/SS (hours/minutes/seconds).

Description

Using the clock timezone command, you can set the local time zone. Using the undo
clock timezone command, you can restore the local time zone to the default UTC time
zone.

After the configuration takes effect, you can view it by executing the display clock
command. The time applied to the log and debug information is the local time with time
zone and daylight saving time adjustment.

For the related command, see clock summer-time.

Example

# Set the name of the local time zone to Z5, five hours ahead of UTC time.
<Quidway> clock timezone z5 add 05:00:00

1.1.4 command-privilege

Syntax

command-privilege level level view view command-key

undo command-privilege view view command-key

1-3
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

View

System view

Parameter

level level: Command level ranging from 0 to 3.

view view: View. The following table describes the available views.

Table 1-1 Available views

View Description
shell View of the current user level
system System view
Includes ospf (OSPF view), rip (RIP view), bgp (BGP view), isis (IS-IS
Routing protocol view
view), and so on.
Includes ethernet (FE), gigabitethernet (GE), serial (serial interface),
ce1 (cE1 interface), ce3 (E3 interface), ct1 (cT1 interface), atm (ATM
Interface view interface), pos (POS interface), virtual-template (virtual interface
template), virtual-ethernet (virtual Ethernet interface), loopback
(loopback interface), null (null interface), tunnel (tunnel interface).

user-interface User interface view


l2tp-group L2TP group view
route-policy Route map view

Refer to the "Command Line Views" section in the VRP3.4 Operation Manual for more
information.

commandkey: Command to be set.

Description

Using the command-privilege command, you can assign a command level to the
commands in the specified view. Using the undo command-privilege view command,
you can cancel the current setting.

Command privilege falls into four levels: visit, monitor, system, and manage, which are
identified by 0 through 3.

For a user logs onto the router from a user interface, the command level that the user
can access can be the one administratively assigned to the user or the one assigned to
the user interface, whichever is smaller. For more information on how to assign
command level to a user interface, refer to “Chapter 4 User Interface Configuration
Commands” in VRP3.4 Command Manual – System Management.

1-4
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

The following table describes the default level of the commands.

Table 1-2 Default level of the commands

Command level Commands


Visit (0) ping, tracert, telnet
Monitor (1) display, debugging
System (2) Configuration commands
Manage (3) Key settings, FTP, Xmodem, TFTP, file system operation commands

Example

# Set the command level of the interface command to 0.


[Quidway] command-privilege level 0 view system interface

1.1.5 display clipboard

Syntax

display clipboard

View

Any view

Parameter

None

Description

Using the display clipboard command, you can view the contents of the clipboard.

Example

# Display the contents of the clipboard.


<Quidway> display clipboard
-----------------clipboard -----------------
ip route 10.1.0.0 255.0.0.0 eth 0

1.1.6 display clock

Syntax

1-5
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

display clock

View

Any view

Parameter

None

Description

Using the display clock command, you can view the current system time and date.

If the displayed system time and date are incorrect, you can use the clock datetime
command to adjust them.

Example

# Display the current time and date.


<Quidway> display clock
15:50:45 UTC Mon 02/12/2003

1.1.7 display cpu-usage

Syntax

display cpu-usage [ configuration | number [ offset ] [ verbose ] [ from-device ] ]

View

Any view

Parameter

configuration: Displays the configuration about CPU usage measurement, such as


whether CPU usage measurement is enabled, measuring period, and CPU usage
alarm thresholds.

number: Number of CPU usage statistics queries.

offset: Offset of the starting entry to be displayed to the last statistic entry.

verbose: Displays the detailed information.

from-device: Displays information stored on an external storage device such as a


Flash or hard disk. (Not available yet.)

1-6
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

Description

Using the display cpu-usage command, you can view statistics about CPU usage.

The function of both display cpu-usage and display cpu-usage 1 0 verbose is to


display detailed information on the last CPU usage measurement.

Example

# Display detailed information on CPU usage statistics.


[Router] display cpu-usage
===== Current CPU usage info =====
CPU Usage Stat. Cycle: 1 (Second)
CPU Usage : 1%
CPU Usage Stat. Time : 2004-09-15 15:51:48
CPU Usage Stat. Tick : 0x27(CPU Tick High) 0x88cf18e4(CPU Tick Low)
Actual Stat. Cycle : 0x0(CPU Tick High) 0x2264cc2(CPU Tick Low)

TaskName CPU Runtime(CPU Tick High/CPU Tick Low)


VIDL 99% 0/ 222de39
TICK 0% 0/ 88d8
co0 0% 0/ 6e5
SRM 0% 0/ 1da
ROUT 0% 0/ 1d6c
SOCK 0% 0/ 3c65
VTYD 0% 0/ 1074
IPSP 0% 0/ 28b
TAC 0% 0/ 15ac
SC 0% 0/ 10de
RDS 0% 0/ e71
ACM 0% 0/ 180a
LSSO 0% 0/ 3a2
TRAP 0% 0/ 2d0
NTPT 0% 0/ 1082a
PIMT 0% 0/ 2f8
LSPM 0% 0/ 90c
L2V 0% 0/ 1066
IPS 0% 0/ 7575
SIP 0% 0/ 6b87
DHCP 0% 0/ 33d
HOT 0% 0/ fca
DHCC 0% 0/ 414

1-7
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

1.1.8 display history-command

Syntax

display history-command

View

Any view

Parameter

None

Description

Using the display history-command command, you can view the history commands.

The terminal automatically saves the commands that are input and each ended with a
carriage return.

Example

# Display history commands.


<Quidway> display history-command
display interface
displayinterface e 1/0/0
interface e 1/0/0

1.1.9 display memory

Syntax

display memory

View

Any view

Parameter

None

1-8
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

Description

Using the display memory command, you can view information on system memory
load.

Example

# Display information on the current system memory load.


[Router] display memory
System Total Memory(bytes): 41918976
Total Used Memory(bytes): 15949136
Used Rate: 38%

1.1.10 display version

Syntax

display version

View

Any view

Parameter

None

Description

Using the display version command, you can view system version information.

By viewing system version information, you can learn about the current software
version, rack type and the information related to the main control board and interface
boards.

Example

# Display system version information of the AR 46-40.


<Quidway> display version
Copyright Notice:SK_VSIR_NAME crea

All rights reserved (Sep 13 2004).rule 1 de icmp ?create...


Huawei-3Com Versatile Routing Platform Software
VRP(R) software, Version 3.40, Release 0001SP03

1-9
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

Copyright (c) 2003-2004 Hangzhou Huawei-3Com Tech. Co.,Ltd. All rights


reserved
.
Copyright (c) 2000-2003 Huawei Tech. Co.,Ltd. All rights reserved.
Quidway Series Router AR46-40 uptime is 0 week, 0 day, 0 hour, 22 minutes

Rpu's version information:


Router AR46-40 with 1 PowerPC 750 Processor
256M bytes SDRAM
32M bytes FLASH
512K bytes NVRAM
Pcb Version : RTM1RPUA.1
RPE Logic Version : RPE3.4
SBG Logic Version : 012
Small BootROM Version : 3.04
Big BootROM Version : 5.03
Config Register points to FLASH

[SLOT 0] AUX0 (Hardware)A.1, (Driver)1.0, (Cpld)3.4


[SLOT 0] ETH0 (Hardware)A.1, (Driver)1.0, (Cpld)3.4
[SLOT 0] ETH1 (Hardware)A.1, (Driver)1.0, (Cpld)3.4

1.1.11 header

Syntax

header [ shell | incoming | login ] text

undo header [ shell | incoming | login ]

View

System view

Parameter

shell: Banner displayed for entering user view.

incoming: Banner displayed when a user logs onto a terminal user interface.

login: Login banner.

text: Content of the banner.

1-10
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

Description

Using the header command, you can set the greeting information to be displayed.
Using the undo header command, you can clear the greetings.

text uses the first English character to indicate the beginning and end of the banner
message. After the end character is input, the system quits automatically. If no keyword,
login, shell, or incoming, is specified, the configured banner is for login by default.
You may input the banner message in either of the following ways:
1) Input all the contents in one line. 256 characters including the command keyword
are allowed now.
2) Input the contents in separate lines each ended with a carriage return. 1024
characters are allowed excluding the command keyword.

Example

# Configure the banner to be displayed when a user enters user view.


[Quidway] header shell %
Input banner text, and quit with the character'%'.
SHELL : Hello! Welcome use Quidway R1760.%
[Quidway]

Note: "%" serves as both beginning and end characters of the defined text. The second
input of "%" therefore indicates the end of the text and has the system quit the header
command.

# Test the configuration.


[Quidway] quit
<Quidway> quit
*********************************************************
* All rights reserved (1997-2003) *
* Without the owner's prior written consent, *
*no decompiling or reverse-engineering shall be allowed.*
*********************************************************

User interface con0 is available


Press RETURN to get started
SHELL : Hello! Welcome use Quidway R1760.
<Quidway>

1.1.12 hotkey

Syntax

hotkey [ CTRL_G | CTRL_L | CTRL_O | CTRL_T | CTRL_U ] command_text

1-11
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

undo hotkey [ CTRL_G | CTRL_L | CTRL_O | CTRL_T | CTRL_U ]

View

System view

Parameter

CTRL_G: Assigns the hot key <CTRL+G> to a command.

CTRL_L: Assigns the hot key <CTRL+L> to a command.

CTRL_O: Assigns the hot key <CTRL+O> to a command.

CTRL_T: Assigns the hot key <CTRL+T> to a command.

CTRL_U: Assigns the hot key <CTRL+U> to a command.

command_text: The command line associated with the hot key.

Description

Using the hotkey command, you can assign a hot key to a command line.

Using the undo hotkey command, you can restore the default assignment scheme of
the system: <CTRL_G> to display current-configuration, <CTRL_L> to display ip
routing-table, <CTRL_O> to undo debugging all, and null to other two hot keys.

You can customize this scheme however.

Example

# Assign the hot key < CTRL_T> to the display tcp status command.
[Quidway] hotkey ctrl_t display tcp status
[Quidway] display hotkey
----------------- HOTKEY -----------------
=Defined hotkeys=
Hotkeys Command
CTRL_G display current-configuration
CTRL_L display ip routing-table
CTRL_O undo debug all
CTRL_T display tcp status

=Undefined hotkeys=
Hotkeys Command
CTRL_U NULL

=System hotkeys=

1-12
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

Hotkeys Function
CTRL_A Move the cursor to the beginning of the current line.
CTRL_B Move the cursor one character left.
CTRL_C Stop current command function.
CTRL_D Erase current character.
CTRL_E Move the cursor to the end of the current line.
CTRL_F Move the cursor one character right.
CTRL_H Erase the character left of the cursor.
CTRL_K Kill outgoing connection.
CTRL_N Display the next command from the history buffer.
CTRL_P Display the previous command from the history buffer.
CTRL_R Redisplay the current line.
CTRL_V Paste text from the clipboard.
CTRL_W Delete the word left of the cursor.
CTRL_X Delete all characters up to the cursor.
CTRL_Y Delete all characters after the cursor.
CTRL_Z Return to the user view.
CTRL_] Kill incoming connection or redirect connection.
ESC_B Move the cursor one word back.
ESC_D Delete remainder of word.
ESC_F Move the cursor forward one word.
ESC_N Move the cursor down a line.
ESC_P Move the cursor up a line.
ESC_< Specify the beginning of clipboard.
ESC_> Specify the end of clipboard.

1.1.13 language-mode

Syntax

language-mode { chinese | english }

View

User view

Parameter

None

Description

Using the language-mode command, you can toggle the display language of the
command line interface (CLI) between English and Chinese.

1-13
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

The default language is English.

Example

# Toggle the language from English to Chinese.


<Quidway> language-mode chinese
Change language mode, confirm? [Y/N]y
% Switch to Chinese mode.

1.1.14 lock

Syntax

lock

View

User view

Parameter

None

Description

Using the lock command, you can lock the illegitimate users out of the active user
interface, which can be console, AUX, or VTY.

After entering the lock command, you are prompted to enter and confirm the
screensaver's password. If you enter the same password twice, the interface is locked.
To unlock and access the system after that, you must press <Enter> first and enter the
password you just set.

Example

# Log in through the console port and lock the active user interface.
<Quidway> lock
Password:
Again:

1.1.15 quit

Syntax

quit

1-14
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

View

Any view

Parameter

None

Description

Using the quit command, you can quit to a lower-level view (if the current view is user
view, you exit the system).

The views fall into three levels which are, in ascending order:
z User view (for user level 0)
z System view (for user level 3)
z Configuration view (such as routing protocol view, interface view, and VPDN
group view)
For the related command, see return.

Example

# Switch from Ethernet1/0/0 interface view to system view, and then to user view.
[Quidway-Ethernet1/0/0] quit
[Quidway] quit
<Quidway>

1.1.16 return

Syntax

return

View

Any view except for user view

Parameter

None

Description

Using the return command, you can return to user view from any other view, as you
would with the combination key <Ctrl+Z>.

1-15
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

For the related command, see quit.

Example

# Return to user view from system view.


[Quidway] return
<Quidway>

1.1.17 super

Syntax

super [ level ]

View

User view

Parameter

level: User level ranging from 0 to 3.

Description

Using the super command, you can switch from current user level to a specified user
level, or the command level that the user can access.

There are four levels of commands:


z Visit: involves commands for network diagnosis (such as ping and tracert),
commands for accessing an external device (such as Telnet client, SSH client,
RLOGIN). Saving the configuration file is not allowed at this level.
z Monitor: includes the display and debugging commands for system maintenance,
service fault diagnosis. Saving the configuration file is not allowed at this level.
z System: provides service configuration commands, including routing and
commands at each level of the network for providing services.
z Manage: influences the basic operation of the system and the system support
modules for service support. Commands at this level involve file system, FTP,
TFTP, Xmodem download and configuration file switch, power control, standby
board control, user management, level setting, as well as parameter setting within
a system (the last case involves those non-protocol or non RFC provisioned
commands).
Login users are also classified into four levels that correspond to the four command
levels. After users at different levels log in, they can only use commands at their own, or
lower, levels.

1-16
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

To fence off intrusion of illegitimate users, users are required to provide the correct
super password, if one has been configured using the super password command,
when they switch from a lower level to a higher level. For privacy sake, the entered
password is not displayed on the screen. Users have three chances to provide the
correct password. Only after the correct password is entered can they switch to the
higher level. Otherwise, the original user level remains unchanged.

For the related command, see super password.

Example

<Quidway> super 3
Password:
User privilege changes to 3 level, just equal or less this level's
commands can be used.
Privilege note: 0-VISIT, 1-MONITOR, 2-SYSTEM, 3-MANAGE

1.1.18 super password

Syntax

super password [ level user-level ] { simple | cipher } password

undo super password [ level user-level ]

View

System view

Parameter

user-level: User level ranging from 0 to 3.

simple: Plain text password.

cipher: Ciphertext password.

password: Content of password. A plain text password is a consecutive character string


containing no more than 16 characters, such as 1234567. A ciphertext password
contains 24 characters and must be in enciphered format as in
"_(TT8F]Y\5SQ=^Q`MAF4<1!!".

Description

Using the super password command, you can set the password needed to switch
from a lower user level to a higher one. Using the undo super password command,
you can cancel the current setting.

1-17
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

By default, plain text password is adopted.

Example

# Execute the following command in system view:


[Quidway] super password level 3 simple zbr

1.1.19 sysname

Syntax

sysname sysname

View

System view

Parameter

sysname: Name of the router, a string containing 1 to 30 characters.

Description

Using the sysname command, you can set the name of the router.

The router name defaults to Quidway.

Modifying router name affects the prompt of the CLI. For example, if the router's name
is Quidway, the prompt of user view is <Quidway>.

Example

# Set the name of the router to R1760.


[Quidway] sysname R1760
[R1760]

1.1.20 system-view

Syntax

system-view

View

User view

1-18
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

Parameter

None

Description

Using the system-view command, you can enter system view from current user view.

For the related commands, see quit and return.

Example

<Quidway> system-view
Enter system view , return user view with Ctrl+Z.
[Quidway]

1.1.21 vrbd

Syntax

vrbd

View

Any view

Parameter

None

Description

Using the vrbd command, you can view software version details, including product
software version and the matched platform software version.

Example

# Display the internal version information.


[Router] vrbd
Routing Platform Software
Version AR46XX 8040V300R003B01D009 (COMWAREV300R002B11D001), RELEASE
SOFTWARE
Compiled Sep 13 2004 15:36:51 by sunyu

1.2 Command-Alias Configuration Commands

1-19
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

1.2.1 command-alias enable

Syntax

command-alias enable

undo command-alias enable

View

System view

Parameter

None

Description

Using the command-alias enable command, you can enable the command alias
function. Using the undo command-alias enable command, you can disable the
command alias function.

By default, the command alias function is disabled.

Example

# Enable the command alias function.


[Quidway] command-alias enable

# Disable the command alias function.


[Quidway] undo command-alias enable
Command alias switch is off!

1.2.2 command-alias mapping

Syntax

command-alias mapping cmdkey alias

undo command-alias mapping alias

View

System view

1-20
Command Manual – Getting Started
VRP3.4 Chapter 1 Basic Configuration Commands

Parameter

cmdkey: The first keyword to be substituted in the current command by the alias. The
complete keyword name must be provided.

alias: An alias assigned by the user, which shall not conflict with (that is, fully match with)
the current first keyword.

Description

Using the command-alias mapping command, you can specify an alias. Using the
undo command-alias mapping command, you can cancel an alias.

By default, no alias is configured.

Example

# Assign the alias “show” to the keyword display.


[Quidway] command-alias mapping display show

# Cancel the configured alias "show".


[Quidway] undo command-alias mapping show

1.2.3 display command-alias

Syntax

display command-alias

View

Any view

Parameter

None

Description

Using the display command-alias command, you can view the current alias settings.

Example

# Display the current alias settings.


[Quidway] display command-alias
index alias commandkey
0 show display

1-21

You might also like