Attach your laptop to multiple networks with hotplug, resolvconf dnsmasq and wicd

Sometimes you need to attach to multiple networks at the same time, maybe a closed-corporate-no-internet wired network and your smartphone wireless tethering hotspot.

Pre requisites

Install :

  1. wicd-curses to manage the wireless card
  2. ifplugd to detect network connectivity change (might not be necessary)
  3. resolvconf to manage the resolv.conf file by aggregating results from each attached networks
  4. eventually dnsmasq to cache DNS queries or add your own config

sudo apt-get install wicd-curses ifplugd resolvconf dnsmasq