From owner-freebsd-questions@FreeBSD.ORG Thu May 18 08:23:36 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C51E216A403 for ; Thu, 18 May 2006 08:23:36 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: from matrix.teledomenet.gr (dns1.teledomenet.gr [213.142.128.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29A8343D48 for ; Thu, 18 May 2006 08:23:32 +0000 (GMT) (envelope-from nvass@teledomenet.gr) Received: from [192.168.1.71] ([192.168.1.71]) by matrix.teledomenet.gr (8.12.10/8.12.10) with ESMTP id k4I8NPEY026261; Thu, 18 May 2006 11:23:25 +0300 From: Nikos Vassiliadis To: freebsd-questions@freebsd.org Date: Thu, 18 May 2006 11:19:57 +0300 User-Agent: KMail/1.9.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605181119.58110.nvass@teledomenet.gr> Cc: "Michael P. Soulier" Subject: Re: pppoe reliability X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2006 08:23:36 -0000 On Thursday 18 May 2006 02:07, Michael P. Soulier wrote: > Hello, > > I'm trying FreeBSD as a PPPoE client for my ADSL connection. Setup was > great, but I'm finding that when I lose a connection (troubles with my > isp), the ppp command does not return like I would like it to. > > [root@kanga ~]# ppp -foreground -nat storm > Working in foreground mode > Using interface: tun0 > tun0: Command: default: set ifaddr 10.0.0.1/0 10.0.0.2/0 > tun0: ID0: 0x282eed00 = fopen("/etc/ppp/ppp.conf", "r") > tun0: Debug: ReadSystem: Checking storm (/etc/ppp/ppp.conf). > tun0: Command: storm: nat enable yes > tun0: Command: storm: set device PPPOE:fxp0 > tun0: Command: storm: set authname msoulier@storm.ca > tun0: Command: storm: set authkey ******** > tun0: Command: storm: set dial > tun0: Command: storm: set login > tun0: Command: storm: add default HISADDR > tun0: ID0: 9 = socket(17, 3, 0) > tun0: ID0: -1 = write(9, data, 140) > tun0: TCP/IP: rt_Set failure: > tun0: TCP/IP: rt_Set: Cmd = Add > tun0: TCP/IP: rt_Set: Dst = 0.0.0.0/0 > tun0: TCP/IP: rt_Set: Gateway = 10.0.0.2 > tun0: Debug: wrote -1: cmd = Add, dst = 0.0.0.0/0, gateway = 10.0.0.2 > > I just found the connection down because my modem lost sync, and the > client didn't return. I was hoping that it would return so that I > could script the client such that it would always retry, via supervise > or runit. > > Any ideas? Enable echo so ppp will know when the other peer is down, and then will act as you tell it to. I think enabling echo and -ddial mode will be fine, no need of scripting, but anyways the recommended way of interacting with ppp(8) is pppctl(8). from ppp man: -ddial This mode is equivalent to -auto mode except that ppp will bring the link back up any time it is dropped for any reason. 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''.