What's Popular

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...

Showing posts with label Catalyst. Show all posts
Showing posts with label Catalyst. Show all posts

Sunday, August 22, 2021

Password Recovery for Old/Used Cisco Switch or Router

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.

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)

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

Thursday, January 3, 2019

Changing VLAN Root Bridge ID on a Layer 3 Switch

1.    First, you will need to identify the VLAN you wish to change. With Cisco switches (not sure about others yet), you can change the root bridge ID for each VLAN individually. Warning! This may/will cause a re-convergence on the network. My lab environment noticed very little issues, but again just a home lab and a medium/large network this can take down your network as everything tries to readjust. Again, all of my SOPs/tips have been done in a home lab, always follow proper procedures before performing changes on your live/home network.
2.    Make sure you design/choose your switch you wish to be root carefully. Usually, you want your big/fast switches to be the root so you don’t have your traffic handicapped at a small/slow switch. It is all depending on how you wish to design it.
3.    Once you identify your VLAN, perform the following to change the priority:
    a.    #configure terminal
        i.    #spanning-tree vlan XXX priority 4096
            1.    Numbers start from 0 and increment in the number 4096 intervals. So example: 0, 4096, 8192, 12288 etc.
        ii.    #exit
    b.    #write
4.    Sometimes this is quick, sometimes this can take a little time for the switches to readjust. Just a few simple commands, but can make a huge difference on the speed of your network.

Reference: https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_53_se/configuration/guide/2960scg/swstp.html

Sunday, July 1, 2018

Common and Basic Cisco Commands

Common and Basic Cisco Commands
This list is just a quick list of tips and commands that are only for my reference. These are just quick inputs and notes, and these are not considered a walkthrough. This list will constantly be updated over time and when I have time to update it.

·         You type in something wrong and get the “Translating “your incorrect entry” …domain server (255.255.255.255), you can stop this in the middle of it by the following:
o   Ctrl+Shift+6 will abort this process.
·         To prevent the Cisco device from trying to resolve an incorrect entry into an IP address, you can put in the following:
o   Escalate up to “configure terminal” mode
o   Enter the following command: #no ip domain-lookup
·         You can see the previous history of entered commands by typing in:
o   #show history
o   If you want to change the size of the history, perform the following:
§  Escalate to configure terminal level
§  Select console line by typing the following: #line console 0
§  Next type in #history size 50. You can put in any number from 0-256 for how many lines you want history to remember.
·         You can exit by doing Ctrl+Z or by typing #exit.
o   Typing #end will take you all the way back to the beginning of the Cisco device privilege modes.
·         You can see what is on the hard drive or flash of a Cisco device by typing in #show flash.
o   If you want to remove files on the flash, execute the following:
§  #delete flash:’filename’
§  Confirm the deletion.
o   Sometimes files can be deleted by the following command (if they are still stored and not being deleted) #squeeze flash.
·         One vital command which is helpful is the ability to reload the router through CLI. This is performed by typing the following command:
o   #reload in 5
o   This reboots the router in 5 minutes. You can have it reboot in any amount of time you designate.
o   This allows you to wipe the configuration if you have not already committed the changes and saved to the flash.
o   #reload cancel cancels the reboot.
·         #show running-config to show the current configurations which are running on the Cisco device.
·         #show startup-config to show the configurations which will be loaded into the Cisco device upon boot.
·         #copy running-config startup-config” will give you the option to save your current running configuration to the startup configuration fle.
o   #copy run startup-config and #write memory commands also save the configurations (can also just type write).
·         #write erase will allow you to erase your saved configurations in NVRAM and take you back to factory defaults.
·         To kick users from the device execute the following:
o   #show users
o   #clear line vty #
·         To show spanning-tree information for priorities, if an interface is blocked, designated, or the switch is root, and other information:
show spanning-tree” will display the information.