From owner-freebsd-questions@FreeBSD.ORG Tue Nov 20 08:23:55 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 55A6EB6 for ; Tue, 20 Nov 2012 08:23:55 +0000 (UTC) (envelope-from nvass@gmx.com) Received: from mailout-eu.gmx.com (mailout-eu.gmx.com [213.165.64.43]) by mx1.freebsd.org (Postfix) with SMTP id 6D8028FC15 for ; Tue, 20 Nov 2012 08:23:54 +0000 (UTC) Received: (qmail invoked by alias); 20 Nov 2012 08:11:42 -0000 Received: from 77.49.93.72.dsl.dyn.forthnet.gr (EHLO [192.168.1.77]) [77.49.93.72] by mail.gmx.com (mp-eu004) with SMTP; 20 Nov 2012 09:11:42 +0100 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX1/c2JNOtZLcXKc1syz7ZkQI6fVpUT0FPtowIZyMxZ 4TDTflFaUKxT8O Message-ID: <50AB3B33.7000104@gmx.com> Date: Tue, 20 Nov 2012 10:11:31 +0200 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120604 Thunderbird/13.0 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-Y-GMX-Trusted: 0 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 08:23:55 -0000 On 11/20/2012 2:49 AM, 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. Yes, I think this is caused by NAT. It seems that this is feature: > iface-alias > Default: Enabled if -nat is specified. This option simply tells > ppp to add new interface addresses to the interface rather than > replacing them. The option can only be enabled if network > address translation is enabled (``nat enable yes''). > > With this option enabled, ppp will pass traffic for old interface > addresses through the NAT engine (see libalias(3)), resulting in > the ability (in -auto mode) to properly connect the process that > caused the PPP link to come up in the first place. > > Disabling NAT with ``nat enable no'' will also disable > `iface-alias'. One could say that it's a surprising one! But, yes, is deliberate. HTH, Nikos