Cisco Systems


 


 

Modules:  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  10  |  11  |  CS  |  All  |
Module 2: Introduction to Routers
Module Overview  
2.1 Operating Cisco IOS Software
 
2.1.1 The purpose of Cisco IOS software
2.1.2 Router user interface
2.1.3 Router user interface modes 
2.1.4 Cisco IOS software features
2.1.5 Operation of Cisco IOS software
 
2.2 Starting a Router
 
2.2.1 Initial startup of Cisco routers
2.2.2 Router LED indicators
2.2.3 Examining the initial router bootup
2.2.4 Establishing a HyperTerminal session
2.2.5 Logging into the router
2.2.6 Keyboard help in the router CLI
2.2.7 Enhanced editing commands
2.2.8 Router command history
2.2.9 Troubleshooting command line errors
2.2.10 The show version command
 
Module Summary  
Module Quiz

 

 
Close Window
All contents copyright © 2003 Cisco Systems, Inc. All rights reserved.

 

Overview
 
Cisco technology is built around the Cisco Internetwork Operating System (IOS), which is the software that controls the routing and switching functions of internetworking devices. A solid understanding of the IOS is essential for a network administrator. This module will present an introduction to the fundamentals of the IOS and will provide practice in examining the features of the IOS. All network configuration tasks, from the most basic to the most complex, require a strong foundation in the basics of router configuration. This module will provide the tools and techniques for basic router configuration that will be used throughout this course.

Students completing this module should be able to:

  • Describe the purpose of the IOS
  • Describe the basic operation of the IOS
  • Identify various IOS features
  • Identify the methods to establish a command-line interface (CLI) session with the router
  • Move between the user command executive (EXEC) and privileged EXEC modes
  • Establish a HyperTerminal session on a router
  • Log into a router
  • Use the help feature in the command line interface
  • Troubleshoot command errors

    

2.1 Operating Cisco IOS Software  
  2.1.1 The purpose of Cisco IOS Software  
  As with a computer, a router or switch cannot function without an operating system. Cisco calls its operating system the Cisco Internetwork Operating System or Cisco IOS. It is the embedded software architecture in all of the Cisco routers and is also the operating system of the Catalyst switches. Without an operating system, the hardware does not have any capabilities. The Cisco IOS provides the following network services:
  • Basic routing and switching functions
  • Reliable and secure access to networked resources
  • Network scalability
  Web Links

Cisco IOS® Software Overview

http://www.cisco.com/warp/ public/732/

          

2.1 Operating Cisco IOS Software  
  2.1.2 Router user interface  
  The Cisco IOS software uses a command-line interface (CLI) as the traditional console environment. The IOS is a core technology that extends across most of the Cisco product line. Its operation details may vary on different internetworking devices.

This environment is accessible through several methods. One way to access the CLI is through a console session. A console uses a low speed serial connection directly from a computer or terminal to the console connection on the router. Another way to access a CLI session is by use of a dialup connection using a modem or null modem connected to the router AUX port. Neither of these methods require that the router have any network services configured. Another method of accessing a CLI session is to Telnet to the router. To establish a Telnet session to the router, at least one interface must be configured with an IP address, and virtual terminal sessions must be configured for login and passwords.

  

2.1 Operating Cisco IOS Software  
  2.1.3 Router user interface modes  
  The Cisco command-line interface (CLI) uses a hierarchical structure. This structure requires entry into different modes to accomplish particular tasks. For example, to configure a router interface, the user must enter interface configuration mode. From interface configuration mode, all configurations entered apply only to that particular interface. Each configuration mode is indicated with a distinctive prompt and allows only commands that are appropriate for that mode.

The IOS provides a command interpreter service known as the command executive (EXEC). After each command is entered, the EXEC validates and executes the command.

