From owner-freebsd-net Sat Oct 20 14:25:25 2001 Delivered-To: freebsd-net@freebsd.org Received: from fepZ.post.tele.dk (fepz.post.tele.dk [195.41.46.133]) by hub.freebsd.org (Postfix) with ESMTP id DC5BB37B401 for ; Sat, 20 Oct 2001 14:25:20 -0700 (PDT) Received: from arnold.neland.dk ([62.243.124.200]) by fepZ.post.tele.dk (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP id <20011020212519.QVY2863.fepZ.post.tele.dk@arnold.neland.dk>; Sat, 20 Oct 2001 23:25:19 +0200 Received: from gina ([192.168.5.109]) by arnold.neland.dk (8.11.6/8.11.6) with SMTP id f9KLPnq16486; Sat, 20 Oct 2001 23:25:50 +0200 (CEST) (envelope-from leifn@neland.dk) Message-ID: <007501c159ad$b56fc5a0$6d05a8c0@neland.dk> From: "Leif Neland" To: "Jason Kocol" , References: <3BD1B5F7.DA998771@cv.org> <005701c15990$eb5407c0$6d05a8c0@neland.dk> <3BD1BD7C.88C97C57@cv.org> Subject: Re: ppp, tun0, and 2 IP addresses Date: Sat, 20 Oct 2001 23:25:14 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org ----- Original Message ----- From: "Jason Kocol" To: "Leif Neland" ; 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