04 - The Command Structure
04 - The Command Structure
04 - The Command Structure
1
The Command Structure
Networking Today
2.3.1
Basic Switch and End Device
2 Conguration
Basic IOS Command Structure
2.0 Introduction
2.1 Cisco IOS Access This topic covers the basic structure of commands for the Cisco IOS. A network administrator must know the basic IOS
command structure to be able to use the CLI for device conguration.
2.1.3 Purpose of an OS
Switch>show ip protocols
2.1.4 Access Methods
After entering each complete command, including any keywords and arguments, press the Enter key to submit the command to
2.2.4 Navigate Between IOS Modes
the command interpreter.
2.2.7
Syntax Checker - Navigate IOS Command Syntax Check
Between IOS Modes
Convention Description
2.3.2 IOS Command Syntax Check
boldface Boldface text indicates commands and keywords that you enter literally as shown.
2.3.3 IOS Help Features italics Italic text indicates arguments for which you supply values.
Braces and vertical lines within square brackets indicate a required choice within an optional element. Spaces
2.3.5 Hot Keys and Shortcuts [x {y | z }]
are used to clearly delineate parts of the command.
2.3.6 Video - Hot Keys and Shortcuts For instance, the syntax for using the description command is description string. The argument is a string value provided by the
user. The description command is typically used to identify the purpose of an interface. For example, entering the command,
description Connects to the main headquarter oce switch, describes where the other device is at the end of the connection.
2.3.7 Packet Tracer - Navigate the IOS
The following examples demonstrate conventions used to document and use IOS commands:
Lab - Navigate the IOS by Using
2.3.8
Tera Term for Console Connectivity
ping ip-address - The command is ping and the user-dened argument is the ip-address of the destination device. For
example, ping 10.10.10.5.
2.4 Basic Device Conguration traceroute ip-address - The command is traceroute and the user-dened argument is the ip-address of the destination
device. For example, traceroute 192.168.254.254.
2.5 Save Congurations
If a command is complex with multiple arguments, you may see it represented like this:
2.6 Ports and Addresses Switch(config-if)# switchport port-security aging { static | time time | type {absolute | inactivity}}
2.7 Congure IP Addressing The command will typically be followed with a detailed description of the command and each argument.
The Cisco IOS Command Reference is the ultimate source of information for a particular IOS command.
2.8 Verify Connectivity
2.3.3
4 Physical Layer
The IOS has two forms of help available: context-sensitive help and command syntax check.
5 Number Systems Context-sensitive help enables you to quickly nd answers to these questions:
Command syntax check veries that a valid command was entered by the user. When a command is entered, the command line
interpreter evaluates the command from left to right. If the interpreter understands the command, the requested action is
8 Network Layer executed, and the CLI returns to the appropriate prompt. However, if the interpreter cannot understand the command being
entered, it will provide feedback describing what is wrong with the command.
9 Address Resolution
2.3.4
10 Basic Router Conguration
11 IPv4 Addressing
Check
12 IPv6 Addressing
Click Play in the gure to view a video demonstration of context-sensitive help and command syntax check.
13 ICMP
14 Transport Layer
15 Application Layer
Network Security
16
Fundamentals
4:02
2.3.5
The IOS CLI provides hot keys and shortcuts that make conguring, monitoring, and troubleshooting easier.
Commands and keywords can be shortened to the minimum number of characters that identify a unique selection. For example,
the congure command can be shortened to conf because congure is the only command that begins with conf. An even
shorter version, con, will not work because more than one command begins with con. Keywords can also be shortened.
Keystroke Description
Ctrl+K Erases all characters from the cursor to the end of the command line.
Esc D Erases all characters from the cursor to the end of the word.
Ctrl+U or Ctrl+X Erases all characters from the cursor back to the beginning of the command line.
Left Arrow or Ctrl+B Moves the cursor one character to the left.
Right Arrow or Ctrl+F Moves the cursor one character to the right.
Recalls the previous command in the history buer, beginning with the most recent
Up Arrow or Ctrl+P
command.
Down Arrow or Ctrl+N Goes to the next line in the the history buer.
Ctrl+R or Ctrl+I or Ctrl+L Redisplays the system prompt and command line after a console message is received.
Note: While the Delete key typically deletes the character to the right of the prompt, the IOS command structure does not
recognize the Delete key.
When a command output produces more text than can be displayed in a terminal window, the IOS will display a “--More--”
prompt. The following table describes the keystrokes that can be used when this prompt is displayed.
Keystroke Description
Space
Displays the next screen.
Bar
When in any conguration mode, ends the conguration mode and returns to
Ctrl-C privileged EXEC mode. When in setup mode, aborts back to the command
prompt.
When in any conguration mode, ends the conguration mode and returns to
Introduction to Networks Ctrl-Z
privileged EXEC mode.
Ctrl- All-purpose break sequence used to abort DNS lookups, traceroutes, pings,
Shift-6 etc.
1 Networking Today
2.1 Cisco IOS Access Click Play in the gure to view a video demonstration of the various hotkeys and shortcuts.
2.1.2 GUI
2.1.3 Purpose of an OS
2.3.4
Video - Context Sensitive Help
and Command Syntax Check
Connectivity
2.3.5 Hot Keys and Shortcuts
In this lab, you will complete the following objectives:
2.3.6 Video - Hot Keys and Shortcuts
Part 1: Access a Cisco Switch through the Serial Console Port
Part 2: Display and Congure Basic Device Settings
2.3.7 Packet Tracer - Navigate the IOS Part 3: (Optional) Access a Cisco Router Using a Mini-USB Console Cable
2.2 2.4
2.5 Save Congurations IOS Navigation Basic Device Conguration
4 Physical Layer
5 Number Systems
7 Ethernet Switching
8 Network Layer
9 Address Resolution
11 IPv4 Addressing
12 IPv6 Addressing
13 ICMP
14 Transport Layer
15 Application Layer
Network Security
16
Fundamentals