[Top][All Lists]

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

Re: [lwip-users] Handling link-up/down, netif-up/down events in LwIP

From: Sylvain Rochet
Subject: Re: [lwip-users] Handling link-up/down, netif-up/down events in LwIP
Date: Sat, 7 Jul 2012 13:50:00 +0200
User-agent: Mutt/1.5.21 (2010-09-15)


On Sat, Jul 07, 2012 at 11:56:45AM +0100, Kieran Mansley wrote:
> They probably wouldn't.  TCP is designed to cope with links coming and 
> going, and will just retransmit if any packets are lost while the link 
> is down for example.  Connections should survive link being removed 
> and restored.

I agree. TCP idle sessions without link between the hosts can live as 
long as no end try to send data. However there is some limitations set 
by equipments doing connections tracking for NAT, stateful firewall, and 
such. Linux connections tracking feature defaults to 5 days idle timeout 
on established session:

net.netfilter.nf_conntrack_tcp_timeout_established = 432000

> I would experiment on Linux or similar to see what happens there, but 
> my guess is that setting the interface down (not quite the same as the 
> link state being down) will result in the route being invalid and 
> you'll get an error such as "host unreachable" or "no route to host".


Interface down = administratively down, so voluntarily down
Link state down = carrier lost, unplug media, fiber cut, ...

Linux remove all routes going to an interface switched to 
administratively down:

# ip route show dev tap1  proto kernel  scope link  src 
# ip route add via
# ip route show dev tap1 via  proto kernel  scope link  src 
# ip link set down dev tap1
# ip route show dev tap1

Other OSes, like most *BSD ones IIRC, keep the routes in the routing 
table, both approach seem valid for me.


Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]