
This chapter covers the following topics:
Logging in
The first step in accessing the MAX TNT command line is to log into the system. You can log in from a PC connected to the unit's serial port, or from a PC that has Telnet access to the system. When you log in, you are prompted for a user name:
User:If you are logging in for the first time and need the default password assigned to the MAX TNT Admin login, see the MAX TNT Hardware Installation Guide.
If an administrator has already created a User profile for you and given you the name and password required to use it, you can log in by supplying that information. In addition to specifying a name and password, a User profile sets permissions that determine which classes of commands you can use. Alternatively, you might be able to log in as the Admin user, with full permissions. (For more information about permissions and command classes, see the next section.)
Typically, the name specified in your User profile appears as your system prompt. For example, if you log in as Admin, the following prompt appears:
admin>This guide assumes that you have the permissions required to perform all of the tasks described. For sake of example, it shows the Admin login prompt, but the actual prompt on your screen could represent any login with comparable permissions. For example:
User: joann
Password: joann-password
joann>You can display the name of the current User profile by entering the Whoami command:
admin> whoami
admin
What commands are available?
To display the commands that your User profile makes available, enter the Help (or ?) command. The following example shows the commands available for the Admin login. The left column shows command names, and the right column shows the command class, which determines the permissions required to use the command. To list all commands, even if you do not have the required permissions, append the -a option to the Help command.
admin> ?The last line in the sample output:
? ( user )
arptable ( system )
auth ( user )
callroute ( diagnostic )
clear ( user )
clock-source ( diagnostic )
clr-history ( system )
connection ( system )
date ( update )
debug ( diagnostic )
delete ( update )
device ( diagnostic )
dir ( system )
dircode ( system )
ether-display ( diagnostic )
fatal-history ( system )
format ( code )
fsck ( code )
get ( system )
hdlc ( system )
help ( user )
if-admin ( diagnostic )
[More? <ret>=next entry, <sp>=next page, <^C>=abort]
[More? <ret>=next entry, <sp>=next page, <^C>=abort]shows your options for displaying additional output:
?) command.
Command class |
Permission |
|---|---|
|
System
|
|
|
Diagnostic
|
|
|
Update
|
|
|
Code
|
|
For more information about commands, see the MAX TNT Reference Guide.
Getting help for a specific command
If you include a command name after the Help (or ?) command, the system displays a usage statement for the command name you specify. For example, to get information about the Dir command:
admin> ? dirAlso, online help for a command that requires arguments appears if you enter the command without the arguments.
dir list all profile types
dir profile-type list all profiles of the specified type
dir profile-type profile-index list the specified profile instance
For more information about the Dir command, see Chapter 3, Working with Profiles.
Command-line shortcuts
You can use abbreviations, edit existing command lines, and reuse previously entered commands to save keystrokes and time. Using abbreviations
When you enter a command, you can type just enough characters to specify a unique string. The MAX TNT fills in the rest of the name automatically. For example, the following two commands are equivalent, as shown by their output:
admin> iproute
usage:
iproute add <destination/size> <gateway> [ pref ] [ metric ]
iproute delete <destination/size> [gateway]
admin> iprThe same principle applies when you specify a profile name. For example, the following command:
usage:
iproute add <destination/size> <gateway> [ pref ] [ metric ]
iproute delete <destination/size> [gateway]
admin> dir eresults in an error message, because the string is not unique. But the following command:
admin> dir etherdisplays information about Ethernet profiles; for example:
88 08/14/1996 14:20:53 { shelf-1 controller 1 }
This principle applies to any command argument (except profile indexes, which must be specified fully). For example, the following two commands are equivalent:
admin> load boot-sr net host1 tntsr.bin
admin> load b n host1 tntsr.bin
Reusing commands (command history)
The command history buffer is a file containing the last 20 command lines. Once the buffer is full, it discards the oldest command line when you add a new one by pressing Enter to execute a command.
For example, you might type the following command and press Enter:
admin> read ip-interface {{1 c 1}0}
Then, if you press the Up Arrow key, the command line reappears:
admin> read ip-interface {{1 c 1}0}
The cursor is at the end of the line. Say you want to replace the c in the interface address with a 2. Press the Left Arrow key until the cursor is at the right edge of the c, then press Delete, then the 2 key:
admin> read ip-interface {{1 2 1}0}
Press Enter to execute the new command. The cursor can be positioned anywhere within the command line when you press Enter.
Copyright © 1998, Ascend Communications, Inc. All rights reserved.