text stringlengths 0 6.55k |
|---|
Configuration Submodes and Contexts 4 Configuration mode itself contains a multitude of commands. To help organize the configu- |
ration, 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 sub-command mode, or context, to another. These context-setting commands t... |
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 com- |
monly used context-setting configuration commands. For example, the CLI user could enter interface configuration mode by entering the interface FastEthernet 0/1 configuration com-mand. Asking for help in interface configuration mode displays only commands that are use-ful when configuring Ethernet interfaces. Commands ... |
■ 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) |
|||||||||||||||||||| |
|||||||||||||||||||| |
98 CCNA 200-301 Official Cert Guide, Volume 1 |
■ 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 4-4 Navigating Between Different Configuration Modes |
Switch# configure terminal |
Switch(config)# hostname Fred |
Fred(config)# line console 0 |
Fred(config-line)# password hope |
Fred(config-line)# interface FastEthernet 0/1 |
Fred(config-if)# speed 100 |
Fred(config-if)# exit |
Fred(config)# |
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), mean-ing global configuration mode. After the line console 0 command, the text expands to (con-fig-line), meaning line configuration mode. Each ti... |
Table 4-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. |
Table 4-4 Common Switch Configuration Modes |
Prompt |
hostname(config)# |
hostname(config-line)# |
hostname(config-if)# |
hostname(vlan)# |
Name of Mode |
Global |
Line |
Interface |
VLAN |
Context-Setting Command(s) to Reach This Mode |
None—first mode after configure terminal |
line console 0 |
line vty 0 15 |
interface type number |
vlan number |
You should practice until you become comfortable moving between the different configura-tion 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 4-8 shows most of the navigation betwee... |
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 com-mands listed in bold in the center of the figure. |
|||||||||||||||||||| Technet24 |
|||||||||||||||||||| |
Chapter 4: Using the Command-Line Interface 99 |
interface type/number |
exit |
Interface Mode |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.