I run into a big problem on my project yesterday. I have a local server which I connect to through websockets. Everything works fine.
The next step of the project was to use it when the network wasn't connected to internet. I thought it would go smoothly. Wrong! The websockets wouldn't connect.
After many hours, I found out that the local server would basically send a frame to try to resolve the local IP of the connecting client, and would lock the connection until it gets a reply, which my router couldn't answer as internet was unplugged.
The bad workaround I found was to add my client IP in the /etc/hosts/ But I cannot add all local addresses to the 'hosts' file.
Any idea how to prevent ubuntu to resolve local IPs? it configured as DHCP:
$>more /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto em1
iface em1 inet dhcp
Thanks a lot in advance