# iproute2 vs. ifplugd

## samo

Hello,

what is the best way to switch between wlan0 and eth0 interface?

Normally I'm connected via WLAN to the internet router at home. But sometimes LAN is connected and I use it instead of WLAN. I'm using ifplugd to switch between wlan0 and eth0. But I'm not sure, if iproute2 would be a better solution.

Regards

----------

## rahulthewall

Why not use a network manager like WICD ?

----------

## samo

Does wicd replace wpa_supplicant, /etc/init.d/net.* and the settings in /etc/conf.d/net?

----------

## depontius

 *samo wrote:*   

> Hello,
> 
> what is the best way to switch between wlan0 and eth0 interface?
> 
> Normally I'm connected via WLAN to the internet router at home. But sometimes LAN is connected and I use it instead of WLAN. I'm using ifplugd to switch between wlan0 and eth0. But I'm not sure, if iproute2 would be a better solution.
> ...

 

"ifplugd" and "iproute2" are not comparable packages.  "iproute2" is basic plumbing, more of an alternative to "ifconfig".  "ifplugd" is a higher layer that can handle network changes from the lower layers.  You're probably thinking more of a contrast between ifplugd and custom scripts that run iproute commands directly.

----------

## samo

Thanks for the clarification. Seems like I mixed some layers. 

iproute2 supports load balancing. This seems to be another solution to use different interfaces at the same time. ifplugd configures automatically ethernet devices, depends on a cable is plugged in or pulled. If I understand you right, iproute2 is a lower layer and ifplugd is a higher layer. wicd seems to be also a higher layer solution to handle different devices. It replaces wpa_supplicant. 

1.Is it better to manage different interfaces on lower or higher layer considering system load and maybe resource consumption.

2. Does wicd also replace lower layers like ifconfig or iproute2? Are the /etc/init.d/net.* scripts and the settings in /etc/conf.d/net still necessary with wicd?

----------

## depontius

"wicd" doesn't replace "wpa_supplicant", again an issue of layers.  "wpa_supplicant" is a security tool - it's the thing that manages WPA, WPA2, WEP, and all of those other TLAs and FLAs.  "wicd" is more akin to "network-manager" or "knet" or - those are user interface tools present at the desktop that sit just below the application level.  "wpa_supplicant" is more like an extra layer, rather like a vpn in some ways, that sits just above "iproute2" or "ifconfig" and below something like "wicd".  Logically, "ifplugd" sits in the same kind of place as "wicd" or the others, except it doesn't have a user interface - it's for scripting bigots - like me.  My laptop auto-adjusts to the network it finds itself on, using a script I wrote that is called, in this case by dhcpcd - I just use ifplugd to make things more graceful when the ethernet isn't plugged in.  Normally dhcpcd has a wicked timeout, and ifplugd gets around that.

----------

## samo

Thanks for the infos

----------

