Help How to Connect via LAN

Nostalgic

Loyal Member
Loyal Member
May 19, 2020
277
39
40
Hi Everyone,

I have a Mir 2 Server running on a the main computer without issues. I'm now attempting for a secondary PC to connect.

Notes
Firewall is disabled.
Client files are the same apart from server .ini file, where the IPAddress is changed.

Main PC Server .ini File:
Code:
[Network]
UseConfig=True
IPAddress=127.0.0.1
Port=7000

[Launcher]
Enabled=False

Secondary PC Server .ini File:
Code:
[Network]
UseConfig=True
IPAddress=192.168.1.140
Port=7000

[Launcher]
Enabled=False

CMD > IPConfig
Code:
IPv4 Address. . . . . . . . . . . : 192.168.1.140

Error
Secondary PC is receiving "Attempting to connect to the server." error.

Appreciate the help!
- Nos
 

meacher

LOMCN Veteran
Veteran
Mar 16, 2004
273
134
140
Main PC server.ini IPAddress needs to be set to 0.0.0.0
Secondary PC Mir2Test.ini IPAddress needs to be set to IP of Main PC
 
Upvote 0

Nostalgic

Loyal Member
Loyal Member
May 19, 2020
277
39
40
Main PC server.ini IPAddress needs to be set to 0.0.0.0
Secondary PC Mir2Test.ini IPAddress needs to be set to IP of Main PC

Both PCs are on the same WiFi. Port forwarding hasn't been setup, I'm looking to do this locally.
 
Upvote 0

meacher

LOMCN Veteran
Veteran
Mar 16, 2004
273
134
140
Server should be set to 0.0.0.0
Connecting PC's Mir2Test.ini should have 192.168.1.140 im guessing
 
Upvote 0

Nostalgic

Loyal Member
Loyal Member
May 19, 2020
277
39
40
Server should be set to 0.0.0.0
Connecting PC's Mir2Test.ini should have 192.168.1.140 im guessing

Main PC > 0.0.0.0 = Doesn't connect. It works with local host 127.0.0.1.
Secondary PC > 192.168.1.140 = Doesn't connect.
 
Upvote 0

meacher

LOMCN Veteran
Veteran
Mar 16, 2004
273
134
140
so if you are on the Main PC
with server set to 0.0.0.0
and client set to 127.0.0.1
The main PC should connect to server.

If you want to connect on another PC elsewhere on the same network, set Mir2Test.ini to the IP of the Main PC 192.168.1.x (x = number for the Main PC with server)
 
Upvote 0

Martyn

Smir.co.uk
Staff member
Administrator
Mar 24, 2003
3,851
2
863
400
Kent - UK
you tried setting up port forward on the router? I would do it just to check, it’s not external access but you never know 😂
 
Upvote 0

meacher

LOMCN Veteran
Veteran
Mar 16, 2004
273
134
140
you tried setting up port forward on the router? I would do it just to check, it’s not external access but you never know 😂
server.ini shows 127.0.0.1 so more likely just running on localhost with no LAN/External access.

Server Config>Server>Network should be
1716471051142.png

0.0.0.0 means any available IP (including the LAN network address)

Run IPConfig on the PC Hosting the Server
use the 192.168.1.something address on all other PC's as the IPAddress.

..failing that, turn OFF firewall on both machines and reboot them for fun
 
Last edited:
  • Like
Reactions: Nostalgic
Upvote 0

Nostalgic

Loyal Member
Loyal Member
May 19, 2020
277
39
40
1716472242767.png

Server Control Panel > Config > Server > [Server Config Form] > Network > Swapping 127.0.0.1 to 0.0.0.0 worked. Now, client can connect via .ini file as [Network] IPAddress=127.0.0.1 and Secondary PC as IPAddress=192.168.1.140.

Problem I am having now is that the Secondary PC disconnects frequently after logging in.

Server Log

Player Event • Player: {Player_Name} × Connection Status: Disconnected × Reason: Connection Timed Out
 
Upvote 0

meacher

LOMCN Veteran
Veteran
Mar 16, 2004
273
134
140
run the client twice on the server,
1 connected to 127.0.0.1
2 connected to 192.168.1.140

Run the Client on another PC at the same time connected to 192.168.1.140.

If server client pointing at 127.0.0.1 stays connected - Server Application is fine.

If server client pointing at 192.168.1.140 disconnects and 127.0.0.1 stays connected - Bad Wifi Connection on Server

If the Other PC disconnects and both server Clients stay connected - Bad Wifi Connection on the Other PC

If the Other PC and the Server Client pointing at 192.168.1.140 both disconnect - bad Wifi all round

If everything shits the bed, at the same time, Server PC probably isnt powerful enough to run the server or something, i got nothing lol never a bad idea wire everything into the router or access point where possible though.
 
Upvote 0

Nostalgic

Loyal Member
Loyal Member
May 19, 2020
277
39
40
run the client twice on the server,
1 connected to 127.0.0.1
2 connected to 192.168.1.140

Run the Client on another PC at the same time connected to 192.168.1.140.

If server client pointing at 127.0.0.1 stays connected - Server Application is fine.

If server client pointing at 192.168.1.140 disconnects and 127.0.0.1 stays connected - Bad Wifi Connection on Server

If the Other PC disconnects and both server Clients stay connected - Bad Wifi Connection on the Other PC

If the Other PC and the Server Client pointing at 192.168.1.140 both disconnect - bad Wifi all round

If everything shits the bed, at the same time, Server PC probably isnt powerful enough to run the server or something, i got nothing lol never a bad idea wire everything into the router or access point where possible though.

Currently, it's only the Secondary PC that disconnects shortly after logging in with 'timed out'error.

Bizarre, I've went afk (not even turned off PCs) and came back, now the secondary PC can't connect with the above settings applied.....
 
Last edited:
Upvote 0

meacher

LOMCN Veteran
Veteran
Mar 16, 2004
273
134
140
if it stays that way then maybe wire it in / get a better wifi adapter / move the PC closer to router or access point and hope for the best, good luck!
 
Upvote 0

Hurricane

LOM2
Loyal Member
Hurricane
Game Master
Oct 25, 2018
277
1
119
55
i've done that before and was working fine with out any issues, all i've done is opened cmd, checked what's the ip on there, for example "192.168.0.9" Just copied it and write it on the server ip address and client ip address on both pc, same as port, both was 7100 and increased the time out to 60k server and client side.
 
Upvote 0