Re: [SLUG] Continuation of PPP woes.

2003-11-21 Thread Ben Donohue
Sorry but i've missed the inital post of this thread but the following 
may help with keepalive stuff.
It's what I do with a permanent modem connection. You could adapt it to 
suit yourself.

cd /etc/ppp
ps ax | fgrep pppd | fgrep -v fgrep > /dev/null || /usr/sbin/pppd
run this through a cron job every five minutes or so and it will check 
whether your connection is up.
Ben

--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Continuation of PPP woes.

2003-11-20 Thread Grant Parnell
Not sure but it looks to me like something's deliberately killing the 
connection. Have you got it set to 'ondemand' by any chance? this would be 
a bad idea for most people's ADSL since we're not time charged.


Also, generally speaking make the connection profile simple and write a 
keepalive script along the lines of:-

#!/bin/bash
while [ 0 ]; do
# can we reach something that's usually reliable
OK=`ping -c5 -w1 mail.isp.com.au`
if [ "x$OK" = "x" ]; then
# no? are we sure?
# try some other thing pretty reliable
OK=`ping -c5 -w5 ns1.isp.com.au`
if [ "x$OK" = "x" ]; then
# still can't reach it 
# ensure the connection is killed off
adsl-stop &
sleep 30
# if adsl-stop got stuck, kill pppd to help
killall pppd
sleep 5
# kill with extreme predjudice to be sure
killall -9 pppd
sleep 2
# fire it up
adsl-start &
fi
fi
# wait 5 mins before checking again
# while testing you can kill 
sleep 300
done
# never gets out of this loop

start the script with:-
/usr/local/sbin/keepalive >/var/log/keepalive.log 2>&1 &
EG in /etc/rc.d/rc.local 

I usually get quite elaborate with my keepalive scripts that automatically 
switch between ADSL & modem dialup backup.

-- 
--
Electronic Hobbyist, Former Arcadia BBS nut, Occasional nudist, 
Linux Guru, SLUG/AUUG/Linux Australia member, Sydney Flashmobber,
BMX rider, Walker, Raver & rave music lover, Big kid that refuses
to grow up. I'd make a good family pet, take me home today!
Do people actually read these things?


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


[SLUG] Continuation of PPP woes.

2003-11-18 Thread [EMAIL PROTECTED]
G'day all...

I'm still having some PPP woes. PPP doesn't always reconnect properly upon
reboot - which then causes squid to fall-over - and sometimes PPP falls
over by itself and doesn't manage to reconnect. If it was just for me, it'd
be ok, as I can fix it - but its for an organisation I volunteer for, so it
causes drama when I'm not around and they can't access the internet. I need
to create a solution so that it automagically corrects itself, or the fault
is prevented from happening. At this stage I'm not sure where the fault
lies. (Eg. The line itself, SwiftDSL or our server.)

I tried putting "MAXFAIL=0" into the options file for the device which
someone else suggested. (Sorry, can't remember who, but thanks for their
help.) Unfortunately this has only helped marginally, and the problem
persists.

Attached is a cut down version of the /var/log/messages file from the
machine. (IP addresses have been blanked out.) I've tried to diagnose the
fault myself, but I'm not really that au-feaux (sp) with PPP - I'd
really appreciate a hand on this one.

Many thanks and all the best.

Mike Kraus



mail2web - Check your email from the web at
http://mail2web.com/ .

