Chapter 5. The Command-Line Interface

This chapter provides information and commands concerning the following topics:

Image Shortcuts for entering commands

Image Using the Image key to enter complete commands

Image Console error messages

Image Using the question mark for help

Image enable command

Image exit command

Image disable command

Image logout command

Image Setup mode

Image Keyboard help

Image History commands

Image terminal commands

Image show commands

Image Using the pipe parameter (|) with the show command

Shortcuts for Entering Commands

To enhance efficiency, Cisco IOS Software has some shortcuts for entering commands. Although these are great to use in the real world, when it comes time to write a vendor exam, make sure you know the full commands, not just the shortcuts.

Image

Using the Image Key to Complete Commands

When you are entering a command, you can use the Image key to complete the command. Enter the first few characters of a command and press the Image key. If the characters are unique to the command, the rest of the command is entered in for you. This is helpful if you are unsure about the spelling of a command.

Image

Console Error Messages

You may see three types of console error messages when working in the CLI:

Image Ambiguous command

Image Incomplete command

Image Incorrect command

Image

Using the Question Mark for Help

The following output shows you how using the question mark can help you work through a command and all its parameters.

Image

enable Command

Image

exit Command

Image

disable Command

Image

logout Command

Image

Setup Mode

Setup mode starts automatically if there is no startup configuration present.

Image

Note

The answer inside the square brackets, [ ], is the default answer. If this is the answer you want, just press Image. Pressing Image-C at any time will end the setup process, shut down all interfaces, and take you to user mode (Router>).



Note

You cannot use setup mode to configure an entire router. It does only the basics. For example, you can only turn on RIPv1, but not Open Shortest Path First Protocol (OSPF) or Enhanced Interior Gateway Routing Protocol (EIGRP). You cannot create access control lists (ACL) here or enable Network Address Translation (NAT). You can assign an IP address to an interface but not to a subinterface. All in all, setup mode is very limiting.

Entering setup mode is not a recommended practice. Instead, you should use the command-line interface (CLI), which is more powerful:

Would you like to enter the initial configuration dialog? [yes]: no

Would you like to enable autoinstall? [yes]: no

Autoinstall is a feature that tries to broadcast out all interfaces when attempting to find a configuration. If you answer yes, you must wait for a few minutes while it looks for a configuration to load. Very frustrating. Answer no.


Keyboard Help

The keystrokes in the following table are meant to help you edit the configuration. Because you’ll want to perform certain tasks again and again, Cisco IOS Software provides certain keystroke combinations to help make the process more efficient.

Image

History Commands

Image

terminal Commands

Image

Note

The default value of the terminal length x command is 24.



Note

If you set the terminal length x command to zero (0), the router will not pause between screens of output.


Image

Note

The history size command provides the same function as the terminal history size command.

Be careful when you set the size to something larger than the default. By telling the router to keep the last 256 commands in a buffer, you are taking memory away from other parts of the router. What would you rather have: a router that remembers what you last typed in or a router that routes as efficiently as possible?


show Commands

Image

Note

The last line of output from the show version command tells you what the configuration register is set to.


Using the Pipe Parameter (|) with the show Command

By using a pipe (|) character in conjunction with a show command, you can filter out specific information that you are interested in.

Image

Note

You can use the pipe parameter and filters with any show command.



Note

The filtering expression has to match exactly with the output you want to filter. You cannot use shortened forms of the items you are trying to filter. For example, the command

Router#show running-config | section gig0/0

will not work because there is no section in the running-config called gig0/0. You must use the expression GiagbitEthernet0/0 with no spelling errors or extra spaces added in.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.218.147