57137075   
   From: grahn+nntp@snipabacken.se   
      
   On Wed, 2009-12-02, David Schwartz wrote:   
   > On Dec 2, 4:06 am, Jorgen Grahn wrote:   
   >> Assume I am on host A and have a long-lived TCP connection to host B   
   >> (like a telnet or ssh session). And then I bring my network interface   
   >> down, and up again (e.g. using Unix ifconfig). Or maybe it goes down   
   >> and there is something automagical which brings up A's wireless link   
   >> instead, with the same address.   
   >>   
   >> The question is this: should I expect my TCP connection to be alive   
   >> after this?   
   >   
   > It depends on the end system model of the machine and the local source   
   > address of the TCP connection. If that "cutover" resulted in even   
   > transient loss of the IP address that is the source address of the   
   > connection, then the connection will be lost. If not, then it will be   
   > maintained.   
   >   
   >> I think I have heard that Linux and the *BSDs make this work, but that   
   >> Windows kills the TCP socket when the interface disappears from under   
   >> it. But that's a vague memory. I can experiment with Linux, but not   
   >> with all other IP stacks out there ...   
   >   
   > Yep, that's it. Because Windows deassigns the IP address when the   
   > interface is lost as Windows model is that the IP address belongs to   
   > the interface. Most UNIXes use the model that the IP address belongs   
   > to the host.   
   >   
   > Here's the difference:   
   >   
   > On most UNIXes, when a network interface is lost, the IP address still   
   > belongs to the machine. On most Windows machines, when a network   
   > interface is lost, so is the IP address that was assigned to it.   
      
   Thanks.   
      
   > If you need a workaround for Windows, many are possible. For example,   
   > you can use two IP addresses, one that moves and one that doesn't. Use   
   > the IP address that does not move as the source address for the TCP   
   > connection. Or you can assign the source IP address to a bridge that   
   > contains at least one interface that's always up.   
      
   I don't actually need a workaround; I just wanted to know the   
   consequences of the decision on the other side of the link:   
      
    Oh, there's a problem with the link to A. Lets bring it down; A can   
    always bring it up later if he needs it.   
      
   versus   
      
    Oh no, the link to A is about to go down! Let's try these   
    expensive/bug-prone manoeuvres to try to avoid that at all cost!   
      
   /Jorgen   
      
   --   
    // Jorgen Grahn O o .   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|