On 2015-12-24, Timo Myyrä <timo.my...@wickedbsd.net> wrote:
> Hi,
>
> I'm trying to use ifstated to switch between my laptops wireless and wired
> interface.
> Currently it works when I don't have cable plugged in but once I plug in the
> cable the ifstated starts to switch between wired and wireless states and 
> won't
> stay in wired state.
>
> So it seems the em0.link.down condition gets triggered in wired state but why?
> The dhclient seems to run so the em0 should have IP and so it should be up.

Kill ifstated and watch 'route -n monitor' when you plug in. Does state
change more than once e.g. does it go up/down/up during negotiation
with the switch? If so, you may need a sleep before re-checking link state.

As it stands, I don't think this ifstated.conf is doing anything that
you can't do just by running a dhclient on each interface all the time,
dhclient already tracks link state itself, multiple priority routes
work fine, and you aren't doing anything to alleviate the problem
I mentioned in the other thread that does exist with that setup.

Reply via email to