Friday Facts #149 - Deep down in multiplayer

Regular reports on Factorio development.

kinnom
Filter Inserter
Filter Inserter
Posts: 697
Joined: Fri Dec 26, 2014 4:20 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by kinnom » Fri Jul 29, 2016 10:53 pm

read it before you put the link here up :P
no yes yes no yes no yes yes

User avatar
Zirr
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Feb 09, 2013 8:58 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Zirr » Fri Jul 29, 2016 11:07 pm

Interesting read. I love the technical Friday (saturday? :)) Facts.

Supercheese
Filter Inserter
Filter Inserter
Posts: 835
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Supercheese » Fri Jul 29, 2016 11:44 pm

Zirr wrote:Interesting read. I love the technical Friday (saturday? :)) Facts.
It's definitely still Friday here, at least.

Ratzap
Filter Inserter
Filter Inserter
Posts: 370
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Ratzap » Sat Jul 30, 2016 12:13 am

This kind of thing is close to my professional work so I love these types of Friday facts. Technically it wasn't on a Friday but we'll let you off.

bk5115545
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Apr 03, 2016 7:00 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by bk5115545 » Sat Jul 30, 2016 12:20 am

Probably the most interesting Friday Fact yet.

I especially like the flow charts.

Question: What will happen if the newly-connected client can't finish the "catch-up" phase;
Tick rate decrease or disconnect or something else (maybe even undecided)?

User avatar
tehroach
Fast Inserter
Fast Inserter
Posts: 128
Joined: Mon Feb 01, 2016 11:04 am
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by tehroach » Sat Jul 30, 2016 12:45 am

bk5115545 wrote:Probably the most interesting Friday Fact yet.

I especially like the flow charts.

Question: What will happen if the newly-connected client can't finish the "catch-up" phase;
Tick rate decrease or disconnect or something else (maybe even undecided)?
From what I read, I assumed that the slower player will just keep receiving packets, will never catch up and the player will be forced to click the disconnect button, mean while the players playing will continue playing and be blissfully unaware of the slow players problems.

Ohh I really can't wait to be able to play this game with people in other countries :)

self-same-spot
Inserter
Inserter
Posts: 34
Joined: Fri Mar 04, 2016 11:50 am

Re: Friday Facts #149 - Deep down in multiplayer

Post by self-same-spot » Sat Jul 30, 2016 1:00 am

.
Last edited by self-same-spot on Thu Nov 24, 2016 11:09 am, edited 1 time in total.

nonstickfrypan
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Fri Apr 15, 2016 9:02 am
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by nonstickfrypan » Sat Jul 30, 2016 3:38 am

self-same-spot wrote:
As the peer-to-peer network model is being removed, this is not needed anymore and every communication has it's own numbering,
I've kept my mouth shut the first twenty times this happened in the blog and changelogs, but I can't anymore. Sorry for pedantry:
Thanks for clearing that up! Its something that annoy's me as well; its as if people have never heard of an apostrophe so they either leave it out or add one at random where they think its appropriate. The apostrophes property's are confusing but its easy to learn.

Hamster
Inserter
Inserter
Posts: 48
Joined: Thu Oct 29, 2015 9:27 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Hamster » Sat Jul 30, 2016 5:23 am

nonstickfrypan wrote:
self-same-spot wrote:
As the peer-to-peer network model is being removed, this is not needed anymore and every communication has it's own numbering,
I've kept my mouth shut the first twenty times this happened in the blog and changelogs, but I can't anymore. Sorry for pedantry:
Thanks for clearing that up! Its something that annoy's me as well; its as if people have never heard of an apostrophe so they either leave it out or add one at random where they think its appropriate. The apostrophes property's are confusing but its easy to learn.
I learned it that way, that every
it's = it is.

So the best is to "replace" it with the long variant, and check if the sentence is still correct:
communication has it's own numbering. = communication has it is own numbering

As we see it, it's not.

User avatar
ChurchOrganist
Fast Inserter
Fast Inserter
Posts: 222
Joined: Sun Apr 17, 2016 12:45 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by ChurchOrganist » Sat Jul 30, 2016 8:01 am

Ratzap wrote:Technically it wasn't on a Friday but we'll let you off.
Actually it was - according to the forum time stamp Kovarex's post was at 22:50 UTC on Friday 29th July.

But as most of us are on daylight saving time at the moment it may have appeared that the post was on Saturday.
Want to know where the biters chewing your power plant have come from??
Wondering where your next iron is going to come from??
You need Long Range Radar

Blubberbub
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Jul 30, 2016 8:29 am
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Blubberbub » Sat Jul 30, 2016 8:32 am

So if the attacker knows the server ID, he/she can still run the same attack by sending 2 instead of 1 packet to the server? Or is the server ID random and different for every player?

Loewchen
Global Moderator
Global Moderator
Posts: 5510
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Loewchen » Sat Jul 30, 2016 9:07 am

