From owner-freebsd-questions Fri Jun 21 06:31:47 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA15440 for questions-outgoing; Fri, 21 Jun 1996 06:31:47 -0700 (PDT) Received: from mail.Clark.Net (mail.clark.net [168.143.0.10]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA15434 for ; Fri, 21 Jun 1996 06:31:45 -0700 (PDT) Received: from clark.net (root@clark.net [168.143.0.7]) by mail.Clark.Net (8.7.3/8.6.5) with ESMTP id JAA19283; Fri, 21 Jun 1996 09:31:39 -0400 (EDT) Received: from clark.net (markus@localhost [127.0.0.1]) by clark.net (8.7.1/8.7.1) with ESMTP id JAA26255; Fri, 21 Jun 1996 09:31:35 -0400 (EDT) Message-Id: <199606211331.JAA26255@clark.net> To: Kenneth Ingham cc: questions@freebsd.org Subject: Re: I want PPP to stay up all the time In-reply-to: Your message of "Thu, 20 Jun 1996 17:36:04 MDT." <199606202336.RAA00786@cube.i-pi.com> Date: Fri, 21 Jun 1996 09:31:27 -0400 From: Mark Plummer Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > OS: FreeBSD 2.1. > > I'm have a full-time (modem) ppp connection to the internet. I'd like the > link to stay up all the time. What happens now with both kernel and user PPP > is that if the link drops (i.e. due to a noisy phone line), it stays down. > > I've gone over the man pages and the FreeBSD Handbook and have found nothing > that seems to help. I would dig through the source, but my CD drive is dead > (but under warranty, so will eventually be replaced). > > I have tried both user and kernel ppp. > > Any suggestions? > > Kenneth Ingham > ingham@i-pi.com hey, i use a script which pings the far side of the connection (or something which is always reachable if the connection is up). if the connection is down, it restarts ppp automatically. i run it from cron every five minutes. here it is... #!/bin/sh PATH=/sbin:/usr/sbin:/bin:/usr/bin ipaddr="$1" # which ip address to check for basic connectivity ppptag="$2" # which tag in ppp.conf to use to redial pppline=`ps -axu | grep "[p][p][p][) ]"` if [ ! -z "$pppline" ] ; then if ping -c 10 $ipaddr 2> /dev/null | grep -q "100% packet loss" ; then ppppid=`echo $pppline | awk '{print $2}'` kill $ppppid sleep 3 ppp $ppptag > /dev/null 2>&1 & fi else ppp $ppptag > /dev/null 2>&1 & fi -- Mark Plummer, markus@clark.net, +1 410 796 1272