I’m doing my client side development in windows and my server side in linux (Which I run virtually). My client side socket is set to connect on the inet addr of my linux server (using localhost never seems to work for me, I guess because I’m running linux virtually).
My main problem is that my inet addr keeps changing (usually increments by 1) and then I have to rebuild my client code and transfer it over to the server which is very annoying.
Is there anyway to manually set my inet addr or to keep it from changing?
Thanks in advance.
Edit /etc/network/interfaces and define something like:
In this case, assuming your network address is 10.0.0.0/24, and the gateway (Windows machine) has the 10.0.0.1 as interface for your Linux machine. Also, this assumes you want to set the network interface
eth0.Then:
The first one is to shutdown the network interface and the second one is to re-activate it with the new settings.