Running a backup DHCP server

DJ-CHRIS1

Golden Master
Messages
5,203
Okay so I have decided to have two DHCP servers on my network for backup purposes.

The primary DHCP Server is running Cisco IOS 12.2T soon to be upgraded to Cisco IOS 12.4

The secondary DHCP Server is running Windows 2000 Advanced server.

What I want to do is to have the Windows 2000 Advanced server check to see if the primary DHCP server is running. If it cannot ping the primary DHCP server I would like the Windows 2000 Advanced server to start it's own DHCP service.

Is their any way to do this?
 
Okay i was thinking more and I need a little program that does this

It would ping a host (10.10.10.1) "ping 10.10.10.1 -t" and as soon as the ping's started
(you would get "Destination host unreachable") failing it would issue the command "net start dhcp"
 
Okay here is how it was done. I got a friend to write a bit of this, than I edited it to my uses

***START***
@echo off
:_start
echo ***PROGRAM STARTED***
ping 10.10.10.1 -n 1 | find "TTL=" >NUL
if not ERRORLEVEL 1 goto _found

ping 10.10.10.1 -w 10000 | find "TTL=" >NUL
if ERRORLEVEL 1 goto _do

goto _err

:_found
sndrec32 /play /close "C:\dhcp\blip.wav"
echo DHCP Server (ciscogateway.mayhew.ca / 10.10.10.1) is UP
echo %date% %time%: Found server. >> c:\DHCP\pingstart.txt
echo Waiting 5 seconds
goto _wait


:_do
echo DHCP Server (ciscogateway.mayhew.ca / 10.10.10.1) is DOWN
echo %date% %time%: Didn't find server. Starting DHCP on local machinne >> c:\DHCP\pingstop.txt
net start dhcp
echo WARNING MAIN NETWORK DHCP SERVER IS DOWN.
goto _erroraudio


:_err
echo UNEXPECTED ERROR!
echo %date% %time%: ERROR: CONFLICTING RESULTS >> c:\DHCP\pingstop.txt
goto _erroraudio

:_wait
@ping 127.0.0.1 -n 8 -w 30000 > nul
@ping 127.0.0.1 -n %1% -w 30000> nul
goto _start

:_erroraudio
sndrec32 /play /close "C:\DHCP\Redalert.wav"
goto _start

:_end
echo Written by: Andrew D, 2006
 
Back
Top Bottom