Sei sulla pagina 1di 38

Using the Command Line Interface

Avaya Secure Router 2330/4134

10.3
NN47263-506, 04.01
October 2010

2010 Avaya Inc.

All Rights Reserved.


Notice
While reasonable efforts have been made to ensure that the
information in this document is complete and accurate at the time of
printing, Avaya assumes no liability for any errors. Avaya reserves the
right to make changes and corrections to the information in this
document without the obligation to notify any person or organization of
such changes.
Documentation disclaimer
Avaya shall not be responsible for any modifications, additions, or
deletions to the original published version of this documentation unless
such modifications, additions, or deletions were performed by Avaya.
End User agree to indemnify and hold harmless Avaya, Avaya's agents,
servants and employees against all claims, lawsuits, demands and
judgments arising out of, or in connection with, subsequent
modifications, additions or deletions to this documentation, to the
extent made by End User.
Link disclaimer
Avaya is not responsible for the contents or reliability of any linked Web
sites referenced within this site or documentation(s) provided by Avaya.
Avaya is not responsible for the accuracy of any information, statement
or content provided on these sites and does not necessarily endorse
the products, services, or information described or offered within them.
Avaya does not guarantee that these links will work all the time and has
no control over the availability of the linked pages.
Warranty
Avaya provides a limited warranty on this product. Refer to your sales
agreement to establish the terms of the limited warranty. In addition,
Avayas standard warranty language, as well as information regarding
support for this product, while under warranty, is available to Avaya
customers and other parties through the Avaya Support Web site:
http://www.avaya.com/support. Please note that if you acquired the
product from an authorized Avaya reseller outside of the United States
and Canada, the warranty is provided to you by said Avaya reseller and
not by Avaya.
Licenses
THE SOFTWARE LICENSE TERMS AVAILABLE ON THE AVAYA
WEBSITE, HTTP://SUPPORT.AVAYA.COM/LICENSEINFO/ ARE
APPLICABLE TO ANYONE WHO DOWNLOADS, USES AND/OR
INSTALLS AVAYA SOFTWARE, PURCHASED FROM AVAYA INC.,
ANY AVAYA AFFILIATE, OR AN AUTHORIZED AVAYA RESELLER
(AS APPLICABLE) UNDER A COMMERCIAL AGREEMENT WITH
AVAYA OR AN AUTHORIZED AVAYA RESELLER. UNLESS
OTHERWISE AGREED TO BY AVAYA IN WRITING, AVAYA DOES
NOT EXTEND THIS LICENSE IF THE SOFTWARE WAS OBTAINED
FROM ANYONE OTHER THAN AVAYA, AN AVAYA AFFILIATE OR AN
AVAYA AUTHORIZED RESELLER, AND AVAYA RESERVES THE
RIGHT TO TAKE LEGAL ACTION AGAINST YOU AND ANYONE
ELSE USING OR SELLING THE SOFTWARE WITHOUT A LICENSE.
BY INSTALLING, DOWNLOADING OR USING THE SOFTWARE, OR
AUTHORIZING OTHERS TO DO SO, YOU, ON BEHALF OF
YOURSELF AND THE ENTITY FOR WHOM YOU ARE INSTALLING,
DOWNLOADING OR USING THE SOFTWARE (HEREINAFTER
REFERRED TO INTERCHANGEABLY AS YOU AND END USER),
AGREE TO THESE TERMS AND CONDITIONS AND CREATE A
BINDING CONTRACT BETWEEN YOU AND AVAYA INC. OR THE
APPLICABLE AVAYA AFFILIATE (AVAYA).

protected by copyright and other intellectual property laws including the


