The term “global” is
used to indicate characteristics or features that affect the system as a whole.
Global configuration mode is used to configure your system globally, or to
enter specific configuration modes to configure specific elements such as
interfaces or protocols. Use the
configure
terminal privileged EXEC command to enter global
configuration mode.
To access global
configuration mode, use the following command in privileged EXEC mode:
Command
|
Purpose
|
Device#
configure terminal
|
From
privileged EXEC mode, enters global configuration mode.
|
The following example
shows the process of entering global configuration mode from privileged EXEC
mode:
Device# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Device(config)#
Note that the system
prompt changes to indicate that you are now in global configuration mode. The
prompt for global configuration mode consists of the host-name of the device
followed by (config) and the pound sign ( # ). To list the commands available
in privileged EXEC mode, issue the
? command at
the prompt.
Commands entered in
global configuration mode update the running configuration file as soon as they
are entered. In other words, changes to the configuration take effect each time
you press the Enter or Return key at the end of a valid command. However, these
changes are not saved into the startup configuration file until you issue the
copy
running-config
startup-config EXEC mode command. This behavior is
explained in more detail later in this document.
As shown in the
example above, the system dialogue prompts you to end your configuration
session (exit configuration mode) by pressing the Control (Ctrl) and “z” keys
simultaneously; when you press these keys,
^Z is printed
to the screen. You can actually end your configuration session by entering the
Ctrl-Z key combination, using the
end command,
using the Ctrl-C key combination. The
end command is
the recommended way to indicate to the system that you are done with the
current configuration session.
Caution |
If you use Ctrl-Z
at the end of a command line in which a valid command has been typed, that
command will be added to the running configuration file. In other words, using
Ctrl-Z is equivalent to hitting the Enter (Carriage Return) key before exiting.
For this reason, it is safer to end your configuration session using the
end command.
Alternatively, you can use the Ctrl-C key combination to end your configuration
session without sending a Carriage Return signal.
|
You can also use the
exit command to
return from global configuration mode to EXEC mode, but this only works in
global configuration mode. Pressing Ctrl-Z or entering the
end command
will always take you back to EXEC mode regardless of which configuration mode
or configuration submode you are in.
To exit global
configuration command mode and return to privileged EXEC mode, use one of the
following commands:
Command
|
Purpose
|
Device(config)# end or
Device(config)# ^Z
|
Ends the
current configuration session and returns to privileged EXEC mode.
|
|
Exits the
current command mode and returns to the preceding mode. For example, exits from
global configuration mode to privileged EXEC mode.
|
From global
configuration mode, you can enter a number of protocol-specific,
platform-specific, and feature-specific configuration modes.
Interface
configuration mode, described in the following section, is an example of a
configuration mode you can enter from global configuration mode.