tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Dealing with ICMPv6 network unreachable.



On Fri, 2015-04-03 at 11:20 -0400, Mouse wrote:
> >> I just got my ssh connections to a linux host killed only because I
> >> unplugged/replugged the ethernet cable of said linux box.  That's
> >> very annoying.
> > I would argue that's correct behaviour because the addresses will
> > become non functional when you take the cable out.
> 
> Only temporarily.

The cable has been unplugged. There is no guarantee it will be plugged
back in.

> > There is no guarantee the same network will be plugged back in.
> 
> True.  But the time to deal with that is when you discover another
> network was plugged in, not when the original network is unplugged.

So lets say that we are plugged back into a new network, but it shares
the same subnet and your existing IP address conflicts with a server on
the network. If a new host on the new network wants to talk to the
server and hasn't learned the LL address yet and both our host and the
server respond it's basically a coin flip which machine the new host
will actually talk to. Is this desirable behaviour? To me this is like a
mini DoS attack, although unintended.

The reverse is also true, we would need to discard our learned LL
addresses as they may be incorrect as well.

Sadly it's possible that a well configured DHCP server remains silent
when trying to renew the old lease on a different network so we could
still be using the old IP for some time - although it's possible to
configure short timeouts for this scenario.

If you can supply satisfactory answers to the above, then sure I'll
happily add code to dhcpcd to keep the lease on carrier down, but until
then I'd rather behave nicely on all networks.

> > If you want ssh to persist in any way or form, run tmux or screen at
> > the other end.
> 
> I'm glad you don't control the network stack on my machines.  (Nitpick:
> even that doesn't actually make ssh persist.  All it renders persistent
> is the shell, and things run under it, on the remote machine.  It also
> assumes the remote machine _has_ something like tmux or screen, which
> may not be the case.)

True it does not make ssh persist but the shell under it and yes it
relies on something like tmux.
However, I would rather be notified right away that something was awry
with the connection rather than waiting for a long timeout on switching
networks.

Roy 



Home | Main Index | Thread Index | Old Index