sui generis rights relating to the protection of databases. You may not
modify, copy, reproduce, republish, upload, post, transmit or distribute
in any way any content, in whole or in part, including any code and
software. Unauthorized reproduction, transmission, dissemination,
storage, and or use without the express written consent of Avaya can
be a criminal, as well as a civil, offense under the applicable law.
Third-party components
Certain software programs or portions thereof included in the Product
may contain software distributed under third party agreements (Third
Party Components), which may contain terms that expand or limit
rights to use certain portions of the Product (Third Party Terms).
Information regarding distributed Linux OS source code (for those
Products that have distributed the Linux OS source code), and
identifying the copyright holders of the Third Party Components and the
Third Party Terms that apply to them is available on the Avaya Support
Web site: http://www.avaya.com/support/Copyright/.
Trademarks
The trademarks, logos and service marks (Marks) displayed in this
site, the documentation(s) and product(s) provided by Avaya are the
registered or unregistered Marks of Avaya, its affiliates, or other third
parties. Users are not permitted to use such Marks without prior written
consent from Avaya or such third party which may own the Mark.
Nothing contained in this site, the documentation(s) and product(s)
should be construed as granting, by implication, estoppel, or otherwise,
any license or right in and to the Marks without the express written
permission of Avaya or the applicable third party.
Avaya is a registered trademark of Avaya Inc.
All other trademarks are the property of their respective owners.
Downloading documents
For the most current versions of documentation, see the Avaya Support
Web site: http://www.avaya.com/support
Contact Avaya Support
Avaya provides a telephone number for you to use to report problems
or to ask questions about your product. The support telephone number
is 1-800-242-2121 in the United States. For additional support
telephone numbers, see the Avaya Web site: http://www.avaya.com/
support

Copyright
Except where expressly stated otherwise, no use should be made of
materials on this site, the Documentation(s) and Product(s) provided
by Avaya. All content on this site, the documentation(s) and the
product(s) provided by Avaya including the selection, arrangement and
design of the content is owned either by Avaya or its licensors and is

Using the Command Line Interface

October 2010

Contents
Chapter 1: New in this release.................................................................................................5
Other changes...................................................................................................................................................5

Chapter 2: Introduction.............................................................................................................7
Navigation.........................................................................................................................................................7

Chapter 3: CLI fundamentals....................................................................................................9


Navigation.........................................................................................................................................................9
Top-level commands.........................................................................................................................................9
Global commands...........................................................................................................................................10
Configuration mode.........................................................................................................................................11
Context-sensitive configuration commands.....................................................................................................11
CLI user access levels....................................................................................................................................12
Multiple concurrent CLI users.........................................................................................................................12
Context-sensitive help.....................................................................................................................................13
Command-specific help...................................................................................................................................13
Command tree................................................................................................................................................14
Navigation keys...............................................................................................................................................14
Navigation commands.....................................................................................................................................15
no command...................................................................................................................................................15
Command abbreviations.................................................................................................................................16
Command history............................................................................................................................................16
Configuration file.............................................................................................................................................16
Module slot and port numbering......................................................................................................................16
Secure Router 4134 Voice Carrier medium module subslots.................................................................18

Chapter 4: Boot CLI fundamentals........................................................................................19


Boot CLI command list....................................................................................................................................19

Chapter 5: Basic CLI operations............................................................................................23


Prerequisites...................................................................................................................................................23
Navigation.......................................................................................................................................................23
Logging on......................................................................................................................................................24
Configuring the router from a terminal............................................................................................................24
Configuring users............................................................................................................................................24
Modifying the administrator account user name.............................................................................................25
Modifying passwords for other users..............................................................................................................26
Modifying your own password.........................................................................................................................26
Saving the current configuration to file............................................................................................................27
Encrypting password display...........................................................................................................................27
Adding a header to the configuration file.........................................................................................................28
Adding comments at the beginning of a configuration....................................................................................28
Adding comments to the end of a configuration..............................................................................................28
Configuring the router using configuration files from flash..............................................................................29
Configuring the router using configuration files from the network...................................................................29
Configuring the timeout for console sessions.................................................................................................30
Displaying the console timeout.......................................................................................................................30
Displaying configured user accounts..............................................................................................................30
Displaying connected users............................................................................................................................30

Using the Command Line Interface

October 2010

Displaying user account for current session...................................................................................................31


Displaying running configuration.....................................................................................................................31
Displaying stored configuration.......................................................................................................................31
Displaying system configuration......................................................................................................................31

Chapter 6: File management..................................................................................................33


Navigation.......................................................................................................................................................33
Copying files to and from compact flash or USB.............................................................................................33
Downloading files from the network to compact flash or USB........................................................................34
Uploading a file from compact flash or USB to the network............................................................................34
Formatting a compact flash or USB device.....................................................................................................35
Renaming a file on compact flash or USB......................................................................................................35
Removing a file from compact flash or USB...................................................................................................36
Uploading the event log to the network...........................................................................................................36
Displaying the file list from compact flash or USB...........................................................................................36
Displaying image file versions from compact flash or USB.............................................................................36
Displaying Boot ROM file information.............................................................................................................37

