Due to various reasons, I have 3 WiFi broadband routers at my home (or say my personal hobby hacking lab). On WAN side one is FTTH, another is ADSL and third is 4G-LTE. On WLAN side they are assigned 192.1.x.x, 192.2.x.x, 192.3.x.x subnets, and all of them are configured to assign DHCP IP-address to requesting devices in the 192.x.1.0 - 192.x.200.0 range, and above 192.x.200.0 range are reserved for static-IP address.
House-hold (like many, these days) has half a dozen Android phones / tablets, and few PCs. All of the devices use DHCP for IP-address assignment. However, as one might imagine a device may be connected to any one of the 3 WiFi routers, and as a result may have any IP-address (in 192.x.1 ~ 192.x.200 range, where x = 1, 2, 3).
I am trying to develop an Android application, that needs to use TCP/IP to talk to a specific server. The server is a Linux application, running inside a virtual-machine (Ubuntu 32-bit guest, running on VMWare Workstation Pro 14 hypervisor), on a Windows 10 laptop. The laptop is also assigned IP-address dynamically (DHCP). The Linux virtual-machine uses NAT-mode virtual NIC.
Here is a diagram to explain the setup:
The issue is that due to use of dynamic IP, and usage of explicit IP-address (private class, thus not manageable via DNS), I am having to reconfigure the server IP-address in Android client application frequently. A simple solution would be to switch to using static-IP for the servers -- however, I am wondering if there is any alternative approach, that is simple & elegant ?