Saturday, May 26, 2018

Cisco Device Management


Backing up and Restoring IOS
----------------------------

Basic parts:

  Flash
    - stores IOS (around 29 MB)
    - slow
    - is copied to RAM when device boots

  RAM
    - holds running config and IOS
    - fast but volatile
 
  NVRAM
    - available on some devices to hold running config
    - fast and non-volatile

Where to put back ups?

  HTTP - web server
  FTP - old way; requires username and password
  TFTP - uses UDP; don't require username and password

Configuration Registers
-----------------------

Determines how device boots up

2100 (rommon)
device will boot here if it can't detect an IOS
2101 (rxboot)
limited version of IOS
2012
normal boot
2142
ignore/bypass NVRAM

How Cisco devices boot
----------------------

1. checks config register
2. checks for `boot system` command in startup config
3. looks for first IOS image in flash
4. broadcast for a tftp server

Commands
--------

key command
copy ?
general syntax of `copy`
copy FROM TO
copies flash to TFTP server
copy flash: tftp://192.168.1.100/
same as above but uses prompt
copy flash tftp
prints flash information
show flash
restoring
copy TFTP flash
copies running config
copy running-config DESTINATION
displays configuration register
show version

Some notes:

  - don't restore running config because it will just merge it to the present
  - e.g: copy tftp running-config
  - proper way is to restore running config from offsite box to startup config
  - e.g: copy tftp start-up config

Tutorials
---------

recovering enable password
1. Boot into rommon
  -> connect to device via console
  -> power off device via physical switch
  -> power on device
  -> hit CTRL+BREAK

2. Change config register to bypass NVRAM
rommon 1 > confreg 0x2142
rommon 2 > reset

3. Copy the startup config to the running config and change
   enable password
Router> enable
Router# copy startup-config running-config
Router# conf t
Router(conf)# enable secret newpassword
Router(conf)# exit
Router# copy run start

No comments:

Post a Comment