Using the Command Line Interface

October 2010

Chapter 1: New in this release


There is no new content added to Avaya Secure Router 2330/4134 Using the CLI (NN47263-506) for
Release 10.3..

Other changes
This document is rebranded to Avaya.

Using the Command Line Interface

October 2010

New in this release

Using the Command Line Interface

October 2010

Chapter 2: Introduction
This document describes the basic functionality and navigation of the Command Line Interface (CLI) for
the Avaya Secure Router 2330/4134 (Avaya SR2330/4134).

Navigation
CLI fundamentals on page 9
Boot CLI fundamentals on page 19
Basic CLI operations on page 23
File management on page 33

Using the Command Line Interface

October 2010

Introduction

Using the Command Line Interface

October 2010

Chapter 3: CLI fundamentals


The command line interface (CLI) is the main, text-based interface for configuring, managing, and
monitoring the Avaya Secure Router 2330/4134. You access the CLI through a direct connection to the
console port, or remotely using Telnet. This section contains information about the basic CLI functionality
with the Secure Router 2330/4134.

Navigation
Top-level commands on page 9
Global commands on page 10
Configuration mode on page 11
Context-sensitive configuration commands on page 11
CLI user access levels on page 12
Multiple concurrent CLI users on page 12
Context-sensitive help on page 13
Command-specific help on page 13
Command tree on page 14
Navigation keys on page 14
Navigation commands on page 15
no command on page 15
Command abbreviations on page 16
Command history on page 16
Configuration file on page 16
Module slot and port numbering on page 16

Top-level commands
When you log on to the switch, you enter the top level of the CLI hierarchy. From this level,
you can access various top-level commands, including debugging, system file configuration,

Using the Command Line Interface

October 2010

CLI fundamentals

password configuration, testing, and rebooting. The configure command is also available for
entering the configuration mode, or configuring the switch from an existing configuration file.
The following table lists the commands that are accessible only from the top level of the CLI.
Table 1: Top-level commands
Command

Definition

configure

Configure from [flash | network | terminal].

debug

Access debug commands.

file

Access file commands.

password

Change the user password.

reboot

Reboot the system.

test

Access test commands.

Global commands
From the top level of the CLI, you can also access additional operational commands including
clear, pin, save, show, telnet, and trace. These commands are available from any level of the
CLI.
The following table lists the global commands are available from any level of the CLI.
Table 2: Global commands
Command

10

Definition

clear

Access clear commands.

ping

Invoke ping to IP host.

ping6

Invoke pint to IPv6 host.

save

Save configuration to [local | network].

show

Access show commands.

telnet

Open a Telnet connection.

trace

Trace the route to a destination address or


host name.

trace6

Trace the route to an IPv6 destination


address or host name.

Using the Command Line Interface

October 2010

Configuration mode

Configuration mode
To configure the router system parameters, you must enter the configuration mode using the
configure terminal command. For example:
SR4134# configure terminal
SR4134/configure#
From the configuration mode, you can configure router system parameters for the
SR2330/4134. You can also access configuration commands for specific interfaces, modules,
or features. For detailed configuration commands, refer to

Context-sensitive configuration commands


To configure parameters for certain interfaces, modules, or features, you must first select the
desired object to configure. For example, you can select an interface from the configuration
mode by entering the interface command. Or you can configure the firewall parameters by
entering the firewall command.
When you select a particular object, the CLI prompt level changes to display the object that is
selected. Any subsequent commands that you enter apply only to the selected object until you
exit the command level for that object.
For example, the following displays the commands required to select Ethernet interface in slot
0, port 1 for configuration.
SR4134# configure terminal
SR4134/configure#

interface ethernet 0/1

Configuring existing Ethernet interface


SR4134/configure/interface/ethernet (0/1)#
The commands available differ depending on the particular object selected.

Using the Command Line Interface

October 2010

11

CLI fundamentals

CLI user access levels


The CLI supports four levels of privilege.
Privilege level

Privilege name

Definition

1 (highest)

PRIVILEGE_ADMIN

Admin level Can access any


command and configure any
feature in the router, including user
configuration and administration.

PRIVILEGE_CONFIGURE

Configure level Can configure any


feature. Cannot add or delete users.

PRIVILEGE_TEST

Test level Can only run diagnostic


tests. Cannot access configuration
commands.

4 (lowest)

