Archive for March, 2013

Configure Windows 2012 server to use NTP server.

I used the following procedure to configure my Windows 2012 server to use NTP running on my linux server.

Configure the Window Time service to use the NTP server:

PS > w32tm /config /manualpeerlist:NameOrIPAddress /syncfromflags:MANUAL

Example:

PS > w32tm /config /manualpeerlist:192.168.0.1 /syncfromflags:MANUAL

Stop the Windows Time service:

PS > Stop-Service W32Time

Start the Windows Time service:

PS > Start-Service W32Time

Query the Windows Time service:

PS > w32tm /query /status

How to use minicom to access Cisco equipment console

This is another one of those things that I do not do very often. And when it comes up, I have re-invent the wheel. No more. I will have here.

This was done from a CentOS 6.x machine connected via a Cisco console cable to a 35xx switch. This configuration has worked for any Cisco equipment I have worked with as well.

If minicom is not installed:

# yum install minicom

Setup minicom.

# minicom -s

Configure the serial port by selecting “Serial port setup” from the menu.

Select the serial port using A:
A (ttyS0)

Configure the port connection by selecting E:
E
C (9600)
V (Bits)
L (Parity)
W (Stopbits)

9600 8N1

Toggle the hardware flow control:
Hardware Flow Control (off):
F

This will save the configuration as the default configuration:

Save setup as dfl

Ensure that user accounts that need to access the console are added to the dialout group.

# vigr

dialout:x:18:jim

Verify your terminal emulation. Mine was set to xterm, and none of the menuing worked. Obviously, this would need to be done in the user environment.

# export TERM=vt100

Another useful setting is the toggle to enable logging. This is very useful, especially when messing a router or switch configuration.

From the menu (CTRL-A Z), enable capture using L.

Recover a Cisco switch password

Used this procedure to get back into a Cisco 35xx switch that I forgot the enable password.

Unplug switch.
Push and hold the mode button on the front of the switch, and plug the switch in.

At the switch prompt, enter flash_init

switch: flash_init
Initializing Flash…
flashfs[0]: 456 files, 6 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 9057280
flashfs[0]: Bytes available: 23456768
flashfs[0]: flashfs fsck took 13 seconds.
…done Initializing Flash.
Boot Sector Filesystem (bs) installed, fsid: 3
Setting console baud rate to 9600…

Once back at the switch prompt, enter load_helper.

switch: load_helper

Temporarily, rename the current config.

switch: rename flash:config.text flash:config.backup

switch: boot

Would you like to terminate autoinstall? [yes]: yes

— System Configuration Dialog —

Would you like to enter the initial configuration dialog? [yes/no]: no

Enable with no pasword:

Switch>enable
Switch#

Rename the config renamed earlier:

Switch#rename flash:config.backup flash:config.text
Destination filename [config.text]?

Now, copy it to be your running config:

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

Fix your mistake:

Zswitch(config)#no enable secret
Zswitch(config)#enable password mysupersecretpassword

Copy the updated running config to be the startup:

Zswitch(config)#exit
Zswitch#copy running-config startup-config
Destination filename [startup-config]?

I reloaded the switch to verify I could get in now.

Zswitch#reload
Proceed with reload? [confirm]

Return top

INFORMATION