The word "Router" is replaced with your router's hostname if the hostname is already configured.

Similar documents
Command-Line Interface (CLI) Basics

Using the Cisco NCS Command-Line Interface

Command-Line Interfaces

Lab Command Modes and Router Identification. Objective. Background/Preparation. Step 1 Login to the router in user EXEC mode

Introduction To Cisco IOS

Cisco IOS Software Basic Skills

King Fahd University of Petroleum & Minerals. Configuration of Routers and Establishing Routed Networks

Using the Command-Line Interface

Command-Line Interfaces

Configuring for the First Time

Basic IOS Configuration and Basic Serial WAN Connectivity

4(b): Assign the IP address on the Serial interface of Router. Console Cable

Lab Using the Boot System Command. Objective. Background/Preparation

Cisco IOS Configuration Basics

Lab 3: Basic Device Configuration

Using the Command-Line Interface

Practice Dynagen. Winpcap 4.0. RPMs for are now available in the download section. Thanks to Sean Walberg for performing the packaging.

Using Cisco IOS Software

First-Time Configuration

Lab Troubleshooting RIP

CCNA 1 Chapter 2 v5.0 Exam Answers 2013

Lab Configuring Router Passwords. Objective. Background/Preparation. Step 1 Login to the router in user EXEC mode

Lab Command Line Fundamentals Instructor Version 2500

Basic IOS Command Structure. Router#disable Router>

Lab 7 Configuring Basic Router Settings with IOS CLI

Initial Configuration on ML-Series Card

ord Recovery Procedure for the Cisco Catalyst 8510 Multiserv

~ 1 ~ Ankara University Department of Computer Engineering COM LAB 1 Part 1

Password Recovery Procedure for the Cisco 3600 and 3800 Series Routers

This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and

IOS and Configuration Basics

Antonio Cianfrani. Packet Tracer

Password Recovery Procedure for the Cisco 801, 802, 803, 804, 805, 811, and 813 Series Routers

This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and

CCNA 1 Chapter 2 v5.0 Exam Answers %

Using Cisco IOS XE Software

CHAPTER 2 ACTIVITY

Using the Cisco IOS Command-Line Interface

Checklists for Configuring the Gateway

Network Cable : Configure & Verifying Cross-Over Cable. Network Profile: Network Discovery, File and Printer sharing

Lab 1. CLI Navigation. Scenario. Initial Configuration for R1

Configuring Local Authentication

Lab Advanced Telnet Operations Instructor Version 2500

Chapter 11. Configuring and Testing Your Network

KIM DONNERBORG / RTS. Cisco Lab Øvelse Af Kim Donnerborg / RTS. Side 0 af 8

Using the Command-Line Interface (CLI)

Password Recovery Procedure for the Cisco 1700 and 1800 Series Routers

CCNA relevante Befehle

co Password Recovery Procedure for the Cisco 1700 Series R

Chapter 5 Router and IOS Basics

Lab Well-Known Port Numbers and Multiple Sessions

Lab Configuring OSPF Timers

The Lab. The lab (cont ) 5 (6) routers ETSF05 + ETSF The routing lab. Jens A Andersson. Many links (vlans) Front-end server

Initial Configuration

Using the Command-Line Interface

Configuration File Management Commands

Lab Configuring OSPF Timers 2500 Series

Telnet, Console and AUX Port Passwords on Cisco Routers Configuration Example

Upgrading the Software

TELECOMMUNICATION MANAGEMENT AND NETWORKS

CCNA Explorer 1 Chapter 11 Configuring & Testing Your Network

Lab Troubleshooting Routing Issues with show ip route and show ip protocols Instructor Version 2500

Module 9, Assignment 7

Before you start the lab exercises see the lab administrator or EEE3080F tutor to get assigned to your routers.

LAB MANUAL for Computer Network

Lab 5.2.6b Managing IOS Images with ROMmon and Xmodem Instructor Version 2500

Student Instructions: "Rob Router" Learns How to Communicate...Again!

LAB 3 Basic Switch Configuration Commands

Lab: RIP v2 with VLSM

Lab Configuring the OSPF Routing Process

Configure Initial Router Settings on Cisco 4000 Series ISRs

Console Port, Telnet, and SSH Handling

2.1. Device Connection

SEMESTER 2 Chapter 1 Planning and Cabling a Network V 4.0

Backup a copy of a router IOS from flash to a TFTP server. Reload the backup IOS software image from a TFTP server into flash on a router.

Lab Verifying RIP v2 Configuration

Lab Troubleshooting IP Address Issues Instructor Version 2500

Lab Configuring OSPF Authentication 2500 Series

Using the Command-Line Interface

Configuring Switch-Based Authentication

