Packet fragmentation (Factorio)

Post all other topics which do not belong to any other category.
Post Reply
User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Packet fragmentation (Factorio)

Post by impetus maximus »

how does Factorio handle fragmented packets? let's say a firewall blocks them.
will blocking/dropping the fragmented packets cause any issues?

was going to put this in technical help, but i'm not having a problem. just curious.

cheers

User avatar
ledow
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Sat Sep 24, 2016 3:00 pm
Contact:

Re: Packet fragmentation (Factorio)

Post by ledow »

Nice homework question.

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Packet fragmentation (Factorio)

Post by impetus maximus »

homework? are you going to school for networking?

Daid
Fast Inserter
Fast Inserter
Posts: 163
Joined: Sun Jul 03, 2016 7:42 am
Contact:

Re: Packet fragmentation (Factorio)

Post by Daid »

Factorio uses UDP, and one of the basics of UDP is that packets cannot be fragmented. A whole packet arrives or not. Maximum packet size is set by the lowest MTU of the whole link. But generally is more then 1400 bytes.

As for dropped packets, if you are using UDP, it's common knowledge to account for dropped packets. Even if packet loss is less then 1% these days. Factorio does, or people would be complaining a lot in network games. As the only other result would be people to desync from the game.

Engimage
Smart Inserter
Smart Inserter
Posts: 1069
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Packet fragmentation (Factorio)

Post by Engimage »

UDP packets CAN be fragmented. And it can easily happen if you got some routers with MTU lower than 1500 on your path.
However the path MTU discovery can easily fail and the best way to avoid this is setting your network adapter MTU to say 1400. This will most likely terminate all fragmentation issues.
Below is an article which will help you change and test a bit your fragmentation issues.
https://support.purevpn.com/how-to-chan ... ta-7-and-8

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Packet fragmentation (Factorio)

Post by impetus maximus »

thanks for the help Daid, PacifyerGrey. :)

Daid
Fast Inserter
Fast Inserter
Posts: 163
Joined: Sun Jul 03, 2016 7:42 am
Contact:

Re: Packet fragmentation (Factorio)

Post by Daid »

PacifyerGrey wrote:UDP packets CAN be fragmented. And it can easily happen if you got some routers with MTU lower than 1500 on your path.
I stand corrected. UDP indeed can be fragmented. However, if it's fragmented, it is also reassembled before it arrives at your application. And thus you will not notice this fragmentation except for a higher chance of dropped packets.

eX_ploit
Inserter
Inserter
Posts: 27
Joined: Sun Apr 30, 2017 9:29 am
Contact:

Re: Packet fragmentation (Factorio)

Post by eX_ploit »

In some networks udp packet of a size bigger than a certain number can be completely dropped instead of being fragmented. And if you just resend, it will get dropped again. So if you want to work with udp you need some kind of "test the waters" functionality which can find this number by trial, and not just assume a hardcoded mtu size.

Post Reply

Return to “General discussion”