Jump to content

Server connection issue


Recommended Posts

This is first time posting something in these forums. I don't exactly know where I should have asked this, so sorry in advance. 

I have been trying to host a game for me and two of my friends (we live close together in same country maybe a kilometer form each other), but they always have bad connection, more specifically the other one has worse connection compared to other. Regardless it's enough to stop playing. I tried creating dedicated server for if it could help anything but as far as I know it's basically the same thing as hosting one "in game". I have some understanding of how to port forward through router for better connection but I heard it's not necessary. My computer is quite decent (Intel I5 - 7400 3.00 GHZ, Nvidia GTX 1070, 8 GB memory, game is on hard drive) so I don't think it's the cause. Ping to my router is 20 milliseconds with a download speed of 150 Mbps and upload of 32.8 Mbps so I don't think its cause of internet speed either. About that port forwarding; I have an idea of how it goes at least on router side but I don't really know what to enable on firewall side. More specifically which ports to touch.

I think the internet as a water flow. If you have all vents open (ports) it will flow freely but if any is partially or fully closed it wont work properly. Except computers work more like on off, I think. How can it work if no port is opened? how does anything work if now ports are opened? Which leads to a question; why then do we need to port forward at all as for example gmail works without it? I guess that went a little off topic. For me this seems like something is blocking the connection as we all can join but connection is quite bad. Regardless, any help would be appreciated.

Link to comment
https://forums.kleientertainment.com/forums/topic/150412-server-connection-issue/
Share on other sites

The analogy with the water flow doesn't quite work with ports and firewalls, as it's all quite binary. Either it goes through or it doesn't. If the port is blocked, connections can't get in from the outside (inbound). Inbound means that the packages go to your PC from the outside. If you use your gmail account, you are accessing a server, and therefore building up a outbound connection, which most firewalls allow by default. The gmail answer packages that are technically inbound, are allowed through the firewall, as either the client opened up a persistent tunnle, or the firewall remembers that that client asked for a return package, and the incoming package has a token, that allows it to go through the firewall.

What DST (according to my understanding) does is, that if it doesn't have the port forwarded, it uses some Steam Networking tunnle as Fallback, essentially building up a connection to steam (outbound) over which players can connect.

The problem with this is that all those extra steps the internet packages have to take add latency, and the server listing shows ??? as ping, since no direct connection is possible.

 

That said, even if you portforward correctly, have amazing internet, low geographical distance, etc, you can still struggle with a bad connection. This can have many reasons, most notably that internet packages often have to take detours to reach different spots.

As an example I assume 2 Players (Host and Client) have to different internet providers (A and B). Their houses are 50m apart. If the Client wants to connecto to the server, the package has to travel through the following stops:
Local PC network card -> Personal Router (Client) -> local distribution point -> central provider A node -> Provider A Exit node -> internet backbone node (Not sure what they are exactly called) -> Provider B entry node -> central provider B node -> local distribution point -> Personaly Router (Server) -> Server Network card. That's quite a few steps, and quite some distance the package has to travel, just to cover a distance over 50 meters.
As you can see there's quite a few places the packages have to go through, and there might be a lot more steps an individual packet goes through due to bandwidth routing balancing.

So it's possible there is, in worst case scenario, no solution at all? One option would be to look for if it uses those "steam ports" in which case I would have messed up setting the ports. Would I need to set the ports in my router too in that case? After all outbound works without doing so. Why would you need to do so (set ports in router) if its inbound?

I mean ports need to be open at least in firewall, possibly also on router side too. As you normally would no need to set any ports for outbound why for inbound then? Is it perhaps because software set outbound rules automatically through firewall (at least in my firewall there's quite a lot outbound rules)? But that wouldn't still explain ports in routers as there is no way some software could do it for you or could it? If so then it would mean the problem is in the router except there is one problem. How did steam's ports end up there? This all is assumptions from the base I haven't checked "inside" my router.

On the other hand I have similar problems with hosting Terraria sessions but no such ones with Valheim. And for those two I haven't done anything so why does Valheim work and those two DST and Terraria, plus pretty much anything else I try hosting is not?

The point of a Firewall is to protect against attackers, while allowing you to access the internet.
Attackers come from the outside, you come from the inside. This is the reason why the ports are open outgoing, but blocked incoming. Imagine it as your house's door. You can open it from the inside, but it's locked from the outside.

You just need to portforward your DST Server ports through the firewall, no steam ports or something.

The Router's portforwarding is somewhat like the Router's firewall, which then decides that the packets that arrive at the specific port on the router to be forwarded to your Server-PC.

And yes, worst case is that it's unfixable, depending on the circumstances.

If it works in some games, and not in others, it's usually due to how the games have their network code and stuff setup.
For example the DST server constantly checks if a player is allowed to do an action, move somewhere or is getting hit (in the server's eyes). If you weren't allowed to move womewheere within a timeframe, the server just overrides your client position and moves you to where you are allowed (rubberbanding), or if the server thinks that you've got hit, it damages you.

Other games might handle stuff differently, such as that the server just sends the boss location, etc to the clients, and the clients themselves decide if a Player is allowed to move somewhere, or if a player got hit. This feels much more responsive, and doesn't run the risk of rubberbanding or "ghost hits", however it allows clients to use hacks, etc.

 

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...