> Got adsl yesterday and managed the setup. though not using draknet. I
> tried draknet first but it did not work. Then I ran adsl-setup and added
> a defaultroute in adsl-start. Now it works like a charm.
> Problem is, 1&1 (my provider) cuts the link after 15 minutes
> of inactivity and after 14 hours of continous running.
>
> 1. I put up a cronjob which sends 1 ping tom my own domain every 14
> minutes.
>
in addition to this job you could also run this script as cronjob which will
check if the connection (ppp0 interface) is still up. if not it will reconnect
and it will also write to a logfile that the connection was down
I've written this script for a SuSE installation, so maybe you have to change
some directories...
#!/bin/bash
#
# This script checks if the specified (network-) interface is up by
# examining ifconfigs output. If the connection is down a new
# connection will be established
#
# check this interface
IFACE=ppp0
# the pid-file of the iface
PIDFILE=/var/run/$IFACE.pid
LOGFILE=/var/log/adsl-status.log
# We must be in RL 3 or 5, otherwise the script does nothing
if [ $(runlevel | awk '{ print $2 }') -gt 2 ]
then
if ! /sbin/ifconfig | /usr/bin/grep --silent $IFACE
then
datestr=$(date +"%Y-%m-%d %H:%M:%S")
echo $datestr Interface $IFACE is not up. Reconnecting. >> $LOGFILE
/sbin/init.d/adsl stop >> $LOGFILE
while [ -e $PIDFILE ]
do
sleep 1
done
sleep 2
/sbin/init.d/adsl start >> $LOGFILE
echo "---" >> $LOGFILE
fi
fi
# END OF FILE
/sbin/init.d/adsl is the script that does the work for connecting/unconnecting.
On a normal linux installation (everything but SuSE) the directory is
/etc/init.d
since my ISP uses PPTP and not PPoE for the adsl connection I got some problems
when the connection died. (pppd stays alife,....). Therefor I shut down the
connection with adsl stop (which will kill the pppd), wait until pppd has
terminated and then i reconnect.
Probalby you can just bring up your connection without the need to stop and
then start the connection.
So that you can do this:
...
if ! /sbin/ifconfig | /usr/bin/grep --silent $IFACE
then
datestr=$(date +"%Y-%m-%d %H:%M:%S")
echo $datestr Interface $IFACE is not up. Reconnecting. >> $LOGFILE
COMMAND TO BRING CONNECTION UP
echo "---" >> $LOGFILE
fi
----------------------------------
E-Mail: Gregor Maier <[EMAIL PROTECTED]>
Date: 09-Jul-2001
Time: 13:00:48
----------------------------------