Blubberbub wrote:So if the attacker knows the server ID, he/she can still run the same attack by sending 2 instead of 1 packet to the server? Or is the server ID random and different for every player?
The attacker can't respond as he fakes the victims IP or he would DDOS himself ;).
He would get one packet send to the victim for 1 packet sent by himself instead of 700 for 1.

Blubberbub
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Jul 30, 2016 8:29 am
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Blubberbub » Sat Jul 30, 2016 9:26 am

Loewchen wrote:
Blubberbub wrote:So if the attacker knows the server ID, he/she can still run the same attack by sending 2 instead of 1 packet to the server? Or is the server ID random and different for every player?
The attacker can't respond as he fakes the victims IP or he would DDOS himself ;).
He would get one packet send to the victim for 1 packet sent by himself instead of 700 for 1.
Why would the attacker not be able to respond if he knows the response?
  • Attacker connects to server by himself and figures out the server-id.
  • Attacker sends first spoofed packet with client-id
  • Server sends first response to victim. Will probably be discarded.
  • Attacker waits a little
  • Attacker sends second spoofed packet with client-id + server-id
  • Server starts sending a lot of data to the victim
Last edited by Blubberbub on Sat Jul 30, 2016 9:40 am, edited 1 time in total.

Loewchen
Global Moderator
Global Moderator
Posts: 5510
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Loewchen » Sat Jul 30, 2016 9:39 am

Blubberbub wrote:
Loewchen wrote:
Blubberbub wrote:So if the attacker knows the server ID, he/she can still run the same attack by sending 2 instead of 1 packet to the server? Or is the server ID random and different for every player?
The attacker can't respond as he fakes the victims IP or he would DDOS himself ;).
He would get one packet send to the victim for 1 packet sent by himself instead of 700 for 1.
Why would the attacker not be able to respond if he knows the response?
  • Attacker connects to server by himself and figures out the server-id.
  • Attacker sends first spoofed package with client-id
  • Server sends first response to victim. Will probably be discarded.
  • Attacker waits a little
  • Attacker sends second spoofed package with client-id + server-id
  • Server starts sending a lot of data to the victim
If the attacker would connect himself he would get his own clientID but he would need the clientID of the victim which he can not get as it is sent to the victims IP.

Blubberbub
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Jul 30, 2016 8:29 am
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Blubberbub » Sat Jul 30, 2016 9:47 am

Loewchen wrote: If the attacker would connect itself he would get his own clientID but he would need the clientID of the victim which he can not get as it is sent to the victims IP.
Image
The image suggests, that the client presents its client-id to the server. (I would like to URL it, but apparently that starts a download of the image which is inconvenient...)

The attack is only prevented if there is secret information send from the server to the client in the Connection Reply packet. But from the text and diagram it looks like there is only the client-id (which is send from the client to the server in the Connection Request, so the attacker can choose one) and the server-id (which is presumably the same for all clients on the server).

EDIT:
The client first generates (randomly) his id, and sends it to the server as part of the request. The server generates his unique random id as well, and sends it back to the client.
The client id is randomly chosen by the attacker, so it does not add anything to the ddos prevention. The wording of "his unique random id" suggests, that the id is unique to the server. For the prevention to work the server id has to be different and unique for every client and not unique for every server. Maybe its just a wording issue. I hope it is.
Last edited by Blubberbub on Sat Jul 30, 2016 10:09 am, edited 2 times in total.

universal
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Jul 01, 2016 9:47 am
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by universal » Sat Jul 30, 2016 10:05 am

the ability to have the server bind to a specific ip and not 0.0.0.0 would be great ;)

Loewchen
Global Moderator
Global Moderator
Posts: 5510
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Loewchen » Sat Jul 30, 2016 10:08 am

Blubberbub wrote:
Loewchen wrote: If the attacker would connect itself he would get his own clientID but he would need the clientID of the victim which he can not get as it is sent to the victims IP.
The image suggests, that the client presents its client-id to the server.
Indeed, that would make it necessary for the ServerID to be unique between the clients.

Zulan
Inserter
Inserter
Posts: 47
Joined: Mon Jan 25, 2016 5:55 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Zulan » Sat Jul 30, 2016 10:37 am

This is a really interesting read. There is just one thing that keeps puzzling me. Is there not a good framework out there that you don't have to write and maintain that code yourself? It's not like this is the first multiplayer game. The latency hiding seems to be the only thing that has game-specific aspects as it sort of needs to roll-back state. The rest just feels completely generic to almost all games that don't exclusively simulate the world on the server.

Jürgen Erhard
Filter Inserter
Filter Inserter
Posts: 273
Joined: Sun Jun 12, 2016 11:29 pm
Contact:

Re: Friday Facts #149 - Deep down in multiplayer

Post by Jürgen Erhard » Sat Jul 30, 2016 12:14 pm

Please, kovarex, at least stop thinking about multiplayer when you ride your bike and *CONCENTRATE ON THE TRAFFIC*!

;-)

Post Reply

Return to “News”

Who is online

Users browsing this forum: No registered users