PRIVILEGE_NORMAL

Normal level Can only enter show


or display commands.

Multiple concurrent CLI users


A single user can issue commands through the console interface. In addition, multiple
concurrent users can telnet and issue commands.
Important:
To avoid multiple users from issuing configuration commands simultaneously, only one user
is allowed to enter the configuration mode at one time. A console connection with a console
timeout value of 0 seconds will prevent other users from entering the configuration mode
indefinitely . To work around this issue, enter the debug clear_clisession command.
To avoid this issue, you can also configure the console timeout (using the
console_timeout command).
Alternatively, if the active session that is locking other users out of the configuration mode
is a Telnet session, you can disconnect the session using the clear telnet_session
command.
Use the show users command to identify the session to be cleared.

12

Using the Command Line Interface

October 2010

Context-sensitive help

Context-sensitive help
The CLI provides text-based, context-sensitive help. To access this help, enter a question mark
(?) at the current command level, or after typing a partial or full command string. The CLI
displays the commands available at that level, or the options available for the specified
command.
The following figure shows a sample output for the show ? command.

In addition, you can also manually scroll through the options available at the current command
level or to complete a particular command string by repeatedly pressing the Tab key.

Command-specific help
The help <cmd> command displays help for the command specified in <cmd>. This help
provides the same description of command options available through context-sensitive help.
However, command-specific help also provides a description of the command itself, as well as
the correct syntax required for the command.
The following figure shows a sample output for the help configure command.

Using the Command Line Interface

October 2010

13

CLI fundamentals

Command tree
The tree command displays a tree of all CLI commands associated with the current command
mode or level.
The following figure shows a sample output for the tree command.

Navigation keys
You can change the location of the cursor and edit commands in the CLI using the key
combinations shown in the following table.
The help edit command displays a table containing most of the information below.
Table 3: help edit output
Key stroke

14

Action

TAB

complete the command

Esc+B

go back one word

Esc+F

go forward one word

Esc+DEL

delete one word left to cursor

BackSpace

go back and delete one character

Ctrl+A

go back to the start of the line

Ctrl+B / Left arrow ()

go back one character

Ctrl+D / DEL

delete a character

Using the Command Line Interface

October 2010

Navigation commands

Key stroke

Action
OR
if the line is empty, go up one level

Ctrl+E

go forward to the end of the line

Ctrl+F / Right arrow ()

go forward one character

Ctrl-K

delete the line ahead of the cursor

Ctrl+L

refresh the line

Ctrl+N / Down arrow ()

go to the next command in history

Ctrl+P / Up arrow ()

go to the previous command in history

Ctrl+U

delete the entire line

Ctrl+W

delete one word left to cursor

Ctrl+Z

exit to top level

Navigation commands
The following commands provide additional navigation in the CLI.
Table 4: Navigation commands
Command

Definition

exit

Exit <level nos> exits the specified number of command levels. When
this command is executed from the top level, it terminates the CLI
session.

pop

