Issue in ifplugd?

Sameer Naik sameer.subscriptions at damagehead.com
Mon Jan 10 06:45:09 UTC 2011


Hello Denys,

> What is your network card?
I am using an DM6446 based platform with the RTL8201 ethernet controller.

> Which detection mode is in use for your interface?
ifplugd(eth0): using IFF_RUNNING detection mode

> If it is in IFF_RUNNING detection mode, "downed" interface
> is always seen as unplugged.
Based on what you said, instead of bringing down the interface i added
the line, 'post-down ifconfig $IFACE 0.0.0.0',
to the eth0 configuration in /etc/network/interfaces, so that the eth0
interface is configured to 0.0.0.0 when the link is down. Thereby
keeping the interface up while the link is down.

Now ifplugd is able to report the link status as it changes. I am not
aware of any issues that may arise from the above configuration.
Please let me know if there are any downsides to this.

Thanks and Regards
~Sameer

On Mon, Jan 10, 2011 at 12:55 AM, Denys Vlasenko
<vda.linux at googlemail.com> wrote:
> On Saturday 08 January 2011 10:24, Sameer Naik wrote:
>> Hi,
>>
>> I just configured the busybox-1.15.2 applet ifplugd to monitor the
>> "eth0" interface and call "ifup eth0" when the interface link comes up
>> and call "ifdown eth0" when the interface link goes down. My
>> /etc/ifplugd/ifplugd.action script looks like this.
>>
>> -- /etc/ifplugd/ifplugd.action
>> #/bin/sh
>>
>> echo "link of interface ${1} is ${2}" > /tmp/ifplugd.log
>>
>> if [ "${2}" == "up" ]; then
>>     ifup ${1}
>> else
>>     ifdown ${1}
>> fi
>>
>> -- EOF
>>
>> What i am seeing is that when the link comes up the ifup command is
>> called and when the link goes down the ifdown command is called. But
>> once the ifdown command gets called, ifplugd will no longer be able to
>> detect if the link has come up.
>>
>> To confirm this i removed the else block from the action script and i
>> ifplugd will report the link status whenever is comes up or goes down.
>> If i call ifdown eth0 manually, then again ifplugd will stop reporting
>> the link status.
>
> What is your network card?
> Which detection mode is in use for your interface?
> Look for this message in the log:
>
> ifplugd(eth0): using FOO detection mode
>
> If it is in IFF_RUNNING detection mode, "downed" interface
> is always seen as unplugged.
>
> --
> vda
>


More information about the busybox mailing list