Access Point problem

Rick Stevens rstevens at vitalstream.com
Wed Mar 9 19:16:50 UTC 2005


Rick Stevens wrote:
<snip>
> Well, you could run something like this:
> 
>     #!/bin/bash
>     FIRSTIP=192.168.0.1
>     LASTIP=192.168.0.255
> 
> 
>     IP=$FIRSTIP
>     echo `date`
>     while [ $IP -le $LASTIP ]; do
>         ping -q -c 1 $IP >/dev/null
>         if [ $? -eq 0 ]; then
>             echo $IP is alive
>         else
>             echo $IP is NOT alive
>         fi
> 
> 
>         let IP=$IP+1
>     done

Oops!  I hacked that up from another bit of kit and didn't check it.
It should be:

	#!/bin/bash
	# Change this line to reflect your network IP...
	NET=192.168.0
	FIRSTIP=1
	LASTIP=254
 

	IP=$FIRSTIP
	echo `date`
	while [ $IP -le $LASTIP ]; do
	    ping -q -c 1 $NET.$IP >/dev/null
	    if [ $? -eq 0 ]; then
	        echo $NET.$IP is alive
	    else
	        echo $NET.$IP is NOT alive
	    fi
 

	    let IP=$IP+1
	done

Sorry, gang!
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-         The Navy's a bunch of wimps!  MY job's an adventure!       -
----------------------------------------------------------------------




More information about the fedora-list mailing list