In configuration mode, the pop command sets the command level back
to the main configuration mode level ( SR4134/configure# .

no command
The no command is always used as a prefix to a command to negate the action performed by
that command. The no command removes or clears the configuration or operation controlled
by the specified command.

Using the Command Line Interface

October 2010

15

CLI fundamentals

Command abbreviations
The SR2330/4134 accepts abbreviations for commands, as long as there is only one possible
choice to complete the abbreviated command. For example, sh in 2/3 is an acceptable
abbreviation for the show interface command.

Command history
The CLI maintains a list of entered commands. From the command line, you can scroll through
the list of previously executed commands by pressing the up arrow key (). The CLI stores a
maximum of 100 commands.

Configuration file
In addition to manual configuration, you can set the router system parameters using a
configuration file stored in flash memory, or on a network server. This is useful for restoring a
saved configuration to your router, or for copying a saved configuration to another router.
Configuration files have a .cfg extension.
Create a config file by using the save command.

Module slot and port numbering


The SR2330/4134 supports a variety of modules, each with unique configuration requirements.
To configure these modules, you must specify the slot in which the module is located, and
typically the individual port on the module to configure, in the format slot/port.
As shown in the following figure, the SR4134 chassis provides a slot numbering legend directly
above Chassis SFP Ethernet ports 0/3 and 0/4. The legend shows how slots are numbered
on the Secure Router 4134.

16

Using the Command Line Interface

October 2010

Module slot and port numbering

Figure 1: Secure Router 4134 slot numbering legend

Slots 1 through 4 are Small Module slots, and slots 5 through 7 are Medium Module slots. If
you insert a Large Module, it spans slots 6 and 7. In this case, the Large Module is identified
in the Command Line Interface (CLI) as slot 6.
The slot/port format also applies to the onboard Chassis Ethernet ports, but for these ports,
the assigned slot number is 0. As a result, the rear panel Fast Ethernet management port is
numbered 0/0, and the front panel Gigabit Ethernet ports are number 0/1 through 0/4.
With the Secure Router 2330, all slots and ports are labelled directly on the chassis.
The following figure shows the front panel of the Secure Router 2330.

Figure 2: Secure Router 2330 front panel

The following table describes the built-in slots and ports available on the front panel of the
Secure Router 2330.
Table 5: Secure Router 2330 front panel description
Item

Description

Small Module slot 1

Small Module slot 2

Small Module slot 3

Power input

Four Fast Ethernet ports (FE 0/1 through FE 0/4)

Using the Command Line Interface

October 2010

17

CLI fundamentals

Item

Description

Two 10/100/1000Base-T ports (GE 0/5 and 0/6), which use dual RJ-45
connector with integrated Gigabit Ethernet magnetics

Two Small Form-factor Pluggable (SFP) ports (GE 0/7 and 0/8), for plug-in SFP
modules

Console port

Compact Flash slot (CF1)

10

Ground lug

For more information about the supported modules for the SR2330/4134, see Avaya Secure
Router 2330/4134 Installation Hardware Components (NN47263-500).

Secure Router 4134 Voice Carrier medium module subslots


The Voice Carrier medium module (VCMM) allows you to expand the number of available small
slots on the SR4134. When installed in a medium slot, the module provides four additional
subslots that can house up to four small FXS or FXO modules. Only FXS or FXO modules can
be installed in the Voice Carrier module.
The following figure shows the four-slot Voice Carrier medium module with slot covers installed
and identifies the subslot numbers. To configure modules in the Voice Carrier medium module,
you must specify the medium slot in which the Voice Carrier module is located, the subslot in
which the FXS or FXO module is located, and typically the individual port on the module to
configure, in the format slot/subslot/port.

Figure 3: Voice carrier medium module subslot numbering

18

Using the Command Line Interface

October 2010

Chapter 4: Boot CLI fundamentals


The Boot command line interface (CLI) is a text-based interface that provides commands for configuring
the router boot process. You can access the Boot CLI only through a direct connection to the console port
and only during the boot process. To access the Boot CLI, during the boot process press any key until the
boot prompt appears.
This section contains information about the basic Boot CLI commands with the Avaya Secure Router
2330/4134.
You can specify to boot the router from any of the following locations: TFTP, FTP, CF0, CF1, or USB.
CF0 is the main internal Compact Flash memory where the system image and configuration files are
stored. CF1 is the external Compact Flash slot.

Boot CLI command list


The following table contains descriptions of the Boot CLI commands.
Table 6: Boot CLI command list
?

print this list

boot (load and go)

print boot parameters

change boot parameters

g <adrs>

go to address

d adrs[,n]

display memory

m <adrs>

modify memory

f adrs, nbytes,
value

fill memory

t adrs, adrs,
nbytes

copy memory

print fatal exception

print boot logo with version

n netif

print network interface device address

available boot devices are: "tftp","ftp","cf0","cf1","usb"

Using the Command Line Interface

October 2010

19

Boot CLI fundamentals

show bootrom header information

show file list in a USB device

format a USB device

L [0|1]

show file list in CF0 or CF1.

F [0|1]

format the CF0 or CF1

show simple PCI device scan result

dram test after cold reset

show current boot image (Golden/Normal)

select a boot image will be running at the next boot

show simple slot insertion status

print status of watchdog timer

V adrs, nbytes,
value

clear NVRAM area with value

cold reset

reset to factory (NVRAM/CF)

Checksum enable:
0

disable checking image checksum

enable checking image checksum

Show header enable:


0

disable showing image header contents

enable showing image header contents

Save bootrom image:


0

autoupdate NORMAL boot area rom image by checking version


autosync GOLDEN boot area rom image by checking baseline_version
baseline_version : base version for updating GOLDEN boot

save boot image on the NORMAL flash area

save boot image on the GOLDEN flash area

No bootrom update

Boot image redundancy

20

NORMAL boot
image

Default boot image saved on the NORMAL boot area

GOLDEN boot
image

Backup boot image saved on the GOLDEN boot area - GOLDEN image
area should not be corrupted

Using the Command Line Interface

October 2010

Boot CLI command list

From the CLI, you can view the configure boot parameters using the show boot command.
You can also configure boot parameters using the boot_params command.

Using the Command Line Interface

October 2010

21

Boot CLI fundamentals

22

Using the Command Line Interface

October 2010

Chapter 5: Basic CLI operations


Perform the basic CLI operations to log on to the switch, configure the switch from a terminal, or configure
the switch using saved configuration files from flash or the network.

Prerequisites
Valid CLI username and password. (Default username is admin and default password is
setup).

Navigation
Logging on on page 24
Configuring the router from a terminal on page 24
Configuring users on page 24
Modifying the administrator account user name on page 25
Modifying passwords for other users on page 26
Modifying your own password on page 26
Saving the current configuration to file on page 27
Encrypting password display on page 27
Adding a header to the configuration file on page 28
Adding comments at the beginning of a configuration on page 28
Adding comments to the end of a configuration on page 28
Configuring the router using configuration files from flash on page 29
Configuring the router using configuration files from the network on page 29
Configuring the timeout for console sessions on page 30
Displaying the console timeout on page 30
Displaying configured user accounts on page 30
Displaying connected users on page 30

Using the Command Line Interface

October 2010

23

Basic CLI operations

Displaying user account for current session on page 31


Displaying running configuration on page 31
Displaying stored configuration on page 31
Displaying system configuration on page 31

Logging on
Log on to the CLI to access the switch configuration commands.

Procedure steps
1. After the Avaya Secure Router 2330/4134 powers on and the following login prompt
appears:
login
enter the username (default is admin)
The CLI prompts for the password:
password:
2. Enter your user password (default is setup)
For detailed information about configuring passwords and administering users, refer to Avaya
Secure Router 2330/4134 Commissioning (NN47263-500).

Configuring the router from a terminal


Enter the configuration command mode from a console terminal or management workstation
to manually configure the router system parameters.

Procedure steps
To configure the router from a terminal, enter:
configure terminal

Configuring users
Configure additional usernames and passwords to provide access to the SR2330/4134 to
others.

24

Using the Command Line Interface

October 2010

Modifying the administrator account user name

To configure users, you must log in with level 1 user privileges using the administrator account.
You can configure any new user to have a user privilege level from 2 to 4. The administrator
account is the only account that has level 1 privileges.

Procedure steps
1. To enter the configuration mode, enter:
configure terminal
2. To create a user, enter:
user <user-name> [<user-level>]
The system prompts you to enter a password:
Please enter new password:
3. Enter the password.
The system prompts you to confirm the password:
Please re-enter password:
4. Reenter the password.
The system provides a system message confirming that the user has been added:
password is set user is added

Modifying the administrator account user name


Modify the administrator account user name.
To modify the administrator user name, you must log in with level 1 user privileges using the
administrator account (default user name is admin and password is setup).

Procedure steps
1. To enter the configuration mode, enter:
configure terminal
2. To modify the administrator account name, enter:
admin_name <admin-name>

Using the Command Line Interface

October 2010

25

Basic CLI operations

Modifying passwords for other users


When you are logged in with level 1 privileges using the administrator user account, you can
change the passwords of other users.

Procedure steps
1. To change a user password, enter:
password
The system prompts you for the user name:
name:
2. Enter the user name.
The system prompts you to enter the new password:
new password:
3. Enter the new password.
The system prompts you to reenter the new password:
re-enter password:
4. Reenter the new password.
The system confirms the password change:
password has been changed

Modifying your own password


When you are logged in using a non-administrator account, you can only change your own
configured user password.

Procedure steps
1. To change the existing password for your account, enter:
password
The system prompts you to enter the old password:
old password:
2. Enter the old password.
The system prompts you to enter the new password:

26

Using the Command Line Interface

October 2010

Saving the current configuration to file

new password:
3. Enter the new password.
The system prompts you to reenter the new password:
re-enter password:
4. Reenter the new password.
The system confirms the password change:
password has been changed

Saving the current configuration to file


Save the current configuration to a .cfg file on the flash. Save your configuration to flash each
time you make configuration changes to allow the system to boot from the latest configuration
upon subsequent reboot. You can also save the configuration to a network location using TFTP,
providing a backup of your configuration, or to copy the configuration to another router.

Procedure steps
To save the current configuration file, enter:
save {local <filename> | network <IP address> <file path>}

Encrypting password display


Encrypt the user passwords to ensure that no one can view them in plain text when they are
displayed on screen, or viewed in the configuration file. Use the no form of the command to
display passwords in plain text.

Procedure steps
1. To enter the configuration mode, enter:
configure terminal
2. To encrypt the passwords, enter:
[no] secure_passwords

Using the Command Line Interface

October 2010

27

Basic CLI operations

Adding a header to the configuration file


Add a header to add some descriptive information to the top of the configuration file. The
maximum length of the header is 80 characters.

Procedure steps
1. To enter the configuration mode, enter:
configure terminal
2. To add a header to the configuration file, enter:
header "<header>"
3. To save the header information to the configuration file, enter:
save local <filename>

Adding comments at the beginning of a configuration


Add comments at the beginning of a configuration. The comments appear after saving the
configuration using the save local command.
The maximum length of the comment string is 80 characters.

Procedure steps
1. To enter the configuration mode, enter:
configure terminal
2. To add comments at the beginning of a configuration, enter:
SYS_REM "<comments>"

Adding comments to the end of a configuration


Add comments to the end of a configuration. The comments appear after saving the
configuration using the save local command.
The maximum length of the comment string is 80 characters.

28

Using the Command Line Interface

October 2010

Configuring the router using configuration files from flash

Procedure steps
1. To enter the configuration mode, enter:
configure terminal
2. To add comments to the end of a configuration, enter:
SYS_REM_ "<comments>"

Configuring the router using configuration files from flash


Copy a saved .cfg file from flash to the router to reinstate a previously saved configuration.

Procedure steps
1. To configure the router using configuration files saved in flash, enter:
configure flash
The router responds with the following prompt:
filename:
2. Enter the full file name, for example .
SR4134.cfg

Configuring the router using configuration files from the


network
Copy a .cfg file from the network to the router to reinstate a previously saved configuration.

Procedure steps
1. To configure the router using configuration files saved in a network location, enter:
configure network
The router responds with the following prompt:
host:
2. Enter the DNS host name or IP address
The router responds with the following prompt:
filename:
3. Enter the full file name, for example :

Using the Command Line Interface

October 2010

29

Basic CLI operations

SR4134.cfg

Configuring the timeout for console sessions


Configure a timeout in seconds for console sessions. The default value is 900 seconds.

Procedure steps
1. To enter the configuration mode, enter:
configure terminal
2. To configure the timeout for a console session, enter:
console_timeout <0-3600>

Displaying the console timeout


Display the configured console timeout value.

Procedure steps
To display the timeout value for console sessions, enter:
show console_timeout

Displaying configured user accounts


Display configured users and their associated account levels.

Procedure steps
To display all configured users and their associated account levels, enter:
show user_accounts

Displaying connected users


Display users who are actively connected to the router.

30

Using the Command Line Interface

October 2010

Displaying user account for current session

Procedure steps
To display all users who are actively connected to the router, enter:
show users

Displaying user account for current session


Display the account used to log on to the router for the current session.

Procedure steps
To display the user account used for the current session, enter:
show whoami

Displaying running configuration


Display the current running configuration.

Procedure steps
To display the running configuration , enter:
show configuration running

Displaying stored configuration


Display the configuration that is stored in Flash.

Procedure steps
To display the stored configuration , enter:
show configuration stored

Displaying system configuration


Display the system configuration.

Using the Command Line Interface

October 2010

31

Basic CLI operations

With release 10.2, the output of the show system configuration is modified so that the
slot allocation is shown in consecutive order.

Procedure steps
To display the system configuration , enter:
show system configuration

32

Using the Command Line Interface

October 2010

Chapter 6: File management


Use the file management commands to manage files on the compact flash and USB, including copy,
delete, download, and upload.

Navigation
Copying files to and from compact flash or USB on page 33
Downloading files from the network to compact flash or USB on page 34
Uploading a file from compact flash or USB to the network on page 34
Formatting a compact flash or USB device on page 35
Renaming a file on compact flash or USB on page 35
Removing a file from compact flash or USB on page 36
Uploading the event log to the network on page 36
Displaying the file list from compact flash or USB on page 36
Displaying image file versions from compact flash or USB on page 36
Displaying Boot ROM file information on page 37

Copying files to and from compact flash or USB


Copy a file in compact flash memory or USB memory and assign the copy a new name.

Procedure steps
To copy a file to or from compact flash or USB, enter:

Using the Command Line Interface

October 2010

33

File management

file copy {/cf0/<filename> | /cf1/<filename> | /usb0/


<filename>} {/cf0/<dest-filename> | /cf1/<dest-filename> | /
usb0/<dest-filename>}
Table 7: Variable definitions
Variable
{/cf0/<filename> | /cf1/<filename> | /usb0/
<filename>}

Value
Specifies the source filename to be copied.

{/cf0/<dest-filename> | /cf1/<dest-filename> Specifies the destination filename.


| /usb0/<dest-filename>}

Downloading files from the network to compact flash or USB


Download a file from a remote host to compact flash or USB memory. You can transfer the file
using either TFTP or FTP. If you use this command with an FTP server, you must specify the
FTP user ID and password for authentication.

Procedure steps
To download a file to compact flash or USB, enter:
file download <source-host-ip> <source-dirpath/filename> {/cf0/
<filename> | /cf1/<filename> | /usb0/<filename>}
Table 8: Variable definitions
Variable

Value

<source-host-ip>

Specifies the source host (server) IP or IPv6


address.

<source-dirpath/filename>

Specifies the path name of the source file.

{/cf0/<filename> | /cf1/<filename> | /usb0/


<filename>}

Specifies the location and name of the file


destination.

Uploading a file from compact flash or USB to the network


Upload a file from compact flash or USB memory to a remote host. You can transfer the file
using either TFTP or FTP. If you use this command with an FTP server, you must specify the
FTP user ID and password for authentication.
To upload a file from compact flash or USB, enter:

34

Using the Command Line Interface

October 2010

Formatting a compact flash or USB device

file upload {/cf0/<filename> | /cf1/<filename> | /usb0/


<filename>} <dest-host-ip> <dest-path/filename> [<outgoinginterface>] [<user-id>] [<password>]
Table 9: Variable definitions
Variable

Value

<dest-host-ip>

Specifies the destination host (server) IP or


IPv6 address.

<dest-path/filename>

Specifies the destination path name for the


file.

{/cf0/<filename> | /cf1/<filename> | /usb0/


<filename>}

Specifies the source filename to be


uploaded.

[<outgoing-interface>]

Specifies the outgoing interface.

[<user-id>]

Specifies the FTP user ID.

[<password>]

Specifies the FTP password.

Formatting a compact flash or USB device


Format the compact flash or USB memory.

Procedure steps
To format the compact flash or USB, enter:
file format [/cf0 | /cf1 | /usb0]

Renaming a file on compact flash or USB


Rename a file on compact flash or USB

Procedure steps
To rename a file on compact flash or USB, enter:

Using the Command Line Interface

October 2010

35

File management

file rename {/cf0/<filename> | /cf1/<filename> | /usb0/


<filename>} <new-filename>

Removing a file from compact flash or USB


Remove a file from compact flash or USB

Procedure steps
To remove a file from compact flash or USB, enter:
file rm {/cf0/<filename> | /cf1/<filename> | /usb0/<filename>}

Uploading the event log to the network


Upload the event log to a network location.
To upload the event log to a network location, enter:
file upload_event_log <dest-host-ip> <remote-filename>

Displaying the file list from compact flash or USB


Display all files that are saved on the compact flash (CF0 or CF1) or USB. By default, CF0 files
are shown.

Procedure steps
To display the file list, enter:
[show] file ls [/cf0 | /cf1 | /usb0]

Displaying image file versions from compact flash or USB


Display the image file versions that are saved on compact flash (CF0 or CF1) or USB. By
default, CF0 files are shown.

Procedure steps
To display the image file versions, enter:

36

Using the Command Line Interface

October 2010

Displaying Boot ROM file information

[show] file version [/cf0 | /cf1 | /usb0]

Displaying Boot ROM file information


the Display information about the Golden and Normal boot files.

Procedure steps
To display the Boot ROM information, enter:
file show_boot

Using the Command Line Interface

October 2010

37

File management

38

Using the Command Line Interface

October 2010

Potrebbero piacerti anche