config mode: Router> enable Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z.

Examples of Cisco APE Scenarios

Lab Establishing and Verifying a Telnet Connection Instructor Version 2500

CCNA 1 Chapter 11 V4.0 Answers

CCENT Study Guide. Chapter 6 Cisco s Internetworking Operating System (IOS)

Using the Command-Line Interface

Table of Contents. Cisco Password Recovery Procedure for the Cisco 2000, 2500, 3000, 4000, AccessPro, 7000 (RP), AGS, IGS, STS

Lab Configuring IGRP Instructor Version 2500

Maintaining the MGX RPM-PR

Catalyst 2960-X Switch Routing Configuration Guide, Cisco IOS Release 15.0(2)EX

CCNA2 Chapter 1 Practice

The Project Study two different routing protocols for intra domain Internet routing Hands-on experience

Lab Manual. ISC 350 (Networks and Telecommunication) Information Technology Solutions. Prepared by: Eng. Altaf Al Farhan.

Lab Backing up Configuration Files

Cable Commands: t. timeout idle-session, page 2 timeout init-session, page 3 timeout off-session, page 4 type, page 5

Powering On the Cisco VG224 Voice Gateway

Lab Configuring OSPF Authentication

Lab Troubleshooting Routing Issues with debug Instructor Version 2500

Education by Simulation Stand Alone Labs For CCNA

Lab Configuring ISDN BRI (U-Interface)

Transcription:

1.2 IOS User Modes There are two primary modes of operation within the IOS: user mode and privileged mode. When you first connect to the router, you are placed in the user mode. The Cisco documentation refers to this as the user exec mode; I am going to omit "exec" throughout this book. The user mode is indicated by the prompt: Router> The word "Router" is replaced with your router's hostname if the hostname is already configured. The show commands in user mode are limited to a few basic levels. You cannot edit or view configurations at this stage; you can only view the router status and other miscellaneous information. To obtain a basic listing of commands, type a question mark: Router>? Editing the router's configuration requires you to be in the privileged exec mode, which I simply call "privileged mode." Use the enable command to enter this mode: Router>enable Password: Router# Privileged mode prompt You can always tell whether you are in user mode or privileged mode by looking at the prompt. The user mode prompt has a > at the end; the privileged mode prompt always has a # at the end, regardless of the submode. If you are familiar with Unix, you can equate privileged mode to "root" access. You could also equate it to the administrator level in NT or the supervisor in NetWare. In this mode, you have permission to access everything inside the router, including configuration commands. However, you can't type configuration commands directly. Before you can change the router's actual configuration, you must enter a submode of the privileged mode by giving the command configure terminal (see Section 1.3 for a shortcut). This command can be entered only when you are in the privileged mode. Router#configure terminal Enter configuration commands, one per line. End with Ctrl-Z Router(config)# Configuration mode To exit from configuration mode, you can use the command exit or type Ctrl-Z. To exit from enable (privileged) mode, you can use the disable command. So to exit both configuration and enable mode, use the following sequence of commands:

Router(config)#exit Router#disable Router> Privileged mode has several submodes in addition to configuration mode; each has its own prompt. To enter these submodes, you must first enter configuration mode by giving the configure terminal command. Here's a summary of the most common modes and prompts (there are many others): Global configuration mode Prompt: Router(config)# This level allows you to enter commands directly into the router configuration. From this level, you can enter any of the other three levels listed here. Once you are done entering commands into the configuration, use Ctrl-Z, exit, or the end command to return to the privileged prompt. The device's hostname is a good example of a configuration item you would find in the global configuration mode. Interface configuration mode Prompt: Router(config-if)# At this level, you are entering interface-specific commands. To enter this mode from theconfiguration prompt, use the command interface followed by an interface name, such as ethernet0, serial0, or serial1. Interface commands are discussed in Chapter 5. Use the exit command to exit from this prompt and return to the configuration prompt. Line configuration mode Prompt: Router(config-line)# From this prompt, you can enter line-specific commands. To enter this mode from the configuration prompt, use the command line, followed by a line type such as vty, console, tty, or async and a line number. The line configuration commands are discussed in Chapter 4. Once again, use the exit command to exit this mode and return to the configuration prompt. Router configuration mode Prompt: Router(config-router)#

From this prompt, you can enter only routing commands. To enter this mode from the configuration prompt, use the command router, followed by a routing protocol, such as rip or igrp. These commands differ widely depending on the routing protocol being used. Routing configuration commands are discussed in Chapter 8 through Chapter 10. Use the exit command to exit this mode and return to the configuration prompt. Figure 1-1 is a flow chart that illustrates the transitions between the most common command modes and submodes. (This list is not comprehensive.) The arrows are labeled with the commands that cause the transitions between the modes. Figure 1-1. Transitions between IOS command modes Configuration submodes provide a context in which certain commands are legal and others disallowed. It's one way that IOS tries to prevent you from making mistakes when configuring a router. In the quick-reference section, I list each

