• Aucun résultat trouvé

Router Configuration Modes

Dans le document CCSP SECUR Exam Certification Guide (Page 97-100)

Foundation Topics

Router Configuration Modes

Before jumping into the command-line interface (CLI) of the Cisco router, it is important to understand the different command modes available. Consider the command mode to be a level where you are able to perform specific functions. If you are not at the correct level, you cannot perform the correct function (to configure the router). This is a very simplified explanation but will make more sense as each mode is discussed. The following are command modes on a Cisco router:

ROM monitor mode—The ROM monitor mode is the mode the router boots to if it cannot find a valid system image. You only need to use this mode if you need to change the system boot parameters to include resetting the system password. If the router has a working image installed, you need to press the Break key during the first 60 seconds of the router boot sequence.

User EXEC mode—The user EXEC mode is the mode that you connect to by default. If the router is configured with a password, you are prompted for the password and given three attempts to provide the correct password. You will know that you are in the user EXEC mode because the router displays the host name followed by a right-angle bracket (>) symbol.

RouterA>

In the user EXEC mode, you can perform limited functions to check the status of the router but cannot change the router configuration. To exit the user EXEC mode, use the command logout.

Privileged EXEC mode—To get from the user EXEC mode to privileged EXEC mode, use the enable command. If an enable password (or better yet, enable secret password) has been con-figured (and it should have), you are again prompted for a password and given three attempts.

In this mode, the router displays its host name followed by the hash (#) symbol.

RouterA> enable RouterA#

In the privileged EXEC mode, you can perform all the functions that were available in the user EXEC mode but still cannot make any configuration changes. You do, however, have access to show and debug commands that are not available in the user EXEC mode. The privileged EXEC mode is the path to the global configuration mode. To return to the user EXEC mode, use the command disable.

RouterA# disable RouterA>

Configuration modes and submodes—There are many different configuration modes. Each of these makes changes to the device configuration. To ensure that those configuration changes are not lost if the router reboots, you must copy the running configuration to the startup config-uration. The type and number of configuration submodes depends on the type of router, the IOS version, and the components installed on the router.

— Global configuration mode—The command for accessing the global configuration mode is configure terminal. In the global configuration mode, the router continues to display its host name followed by (config) and the # symbol.

RouterA# configure terminal RouterA(config)#

The global configuration mode is where you can make “global” changes to the configuration of the router. A very common example of a global configuration is the creation of an access list. From the global configuration mode, you can move to a position that enables you to configure specific components of the router, such as the router interfaces, VPN components (isakmp, crypto, and so on), CLI connections (line), AAA server groups, and many more. To exit to the privileged global configuration mode, use the key combination Ctrl-Z or type the command end.

RouterA(config)# end RouterA#

— Interface configuration mode—From the global configuration mode, the command for accessing the interface configuration submode is interface type interface-number. The router displays its host name followed by (config-if) indicating that it is in the interface configuration mode.

RouterA(config)# interface Ethernet 0 RouterA(config-if)#

At this point, you are ready to configure the interface that you have selected. If you are configuring subinterfaces, you need to use the same command to enter the subinterface configuration mode.

RouterA(config)# interface Ethernet 0.1 RouterA(config-subif)#

It is also possible to enter the subinterface configuration mode from the interface configuration mode due to a backward command link.

RouterA(config-if)# interface Ethernet 0.1 RouterA(config-subif)#

Router Configuration Modes 65

— Line configuration mode—Another configuration submode that must be configured is the line configuration. This is the mode used to configure the CLI access to the router. The command for accessing the line configuration mode from the global configuration mode is line type number.

RouterA(config)# line con 0 RouterA(config-line)#

To exit the configuration mode and return to the privileged EXEC mode, use the key combination Ctrl-Z or type the command end.

RouterA(config-subif)# end RouterA#

To return to the global configuration mode, type the command exit. (This command works for both interface configuration and subinterface configuration modes.)

RouterA(config-subif)# exit RouterA(config)#

For a list of the available commands in each configuration, you can use the question mark (?). This is perhaps the most useful command written into the Cisco IOS Software. In the event that you are not completely familiar with the correct syntax of a command, it is possible to input a portion of the command followed by ?. The router then provides you with the correct syntax. Table 4-2 shows how to navigate between modes when configuring the router.

NOTE The command prompts used in these examples are the default prompts. It is possible to change the system prompt (>, #) by using the prompt command while in the global configuration mode.

Table 4-2 Configuration Modes on the Cisco Router

Command Description

Router> enable Password: ********

Enter the router in the user EXEC mode. Use the enable command and the correct password to enter the privileged EXEC mode.

Router# configure terminal Enter the global configuration mode.

Router# (config) ip routing Enable IP routing on the router.

Router# (config) hostname RouterA Configure the router host name to RouterA.

continues

Dans le document CCSP SECUR Exam Certification Guide (Page 97-100)