Using different environments for my laptop (home: 192.168.0.x or work: 192.168.1.x) requires different IP addresses. My laptop (Macbook Pro) has a Linux VM (running under UTM / QEMU) and wants to access my Android cellphone. All three have different IP addresses on different locations. The .local domain would be a solution, but .local domains do not work for an Android device and not for Centos 7 (which is the VM running on my Mac). So the result is changing the /etc/hosts file every time I switch location.
Is there a better way to check whether an IP is reachable or to check out which IP the device has ?
Edit: Or is it possible to 'alias' the actual 192.168.1.x IP of the VM to another 192.168.0.x IP ?