I use something similiar to this script to check connectivity across my 
network. With a mysql backend it has become a very useful tool. Only problem 
is when you try to ping firewalled hosts. If you are on the same lan segment 
arping can be very useful because it works on the mac layer instead of the 
tcp/ip layer, can ping through most firewalls unless it is a mac oriented 
iptables firewall.


On Tuesday 20 August 2002 11:06 pm, Mark Weaver wrote:
> Randy Kramer wrote:
> > kwan,
> >
> > Thanks!  I've got several choices now ;-)
> >
> > Randy Kramer
> >
> > [EMAIL PROTECTED] wrote:
> >>Here's a script that I use to check connectivity:
> >>
> >>
> >>  #!/bin/bash
> >>  STATUS=`ping -c 2 -q 11.22.33.44 2>/dev/null`
> >>  CODE=$?
> >>
> >>  if [ $CODE -gt 0 ]; then
> >>     echo Link is down.
> >>  else
> >>     echo Link is up.
> >>  fi
> >>
> >>
> >>Replace the 11.22.33.44 with a host on the internet. I use the
> >>nameserver of the ISP but you can use any reliable address.
> >>This script segment is part of a larger one to reboot my DSL modem via
> >>X10, but you can modify it for dialup. There are also other ways of
> >>dialing on demand such as "diald" that may be more effective.
>
> Randy,
>
> The above was the accurate rendition of the correct syntax for the
> earlier suggestion.

-- 
Brandon Long
[EMAIL PROTECTED]

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to