Cisco Email Config Backup
ET fone home... using email config backup
This is a nice little feature that most cisco routers have to allow simple cisco config backup Since I didn't want to install a messy service like RANCID or sftp servers just to get cisco configs, this is a light weight solution for getting the cisco to mail you its own config once in a while.
call-home
contact-email-addr mark@cisco_router.com
mail-server your_mail_server priority 1
profile "ConfigBackup-1"
destination address email mark@xxx.com
subscribe-to-alert-group configuration export full periodic monthly 11 10:00
This cisco will mail you once a month on the 11th at 10am.
Ubuntu serial connection to Cisco devices
Nice and short one, I bet its what all the girls say!
# install the bastard
sudo apt-get install minicom
# check out which serial ports you have
$ dmesg | grep ttyl
spidey@app03:~$ dmesg | grep tty
[ 0.000000] console [tty0] enabled
[ 3.278021] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 3.278114] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[ 3.278334] 00:05: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 3.278451] 00:06: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
# from the above you can see I have ttyS0 which is /dev/ttyS0
# configure away!
sudo minicom -s
# go to "Serial Port Setup"
Set "line speed" to "9600"
Set "hardware flow control" to "No"
Set "serial device" to "/dev/ttyS0"
# Save the settings
# sit back and have some cake
sudo minicom
Upgrade a cisco IOS
Who wants a new cisco IOS?
There are many ways to get an IOS image onto a cisco device, I'm just going to cover the one I used. Getting a IOS off a cisco ASA device, now thats tricky!
First setup a tftp server, I used the first one i found for OSX :) I'm lazy
Once you got all of that setup just follow these instructions. Assumptions:
- tftp server is 10.1.1.1
- IOS image file: asa840-k8.bin
- ASDM file : asdm-641.bin
copy tftp://10.1.1.1/asa840-k8.bin disk0:/asa841-k8.bin
copy tftp://10.1.1.1/asdm-64099.bin disk0:/asdm-641.bin
hostname(config)# clear configure boot
hostname(config)# boot system disk0:/asa841-k8.bin
hostname(config)# asdm image {disk0:/ | disk1:/}[path/]new_filename
hostname(config)# write memory
hostname(config)# reload
Reset Cisco ASA password + factory reset
Forgot your ASA's password? No worries :)
Bypass cisco system configuration
Plug in your serial console,
reboot the ASA
press 'ESC' when its booting
# Now get into configuration management
rommon #0> confreg
# Record this next line we'll need it later.
Current Configuration Register: 0x00000001
Configuration Summary:
boot default image from Flash
Do you wish to change this configuration? y/n [n]: Y
enable boot to ROMMON prompt? y/n [n]:
enable TFTP netboot? y/n [n]:
enable Flash boot? y/n [n]:
select specific Flash image index? y/n [n]:
disable system configuration? y/n [n]: y
go to ROMMON prompt if netboot fails? y/n [n]:
enable passing NVRAM file specs in auto-boot mode? y/n [n]:
disable display of BREAK or ESC key prompt during auto-boot? y/n [n]:
Current Configuration Register: 0x00000040
Configuration Summary:
boot ROMMON
ignore system configuration
Update Config Register (0x40) in NVRAM...
#now lets load the clean settings
rommon #2> boot
The cat's away the mice and play
hostname# copy startup-config running-config
hostname# configure terminal
hostname(config)# password password
hostname(config)# enable password password
hostname(config)# username name password password
#Remember that line I asked you to record :)
hostname(config)# config-register 0x00000001
hostname(config)# copy running-config startup-config
Optional new house!
# Reset to factory settings
config term
config factory-default
#hit spacebar when the ‘more’ thing happens.
(Optional) reload save-config noconfirm