The Laptop-with-Roaming-Services Problem

This is a quick solution to the problem of hosting services on a roaming laptop that need to be semi-reliable and available. When switching connections from wired to wireless (or vice versa), services like ssh need to remain available and active connections should remain connected (albeit with maybe a brief disruption). The solution is to transfer an assigned static IP to some secondary interface (e.g. wlan0) whenever the primary interface (e.g. eth0) becomes disconnected.

The result is nm-connection-delegation, a simple set of scripts that hook into Network Manager events if-up and if-down. To use, simply extract into /etc/network on any Debian or Ubuntu based system:

sudo tar -C /etc/network -zxf nm-connection-delegation-0.1.tar.gz

And configure a few values in /etc/network/connection-delegation. Note that this solution only works when both primary and secondary interfaces are on the same subnet.

This entry was posted in Uncategorized. Bookmark the permalink.