From owner-freebsd-questions@FreeBSD.ORG Tue Nov 20 13:48:34 2012 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E535623 for ; Tue, 20 Nov 2012 13:48:34 +0000 (UTC) (envelope-from fbsd8@a1poweruser.com) Received: from mail-03.name-services.com (mail-03.name-services.com [69.64.155.195]) by mx1.freebsd.org (Postfix) with ESMTP id 713D48FC12 for ; Tue, 20 Nov 2012 13:48:34 +0000 (UTC) Received: from [10.0.10.3] ([173.88.197.103]) by mail-03.name-services.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 20 Nov 2012 05:48:30 -0800 Message-ID: <50AB8A2F.8040507@a1poweruser.com> Date: Tue, 20 Nov 2012 08:48:31 -0500 From: Fbsd8 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: andrew clarke Subject: Re: /usr/sbin/ppp doubling connections on tun0 References: <20121120004938.GA86793@ozzmosis.com> In-Reply-To: <20121120004938.GA86793@ozzmosis.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Nov 2012 13:48:30.0276 (UTC) FILETIME=[B974A840:01CDC725] X-Sender: fbsd8@a1poweruser.com X-Authenticated-Sender: fbsd8@a1poweruser.com X-EchoSenderHash: [fbsd8]-[a1poweruser*com] Cc: FreeBSD questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2012 13:48:34 -0000 andrew clarke wrote: > I'm using /usr/sbin/ppp for PPPoE over an ADSL modem in bridged mode: > > # ifconfig tun0 > tun0: flags=8051 metric 0 mtu 1492 > options=80000 > inet 203.217.27.170 --> 203.215.15.252 netmask 0xffffffff > inet 203.214.46.107 --> 203.215.7.251 netmask 0xffffffff > Opened by PID 49158 > > What would cause this? > > Notice the two IP addresses assigned to the same interface. It should > just have one address assigned. > > Something causes the initial PPPoE session to stop, then another to > restart without properly closing the previous PPPoE session. > > I'm not sure when this started happening but I've noticed it's become > more frequent in the past few weeks. One theory I have is that it may > have begun after I upgraded FreeBSD from 8.2 to 8.3 a few months back. > > I suppose concurrent PPPoE sessions aren't the end of the world, but > obviously it makes no sense to have two on the same interface, so I'd > like to prevent that. > > (Strictly speaking they aren't concurrent as the previously allocated > IP [203.217.27.170 in the case above] no longer responds to pings, > etc. It's dead, Jim.) > > The multiple IP addresses also causes /usr/ports/dns/ddclient to get > confused and not tell DynDNS when a new IP address has been assigned, > although perhaps that's a bug (sort of) in ddclient. > > I notice FreeBSD PR 151400 mentions: > > "The patch also makes a small change to how ppp(8) destroys interfaces > at exit. Instead of just dealiasing interfaces and leaving them > behind, they are now destroyed in the same manner "ifconfig destroy" > works." > > I wonder if that's the cause? If I get a chance I'll try building a > local copy of /usr/sbin/ppp with the patch reverted and test that, > although it can be a difficult problem to replicate. Plus of course > the patch doesn't explain the initial disconnections. I suspect that's > an issue unrelated to /usr/sbin/ppp though. > > # cat /etc/ppp/ppp.conf > default: > set log phase chat lcp ipcp ccp tun command lqm > set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 > nat enable yes > disable lqr > disable ipv6cp > set echoperiod 30 > enable echo > > iinet: > set device PPPoE:bge0 > set authname secret > set authkey secret > set dial > set login > set mru 1492 > set mtu 1492 > set redial 15 0 > add default HISADDR > > # grep ppp /etc/rc.conf > ppp_enable="YES" > ppp_mode="ddial" > ppp_nat="YES" > ppp_profile="iinet" > > # uname -a > FreeBSD blizzard.phoenix 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Tue Jun 12 00:39:29 UTC 2012 > root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > > In the meantime I've switched to using mpd5 (/usr/ports/net/mpd5) and > /sbin/ipnat. So far, so good: > > # ifconfig ng0 > ng0: flags=88d1 metric 0 mtu 1492 > inet 124.170.51.116 --> 203.215.7.251 netmask 0xffffffff > > Regards > Andrew > > Add these statements to your ppp.conf file disable iface-alias # Stop adding old IP address as alias # when ppp redials because line was # lost. These old IPs showed using # ifconfig -a on tun0. iface clear # Remove all previous IP addresses