As a security feature the Cisco IOS software separates the EXEC sessions into two access levels. These levels are user EXEC mode and privileged EXEC mode. The privileged EXEC mode is also known as enable mode. The following are the features of the user EXEC mode and privileged EXEC mode:

  • The user EXEC mode allows only a limited number of basic monitoring commands. This is often referred to as a “view only” mode. The user EXEC level does not allow any commands that might change the configuration of the router. The user EXEC mode can be identified by the “>" prompt.
  • The privileged EXEC mode accesses all router commands. This mode can be configured to require a password from the user before accessing it. For added protection, it can also be configured to require a user ID. This allows only authorized users to access the router. Configuration and management commands require that the network administrator be at the privileged EXEC level. Global configuration mode and all other more specific configuration modes can only be reached from the privileged EXEC mode. The privileged EXEC mode can be identified by the "#" prompt.

To access the privileged EXEC level from the user EXEC level, enter the enable command at the “>” prompt. If a password is configured, the router will then ask for that password. For security reasons, a Cisco network device will not show the password that is entered. When the correct password is entered, the router prompt changes to “#”, indicating that the user is now at the privileged EXEC level. Entering a question mark (?) at the privileged EXEC level will reveal many more command options than those available at the user EXEC level.

  Lab Activity

e-Lab Activity: Logging into the Router

This purpose of this lab is to access the router command-line interface and activate privileged level configuration options.

 

   

  Lab Activity

e-Lab Activity: Router User Interface Modes

In this lab, the students will learn to use the enable command  to enter into privileged EXEC mode on the Cisco IOS.

 

   

  Web Links

Routing Basics 101

http://www.cisco.com/warp/public/779/ smbiz/community/ routing_basics_101.html

Cisco IOS Basic Skills

http://www.cisco.com/univercd/cc/td/ doc/product/ access/ acs_mod/ 1600/1600swcf/ swskills.htm

          

2.1 Operating Cisco IOS Software  
  2.1.4 Cisco IOS software features  
  Cisco provides IOS images for devices spanning a wide range of network product platforms.

To optimize the Cisco IOS software that these various platforms require, Cisco is working to develop many different Cisco IOS software images. Each image represents a different feature set that serves the various device platforms, available memory resources, and customer needs.

Although there are numerous IOS images for different Cisco device models and feature sets, the basic configuration command structure is the same. The configuration and troubleshooting skills acquired on any one device apply across a wide range of products.

The naming convention for the different Cisco IOS releases contains three parts:

  • The platform on which the image runs
  • The special features supported in the image
  • Where the image runs and whether it has been zipped or compressed

Specific IOS features can be selected using the Cisco Software Advisor. The Cisco Software Advisor is an interactive tool that provides the most current information and allows the selection of options that meet network requirements.

One of the main considerations when selecting a new IOS image is compatibility with the router flash and RAM memory. In general, the newer the release and the more features that it provides, the more memory it requires. Use the show version command on the Cisco device to check the current image and available flash. The Cisco support site has tools available to help determine the amount of flash and RAM required for each image.

Before installing a new Cisco IOS software image on the router, check to see if the router meets the memory requirements for that image. To see the amount of RAM, issue the show version command:

<output omitted>… cisco 1721 (68380) processor (revision C) with 3584K/512K bytes of memory.

This line shows how much main and shared memory is installed in the router. Some platforms use a fraction of DRAM as shared memory. The memory requirements take this into account, so both numbers have to be added together to find the amount of DRAM installed on the router.

To find out the amount of flash memory, issue the show flash command:

GAD#show flash
<output omitted>
15998976 bytes total (10889728 bytes free)

    

2.1 Operating Cisco IOS Software  
  2.1.5 Operation of Cisco IOS Software  
  The Cisco IOS devices have three distinct operating environments or modes:
  • ROM monitor
  • Boot ROM
  • Cisco IOS

The startup process of the router normally loads into RAM and executes one of these operating environments. The configuration register setting can be used by the system administrator to control the default start up mode for the router.

The ROM monitor performs the bootstrap process and provides low-level functionality and diagnostics. It is used to recover from system failures and to recover a lost password. The ROM monitor cannot be accessed through any of the network interfaces. It can only be accessed by way of a direct, physical connection through the console port.