Nov 17 12:25:48 rosebud network: Bringing up interface ppp0:  failed 
Nov 17 12:25:58 rosebud pppd[2177]: Connection terminated.
Nov 17 12:25:58 rosebud pppd[2177]: LCP: timeout sending Config-Requests 
Nov 17 12:26:02 rosebud pppd[2177]: Exit.
Nov 17 12:26:02 rosebud pppoe[2178]: Timeout waiting for PADS packets
Nov 17 12:35:01 rosebud pppd[2918]: Connect: ppp0 <--> /dev/pts/0
Nov 17 12:35:01 rosebud pppd[2918]: pppd 2.4.1 started by root, uid 0
Nov 17 12:35:01 rosebud pppd[2918]: Using interface ppp0
Nov 17 12:35:02 rosebud /etc/hotplug/net.agent: assuming ppp0 is already up
Nov 17 12:35:02 rosebud pppoe[2919]: PPP session is 6178
Nov 17 12:35:05 rosebud pppd[2918]: local  IP address ***.***.***.*
Nov 17 12:35:05 rosebud pppd[2918]: primary   DNS address ***.**.**.**
Nov 17 12:35:05 rosebud pppd[2918]: remote IP address ***.***.**.***
Nov 17 12:35:05 rosebud pppd[2918]: secondary DNS address ***.***.**.**
Nov 18 16:58:43 rosebud adsl-stop: Killing adsl-connect
Nov 18 16:58:43 rosebud adsl-stop: Killing pppd
Nov 18 16:58:43 rosebud pppd[2918]: Terminating on signal 15.
Nov 18 16:58:44 rosebud pppd[2918]: Connection terminated.
Nov 18 16:58:44 rosebud pppd[2918]: Connect time 1703.7 minutes.
Nov 18 16:58:44 rosebud pppd[2918]: Sent 2052513 bytes, received 28330500 bytes.
Nov 18 16:58:44 rosebud pppoe[2919]: read (asyncReadFromPPP): Session 6178: 
Input/output error
Nov 18 16:58:44 rosebud pppoe[2919]: Sent PADT
Nov 18 16:58:45 rosebud pppd[2918]: Exit.
Nov 18 16:59:06 rosebud pppd[4481]: Connect: ppp0 <--> /dev/pts/0
Nov 18 16:59:06 rosebud pppd[4481]: pppd 2.4.1 started by root, uid 0
Nov 18 16:59:06 rosebud pppd[4481]: Using interface ppp0
Nov 18 16:59:07 rosebud /etc/hotplug/net.agent: assuming ppp0 is already up
Nov 18 16:59:07 rosebud pppoe[4482]: PPP session is 6631
Nov 18 16:59:10 rosebud pppd[4481]: local  IP address ***.***.***.*
Nov 18 16:59:10 rosebud pppd[4481]: primary   DNS address ***.***.**.**
Nov 18 16:59:10 rosebud pppd[4481]: remote IP address ***.***.**.***
Nov 18 16:59:10 rosebud pppd[4481]: secondary DNS address ***.***.**.**
Nov 18 17:05:56 rosebud adsl-connect: ADSL connection lost; attempting re-connection.
Nov 18 17:05:56 rosebud adsl-stop: Killing adsl-connect
Nov 18 17:05:56 rosebud adsl-stop: Killing pppd
Nov 18 17:05:56 rosebud pppd[4481]: Connection terminated.
Nov 18 17:05:56 rosebud pppd[4481]: Connect time 6.9 minutes.
Nov 18 17:05:56 rosebud pppd[4481]: Exit.
Nov 18 17:05:56 rosebud pppd[4481]: Sent 462 bytes, received 378 bytes.
Nov 18 17:05:56 rosebud pppd[4481]: Terminating on signal 15.
Nov 18 17:05:56 rosebud pppoe[4482]: read (asyncReadFromPPP): Session 6631: 
Input/output error
Nov 18 17:05:56 rosebud pppoe[4482]: Sent PADT
Nov 18 17:06:04 rosebud pppd[4788]: pppd 2.4.1 started by root, uid 0
Nov 18 17:06:05 rosebud /etc/hotplug/net.agent: assuming ppp0 is already up
Nov 18 17:06:05 rosebud pppd[4788]: Connect: ppp0 <--> /dev/pts/0
Nov 18 17:06:05 rosebud pppd[4788]: Using interface ppp0
Nov 18 17:06:05 rosebud pppoe[4789]: PPP session is 6639
Nov 18 17:06:08 rosebud pppd[4788]: local  IP address ***.***.***.*
Nov 18 17:06:08 rosebud pppd[4788]: primary   DNS address ***.***.**.**
Nov 18 17:06:08 rosebud pppd[4788]: remote IP address ***.***.**.***
Nov 18 17:06:08 rosebud pppd[4788]: secondary DNS address ***.***.**.**
Nov 18 17:08:48 rosebud adsl-stop: Killing adsl-connect
Nov 18 17:08:48 rosebud adsl-stop: Killing pppd
Nov 18 17:08:48 rosebud network: Shutting down interface ppp0:  succeeded
Nov 18 17:08:48 rosebud pppd[4788]: Connection terminated.
Nov 18 17:08:48 rosebud pppd[4788]: Connect time 2.8 minutes.
Nov 18 17:08:48 rosebud pppd[4788]: Exit.
Nov 18 17:08:48 rosebud pppd[4788]: Sent 114 bytes, received 114 bytes.
Nov 18 17:08:4