From owner-freebsd-net@FreeBSD.ORG Thu Apr 28 05:30:28 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40D7B16A4CE; Thu, 28 Apr 2005 05:30:28 +0000 (GMT) Received: from 62-15-215-183.inversas.jazztel.es (62-15-215-183.inversas.jazztel.es [62.15.215.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBD0743D3F; Thu, 28 Apr 2005 05:30:24 +0000 (GMT) (envelope-from josemi@freebsd.jazztel.es) Received: from redesjm.local (orion.redesjm.local [192.168.254.16]) j3S5UMkd002359; Thu, 28 Apr 2005 07:30:22 +0200 (CEST) (envelope-from josemi@redesjm.local) Received: from localhost (localhost [[UNIX: localhost]]) by redesjm.local (8.13.3/8.13.3/Submit) id j3S5ULtv000911; Thu, 28 Apr 2005 07:30:21 +0200 (CEST) (envelope-from josemi@redesjm.local) From: Jose M Rodriguez To: freebsd-net@freebsd.org, "Crist J. Clark" Date: Thu, 28 Apr 2005 07:30:21 +0200 User-Agent: KMail/1.8 References: <20050427172304.GA26712@goku.cjclark.org> In-Reply-To: <20050427172304.GA26712@goku.cjclark.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200504280730.21549.josemi@redesjm.local> X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-3; AVE: 6.30.0.7; VDF: 6.30.0.116; host: antares.redesjm.local) Subject: Re: PPP-layer Echo X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2005 05:30:28 -0000 El Mi=E9rcoles, 27 de Abril de 2005 19:23, Crist J. Clark escribi=F3: > I want to do something rather simple, but a quick look at > documentation ("man ppp") didn't give me an answer, and I'm > rather pressed for time. > > All I want to do is send an echo-request and listen for the > echo-reply at the PPP layer. Note that I am talking about > pings _at the link layer,_ not IP layer pings. A quick look > at the ppp(8) manpage didn't seem to indicate any tools for > sending or receiving PPP-layer echoes. If ppp(8) doesn't have > the ability, does anyone have any other _simple_ suggestions > for doing this (e.g. dunno if it's worth writing a netgrap(4) > node for this unless its really simple)? > This is FreeBSD-5.4RC3 man ppp ... lqr Default: Disabled and Accepted. This option decides if Link Quality Requests will be sent or accepted. LQR is a protocol that allows ppp to determine that the link is down without rely- ing on the modems carrier detect. When LQR is enabled, ppp sends the QUALPROTO option (see ``set lqrperiod'' below) as part of the LCP request. If the peer agrees, both sides will exchange LQR packets at the agreed frequency, allowing detailed link quality monitoring by enabling LQM logging. If the peer doesn't agree, and if the ``echo'' option is enabled, ppp will send LCP ECHO requests instead. These packets pass no information of interest, but they MUST be replied to by the peer. Whether using LQR or LCP ECHO, ppp will abruptly drop the connec- tion if 5 unacknowledged packets have been sent rather than send- ing a 6th. A message is logged at the PHASE level, and any appropriate ``reconnect'' values are honoured as if the peer were responsible for dropping the connection. Refer to the ``enable echo'' command description for differences in behaviour prior to ppp version 3.4.2. =2E.. echo Default: Disabled. When this option is enabled, ppp will send LCP ECHO requests to the peer at the frequency defined by ``echoperiod''. Note, LQR requests will supersede LCP ECHO requests if enabled and negotiated. See ``set lqrperiod'' below for details. Prior to ppp version 3.4.2, ``echo'' was considered enabled if lqr was enabled and negotiated, otherwise it was considered dis- abled. For the same behaviour, it is now necessary to ``enable lqr echo'' rather than just ``enable lqr''. =2E.. echo is allways acepted, as this is part of lcp. You only need take a=20 look to the logs (/var/log/ppp.log, fyi). Apr 28 07:07:14 antares ppp[785]: tun0: LCP: deflink:=20 RecvEchoRequest(98) state =3D Opened Apr 28 07:07:14 antares ppp[785]: tun0: LCP: deflink: SendEchoReply(98)=20 state =3D Opened Apr 28 07:07:44 antares ppp[785]: tun0: LCP: deflink:=20 RecvEchoRequest(99) state =3D Opened Apr 28 07:07:44 antares ppp[785]: tun0: LCP: deflink: SendEchoReply(99)=20 state =3D Opened Apr 28 07:08:15 antares ppp[785]: tun0: LCP: deflink:=20 RecvEchoRequest(100) state =3D Opened Apr 28 07:08:15 antares ppp[785]: tun0: LCP: deflink: SendEchoReply(100)=20 state =3D Opened Ap =2D- josemi