When the router is running in boot ROM mode, only a limited subset of the Cisco IOS feature set is available. Boot ROM allows write operations to flash memory and is used primarily to replace the Cisco IOS image that is stored in flash. The Cisco IOS image can be modified in boot ROM by using the copy tftp flash command, which copies an IOS image stored on a TFTP server into the flash memory of the router.

The normal operation of a router requires use of the full Cisco IOS image as stored in flash. In some devices, the IOS is executed directly from flash. However, most Cisco routers require a copy of the IOS to be loaded into RAM and also executed from RAM. Some IOS images are stored in flash in a compressed format and have to be expanded when copied to RAM.

To see the IOS image and version that is running, use the show version command, which also indicates the configuration register setting. The show flash command is used to verify that the system has sufficient memory to load a new Cisco IOS image.

  Lab Activity

e-Lab Activity: Operation of the Cisco IOS

This lab demonstrates how to put a new Cisco IOS image onto the router.

 

   

  Web Links

Cisco IOS Technologies

http://www.cisco.com/warp/ public/732/Tech/

          

2.2 Starting a Router  
  2.2.1 Initial startup of Cisco routers  
  A router initializes by loading the bootstrap, the operating system, and a configuration file. If the router cannot find a configuration file, it enters setup mode. Upon completion of the setup mode a backup copy of the configuration file may be saved to nonvolatile RAM (NVRAM).

The goal of the startup routines for Cisco IOS software is to start the router operations. To do this, the startup routines must accomplish the following:

  • Make sure that the router hardware is tested and functional.
  • Find and load the Cisco IOS software.
  • Find and apply the startup configuration file or enter the setup mode.

When a Cisco router powers up, it performs a power-on self test (POST). During this self test, the router executes diagnostics from ROM on all hardware modules. These diagnostics verify the basic operation of the CPU, memory, and network interface ports. After verifying the hardware functions, the router proceeds with software initialization.

After the POST, the following events occur as the router initializes:

Step 1 The generic bootstrap loader in ROM executes. A bootstrap is a simple set of instructions that tests hardware and initializes the IOS for operation. 
Step 2 The IOS can be found in several places. The boot field of the configuration register determines the location to be used in loading the IOS. If the boot field indicates a flash or network load, boot system commands in the configuration file indicate the exact name and location of the image.
Step 3 The operating system image is loaded. When the IOS is loaded and operational, a listing of the available hardware and software components is output to the console terminal screen.
Step 4 The configuration file saved in NVRAM is loaded into main memory and executed one line at a time. The configuration commands start routing processes, supply addresses for interfaces, and define other operating characteristics of the router.
Step 5 If no valid configuration file exists in NVRAM, the operating system searches for an available TFTP server. If no TFTP server is found, the setup dialog is initiated.  

Setup is not intended as the mode for entering complex protocol features in the router. The purpose of the setup mode is to permit the administrator to install a minimal configuration for a router, unable to locate a configuration from another source. 

In the setup mode, default answers appear in square brackets [ ] following the question. Press the Enter key to use these defaults. During the setup process, Ctrl-C can be pressed at any time to terminate the process. When setup is terminated using Ctrl-C, all interfaces will be administratively shutdown.

When the configuration process is completed in setup mode, the following options will be displayed:

[0] Go to the IOS command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration to nvram and exit.
Enter your selection [2]:

  Lab Activity

Lab Exercise: Router Configuration Using Setup

In this lab the students will use the System Configuration Dialog (setup) to establish some basic router configuration.

 

   

  Web Links

The Typical Boot Process

http://csc.colstate.edu/summers/ NOTES/CS458/ chap11/tsld051.htm

          

2.2 Starting a Router  
  2.2.2 Router LED indicators  
  Cisco routers use LED indicators to provide status information. Depending upon the Cisco router model, the LED indicators will vary.

An interface LED indicates the activity of the corresponding interface. If an LED is off when the interface is active and the interface is correctly connected, a problem may be indicated. If an interface is extremely busy, its LED will always be on. The green OK LED to the right of the AUX port will be on after the system initializes correctly.

  Web Links

Reading the LEDs

http://www.cisco.com/en/US/products/ hw/routers/ps259/products_installation_ guide_chapter09186a008007e022.html#34028

          

