I am once again asking for the quote of the month to be changed as it is now a new month - Mjmd

Create an account  

 
Multiplayer after GameSpy - Lobby and NatNeg

Hello, is it possible to connect two pc behind the same LAN and one or more pc on a different network? For some reason I can't connect two pc on the same lan using zulan's server; I suppose it's got something to do with port forwarding and both pc using the same port 2056, but I'm not sure how to manage this. Any advice? Thank you.
Reply

Hello,

your assumption is correct. To resolve the issue open on one PC the INI-File
[My Documents]\[My Games]\Beyond the Sword\CivilizationIV.ini
and change the 'Port = ...' entry.
Reply

(March 8th, 2023, 17:07)Ramkhamhaeng Wrote: Hello,

your assumption is correct. To resolve the issue open on one PC the INI-File
[My Documents]\[My Games]\Beyond the Sword\CivilizationIV.ini
and change the 'Port = ...' entry.


I tried but it didn't work. I have 3 pc that I can test with, all on the same lan or on 2 different networks (I can connect one or more of them on my mobile phone hotspot) and it doesn't work. When I'm lucky, I can connect all 3 of them via Zulan's server, but most of the time it doesn't work: either one of them can't see the others, or if I get them connected after a few minutes I get a disconnection message.
Reply

I'm sorry to hear that. Did your non-mobile network connecting your pc's by IPv4 with your ISP or by IPv6?
The https://en.wikipedia.org/wiki/IPv6_trans..._(DS-Lite) technique often used by ISP's is problematic for the handling of connections in Civ4.
Reply

It's IPv4. I really can't understand. I tested with a 4th computer too. While on the same LAN everything usually works. If I use Hamachi, it looks like it doesn't work; I've been able to connect 4 pc on zulan if they share the same network, although I get a disconnection after a few minutes max; in this case all players must quit and reconnect, or it's not possible to rejoin the game. If one pc is on a different network (my mobile phone) though, it looks like it doesn't work. BUT, while connected and running some test I've noticed someone briefly connecting to my game (the game was open and without any password). So maybe it's my mobile phone connection? But I still can't understand while I get disconnected after a few minutes no matter what I do. Also, when my pc is hosting on my network and another one is connected with a mobile network, I can see the game in the lobby, but it doesn't find the host when connecting
Reply

If it works for a few minutes and then stops working, you might be throttled by some form of traffic shaping that closes "unused" connections. It could be a local firewall, your router software, or ISP.
Playing: PB74
Played: PB58 - PB59 - PB62 - PB66 - PB67
Dedlurked: PB56 (Amicalola) - PB72 (Greenline)
Maps: PB60 - PB61 - PB63 - PB68 - PB70 - PB73 - PB76

There are two kinds of people in the world: Those who can extrapolate from incomplete data
Reply

I thought about it, but I don't have any kind of problem with other games/services so I highly doubt it's the ISP/firewall/router throttling back the traffic, especially since the traffic for civ4 should really be irrelevant and my speed connection is always above 150Mbs. Besides, I get disconnected even if I simply connect with a single pc and just let the game wait there for a few minutes without doing anything. I get disconnected from the lobby too, not just inside the game. I thought it might be something on server side, but clearly not if I'm the only one having this issue.
Reply

(March 9th, 2023, 08:03)45°38'N-13°47'E Wrote: Also, when my pc is hosting on my network and another one is connected with a mobile network, I can see the game in the lobby, but it doesn't find the host when connecting

The problem with mobile networks is it's translation between internal (ISP) IPv4 addresses and public addresses.
The ISP can not provide every user an IPv4 address and (moreover) handle the traffic to the client by IPv6.

Lets simplify the sketch and let the IPv6 stuff out.
An example chain between client and Lobby-Server/Civ4-Server should be like this:
Code:
1. Player PC with local lan IPv4 ADRESS1 send network message on PORT1 to (mobile) router
2. Router replaces ADDRESS1 with IPv4 address given by ISP (ADDRESS2) and sends package into ISP network
3. ADDRESS2 is just accessible in the ISP network. The service provider translating this into a network package with a
  public IPv4 address and a new port. They storing this relation
   (ADDRESS2:PORT1 <=> ADDRESS3:PORT3)*
4. The server now seeing only the information pair ADDRESS3:PORT3 and using this to send some data back.

Now, the big problem: The relation between ADDRESS2 and ADDRESS3 is restricted on the given pair of ports. If you setup
your game in the lobby and then starting the game. The players will be sharing the data on other ports.
E.g. Player 2 knows the host should be available on ADDRESS3:2056, but data on this port will not be send to the host.


P.S. If someone has more knowledge about this network stuff, please correct me.

=======================================================================f
*) Maybe it is even more worse. They storing this relation only for the currently targeted server. If an other server try
to reply to ADDRESS3:PORT3 the data will thrown away.
Reply

Maybe it is possible to made Civ4 network traffic IPv6 ready?!
For this we need to translates the IPv4 packages of the game locally into IPv6-Packages ( https://en.wikipedia.org/wiki/NAT64 ).

If this is done locally we can use this translation on a whole list of ports, allowing all players to establish a connection to the host.
This needs to be done on the server side, too. For Pitboss-Servers it is probably easier because there is no interaction with the Civ4-Lobby needed.
Reply

Well, I'm using my mobile connection only for testing purposes; if everything works fine with a normal wired connection, I don't need the mobile connection. But the problem as I said in another post is that it keeps disconnecting me from the server even when I simply connect my wired pc to the lobby (and no other pc connected).
Reply



Forum Jump: