Initial configuration for Cisco routers

There are a few things I always do first when configuring Cisco routers:

  1. Backup current IOS image file – just in case something goes wrong in the next step.
  2. Update to latest IOS version – cos everybody just loves those new bells ‘n’ whistles right?!?
  3. Initial configuration – useful commands to make life easier.
Here’s the step-by-step instructions:

Backup current IOS image file

  1. Login into privileged exec mode.
  2. Display current files stored in Flash memory:
    show flash
  3. Note filename of current IOS file eg. ‘c870-advsecurityk9-mz.124-15.T7.bin’.
  4. Copy file from flash memory to TFTP server:
    copy flash tftp
  5. Enter the IOS filename:
    c870-advsecurityk9-mz.124-15.T7.bin
  6. Enter the IP address of TFTP server:
    10.10.10.2

Update to latest IOS version

  1. Login into privileged exec mode.
  2. Display current files stored in Flash memory:
    show flash
  3. Note filename of current IOS file eg. ‘c870-advsecurityk9-mz.124-15.T7.bin’.
  4. Note filename of new IOS file in TFTP-Root folder (for SolarWinds TFTP Server)
    eg. ‘c870-advipservicesk9-mz.124-24.T.bin’.
  5. Copy file from TFTP server to flash memory:
    copy tftp flash
  6. [optional] If there is not enough space, you have to delete the previous IOS file:
    delete flash:c870-advsecurityk9-mz.124-15.T7.bin
  7. Enter the IP address of TFTP server:
    10.10.10.2
  8. Accept the default destination filename.
  9. Check the new IOS file is the first file in Flash memory:
    show flash
  10. Reboot device:
    reload

Initial configuration

  1. Erase current config file if needed:
    write erase
    reload (do not save config file)
  2. Enter privileged exec mode:
    conf t
    (the above expands to: configure terminal)
  3. Setup privileged user account:
    username  privilege 15 secret 0
    username admin privilege 15 secret 0 cisco123
  4. Remove default cisco user account if it exists:
    no username cisco
  5. Setup privileged enable password:
    enable secret
    enable secret cisco123
  6. Set time and date:
    clock set 11:10:00 10 Apr 2011 (must not be in config mode for this command)
    clock timezone GMT 0
  7. Set hostname:
    hostname router
  8. Set useful keyboard shortcuts. This assigns “show ip int br” to the letter “s”:
    alias exec s show ip int br
  9. This shortcut is just lazy, I know:
    alias exec sr show run
  10. Enter line mode:
    line vty 0 4
  11. Set time-out to 30 mins:
    exec-timeout 30 0
  12. Stop console messages popping up and affecting your commands:
    logging synchronous
  13. You can copy/paste and run all commands in one go, eg:
    alias exec s show ip int br
    alias exec sr show run
    line vty 0 4
    exec-timeout 0 0
    logging synchronous
  14. Save current configuration to running configuration (so it’s used after reboot) by any of these commands:
    copy running-config startup-config
    copy run start
    wr

Comments

  1. It really is rare to find advised persons with this topic, however you be understood as you are aware of exactly what you are dealing with! Thanks

    • Adam Rush says

      There’s so much to learn Jay, so I find it helps to write this stuff down, regardless of how basic it may seem at the time. I’ve done this for many years offline (Google Docs, Evernote and Dropbox), but thought it might help others if I blog about it too.

      Glad you found it useful 🙂

  2. Large enthusiast of this page, a bunch of your posts have really helped me out. Looking forward to up-dates!

  3. Adam Rush says

    Thanks Ami. I have plenty of material I want to transfer here, so stay tuned and I’ll get more up soon.

  4. Decent post, We are checking back again frequently to watch out for up-grades.

  5. Exactly where is the facebook like button ?

  6. thanks for share!