command with the context (or mode) in which it can be given. Contexts are clearly important on the command line, where the prompt shows the submode you're in. They are equally important in configuration files, where there are no such hints; you just have to know.

1.3 Command-Line Completion Command-line completion makes the IOS interface much more user-friendly. It saves you extra typing and helps out when you cannot remember a command's syntax. In a previous example, we used the command configure terminal: Router#configure terminal But you could have saved wear and tear on your hands by typing: Router#conf t IOS expands the command conf t to configure terminal. Another shortcut is to press Tab after typing "conf"; the router will fill in the best completion, which is "configure". Here is another example: Router#show running-config This long command can be shortened to: Router#sh ru The router knows that "show" is what you wanted because show is the only command that begins with "sh"; likewise, the only subcommand of show that begins with "ru" is running-config. If the router does not understand a command, it repeats the entire command line and places a caret (^) under the point at which it ran into trouble. For example: Router>show itnerface e0 >show itnerface e0 ^ % Invalid input detected at '^' marker. The caret symbol is pointing to the "t" in "itnerface", which is the command the router does not understand. We can quickly fix that by retyping the command: Router>show interface e0 We now get the correct output! Since we also know how to use shortcuts, we can type: Router>sh int e0 With this command we get the same result as its lengthy counterpart. Commandline completion saves a lot of typing, and it helps you keep your sanity when you're working with long commands.

Another form of command-line completion is the use of the Tab key. If you start a command by entering the first few characters, you can hit the Tab key. As long as there is only one match, the router will complete the command: for example, if you type "sh" and hit Tab, the router completes the "sh" with "show". If the router does not complete the command, you can enter a few more letters and try again. 1.4 Get to Know the Question Mark Previously, I said that you can get the available commands by typing? at the prompt. You can also use this trick to find the subcommands of any command. For example, if you know you want to use the copy command but cannot remember which subcommand you need, type: Router#copy? WORD Copy from flash device - format <dev:>[partition:][filename] flash Copy from system flash flh-log Copy FLH log file to server mop Copy from a MOP server rcp Copy from an rcp server running-config Copy from current system configuration startup-config Copy from startup configuration tftp Copy from a TFTP server Another use of the question mark is to find all commands that match what you have typed so far. For example, if you know the first part of a command, type it and then type a question mark. The router will return a list of all the matching commands. In the following example, we remember that the configure command begins with "co", but that's it. The router gives us the matching commands: Router#co? configure connect copy Note the important difference between these two examples. In the first example, there was a space before the question mark, which gave us the next command that complements copy. Had there not been a space, the router would have tried to complete the word "copy" for us, not given us the next available commands. In the next example, we did not add the space, so the router tried to complete "co" with all the commands it could find that start with "co". Another important rule to understand is that the router will return only commands that are relevant to the mode you are currently in. For example, if you are in user mode, you will be given only commands that apply to that mode. 1.5 Command-Line Editing Keys

IOS provides a number of keyboard shortcuts that let you edit the line you're typing. They should be familiar to any user of Unix or Emacs. Table 1-1 lists the command-line editing keys. Ctrl-a Ctrl-b Ctrl-d Ctrl-e Ctrl-f Ctrl-k Ctrl-n Ctrl-p Ctrl-t Ctrl-r Ctrl-u Keys Ctrl-w Ctrl-x Ctrl-y Ctrl-z Tab Up arrow Down arrow Left arrow Right Table 1-1. Command-line editing keys Commands Returns the cursor to the beginning of the current line. Moves the cursor back one character. (Equivalent to the left arrow key.) Deletes the character to the left of the cursor. Moves the cursor to the end of the line. Moves the cursor forward one character. (Equivalent to the right arrow key.) Deletes all the characters from the current cursor position to the end of the line. Goes to the next command in the session history. (Equivalent to the down arrow key.) Goes to the previous command in the session history. (Equivalent to the up arrow key.) Switches the current character with the character to the left of the cursor. Redraws or redisplays the current line. Clears the line. Deletes the word to the left of the cursor. Deletes from the cursor position to the beginning of the line. Pastes the most recently deleted characters to the current cursor position. Exits the current configuration mode and returns to the previous configuration mode. Tries to finish the current command. (Command completion.) Moves back through the history of commands. Moves forward through the history of commands. Moves the cursor to the left. Moves the cursor to the right.

Keys arrow Ctrl-^, then x Table 1-1. Command-line editing keys Commands Aborts the sequence. Breaks out of any executing command.