2.2 Starting a Router  
  2.2.3 Examining the initial router bootup  
  The examples in Figures - show information and messages displayed during initial bootup. This information will vary, depending on the interfaces in the router and the Cisco IOS release. The screens displayed in this graphic are for reference only and may not exactly reflect what the screen displays on the console.

In Figure , the statement “NVRAM invalid, possibly due to write erase”, tells the user that this router has not been configured yet or that the NVRAM has been erased. A router must be configured, the configuration file saved to NVRAM, and then configured to use the NVRAM configuration file. The factory-default setting for the configuration register is 0x2102, which indicates that the router should attempt to load a Cisco IOS image from flash memory.

In Figure , the user can determine the bootstrap version and the IOS version the router is using as well as the router model, processor, and the amount of memory the router contains. Other information listed in this graphic includes:

  • The number of interfaces
  • The types of interfaces
  • The amount of NVRAM
  • The amount of flash memory

In Figure , the user has the option to enter setup mode. Remember, the primary purpose of the setup mode is to permit the administrator to install a minimal configuration for a router, unable to locate a configuration from another source.

  Web Links

Router Setup and Startup

http://csc.colstate.edu/summers/ NOTES/CS458/ chap11/tsld004.htm

                

2.2 Starting a Router  
  2.2.4 Establishing a HyperTerminal session  
  All Cisco routers include a TIA/EIA-232 asynchronous serial console port (RJ-45). Cables and adapters are needed to connect a console terminal to the console port. A console terminal is an ASCII terminal or PC running terminal emulation software such as HyperTerminal. To connect a PC running terminal emulation software to the console port, use the RJ-45 to RJ-45 rollover cable with the female RJ-45 to DB-9 adapter.

The default parameters for the console port are 9600 baud, 8 data bits, no parity, 1 stop bit, and no flow control. The console port does not support hardware flow control.

Take the following steps to connect a terminal to the console port on the router:

  1. Connect the terminal using the RJ-45 to RJ-45 rollover cable and an RJ-45 to DB-9 or RJ-45 to DB-25 adapter.
  2. Configure the terminal or PC terminal emulation software for 9600 baud, 8 data bits, no parity, 1 stop bit, and no flow control.

Figure shows a list of operating systems and the terminal emulation software that may be used.

 

Lab Activity

Lab Exercise: Establishing a Console Session with HyperTerminal

In this lab the students will connect a router and workstation using a console cable and configure HyperTerminal to establish a console session with the router.

 

   

  Web Links

Setting up HyperTerminal

http://www.alltel.net/~slashdot/ adsl/hyperterminal-setup.shtml

          

2.2 Starting a Router  
  2.2.5 Logging into the router  
  To configure Cisco routers, the router user interface must be accessed with a terminal or by remote access. When accessing a router, a user must login to the router before any other commands are entered.

For security purposes, the router has two levels of access to commands:

  • User EXEC mode – Typical tasks include those that check the router status. In this mode, router configuration changes are not allowed.
  • Privileged EXEC mode – Typical tasks include those that change the router configuration.

The user EXEC mode prompt is displayed upon login to a router. Commands available at this user level are a subset of the commands available at the privileged EXEC level. For the most part, these commands allow a user to display information without changing router configuration settings.

To access the full set of commands, privileged EXEC mode must be entered. At the ">" prompt, type enable. At the password: prompt, enter the password that has been set with the enable secret command. Two commands can be used to set a password used to access privileged EXEC mode: enable password and enable secret. If both commands are used, the enable secret command takes precedence. Once the login steps have been completed, the prompt changes to a "#" indicating the privileged EXEC mode has been entered. The global configuration mode can only be accessed from the privileged EXEC mode. The following are specific modes that can also be accessed from the global configuration mode:

  • Interface
  • Subinterface
  • Line
  • Router
  • Route-map

To return to the user EXEC mode from the privileged EXEC mode, the disable command or exit may be entered. To return to the privileged EXEC mode from the global configuration mode, type exit or Ctrl-Z. Ctrl-Z may also be used to return directly to the privileged EXEC mode from any sub-mode of global configuration.

  Web Links

