Sometimes you will obtain an old or used Cisco Switch or Router which has configurations on the device. You can still access the device if you don’t know the password. You can perform the following steps to recover the device all the while saving configurations too.
1. Connect to the console port.
a. Ensure you have a console cable with the prolific device driver. Some cheaper console cables will not allow you to send the break signal during the router/switch boot process.
2. Reboot the device and send a break signal within the first 30 seconds.
a. During reboot you have 30 seconds to send the break signal and interrupt the boot process. This is why you need a higher quality cable with the prolific device driver for break signals.
b. You are doing this to enter Rommon boot mode. To change were it looks for the startup configuration.
c. You have the following options for sending the break command since laptops and computers are all different:
i. Pause/Break key or Ctrl+Pause/Break on keyboard (This is usually the standard for regular keyboards)
ii. #Ctrl+Fn+F11
iii. #Fn+B
iv. #Ctrl+B
v. #Ctrl+Fn+B
d. Finally, PuTTY has an option to send the break command through the menus:
i. Under the PuTTY menu, hover over “Special Command”
ii. Then select the “Break” option there.
3. Modify the Configuration register.
a. You are doing this in order to keep it from loading the previous configuration into the running-config. This allows us to bypass the password from the currently installed configuration.
b. In Rommon state, there is no OS loaded. It is for recovery purposes. We want to change the “confreg” setting. Type this in:
i. #confreg 0x2142
1. 0x2142 puts it in a state of ignoring the VNRAM contents/startup configuration. But this keeps the old configuration in the system.
2. 0X2102 is the normal state of boot. Makes it operate normally.
c. Next we reset the device to reboot with the new confreg code.
i. #reset
4. Now you can recover your configuration in the router or switch and reset the passwords.
a. After reboot, you say “NO” to initial configuration dialog.
b. You are now in the router/switch without a configuration.
c. Your old configuration is in the startup-config. You can even do a:
i. #show startup-config
ii. And you can see your old configuration on the router/switch.
d. Now we can copy the startup-config into our running-config and we maintain admin rights without the old passwords blocking us:
i. #copy startup-config running-config
e. Also you can now reset your passwords in global config mode:
i. #conf t
ii. #enabled secret cisco
iii. #line con 0 password cisco
iv. And continue with others you wish to reset.
f. Make sure to save the configuration:
i. #write/#copy run start
5. Revert the configuration register to the original boot so now you can load your configurations with the new password.
a. We have a final step to do. We will need to change that boot process again since that 0x2142 is not the normal boot state. We need to change it back to 0x2102.
i. #show version (shows the router/switch status and what the boot reg is set to)
ii. #conf t
iii. #config-register 0x2102
iv. #write
b. Now you can reboot with new passwords and your original configuration.
This blog consists of configurations and processes I have performed in a lab environment. In no way do I recommend or imply these processes need to be followed or are the correct way to execute on any network. Perform at your own risk. Also, please feel free to leave comments if my configurations are too old/need updating.
What's Popular
-
Step 1: UCS-A# scope security Step 2: UCS-A /security # scope keyring default Step 3: UCS-A /security/keyring # set regenerate yes Step 4: U...
-
1. From Server Manager, click on the Tools menu in the top right corner, then click on DHCP to bring up the DHCP configuration console. ...
-
1. First off, once you log in to the Cisco HyperFlex Connect system, you should see the Dashboard. You should first verify the Operation...
Meh, Whatever is Featured
Linking Active Directory to Palo Alto
###First you need to create a server profile under the LDAP section. DEVICE>Server Profiles>LDAP then click on the Add down at the bo...
Sunday, August 22, 2021
Password Recovery for Old/Used Cisco Switch or Router
Labels:
Boot,
Catalyst,
Cisco,
configs,
confreg,
Recovery,
Router,
Routers,
startup,
Switch,
Switches
Friday, April 24, 2020
Wipe and Clear Configuration on Cisco Catalyst Router/Switch
This one is a simple one. We will be clearing out the configurations on Catalyst equipment. If you have a bunch of configurations you just want to clear so you can start from scratch, do the following:
1. Go to Privilege Mode
a. #enable
2. Erase the configuration:
a. #write erase
3. Restart the system:
a. #reload
b. #confirm (just hit enter here)
1. Go to Privilege Mode
a. #enable
2. Erase the configuration:
a. #write erase
3. Restart the system:
a. #reload
b. #confirm (just hit enter here)
Tuesday, March 10, 2020
Reset the Password on Router without Losing the Old Configuration File
• Console cable needed on router
• Power off router
• Turn on router and issue the break command through Putty
• In rommon, hit question mark to see your options
o You should see confreg
• Change confreg to 0x2142
o >confreg 0x2142
• Reset the router
o >reset
• Once the router reboots, cancel the initial setup dialog. You just need the old startup-config
o >show startup-config
• Once you verify you see your old file, copy the old file to the running-config
o #copy startup-config running-config
• You are now in your old config file without the passwords. Now you can reset your password:
o #conf t
o #enable secret cisco
o #exit
o #copy run start
• Next, you need to change the configreg entry from when we changed it in ROMMON.
o #conf t
o #config-register 0x2102
o #exit
o #write
• Finally, you want to ensure your interfaces are all up since sometimes they go into admin down state and need to be brought up manually. You can reboot if necessary, but now you have access back into the router.
• Power off router
• Turn on router and issue the break command through Putty
• In rommon, hit question mark to see your options
o You should see confreg
• Change confreg to 0x2142
o >confreg 0x2142
• Reset the router
o >reset
• Once the router reboots, cancel the initial setup dialog. You just need the old startup-config
o >show startup-config
• Once you verify you see your old file, copy the old file to the running-config
o #copy startup-config running-config
• You are now in your old config file without the passwords. Now you can reset your password:
o #conf t
o #enable secret cisco
o #exit
o #copy run start
• Next, you need to change the configreg entry from when we changed it in ROMMON.
o #conf t
o #config-register 0x2102
o #exit
o #write
• Finally, you want to ensure your interfaces are all up since sometimes they go into admin down state and need to be brought up manually. You can reboot if necessary, but now you have access back into the router.
Wednesday, November 27, 2019
To Log into a Switch from Current Switch
1. You can perform this either from user mode or privileged mode:
a. SW1>ssh -l user_name ip_address
b. SW1#ssh -l user_name ip_address
2. After you pivot into the system from either of the above commands, type in the user’s password (the user you are using to log into the distant switch).
a. SW1>ssh -l user_name ip_address
b. SW1#ssh -l user_name ip_address
2. After you pivot into the system from either of the above commands, type in the user’s password (the user you are using to log into the distant switch).
Friday, May 24, 2019
Configure Gateway of Last Resort
1. First, log into the switch you wish to configure.
2. Next, escalate up to Configure Terminal and then type the following:
a. #conf t
b. #ip default-gateway 172.16.X.X
c. #end
d. #write
3. Next you can direct your traffic through this route if you wish, as a gateway of last resort:
a. #ip route 0.0.0.0 0.0.0.0 172.16.X.X
b. #end
c. #write
4. Verify by typing in the following:
a. #show ip route
b. Then verify you see a gateway of last resort listed.
Reference:
https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/16448-default.html
2. Next, escalate up to Configure Terminal and then type the following:
a. #conf t
b. #ip default-gateway 172.16.X.X
c. #end
d. #write
3. Next you can direct your traffic through this route if you wish, as a gateway of last resort:
a. #ip route 0.0.0.0 0.0.0.0 172.16.X.X
b. #end
c. #write
4. Verify by typing in the following:
a. #show ip route
b. Then verify you see a gateway of last resort listed.
Reference:
https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/16448-default.html
Monday, April 1, 2019
Clearing UCSM error F0933 “named VLAN for vNIC cannot be resolved” errors
1. First off upon logging onto your UCSM you find this lovely error:
2. So what is happening here is you done messed up A A Ron! A VLAN was deleted from the global LAN Cloud area and more than likely is still attached to a vNIC template out there. There can be some other causes, but this has been the most common issue I have found with this error. Your UCS has a VLAN it does not know what to do with.
3. So, from the error screen, go ahead and go to your LAN section in your UCS and go to your vNIC templates section:
4. Now we can go ahead and select this VLAN we thought was gone, and click on the Delete at the bottom.
5. Once you delete the VLAN, the errors should go down or start going away. You want to check all your vNIC templates to ensure it has been removed.
2. So what is happening here is you done messed up A A Ron! A VLAN was deleted from the global LAN Cloud area and more than likely is still attached to a vNIC template out there. There can be some other causes, but this has been the most common issue I have found with this error. Your UCS has a VLAN it does not know what to do with.
3. So, from the error screen, go ahead and go to your LAN section in your UCS and go to your vNIC templates section:
4. Now we can go ahead and select this VLAN we thought was gone, and click on the Delete at the bottom.
5. Once you delete the VLAN, the errors should go down or start going away. You want to check all your vNIC templates to ensure it has been removed.
Thursday, March 21, 2019
Video Issues Upon Logon in Linux
Sometimes you will get login issues such as a blank screen, login loops, and other ways you cannot just logon within Linux distros. The best way to do this is the following:
1. First, when you get to the boot menu and see your Linux distro (s), hit the “e” key to enter edit mode. This will bring up the kernel startup options.
2. You want to find where it stays “quiet splash” screen and then change “quiet splash” to “nomodeset”. This will basically start the system with no graphics drivers which may be causing you video issues upon login.
3. Hold CTRL+X to startup your Linux system.
4. You Should now be able to login to the GUI with no default drivers which may be causing issues.
1. First, when you get to the boot menu and see your Linux distro (s), hit the “e” key to enter edit mode. This will bring up the kernel startup options.
2. You want to find where it stays “quiet splash” screen and then change “quiet splash” to “nomodeset”. This will basically start the system with no graphics drivers which may be causing you video issues upon login.
3. Hold CTRL+X to startup your Linux system.
4. You Should now be able to login to the GUI with no default drivers which may be causing issues.
Reference:
Monday, March 11, 2019
Edit Alarms in vSphere
1. First log into your vSphere.
2. Next, click on the “Home” icon in the top left of your vSphere screen.
3. Next, click on “Global Inventory Lists” on the dropdown.
4. Then click on vCenter Servers.
5. Click on the vCenter server you wish to edit alarms on.
6. Next, click on the “Monitor” tab.
7. In the monitor tab, you have three options:
a. All Issues: This will list all the issues in your vCenter.
b. Triggered Alarms: This will show any currently triggered alarms in your current vCenter.
c. Alarm Definitions: This is the tab you want to click on. This tab is all of the definitions of the alarms in vCenter. Definitions are just the configurations/descriptions of your alarms.
8. Click on the alarm you wish to edit. You will see a menu in the right of your alarm definition screen displaying your selected alarm.
9. Next, you want to click on the “Edit” button in the top right of the menu showing your alarm definition attributes.
10. Finally this is the popup you can configure/re-configure your alarms:
a. General: just allows you to select what will trigger the alarm, virtual machines, clusters, hosts, etc. Items in your vCenter you wish to know about.
b. Triggers: This will allow you to set the specific alert you wish to trigger. You can have VM Memory usage, CPU usage, power, etc.
c. Actions: This is where you will put in what actions you wish the system to automatically perform.
11. You will fill out the appropriate sections to monitor what you wish to keep track of and then click Next to go through the menus and Finish to finalize your edit.
Reference:
https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.monitoring.doc/GUID-79AC1262-D701-4BC8-8F8D-F046AE0578CF.html
2. Next, click on the “Home” icon in the top left of your vSphere screen.
3. Next, click on “Global Inventory Lists” on the dropdown.
4. Then click on vCenter Servers.
5. Click on the vCenter server you wish to edit alarms on.
6. Next, click on the “Monitor” tab.
7. In the monitor tab, you have three options:
a. All Issues: This will list all the issues in your vCenter.
b. Triggered Alarms: This will show any currently triggered alarms in your current vCenter.
c. Alarm Definitions: This is the tab you want to click on. This tab is all of the definitions of the alarms in vCenter. Definitions are just the configurations/descriptions of your alarms.
8. Click on the alarm you wish to edit. You will see a menu in the right of your alarm definition screen displaying your selected alarm.
9. Next, you want to click on the “Edit” button in the top right of the menu showing your alarm definition attributes.
10. Finally this is the popup you can configure/re-configure your alarms:
a. General: just allows you to select what will trigger the alarm, virtual machines, clusters, hosts, etc. Items in your vCenter you wish to know about.
b. Triggers: This will allow you to set the specific alert you wish to trigger. You can have VM Memory usage, CPU usage, power, etc.
c. Actions: This is where you will put in what actions you wish the system to automatically perform.
11. You will fill out the appropriate sections to monitor what you wish to keep track of and then click Next to go through the menus and Finish to finalize your edit.
Reference:
https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.monitoring.doc/GUID-79AC1262-D701-4BC8-8F8D-F046AE0578CF.html
Friday, March 1, 2019
Upload Firmware into UCSM (GUI)
1. First off, log into your UCSM system you wish to upload to.
2. Next, click on the following tabs:
a. Equipment
b. Firmware Management
c. Installed Firmware
3. Next, under the “Installed Firmware” section, click on “Download Firmware”. This option means the Fabric Interconnects (FIs) themselves will download the software into their flash. Not you downloading the software yourself. It is confusing at first, but remember this is you pushing the firmware to the FIs and they download it.
4. After you click this, then you can select the file you wish to upload and then click “OK”.
5. Your software will start uploading into the FI so it can download. If you need to check the progress of the download, click on the “Download Tasks” tab to the right of the “Installed Firmware” tab.
6. Finally, you can verify your firmware was uploaded/downloaded by selecting the “Packages” tab and you should see your new firmware upload in here.
Reference:
https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-manager/GUI-User-Guides/Firmware-Mgmt/4-0/b_UCSM_GUI_Firmware_Management_Guide_4-0/b_UCSM_GUI_Firmware_Management_Guide_4-0_chapter_0100.html#task_0EE4036D9F434685A3CD94EBC0501B66
2. Next, click on the following tabs:
a. Equipment
b. Firmware Management
c. Installed Firmware
3. Next, under the “Installed Firmware” section, click on “Download Firmware”. This option means the Fabric Interconnects (FIs) themselves will download the software into their flash. Not you downloading the software yourself. It is confusing at first, but remember this is you pushing the firmware to the FIs and they download it.
4. After you click this, then you can select the file you wish to upload and then click “OK”.
5. Your software will start uploading into the FI so it can download. If you need to check the progress of the download, click on the “Download Tasks” tab to the right of the “Installed Firmware” tab.
6. Finally, you can verify your firmware was uploaded/downloaded by selecting the “Packages” tab and you should see your new firmware upload in here.
Reference:
https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-manager/GUI-User-Guides/Firmware-Mgmt/4-0/b_UCSM_GUI_Firmware_Management_Guide_4-0/b_UCSM_GUI_Firmware_Management_Guide_4-0_chapter_0100.html#task_0EE4036D9F434685A3CD94EBC0501B66
Subscribe to:
Posts (Atom)










