User Tools

Site Tools


master:cnd:cisco-config

Cisco Config Introduction

Cisco router components: Memory types

  • RAM
    • Stores packet buffers, ARP cache, routing table, software code and data structures necessary for router operation. Running configuration and decompressed IOS code is stored in RAM
  • ROM
    • Contains basic software for hardware testing and initialization
  • Flash
    • Stores IOS and backup configuration files. Not volatile
  • NVRAM (non-volatile RAM)
    • Saves router configuration

Cisco router components: Software

  • POST
    • Power-on Self-Test. Stored in ROM. Checks basic router functions
      • Bootstrap
        • In ROM. Initiates router and loads IOS
      • ROM Monitor
        • In ROM. Used for tests and troubleshooting. Basic interface for troubleshooting low-level issues
      • IOS (Internetwork Operating System)
        • Provides all of the higher-level router functionalities

Configuration Register

  • Controls various low-level settings
    • Tells router to load or ignore NVRAM configuration at startup
    • Terminal behaviour (e.g. serial speed)
  • Current value can be seen with
    • show version
  • Most common settings are:
    • 0x2102 - normal
    • 0x2142 - ignore configuration

Where is the configuration?

  • Router always has two configurations
    • running-config
      • In RAM. Shows which parameters are currently in use.
      • show running-config
      • Modified with configure terminal command
    • startup-config
      • In NVRAM. Loaded by router in next reboot
      • This is where the running-config is saved
      • show startup-config

Configuration backups

  • You can store configuration in other places
    • In router’s Flash memory
    • In a server, via TFTP
  • Can be copied around with copy command
    • copy running-config startup-config
      • or write memory (old style)
    • copy running-config tftp
    • copy startup-config tftp
    • copy startup-config flash:saved-config
    • copy flash:saved-config startup-config

When the router has no configuration....

  • It asks Would you like to enter the initial configuration dialog? [yes/no]:
  • Just say n (no)
    • otherwise you get a tedious series of questions to answer

Access modes

  • User EXEC
    • Limited access. Show interface state, etc.
    • Router>
  • Privileged EXEC (enabled mode)
    • Detailed examination, manipulate configuration and files, run tests, debugging, etc.
    • Router#
  • ROM Monitor
    • Password recovery and IOS installation
    • rommon 1>

Management input sources

  • Console
    • Direct access via serial port
  • Auxiliary Port
    • Access via Modem
  • Virtual Terminals (VTY)
    • Telnet/SSH

Changing the configuration

Commands are activated immediately. So be careful when typing!

When working on serial console or via Telnet or SSH, commands can be copied from a text file and pasted into the terminal

router>
router>enable
... type password ...
router#
router# configure terminal
router(config)#
... type commands ...
router(config)# end
router# write memory

How to tell where you are

Router> - USER EXEC
Router# -  PRVILEDGED EXEC
Router(config) - Global configuration
Router(config-if) - Interface configuration
Router(config-subif) - Sub-interface configuration
Router(config-route-map) - Route-map configuration
Router(config-router) - Routing protocol configuration
Router(config-line) - Line configuration
rommon 1> - ROM Monitor

Context Help

Use “?” to obtain a list of commands available in your current configuration mode

Router(config)#?
Configure commands:
  aaa                         Authentication, Authorization and Accounting.
  aal2-profile                Configure AAL2 profile
  access-list                 Add an access list entry
  alarm-interface             Configure a specific Alarm Interface Card
  alias                       Create command alias
  appfw                       Configure the Application Firewall policy
  application                 Define application
  archive                     Archive the configuration
  arp                         Set a static ARP entry
  ...

Online help

Use “?” also to see all possible parameters to an incomplete command:

Router(config)#username ?
  WORD  User name
Router#show ?
  aaa                       Show AAA value
  aal2                      Show commands for AAL2
  access-expression         List access expression
  access-lists              List access lists
  accounting                Accounting data for active sessions
  ...

Command completion

Use the Tab key to complete a command

router(config)#int<TAB>
router(config)#interface et<TAB>
router(config)#interface ethernet 0
router(config-if)#ip add<TAB>
router(config-if)#ip address n.n.n.n m.m.m.m

You can just type the abbreviated form if it's unambiguous

router(config)#int e 0
router(config-if)#ip add n.n.n.n m.m.m.m

Moving faster around the command line

Move within command history:

  • [Cursor Up] - Previous command
  • [Cursor Down] - Next command

Line editing:

  • [Cursor Left] and [Right] - move within the line
  • Ctrl-a : move to beginning of line
  • Ctrl-e : move to end of line
  • Ctrl-k : delete until end of line

Verifying and troubleshooting

show running-config
show run interface f0/0
show ip int brief
debug ip ospf hello / events / adj
show log
show version
master/cnd/cisco-config.txt · Last modified: 2016/03/24 09:47 by philip