Setting up HyperTerminal

http://www.alltel.net/~slashdot/ adsl/hyperterminal-setup.shtml

          

2.2 Starting a Router  
  2.2.6 Keyboard help in the router CLI  
  Typing a question mark (?) at the user EXEC mode prompt or the privileged EXEC mode prompt displays a handy list of available commands. Notice the "--More--" at the bottom of the sample display. The screen displays many lines at one time. The "--More--" prompt at the bottom of the display indicates that multiple screens are available as output. Whenever a "--More--" prompt appears, the next available screen can be viewed by pressing the space bar. To display just the next line, press the Return or Enter key. Press any other key to return to the prompt.

To access privileged EXEC mode, type enable or the abbreviation ena. This might cause the router to prompt the user for a password if one has been set. If a "?" (question mark) is typed at the privileged EXEC mode prompt, the screen displays a longer list of commands than is available at the user EXEC mode prompt.

Screen output varies, depending on Cisco IOS software level and router configuration.

If a user wants to set the router clock but does not know the necessary command, the help function can be used to check for the correct command. The following exercise illustrates one of the many uses of the help function.

The task is to set the router clock. Assuming the command is not known, proceed using the following steps:

  1. Use ? to find the command for setting the clock. The help output shows that the clock command is required.
  2. Check the syntax for changing the time.
  3. Enter the current time by using hours, minutes, and seconds, as shown in Figure . The system indicates that additional information needs to be provided to complete the command.
  4. Press Ctrl-P (or the up arrow) to repeat the previous command entry automatically. Then add a space and a question mark (?) to reveal the additional arguments. Now the command entry can be completed.
  5. The caret symbol (^) and help response indicate an error. The placement of the caret symbol shows where the possible problem is located. To input the correct syntax, re-enter the command up to the point where the caret symbol is located and then enter a question mark (?).
  6. Enter the year, using the correct syntax, and press Return or Enter to execute the command.
  Lab Activity

e-Lab Activity: Keyboard help in the CLI

This purpose of this lab is to learn the help system in the Cisco IOS.

 

   

  Lab Activity

e-Lab Activity: IOS Auto-Completion

This purpose of this lab is to learn use the router auto-completion feature (TAB key) and the history buffer.

 

   

  Web Links

help Command

http://www.cisco.com/en/US/products/sw/ iosswrel/ ps1835/ productscommand_ reference_ chapter09186a00800ca73c.html#1017835

             

2.2 Starting a Router  
  2.2.7 Enhanced editing commands  
  The user interface includes an enhanced editing mode that provides a set of editing key functions that allows the user to edit a command line as it is being typed.  The key sequences indicated in Figure can be used to move the cursor on the command line for corrections or changes. Although enhanced editing mode is automatically enabled with the current software release, it can be disabled if it interferes with the interaction of written scripts. To disable enhanced editing mode, type terminal no editing at the privileged EXEC mode prompt.

The editing command set provides a horizontal scrolling feature for commands that extend beyond a single line on the screen. When the cursor reaches the right margin, the command line shifts ten spaces to the left. The first ten characters of the line cannot be seen, but a user can scroll back and check the syntax at the beginning of the command. To scroll back, press Ctrl-B or the left arrow key repeatedly until the beginning of the command entry is reached. Ctrl-A will return a user directly to the beginning of the line.

In the example shown in Figure , the command entry extends beyond one line. When the cursor first reaches the end of the line, the line is shifted ten spaces to the left and redisplayed. The dollar sign ($) indicates that the line has been scrolled to the left. Each time the cursor reaches the end of the line, the line is again shifted ten spaces to the left.

Screen output varies, depending on Cisco IOS software level and router configuration.

Ctrl-Z is a command used to back out of configuration mode. This will return the user to the privileged EXEC mode prompt.

 

  Interactive Media Activity

Drag and Drop: Enhanced Editing Commands

After completing this activity, the student will be able to identify the correct usage for enhanced editing commands.

   

  Web Links

editing Command

http://www.cisco.com/en/US/products/sw/ iosswrel/ps1835/products_command_reference_ chapter09186a00800ca73c.html#1017434

          

