Re: Ethernet driver link state propagation to ip stack

From: Paul Jakma
Date: Sat Jan 15 2005 - 07:13:48 EST


On Fri, 14 Jan 2005, [iso-8859-4] Jüri Põldre wrote:

My question is: Does the kernel handle the interface state/routing tables modifications due to link changing automatically

Not completely.

The biggest problem is that kernel does not remove its "connected" or "subnet" route while link is down. This means that even though kernel knows link is down, it will still try route packets out that interface.

or is there some external daemon required to do that. Any links are greatly appreciated.

There is "Netplug" - part of the net-tools package (On fedora core 3 at least). You can use it to 'ip link set dev .... down' when carrier is removed. However, you wont get notified of carrier being inserted back - I dont know whether that holds true generally, or whether its an e1000 bug. So it's one-shot.

We're looking at adding support to the 'zebra' daemon in Quagga to remove connected routes while link is down and add them back when link-up again, and hence deal with this properly. Amir is very interested in this..

/me grumbles about why oh why the "make kernel add connected routes"
feature was *ever* added in 2.3 in the first place (cause now
userspace has "forgotten" how to manage them, so we cant simply undo
this brain-damage[1] without breaking networking for everyone, sigh)

1. In retrospect at least. Brain-damage really only becomes obvious with carrier-sensing drivers, which were very rare back in 2.2 days, dont think there was a unified way to report these events to userspace either.

Sincerely,
Jyri Põldre.

regards,
--
Paul Jakma paul@xxxxxxxx paul@xxxxxxxxx Key ID: 64A2FF6A
Fortune:
Sailors in ships, sail on! Even while we died, others rode out the storm.