0

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 ?

2
  • Your Mac can do DHCP. Your smartphone the same thing. Your VM can use NAT networking , so it all should be reasonably automatic.
    – anon
    Commented Apr 7, 2022 at 18:47
  • But with DHCP, the hostname "hostname.local" does not always work. On Android e.g. And DHCP IP addresses are different in differnet networks. Moreover, NAT IP addresses in a VM are only reachable from the host itself and not from the rest of the same subnet.
    – user513667
    Commented Apr 8, 2022 at 7:13

0

You must log in to answer this question.

Browse other questions tagged .