Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 1996 06:15:30 +0000 ()
From:      francis yeung <fyeung@fyeung5.netific.com>
To:        wsantee@wsantee.oz.net (Wes Santee)
Cc:        wsantee@wsantee.oz.net, questions@freebsd.org
Subject:   Re: Solution: Telling if User PPP is up or down
Message-ID:  <199602160615.GAA25100@fyeung5.netific.com>
In-Reply-To: <199602160811.AAA20475@wsantee.oz.net> from "Wes Santee" at Feb 16, 96 00:11:54 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 

Wes,

	I have encountered the following sometimes:

	/var/spool/lock/LCK...cuaax owned by ppp.
	ifconfig tun0 - up and running
	/var/log/ppp - OsLinkup ipaddrss

	Everything looks like it is up and running but I can't
	ping the other side unless I do the following:


#!/bin/sh
pid=`cat /var/spool/lock/LCK..cuaa2`
if [ $pid ]
then
	echo "ppp pid=$pid"
	kill $pid
fi
sleep 5
/usr/sbin/ppp -auto provider

	to reset the ppp connection. 
	Unfortunately, the kernel was not built to support tcpdump.
	
	I that sort wish that there is a way to find out if the
	link is up. Normally, the ifconfing tun0 's status
	should be controlled by the ppp. If the handsake is completed
	and the ip is up, the ifconfig should indicate that it is
	up otherwise it should say down. But it was not the case.

	Francis



> Wes Santee sez:
> > 
> > Terry Lambert sez:
> > > Or "ifconfig tun0", and if it reports an "inet" line (if it doesn't,
> > > it has never been up), check it for 0.0.0.0 (and make sure it gets
> > > upt back correctly by pppd when it downs...).
> > 
> > Someone else mentioned in e-mail to take a look at ifconfig and see
> > what it will tell me.  I'll give it a shot.
> 
> Well, that didn't do it, but upon further exploration of the PPP man
> page, it says that when the process is locking the com port, it
> creates a lock-file as /var/spool/lock/LCK..<com name> where <com
> name> is something like cuaa0, cuaa1, etc.  As it turns out, when
> the link is up, the lockfile exists, and when the link is down, it
> is removed.
> 


> Cheers,
> -- 
> ( -Wes Santee <wsantee@wsantee.oz.net>  |                                )
> (             <wsantee@oz.net> (backup) | No one told you when to run... )
> ( http://www.oz.net/~wsantee            \------------------------------- )
> ( finger for PGP info                                 Powered by FreeBSD )
> 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602160615.GAA25100>