Exercise Tutorial: Basic IOS command line interface


[Virtual Lab QuickStart]    [Virtual Lab Reference]    [Lab->Exercise]


Overview

This tutorial trains an operator to use the basic IOS command line interface.

Steps

  1. Login to any of the routers, for example "Gateway" at address 10.201.1.3: The authentication information (username, password) is available in the instructions or help. If you cannot login, see the next step.

    Trying 10.201.1.3...
    Connected to 10.201.1.3 (10.201.1.3).
    Escape character is '^]'.
     
     
    User Access Verification
     
    Username: lab
    Password:
    gateway>logout
    Connection closed by foreign host.
    

  2. Why can't I telnet to the device?

    You can only telnet to a device if its network ports are operationally up.

    Just like in the real world, this is only the case for each port, if its administrative status is up and its neighbor device is running (in the case of directly connected links). If you start the entire lab, all devices should satisfy this and you should be able to telnet into any of the devices. If you start just one device in the lab, you will likely not be able to telnet in.

    But, each Cisco device in the lab also has Console access.

  3. In addition to telnet access, MIMIC simulates console port access to the simulated devices. You can achieve this by selecting the Device->Console...menu item. If it still fails, then consult the online documentation.

    In most aspects the Telnet and console access will be the same, except most noteably in

    We will use Telnet access and console access interchangeably throughout. If you are stuck at some point using telnet or console, switch to the other access method.

  4. Notice that the telnet session to the device simulation is done with a separate telnet client, just as you would with a real device. Thus, if you click anywhere on the lab, the telnet window will be obscured.

    If you want to continue using this telnet window, you need to raise it again, eg. by clicking on its icon in the bottom taskbar of your window manager.

    Of course, you can have multiple telnet sessions open to any device simulation, but just like in the real world, you can only have one console session open.

  5. By default you are in user mode, type the following commands:

    
    gateway>show ver
    Cisco Internetwork Operating System Software
    IOS (tm) 3000 Software (IGS-D-L), Version 11.0(14a), RELEASE SOFTWARE (fc1)
    Copyright (c) 1986-1997 by cisco Systems, Inc.
    Compiled Wed 02-Apr-97 19:23 by tlane
    Image text-base: 0x02005000, data-base: 0x025BD7B0
     
    ROM: System Bootstrap, Version 11.0(10c), SOFTWARE
    ROM: 3000 Software (IGS-D-L), Version 11.0(14a), RELEASE SOFTWARE (fc1)
     
    c2524 uptime is 2 minutes
    System returned to ROM by power-on
    System image file is "flash:igs-d-l.110-14a"
     
    cisco 2524 (?) processor (revision J) with 14336K/512K bytes of memory.
    Processor board ID 05243987, with hardware revision 00000003
    Bridging software.
    X.25 software, Version 3.0.0.
    1 Ethernet/IEEE 802.3 interface(s)
    2 Serial(sync/async) network interface(s)
    System/IO memory with parity disabled
    8192K bytes of DRAM onboard
    System running from RAM
    31K bytes of non-volatile configuration memory.
              
    gateway>show host
     
     
    Default domain is not set
    Name/address lookup uses domain service
    Name servers are 255.255.255.255
    Host              Flag      Age  Type  Address(es)
     
    gateway>show hist
      show ver
      show host
      show hist
    

  6. What happens if we abbreviate a command too much?
    gateway>show h
    % Ambiguous command "show h"
    

    To resolve an ambiguous command:

    gateway>show h?
    history hosts
     
    gateway>show h
    

  7. Let's explore some of the help facilities in IOS. To see a list of available commands in user mode, type:
    gateway>?
    Exec commands:
      clear       Reset functions
      disconnect  Disconnect an existing network connection
      enable      Turn on privileged commands
      exit        Exit from the EXEC
      help        Description of the interactive help system
      logout      Exit from the EXEC
      ping        Send echo messages
      show        Show running system information
      systat      Display information about terminal lines
      terminal    Set terminal line parameters
      where       List active connections
    

    To see a list of available commands starting with "s":

    gateway>s?
    show systat
    

    To see the list of show commands:

    gateway>show ?
      backup     Backup status
      buffers    Buffer pool statistics
      clock      Display the system clock
      compress   Show compression statistics
      dialer     Dialer parameters and statistics
      flash:     display information about flash: file system
      history    Display the session command history
      hosts      IP domain-name, lookup style, nameservers, and host table
      ip         IP information
      location   Display the system location
      modemcap   Show Modem Capabilities database
      protocols  Active network routing protocols
      snmp       snmp statistics
      terminal   Display terminal configuration parameters
      users      Display information about terminal lines
      version    System hardware and software status
    

    To see the syntax of the show version command:

    gateway>show version ?
      |  Output modifiers
      
     
    gateway>show version
    

  8. Command line editing makes your life easier.

    To use command completion type the Tab key:

    gateway>show verTab
    gateway>show version
    

    Use the left and right arrow keys to move within the line. This lets you correct typing mistakes, for example type

    gateway>show vesion
                      ^
    % Invalid input detected at '^' marker.
    

    Use the up arrow key to recall the previous command from history then correct the command.

  9. To switch privilege level between user mode and enable mode:

    gateway>enable
    Password:
    gateway# disable
    gateway>
    

  10. To switch between global configuration mode and enable mode:

    gateway# configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    gateway(config)# exit
    gateway#
    

  11. We will switch our mode between interface configuration , global configuration, and enable mode:

    gateway# configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    gateway(config)# interface Serial0
    gateway(config-if)# ^Z
    gateway# 
    gateway# configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    gateway(config)# interface Serial0
    gateway(config-if)# exit
    gateway(config)# interface Serial0.1
    gateway(config-if)# exit
    gateway(config)#
    

  12. We will execute a global configuration mode command, log out of the device, then log in again.
    gateway(config)# banner login ! == my login banner == !
    

    Trying 10.201.0.110...
    Connected to 10.201.0.110 (10.201.0.110).
    Escape character is '^]'.
     
     
    == my login banner ==
     
    Username: lab
    Password:
    gateway>
    

  13. We will switch our mode between global configuration mode and line configuration mode.

    gateway>enable
    Password:
    gateway# configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    gateway(config)# line vty 0
    gateway(config-line)# exit
    gateway(config)# line vty 0
    gateway(config-line)# end
    gateway#
    

  14. We will configure the enable password in a device.

    gateway# configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    gateway(config)# no enable password
    gateway(config)# enable password mypassword
    gateway(config)# ^Z
    gateway# disable
    gateway>enable
    Password:
    gateway#
    

  15. We will practice saving the running configuration.

    gateway# configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    gateway(config)# banner motd * == my motd banner == *
    gateway(config)# end
    gateway# copy running-config startup-config
    Building configuration...
     
    [OK]
    gateway# show startup-config
    version 11.0
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    !
    hostname cisco-2524
    !
    boot system flash slot0:
    enable secret 5 $1$QjqB$fvfzb0yjJWpjLbRjoHOEF.
    !
    !
    !
    ip subnet-zero
    ip cef
    !
    !
    !
    ip ssh time-out 120
    ip ssh authentication-retries 3
    !
    !
    !
    !
    !
    crypto mib ipsec flowmib history tunnel size 200
    crypto mib ipsec flowmib history failure size 200
    !
    !
    !
    fax interface-type modem
    mta receive maximum-recipients 0
    !
    !
    !
    !
    interface Ethernet0
     ip address 10.1.120.1 255.255.254.0
    !
    interface Serial0
    

References

    Cisco IOS Software Basic Skills


[Virtual Lab QuickStart]    [Virtual Lab Reference]    [Lab->Exercise]