# Ethernet + Wifi + ifplugd

## Coin Coin

Hi

I have ethernet and wifi connection, and I want to use ifplugd to manage them... But I don't understand this step:

(From gentoo.org guide)

(Replace eth0 with the interface to be monitored)

ifplugd_eth0="..."

(To monitor a wireless interface)

ifplugd_eth0="--api-mode=wlan"

What should I do with theses exactly?

----------

## dmpogo

 *Coin Coin wrote:*   

> Hi
> 
> I have ethernet and wifi connection, and I want to use ifplugd to manage them... But I don't understand this step:
> 
> (From gentoo.org guide)
> ...

 

put them into /etc/conf.d/net

I may note that I did not find what is the point of using ifplugd on wireless interface.

----------

## Coin Coin

I put them without modifying anything?

I'm using it because I'm using a laptop and it's easier to switch when you move from home/wifi spot (apparently)

----------

## dmpogo

 *Coin Coin wrote:*   

> I put them without modifying anything?
> 
> 

 

Yes, but actually I don't think you need any line for wired internet. It will be just used when installed.

For wireless you need the line to pass the option

ifplugd_eth0="--api-mode=wlan" 

but in place of eth0 there should be your wireless interface (it may be wlan0 or eth1,   probably not eth0)

 *Quote:*   

> 
> 
> I'm using it because I'm using a laptop and it's easier to switch when you move from home/wifi spot (apparently)

 

That is exactly what I was not able to created a scenario for so that ifplugd would be useful. When I move my laptop, I either switch it off or hibernate. In both cases my wireless is taken down. When it is brought up back (*),  my wireless is associated with wpa_supplicant in normal way.  There is no need to ifplugd 

(*) personally I never bring wireless back automatically at boot or after hibernate, since I don't know when am I and whether I need wireless at all in new environment. But if it is done automatically, either boot or hibernate script brings it up

ifplugd is useful to monitor intermittent physcal connections. So it make sense with wired, since wired is usually brought up at boot, but may or may not be physically linked or may be plugged off and besides ifplugd there is nobody to react on that.  

With wireless there is so many variables and I don't see when it is useful to additionally monitor wether there is a  physcal link or not. 

What is you scenario ?

----------

## Coin Coin

When I boot my laptop without ethernet plugged in, it take more time than when I'm using ethernet because it doesn't not find my ethernet connection

I want my laptop activate ethernet if the cable is plugged in, and to not activate it when there is no ethernet connection and I could use wifi.

It would be nice if it can also activate/desactivate the card for energy performance when ethernet is plugged off/in

----------

## dmpogo

 *Coin Coin wrote:*   

> When I boot my laptop without ethernet plugged in, it take more time than when I'm using ethernet because it doesn't not find my ethernet connection
> 
> I want my laptop activate ethernet if the cable is plugged in, and to not activate it when there is no ethernet connection and I could use wifi.
> 
> It would be nice if it can also activate/desactivate the card for energy performance when ethernet is plugged off/in

 

With ethernet  interface I see it,   the question was about wireless.   ifplugd is run per interface, why do you want to run it for the wireless interface ?

Speaking about the ethernet,  I don't think you can desactivate the card, since then who will be doing sensing that the cable is plugged in ?

----------

