Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Oct 2001 23:25:14 +0200
From:      "Leif Neland" <leifn@neland.dk>
To:        "Jason Kocol" <mrkocol@cv.org>, <freebsd-net@FreeBSD.ORG>
Subject:   Re: ppp, tun0, and 2 IP addresses
Message-ID:  <007501c159ad$b56fc5a0$6d05a8c0@neland.dk>
References:  <3BD1B5F7.DA998771@cv.org> <005701c15990$eb5407c0$6d05a8c0@neland.dk> <3BD1BD7C.88C97C57@cv.org>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message -----
From: "Jason Kocol" <mrkocol@cv.org>
To: "Leif Neland" <leifn@neland.dk>; <freebsd-net@FreeBSD.ORG>
Sent: Saturday, October 20, 2001 8:07 PM
Subject: Re: ppp, tun0, and 2 IP addresses


> Leif Neland wrote:
>
> > > I am running FreeBSD 4.4-STABLE, using ppp with a DSL router.  I
run
> > ppp
> > > in ddial mode, using tun0 as the device.  My DSL service
provides me
> > > with a dynamic IP address.
> > >
> > > Whenever I get disconnected somehow (most likely by the ISP or
> > switch I
> > > am connected to), and ppp reconnects, tun0 ends up binding to 2
> > > different IP addresses - the one it was using prior to
disconnecting
> > and
> > > the new one.
> > >
> > > Has anyone ever experienced this problem and has a way to solve
it?
> > It
> > > happens to me regularly.  Please let me know if you need any
more
> > > information.
> > >
> > It is no problem. It is because processes running during the
cutoff
> > and reconnect does not have to bind to another IP.
> >
> > Are you having any trouble with it, other than confusion?
> >
> > Leif
>
> Yes, I am having trouble with it because I also have a utility
running
> that will update my IP address at dyndns.org if it changes (so I can
> have a constant URL to connect to my machine).  The utility does not
> update the IP address when this happens because it still sees the
old
> one bound to tun0 as well.  Thus, I am unable to connect to this
machine
> remotely until I reset everything manually.
>
Quoted from man ppp:

         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'.


But anyway, is the trouble that your utility must know your "true" ip
to tell dyndns, or just that it needs to know that the address has
changed?

If it is the latter, then run the utility in ppp.linkup and kill it in
ppp.linkdown.

I think you will get in trouble if you disable the behaviour of
keeping the old addresses.

Leif




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?007501c159ad$b56fc5a0$6d05a8c0>