/usr/sbin/ppp doubling connections on tun0
Nikos Vassiliadis
nvass at gmx.com
Tue Nov 20 08:23:55 UTC 2012
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<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1492
> options=80000<LINKSTATE>
> 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
More information about the freebsd-questions
mailing list