Events: London Expo 2009 - DSCF3039.jpg
close the image
close the image
close the image

Cisco Router Notes - Configuration, Logs, Backups

In this entry you will find several commands that you can use to configure a cisco router, retrieve configuration and log information etc etc.   I'll be adding to this article and I remember and need more commands.

Setup.   You need to be able to connect to your router in some mannor.   This could be via TELNET or something like MINICOM

Basic Commands

  • To switch to Priviledge Exec mode type enable at the > prompt.You can get away with just ena as that is unique enough to identify the enable command
  • Exit will log you out completly from any mode, as will CTRL+Z
  • To quit Priviledge Exec mode and return to User exec mode, use the command disable.
  • You can exit and terminate the session from Priviledge Exec mode with logout rather than exit
  • To exit Global Conf Mode and return to User Exec mode, you can use end.
  • ? is the help command.   EG show ? or router ?

Prompts and their Meanings

rotuer> This is User Mode.   Limited access

router# Priviledge mode. Supervisior access

router(config)#         Global Configuration Mode

router(config-if)#   Interface Configuration Mode

router(config-line)#   Main configuration Mode

Backing up Router Configuration Via FTP

Lines that start with a // are comments to help document the procedure

// Switch to Priviledge Exec Mode
router> enable
      [ enter password ]

// Setup FTP Details
router# conf t
router(config)# ip ftp username [username]
router(config)# ip ftp password [password]router(config)# end

// Copy running configuration to FTP Server
router# copy running-config ftp:
// You will then be prompted for two answers before the FTP process will take place
  Address or name of remote host []? [destination host or IP]
  Destination filename [ce_e-config]? [destination filename]
  Writing filename !
  x bytes copied in x.xx secs (x bytes/sec)

Restoring FTP Backup to Running Configuration

router> ena
      [password]
router# copy ftp: running-config
// You will then be prompted with 3 questions.  ust press enter for defaults in the []

      Address of name of remote host [ip_addr_from_previous_backup]?  
      Source filename [filename_from_previous_backup]?
      Destination filename [running-config]?

// The file will then transfer back and the running config wil be the backup.
// Remember to copy running configuration to the startup configuration if you want to use that config when the router next restarts.

Viewing Interface Status

rotuer> show ip interface virtual-access 2

Viewing the Running and Start-Up Configurations

router# show startup-config
router# show running-config

Erasing The Start-Up and Flash Configurations

router# erase startup-config
router# erase flash

Exiting the Router, Logging Out of Priviledge Mode, Existing Global Conf Mode

//   To exit Privileged EXEC mode and return to User EXEC mode use the following command:
router# disable

// To exit Privileged EXEC mode and quit the session with the router, use one of the following commands:
router# logout
     OR
router# exit

// To exit global configuration mode and return to User EXEC mode use one of the following commands:
router(config)# end
     OR
router(config)# exit
    OR
CTRL-Z

Changing Configuration

// configure terminal -> edit running config             configure memory -> edit start-up configuration
Router# configure terminal
      OR
Router# conf t

// Configuring an interface
Router(config)#interface ethernet 0
Router(config-if)#

// To exit interface configuration mode and return to global configuration mode, enter the following command:
router(config-if)# exit

//To exit interface configuration mode and return to Privileged EXEC mode, use the key combination
CTRL-Z
      OR
router(config-if)# end

Configuring Router Passwords

// Console password
// Use the following commands to configure the console password. The first command is used to enter Line configuration mode. The second configures the password "cisco123", and the third command configures the console line to require a login.


router(config)# line con 0
router(config-line)# password password
router(config-line)# login

// Telnet password
// Use the following commands to configure a password for Telnet access:
router(config)# line vty 0 4
router(config-line)# password password
router(config-line)# login


// Auxilary password
// Use the following commands to configure the auxilary port password:

router(config)# line aux 1
router(config-line)# password password
router(config-line)# login

Help

router> show ?
router# show history

Changing the IP Address of a Rotuer Inferface Via Telnet

shell> telnet router-ip

Password:
router> en
Password:
// View the running config
router# show run
// Below is an example of what you may see
      !
      interface FastEthernet0
       ip address 150.150.150.1 255.255.255.0
       ip access-group 100 in
       ip access-group 100 out
       no ip directed-broadcast
      !

// Switch to Global Conf Mode of the RUNNING config
router# conf term
      Enter configuration commands, one per line.   End with CNTL/Z.

// Enter which interface you are configuring
router(config)# int FastEthernet0

// specifiy the new IP address
router(config-if)# ip address 100.100.100.1 255.255.255.0

// NOTE: You will be disconnected at this point as the running config now uses a different IP to the one you connected t
// So you will need to TELNET back and re-enter priviledge mode

// connect
shell> telnet 100.100.100.1.

Password:
router> en
Password:

// Copy running config to startup
router# copy run start
// Restart the router
router# reload

Viewing Logs and other commands

// Quick guide to viewing logs
router> ena
      [password]router# show log

Here are some other useful commands.  Descriptions copied from  http://www.tomax7.com/mcse/cisco_routerconfig.htm

Requirement                                                       Cisco Command
-----------                                                       -------------
View version information                                                         show version
View current configuration (DRAM)                                     show running-config
View startup configuration (NVRAM)                                 show startup-config
Show IOS file and flash space                                             show flash
Shows all logs that the router has in its memory         show log
View the interface status of interface e0                     show interface e0
Overview all interfaces on the router                               show ip interfaces brief
View type of serial cable on s0                                         show controllers 0 (note the space

between the 's' and the '0')
Display a summary of connected cdp devices              show cdp neighbor
Display detailed information on all devices                      show cdp entry *
Display current routing protocols                                       show ip protocols
Display IP routing table                                                      show ip route
Display access lists, this includes the number of displayed matches             show access-lists
Check the router can see the ISDN switch                    show isdn status
Check a Frame Relay PVC connections                            show frame-relay pvc
show lmi traffic stats                                                          show frame-relay lmi
Display the frame inverse ARP table                                 show frame-relay map


Latest Articles

Eventually you will find lists of recent additions here as well as links to some of my other websites and other things of interest and/or importance