Saturday, December 11, 2010

3750 Switch Password Recovery

While having a class of CCNP-SWITCH, i had to perform some labs using layer-3 switch, i used cisco-3750 for the lab, i found that two of the switches are password protected as we purchased that few days before so i had to recvoer the password. Connect the PC to the console port of the switch and if switch is power on, unplug the power and again plug power and press the mode button (it depends on series to series for how long you have to press mode button untill the light turn to green then release it, in 3750 you may required to press for around 15-seconds).

The switch should then give you this prompt

switch:

To initialize the flash file system, run the command

switch: flash_init

The switch will now print few messages about the flash memeory, now the next command will be the helper command.

switch: load_helper

Now we have to list the contents of our flash memory using folowing command.switch:

swith: dir flash:

This will display you the output somewhat like this as show below
The switch file system appears:

Directory of flash:
13 drwx 192 Mar 01 1993 22:30:48 c3750-ipservices-mz-122-25.SEB
11 -rwx 5825 Mar 01 1993 22:31:59 config.text
18 -rwx 720 Mar 01 1993 02:21:30 vlan.dat
16128000 bytes total (10003456 bytes free)


Now rename the configuration file to be used later on.

switch: rename flash:config.text flash:oldconfig.text

To further boot the switch run the boot command, this will start the boot you are used to.

switch: boot

When the switch is booted up, you will realize that the configuration is lost But you are enabled on the switch now and we can recover our old configuration as we kept that in flash with different name.

To recover the old configuration:

Switch# rename flash:oldconfig.text flash:config.text

And now to replace the running configuration with the backup

Switch# copy flash:config.text running-config
Destination filename [running-config]?

Press enter, and you will have your old switch configuration back and you are enabled but remember to change your password now.

I hope this will be informative for you.

Cheers :)

Wednesday, December 8, 2010

Find Net-ID, Host-ID, Total Subnets

Method # 1

Let suppose we have address 192.168.1.142/25

First Address: The first address in the block can be found by setting rightmost 32 – n bits to 0’s. Let’s take the address give above:
11000000 10101000 00000001 10001110
11000000 10101000 00000001 10000000 (as 32-25 = 7)

192.168.1.127 is the First Address

Last Address: The last address in the block can be found by setting rightmost 32 – n bits to 1’s. Let’s take the address given above:
11000000 10101000 00000001 10001110
11000000 10101000 00000001 11111110 (do 32 – n)

192.168.1.254 is the Last Address

Total Addresses: The number of address in the block can be found by using the formula 232-n, let’s look at this:
232-25 = 24 = 16

I hope this will be informative for you.

Cheers :)