{HELP} How to play my server on lan? with my friends?
I have been trying and i would like some help
Printable View
{HELP} How to play my server on lan? with my friends?
I have been trying and i would like some help
This is well documented in many places, both here and more generally on the internet. However, as a summery:-
Playing on a LAN is no different from playing on the internet.
Did you know every machine on the internet has two IPs, and any that connects via a LAN will have three?
There is one IP address reserved for "loopback" or localhost access. 127.0.0.1 always refers to the machine from which any request originates. So any packet sent to 127.0.0.1 (or the domain "localhost") will be received by the same machine which sent it.
Within a LAN there should be a gateway PC / router which bridges all LAN systems to a single IP on the internet. Each machine on the LAN will have it's own IP, but from the other side of the gateway, all machines will appear to have the same IP, the IP of the gateway / router.
Traditionally every PC should have it's IP set when the OS (or, more specifically, the TCP/IP stack) is installed. (many OS did not come with a pre-installed TCP/IP stack, and it had to be loaded on afterwards... including early versions of Windows)
With the standardisation of DHCP, each machine on the LAN can request a free IP address from the gateway system (which should be running a DHCP server) and this is now the default for most systems. It's very easy, but because you didn't set the IP for your machine you may not automatically know what it is.
You can find your LAN IP address on Windows from the command line by typing:-There used to be a GUI version for Win9x, (winipcfg.exe) but Microsoft dropped it, because nobody really bothered with it.Code:ipconfig
You should also be able to look it up from your LANs DHCP server in your Gateway / Router. However, the server software it runs will likely have a custom interface designed by it's manufacturer, and you would have to consult their manual for more information on how to do that. (unless you use a Windows Server, Linux or BSD Gateway PC system, as opposed to a consumer Modem / Router box, if that where the case some of us may be able to help you, but that's a pretty extreme geeky thing to do :wink:)
The server and it's SQL connection must be configured to connect using this LAN IP address, and all clients on all client PCs must be configured to connect to the IP address of the server on the LAN.
You must not use the internet IP of the Gateway, as this refers to all machines on the LAN. Likewise, you must not use localhost (127.0.0.1) as this will mean each client tries to connect to it's self.
If the server is configured on 127.0.0.1 then the server will tell the clients to connect to that IP and they will fail!