web analytics

Configuration Submodes and Contexts

Configuration mode itself contains a multitude of commands. To help organize the configuration,
IOS groups some kinds of configuration commands together. To do that, when using
configuration mode, you move from the initial mode—global configuration mode—into
subcommand modes. Context-setting commands move you from one configuration subcommand
mode, or context, to another. These context-setting commands tell the switch the
topic about which you will enter the next few configuration commands. More importantly,
the context tells the switch the topic you care about right now, so when you use the ? to
get help, the switch gives you help about that topic only.

NOTE Context-setting is not a Cisco term. It is just a description used here to help make
sense of configuration mode.

The best way to learn about configuration submodes is to use them, but first, take a look
at these upcoming examples. For instance, the interface command is one of the most commonly
used context-setting configuration commands. For example, the CLI user could enter
interface configuration mode by entering the interface FastEthernet 0/1 configuration
command. Asking for help in interface configuration mode displays only commands that are
useful when configuring Ethernet interfaces. Commands used in this context are called subcommands—
or, in this specific case, interface subcommands. When you begin practicing
with the CLI with real equipment, the navigation between modes can become natural. For
now, consider Example 6-4, which shows the following :
■ Movement from enable mode to global configuration mode by using the configure
terminal EXEC command
■ Using a hostname Fred global configuration command to configure the switch’s name
■ Movement from global configuration mode to console line configuration mode (using
the line console 0 command)
■ Setting the console’s simple password to hope (using the password hope line subcommand)
■ Movement from console configuration mode to interface configuration mode (using the
interface type number command)
■ Setting the speed to 100 Mbps for interface Fa0/1 (using the speed 100 interface subcommand)
■ Movement from interface configuration mode back to global configuration mode (using
the exit command)

Example 6-4 Navigating Between Different Configuration Modes
Free CISCO CCNA Routing and Switching ICND1 Study Guide
Free CISCO CCNA Routing and Switching ICND1 Study Guide

The text inside parentheses in the command prompt identifies the configuration mode.
For example, the first command prompt after you enter configuration mode lists (config),
meaning global configuration mode. After the line console 0 command, the text expands
to (config-line), meaning line configuration mode. Each time the command prompt changes
within config mode, you have moved to another configuration mode.

Table 6-4 shows the most common command prompts in configuration mode, the names of
those modes, and the context-setting commands used to reach those modes.
Free CISCO CCNA Routing and Switching ICND1 Study Guide

You should practice until you become comfortable moving between the different configuration
modes, back to enable mode, and then back into the configuration modes. However,
you can learn these skills just doing labs about the topics in later chapters of the book. For
now, Figure 6-8 shows most of the navigation between global configuration mode and the
four configuration submodes listed in Table 6-4.
Free CISCO CCNA Routing and Switching ICND1 Study Guide
Figure 6-8 Navigation In and Out of Switch Configuration Modes

NOTE You can also move directly from one configuration submode to another, without
first using the exit command to move back to global configuration mode. Just use the commands
listed in bold in the center of the figure.

You really should stop and try navigating around these configuration modes. If you have
not yet decided on a lab strategy, spin the DVD in the back of the book, and install the
Pearson Sim Lite software. It includes the simulator and a couple of lab exercises. Start any
lab, ignore the instructions, and just get into configuration mode and move around between
the configuration modes shown in Figure 6-8.

No set rules exist for what commands are global commands or subcommands. Generally,
however, when multiple instances of a parameter can be set in a single switch, the command
used to set the parameter is likely a configuration subcommand. Items that are set once
for the entire switch are likely global commands. For example, the hostname command is
a global command because there is only one hostname per switch. Conversely, the speed
command is an interface subcommand that applies to each switch interface that can run at
different speeds, so it is a subcommand, applying to the particular interface under which it
is configured.

Subscribe To Get

Latest IT certification News 

Help You Pass Any IT Exam