This is the only solution on a LAN. You can only reach a server on the same address type than your IP. Today, each network interface can block the Broadcast and usually do it, so you have to stay on your little network.
An other idea is to show the server IP on the server screen when the app runs, and each client can know it easily (since a LAN is often on small areas).