While not directly, what are you asking for, maybe columbus might be part of the solution? It uses ARP traffic to help deal with a machine that, for example, travels at school / home / work, etc. And it must have the appropriate settings for /etc/resolv.conf or firewall, etc.
From the README file:
columbus: automatic network detector and configurator
columbus is useful when you use your machines on different networks. This is great for laptop users.
columbus uses ARP pins to look up known MAC IP addresses. He can do this even when the missing IP address has been assigned yet, which is a good idea when you are on a new network.
columbus can connect to your network script. It can also be connected before your order, and you will be told to re-check the network every time the computer wakes up.
columbus also has a modified version of one of the link checks of Donald Becker tools. Thus, it will check your networks when your network cable is connected again and, if necessary, complete all synchronization steps.
source share