Re: [PATCH] dynamic IP support for 2.4.0 (SIOCKILLADDR)

Andi Kleen (ak@muc.de)
Mon, 29 Jan 2001 13:59:05 +0100


On Mon, Jan 29, 2001 at 03:46:42AM +0100, Albert D. Cahalan wrote:
> John Fremlin writes:
>
> > When the IP address of an interface changes, TCP connections with the
> > old source address are useless. Applications are not notified of this
> > and time out ordinarily, just as if nothing had happened. This is
> > behaviour isn't very helpful when you have a dynamic IP and know
> > you're probably not going to get the old one back. In that case, you
> ...
> > I patched userspace ppp-2.4.0 to use this functionality. It would be
> > better if SIOCKILLADDR were not used until we are sure that the new IP
> > is in fact different from the old one, but pppd in demand mode would
>
> I get the same IP about 2/3 of the time, so it is pretty important
> to avoid killing connections until after the new IP is known.

I prefer it when the IP is killed as soon as possible so that I can see
when the connection is lost (ssh sessions get killed etc.)

Another reason for killing as soon as possible is the last-ack problem.
When the other end goes away suddenly TCP often gets into last-ack state.
This means it'll retransmit a FIN until it times out or the other end
answers. Each such retransmitted FIN triggers a new dialin, which can
get quite costly when you don't have flat rate (like still most of Europe).
With your approach (waiting until the new IP is known) it would cost
at least another dialin in this case.

When you have flatrate your way may be better of course, so a final
user space solution could switch it via a pppd flag.

[I agree that the user space way is better than my kernel hacks]

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/