Common Cisco IOS Issues
File Deletion
Sometimes, files just don't want to go. They cling on to dear life. Generally, you would use the following command to delete files:
erase [filename]
However, sometimes Cisco IOS will spit back an error if it doesn't want to delete said file, for whatever reason. If you run into an issue, use the following command:
delete [filename]
If that doesn't work, usually with the "Is a directory" error, use the following command to force the deletion:
delete /force /recursive [filename]
Forgotten Password Deletion - Routers
When working with labs on Routers, sometimes students enter their console passwords incorrectly or they simply forget. The following documentation will describe the procedure to erase any passwords needed to enter the networking device.
1. Turn the power switch on the router to the off position and unplug the power cable from the router. 2. Please ensure that a computer is plugged into the console port and that the computer has a terminal emulator opened. (TeraTerm or PuTTY) 3. Plug in the power cable to the router and quickly press "Break" (PuTTY) or "Alt+b" (TeraTerm) repeatedly until the rommon 1> prompt appears. 4. When the rommon 1> script appears type and enter the following command: confreg 0x2142 5. After entering the previous command, enter the reset command to reload the router while ignoring the startup-config. 6. After entering the new config, delete the startup-config by typing: delete startup-config 7. After deleting the startup-config, reload the router using the "reload" command.
Forgotten Password Deletion - Switches
The procedure for deletion of line-level passwords outside of the running-config is done differently on switches as compared to routers. Switches require entry through Password Recovery Mode in order to delete passwords as well as corrupted IOS images.
1. Open a terminal emulator and ensure your computer is connected to the console port. (Make sure no power is supplied to the switch) 2. Plug the power cable into the switch; meanwhile, press and hold the mode button until the terminal displays the switch: config text. 3. Use the following commands to reset the running-config with a password: switch: flash_init switch: dir flash: switch: delete flash:[config.text] 4. Answer with "y" to delete the file. 5. Use the reset command to reboot the switch: switch: reset 6. Answer with "y" again to reset the switch. 7. When the switch boots into the normal startup-config, erase the startup-config and reload the switch again to be safe. Switch# erase startup-config Switch# reload
Corrupted IOS Deletion/Replacement - Switches
In rare cases, a switch may have an IOS that is incompatible with the hardware that the switch supports. (ie. An IOS image for a 2960 switch on a 3750 switch) The following steps will detail how to delete an incompatible IOS and how to put a new image on to a switch.
1. Open a terminal emulator and ensure your computer is connected to the console port. (Make sure no power is supplied to the switch) 2. Plug the power cable into the switch; meanwhile, press and hold the mode button until the terminal displays the switch: config text. 3. Use the following commands to initialize the flash and find the image file to delete: switch: flash_init switch: dir flash: switch: delete flash:[IOS file name] (ex: c3560-ipbasek9-mz.122-55.SE4.bin) 4. Download the proper IOS image for the switch and place the image file onto a flash drive. This can be done from a computer on the network with access to the Cisco Curriculum network drive. 5. Place the flash drive into the computer running the terminal emulator. Transfer this file from the flash drive to the local drive (C:) on the computer running the terminal emulator. 6. Use the following command to transfer the file: switch: copy xmodem: flash:[IOS file name] 7. The next thing to do will be to go into the upper left corner of the terminal emulator and click File>Transfer>XMODEM>Send 8. You will then choose the local disk to look from in the top part of the window and choose the IOS file to send. Select the file and click "Send" or "Open". 9. Another window will open showing the progress of the file transfer or the terminal will display multiple C's followed by periods. Allow up to 2 hours for the file transfer. 10. To ensure the computer will not sleep or timeout during the transfer, go to power options and change the display timeout to never. 11. When the image transfer is complete, use the "dir flash:" command to make sure the image is on the device. 12. When the image is transferred, use the following command to boot into the new IOS: switch: boot flash:[filename] 13. When the image loads, use the following commands to set the new image as the bootable image: Switch>enable Switch#configure terminal Switch(config)boot system flash:[filename] Switch(config)end Switch#show boot (Use this command to ensure the new image is the boot image.)