BigNoseBird.Com- home Small Logo
The 508 compliant Guide to 
       Big Nose Bird

Network Services Reboot Script for Network Cards using the Tulip Driver

Some of my servers use the Netgear 310TX card (which is approved by Redhat btw), and have a sort of nasty habit. It seems that whenever they get unplugged from the network, the card (or OS) doesn't then detect that the card is reconnected and so the link remains dead.

Needless to say, this can render a remote box rather useless and force a call to the webhotel folks for the "... yes, I know it's Linux, and it never needs a reboot, but..." call!

I found this little script called from cron seems to take care of the problem of never being able to get the server responding.

You can of course adjust the cron interval to suit your needs. Be sure to set your $GWADDR to your gateway address.

If your gateway address changes- don't forget to change it in the script or you will get bounced very X number of minutes. ;-)


#netboot: tests to see if gateway is unreachable and
#if so, restart networking. Useful for tulip based
#cards. Call from crontab
#set $GWADDR to your gateway address. 


$result=`/bin/ping -c 2 -w 3 $GWADDR 2>/dev/null`;
chop $result;
if ($reslen < 10 || $result=~/100\% packet loss/i){
 system("/etc/init.d/network restart");


#----------------- put this line in /etc/crontab
#0,10,20,30,40,50 * * * * root /path_to/netboot

Find or Give Help on the BBS
Home Top E-Mail
If it looks great, it's by Christine
Some Fine Print
© 1997-2003 BigNoseBird.Com®, Inc. All rights reserved. All other trademarks are the sole property of their respective owners. The products that we recommend are only ones that we use. We have no relationship with any of the authors or their companies. We cannot assume responsibility for their ultimate performance or lack of same. We also cannot assume responsibility for either any programs provided here, or for any advice that is given since we have no control over what happens after our code or words leave this site. Always use prudent judgment in implementing any program- and always make a backup first! For further information, please read our Privacy Statement. We can be contacted at

Web Builder Network Portal
on the
BigNoseBird Newsletter

Sign up today to receive our low volume newsletter. Tips, tricks, news, and whatever else crosses our minds.
Back Issues
Privacy Statement