Go Back   Computer Forums > General Computing > Networking | DNS
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 05-04-2006, 08:56 PM   #1
Golden Master
 
DJ-CHRIS's Avatar
 
Join Date: Apr 2006
Posts: 5,203
Send a message via AIM to DJ-CHRIS Send a message via MSN to DJ-CHRIS Send a message via Yahoo to DJ-CHRIS
Default Running a backup DHCP server

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?
__________________

DJ-CHRIS is offline   Reply With Quote
Old 05-04-2006, 09:41 PM   #2
Golden Master
 
DJ-CHRIS's Avatar
 
Join Date: Apr 2006
Posts: 5,203
Send a message via AIM to DJ-CHRIS Send a message via MSN to DJ-CHRIS Send a message via Yahoo to DJ-CHRIS
Default Re: Running a backup DHCP server

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"
__________________

DJ-CHRIS is offline   Reply With Quote
Old 05-10-2006, 08:20 PM   #3
Golden Master
 
DJ-CHRIS's Avatar
 
Join Date: Apr 2006
Posts: 5,203
Send a message via AIM to DJ-CHRIS Send a message via MSN to DJ-CHRIS Send a message via Yahoo to DJ-CHRIS
Default Re: Running a backup DHCP server

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
DJ-CHRIS is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 09:19 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0