News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Simutrans-Server relisting by IP change

Started by Andarix, September 18, 2019, 02:52:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andarix

If the port IP address of a home-based Simutrans server changes, it will not be transferred to the list server.

The IP is only determined when starting the Simutrans server. Thereafter, this is always transmitted the same even if the connection IP changes.

This means that when the IP of the Simutrans server is changed daily, it will be displayed online for a maximum of 24 hours.

Ters

A server that changes IP when it is running is asking for trouble. Especially when clients and servers stay connected for a long time. The connection will be broken. (Even clients will have trouble if they change IP in that case.)

Andarix

The local running Simutrans server has no problems. He has a local private IP that does not change. But the external IP of the connection changes. And this external IP is never checked after the start, whether this has changed.

Thus, the running Simutrans server reports the old meanwhile invalid external IP to the list server.

The Simutrans server should additionally check the external IP every 3 or 6 hours. If that changes, then this is to be communicated to the Listserver.

Even when reloading the game as a server game (via GUI - loading dialog), the IP is not redetermined. It is a complete restart of Simutrans needed.

Ters

Quote from: Andarix on September 19, 2019, 09:21:39 AMHe has a local private IP that does not change. But the external IP of the connection changes.
It is the external IP address people will use to connect and communicate, so that is what matters.

Quote from: Andarix on September 19, 2019, 09:21:39 AM
The Simutrans server should additionally check the external IP every 3 or 6 hours. If that changes, then this is to be communicated to the Listserver.
I'm not sure how reasonable it is to support a Simutrans server that can't keep connections. A Simutrans server should keep its address for as long at it is running. If it is not stable enough, then it should be started up only for shorter periods during which the IP is stable. Getting kicked out randomly because the IP address changes is not good player experience.

What could make sense is for the listing server to check that servers are alive every few minutes, and de-list those that no longer respond.

prissi

#4
Any private server in Germany (and britain and some other countries) only gets a dynamic IP that changes every 24h hours. They want you to order a fixed one at extra charge. For hosting, this is not really needed though.

Actually, simutrans does this already. Start it with -easyserver on the command line to enable it.

And in r8823 it will also delist the old entry and start a new one.

Ters

Quote from: prissi on September 22, 2019, 01:35:59 PMAny private server in Germany (and britain and some other countries) only gets a dynamic IP that changes every 24h hours. They want you to order a fixed one at extra charge.
Over here, I think they'd lose money if they tried that. DHCP servers seem to default to reusing the IP address you got last time, so they would have to do something extra for those that don't pay. Once in a while, the DHCP server is replaced or something prevents you from renewing the lease before your IP has been repurposed, which means you get a new IP address. It happens so rarely that I think only ISPs targetting businesses offer a guaranteed stable IP address.

With an IP address change every 24 hours, I imagine one would have to keep track of when your IP address is expected to time out, so that you aren't playing multiplayer games when it happens. Or even just downloading or streaming something, unless the client is smart enough to resume properly, which is quite difficult if it is a live stream. Almost like back when I had to remember not to use the Internet at those times of the day when it cost more. (Of course, back then, one would not be using the Internet for more than around 30 minutes per day anyway.)

Andarix

r8826 the annonce is broken for easyserver

I think that's already been the case since r8638/r8639

prissi

Simutrans has trouble connecting to the listserver on IPv6 enabled networks, since the hoster changed the IPv6 without telling me. Since Simutrans does not try IP4 if IPv6 timeouts, no communication at all and thus no announce.

If this is not the case, the I cannot test it the moment, until Isaac (or whoever is in power) changes the AAAA record of the server.

Andarix

120.4.1 r8600

- start Simutrans and load game as servergame -> listing on listserver

r8826

- start Simutrans and load game as servergame -> not listening on listserver

prissi

That you, the query for the IP4 did not work if there was a sucessful query for the IPv6 address. Should be fixed in r8830

Andarix


Andarix

relisting by ip change works in r8834

thanks

Andarix

r8866

relisting ( listserver ) and reconnect ( Simutrans server ) works