2.2 Starting a Router  
  2.2.8 Router command history  
  The user interface provides a history or record of commands that have been entered. This feature is particularly useful for recalling long or complex commands or entries. With the command history feature, the following tasks may be completed:
  • Set the command history buffer size
  • Recall commands
  • Disable the command history feature

The command history is enabled by default and the system records ten command lines in its history buffer. To change the number of command lines the system records during a terminal session, use the terminal history size or the history size command. The maximum number of commands is 256.

To recall commands in the history buffer beginning with the most recent command, press Ctrl-P or the up arrow key repeatedly to recall successively older commands. To return to more recent commands in the history buffer, after recalling commands with Ctrl-P or the up arrow, press Ctrl-N or the down arrow key repeatedly to recall successively more recent commands.

When typing commands, as a shortcut, the unique characters may be entered for a command. Press the Tab key, and the interface will finish the entry. When the typed letters uniquely identify the command, the Tab key simply acknowledges visually that the router has understood the specific command that was intended.

On most computers additional select and copy functions are available. A previous command string may be copied and then pasted or inserted as the current command entry.

 

  Interactive Media Activity

Drag and Drop: Router Command History

When the student has completed this activity, the student will be able to identify the correct usage for keystrokes relating to router command history.

   

  Web Links

Basic Command-Line Interface Commands

http://www.cisco.com/en/US/products/sw/ iosswrel/ps1835/products_command_reference_ hapter09186a00800ca73c.html#xtocid21

            

2.2 Starting a Router  
  2.2.9 Troubleshooting command line errors  
  Command line errors occur primarily from typing mistakes. If a command keyword is incorrectly typed the user interface provides error isolation in the form of an error indicator (^). The "^" symbol appears at the point in the command string where an incorrect command, keyword, or argument was entered. The error location indicator and interactive help system allow the user to easily find and correct syntax errors.

Router#clock set 13:32:00 23 February 93

^  

% Invalid input detected at "^" marker.

The caret symbol (^) and help response indicate an error at 93. To list the correct syntax, enter the command up to the point where the error occurred and then enter a question mark (?):

Router#clock set 13:32:00 23 February ?
<1993-2035> Year
Router#clock set 13:32:00 23 February

Enter the year using the correct syntax and press Return to execute the command.

Router#clock set 13:32:00 23 February 1993

If a command line is entered incorrectly, and the enter key is pressed, the up arrow can be pressed to repeat the last command. Use the right and left arrow keys to move the cursor to the location where the mistake was made. Then type the correction that needs to be made. If something needs to be deleted, use the <backspace> key.

  Lab Activity

Lab Exercise: Command Line Fundamentals

In this lab, the student will log into a router in both user and privileged modes and use several basic router commands to determine how the router is configured.

 

   

  Web Links

editing Command

http://www.cisco.com/en/US/products/sw/ iosswrel/ps1835/products_command_reference_ chapter09186a00800ca73c.html#1017434

          

2.2 Starting a Router  
  2.2.10 The show version command  
  The show version command displays information about the Cisco IOS software version that is currently running on the router. This includes the configuration register and the boot field settings.

Figure shows the following information from the show version command:

  • IOS version and descriptive information
  • Bootstrap ROM version
  • Boot ROM version
  • Router up time
  • Last restart method
  • System image file and location
  • Router platform
  • Configuration register setting

Use the show version command to identify router IOS image and boot source.

  Web Links

show version Command

http://www.cisco.com/en/US/products/sw/ iosswrel/ps1835/products_command_reference_ chapter09186a00800ca743.html#1018369

          

Summary
  An understanding of the following key points should have been achieved:
  • The purpose of the IOS
  • The basic operation of the IOS
  • Identification of various IOS features
  • Identification of the methods to establish a CLI session with the router
  • The differences between the user EXEC and privileged EXEC modes
  • Establishing a HyperTerminal session
  • Logging into the router
  • Using the help feature in the command line interface
  • Using enhanced editing commands
  • Using command history
  • Troubleshooting command line errors
  • Using the show version command