Discussion:
ISP connection tricks
(too old to reply)
root
2018-06-03 20:41:40 UTC
Permalink
Raw Message
This stuff works for my ISP=Charter Communications

When the connection is down I wanted a way to go about my
business and have the computer alert me when it is back
up. I use this script:

if [ $1 ] ; then
ADDRESS=$1
else
#ADDRESS=66.199.228.3
ADDRESS=72.30.35.9
fi
#ping -c1 -w999999999 $ADDRESS
#ping -c2 -W 720 $ADDRESS
#ping -W 12 192.168.100.1
while [ ! "$RESPONSE" ] ;
do
RESPONSE=`ping -c1 $ADDRESS|grep 64`
done
ALARM 4

ALARM is anything what will get your attention. I use this
script:

#ACTIVE=`lsof|grep /dev/snd`
#if [ "$ACTIVE" ] ;then
#/root/bin/beep
#exit
#fi
if [ ! $1 ] ;then
play /root/gaim/arrive.wav > /dev/null 2>&1
exit
fi
for num in $@
do
case $1 in
1) play /root/gaim/arrive.wav > /dev/null 2>&1 ;;
2) play /root/gaim/receive.wav > /dev/null 2>&1 ;;
3) play /root/gaim/send.wav > /dev/null 2>&1 ;;
4) play /root/gaim/leave.wav > /dev/null 2>&1 ;;
5) play /root/gaim/redalert.wav > /dev/null 2>&1 ;;
*) play /root/gaim/arrive.wav > /dev/null 2>&1 ;;
esac
shift
done
exit

Modify as needed.

I find that Charter assigns my IP address on the basis of
the MAC address of the device asking for a connection. If
I want a different IP address I can tell my router to
spoof a different MAC address. One caveat: in running
experiments I found that different MAC addresses led
me to seem to come from a wide range of places in
Southern California, from Los Angeles to San Diego.
Bit Twister
2018-06-03 21:18:38 UTC
Permalink
Raw Message
Post by root
This stuff works for my ISP=Charter Communications
When the connection is down I wanted a way to go about my
business and have the computer alert me when it is back
if [ $1 ] ; then
ADDRESS=$1
else
ADDRESS=72.30.35.9
fi
while [ ! "$RESPONSE" ] ;
do
RESPONSE=`ping -c1 $ADDRESS|grep 64`
done
ALARM 4
Looks like a lot of work to me. If I can ping yahoo.com the network is up.

false
while [ $? -ne 0 ] ; do
ping -c1 yahoo.com > /dev/null 2>&1
done
ALARM 4
root
2018-06-03 23:35:37 UTC
Permalink
Raw Message
Post by Bit Twister
Looks like a lot of work to me. If I can ping yahoo.com the network is up.
false
while [ $? -ne 0 ] ; do
ping -c1 yahoo.com > /dev/null 2>&1
done
ALARM 4
Yes, better.
King Beowulf
2018-06-11 18:12:21 UTC
Permalink
Raw Message
Post by root
Post by Bit Twister
Looks like a lot of work to me. If I can ping yahoo.com the network is up.
false while [ $? -ne 0 ] ; do
ping -c1 yahoo.com > /dev/null 2>&1
done ALARM 4
Yes, better.
If the netwrk is donw...

...I just go read a book.
Aragorn
2018-06-11 18:59:55 UTC
Permalink
Raw Message
On Monday 11 June 2018 20:12, King Beowulf conveyed the following to
alt.os.linux.slackware...
Post by King Beowulf
Post by root
Post by Bit Twister
Looks like a lot of work to me. If I can ping yahoo.com the network is up.
false while [ $? -ne 0 ] ; do
ping -c1 yahoo.com > /dev/null 2>&1
done ALARM 4
Yes, better.
If the netwrk is donw...
...I just go read a book.
One about spelling, I presume? :p
--
With respect,
= Aragorn =
Loading...