Basic IOS Command Structure

Basic IOS Command Structure
Each IOS command has specific format or syntax and is executed at the appropriate prompt. The general syntax for a command is the command followed by any appropriate keywords and arguments. Some commands include a subset of keywords and arguments that provide additional functionality. The figure shows these parts of a command.

The command is the initial word or words entered in the command line. The commands are not case-sensitive. Following the command are one or more keywords and arguments.

The keywords describe specific parameters to the command interpreter. For example, the show command is used to display information about the device. This command has various keywords that can be used to define what particular output should be displayed. For example:

Switch#show running-config

The command show is followed by the keyword running-config. The keyword specifies that the running configuration is to be displayed as the output.

A command might require one or more arguments. Unlike a keyword, an argument is generally not a predefined word. An argument is a value or variable defined by the user. As an example, when applying a description to an interface with the description command, enter a line such as this:

Switch(config-if)#description MainHQ Office Switch

The command is: description. The argument is: MainHQ Office Switch. The user defines the argument. For this command, the argument can be any text string of up to 80 characters.

After entering each complete command, including any keywords and arguments, press the key to submit the command to the command interpreter.

IOS Conventions

The figure and the following examples demonstrate some conventions for documenting IOS commands.

For the ping command:
Format:

Router>ping IP address

Example with values:

Router>ping 10.10.10.5

The command is ping and the argument is the IP address.

Similarly, the syntax for entering the traceroute command is:

Format:
Switch>traceroute IP address
Example with values:
Switch(config-if)#description Interface to Building a LAN


The command is description , and the argument applied to the interface is the text string, Interface to Building a LAN. Once the command is executed, that description will be applied to the particular interface.

Basic IOS Command Structure

Basic IOS Command Structure
Basic IOS Command Structure 
0 comments for "Basic IOS Command Structure"