[kwlug-disc] Detecting and using wired network when available

Lori Paniak ldpaniak at fourpisolutions.com
Wed Jul 7 17:18:13 EDT 2010


On Wed, 2010-07-07 at 17:08 -0400, Kareem Shehata wrote:
> On 2010-07-07, at 15:18 , Andrew Kohlsmith (mailing lists account) wrote:
> 
> > On Wednesday, July 07, 2010 03:15:31 pm Kareem Shehata wrote:
> >> That would truly be painful, but doable.  From what I'm hearing, I could
> >> code my own little app to poll the ioctl for link messages.  I can't help
> >> but think there's an easier way.
> > 
> > Why on earth would you poll for ioctl? udev rules can run scripts and they're 
> > really pretty straightforward.
> 
> 
> Will udev scripts be fired if the link state changes, but the actual device is still present?
> 
> I've just tried adding a udev rule for eth0, but couldn't get it to fire from just pulling the cable.
> 
> -kms
> 

Maybe what you want is more of a dual-wan failover?  I've used lsm
(http://lsm.foobar.fi/) to monitor network links - there are other
options as well.  When the link does not pass (ping) traffic to some
external gateway, the monitor runs a canned script.  You can use that to
rewrite iptables to change gateway and restart networking with the new
routing. 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20100707/3ecaaf88/attachment.sig>


More information about the kwlug-disc mailing list