How to configure ifplugd?
jw at raven.inka.de
Fri Aug 5 12:25:02 UTC 2011
[sorry for the delayed reply. I was on vacation without internet access ]
On Sat, Jul 30, 2011 at 11:10:02AM +0100, Brian wrote:
> On Sat 30 Jul 2011 at 00:04:13 +0200, Josef Wolf wrote:
> > This is what I have so far:
> > root at meinekiste:/# cat /etc/network/interfaces
> > auto lo
> > iface lo inet loopback
> > # ifplugd manpage says interfaces should not be brought up automatically
> > iface eth0 inet dhcp
> > auto wlan0
> allow-hotplug wlan0
This doesn't make any difference.
> > iface wlan0 inet dhcp
> iface wlan0 inet manual
With this, even "ifup wlan0" fails to bring up wlan. What's the problem with
using DHCP here? With DHCP, at least "ifup wlan0" is able to bring up
> > wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
> Excellent help here:
When I follow those steps, neither eth0 nor wlan0 is brought up by
ifplugd. IMHO, eth0 should be a static interface and wlan0 should not be
listed at all to avoid it to be managed by a separate ifplugd process.
With my original configuration, at least eth0 came up/down when I
plug/pull the cable.
> Note the link at the end of the page.
Note that wlan already works fine here if I bring it up manually with ifup.
I think I come closer now. There appear to be two problems here:
1. /etc/ifplugd/action.d/action_wpa calls "wpa_action $IFACE check" which in
turn checks whether $WPA_CLI_PIDFILE exists. Since wpa_cli is not run in
daemon mode, the pidfile does not exist and action_wpa silently skips the
management of the wireless interface.
2. If I comment the check described above, wpa_action calls wpa_cli to
disconnect/reconnect wlan0. But this disconnect/reconnect is only on
wpa_supplicant level. When the cable is plugged, the wireless interface
is disconnected on wpa_supplicant level, but ifconfig shows that it is
still UP and "route -n" shows that the routes are also still present.
Therefore, packets are routed to the wireless interface (which is disabled
on wpa_supplicant level) instead of eth0, resulting in dysfunctional
I think it would be better if /etc/ifplug/action.d/action_wpa would use
ifup/ifdown instead of wpa_cli to activate/deactivate wlan0.
More information about the ubuntu-users