Using the CLI
Use the commands described in this section to navigate the CLI. For a complete description of the CLI, see Chapter 2, Command-Line Interface.
configure
- Use to enter Global Configuration mode.
- Global Configuration mode provides access to other configuration modes, such as Interface Configuration mode. See Chapter 2, Command-Line Interface.
- This command allows other commands to be executed from a terminal or a file.
- This command is not allowed for a short time after a warm restart (warm switchover) occurs. This delay allows some applications time to complete their warm-restart initialization. However, if the warm restart is not complete in 5 minutes, the warm start is cancelled and configuration access is restored.
- Example 1
host1#configureConfiguring from terminal or file [terminal]?Enter configuration commands, one per line. End with CNTL/Z.host1(config)#Example 2 host1#configureConfiguring from terminal or file [terminal]? fileFile name: system1.scrProceed with configure? [confirm]host1(config)#There is no no version. disable
- Use to exit Privileged Exec mode and return to User Exec mode.
- Use to move to a lower Privileged Exec mode level without returning to User Exec mode. Specifying a privilege level after the disable command changes the Privileged Exec mode to the lower level that you specify; you do not return to User Exec mode.
- Example 1
host1#disablehost1>Example 2 host1#show privilegePrivilege level is 10host1#disable 5host1#show privilegePrivilege level is 5There is no no version. do
host1(config)#do show configuration | begin interfaceThe do command functions the same as the run command. There is no no version. enable
- Use to move from User Exec to Privileged Exec mode.
- Privileged Exec mode allows you to access all other user interface modes. From here you can configure, monitor, and manage all aspects of the router.
- You can access the Privileged Exec commands using one of 16 levels of command privilege. If you do not enter a privilege level and you are not accessing the router through a RADIUS authentication account, the default CLI access level is 10. For information about CLI levels of access, see Privileged-Level Access in Chapter 2, Command-Line Interface.
- Set a password for this mode by using either the enable password or the enable secret command in Global Configuration mode. This protects the system from any unauthorized use.
- Once a password is set, anyone trying to use Privileged Exec mode will be asked to provide the password.
- Example 1 (accessing Privileged Exec mode at the default level 10)
host1>enablepassword:*******host1#Example 2 (accessing Privileged Exec mode at the highest level 15; a password is not set for this example) host1>enable 15host1#There is no no version. end
- Use to exit Global Configuration mode or any of the other Configuration modes. You may also use Ctrl+z to exit these modes.
- Executing this command returns you to the User Exec mode.
- Example
host1(config)#endhost1#There is no no version. exit
host1#exithost1>There is no no version. help
host1#helpUse the help options as follows:?, or command<Space>? - Lists the set of all valid next keywords or argumentspartial-keyword? - Lists the keywords that begin with a certain character stringpartial-keyword<Tab> - Completes the partial keywordThere is no no version. run
host1(config)#run show configuration | begin interfaceThe run command functions the same as the do command. There is no no version. sleep
- Use to make the CLI pause for a specified period of time (in seconds).
- Pausing is very useful in configuration script files.
- Example
host1#sleep 60There is no no version.