Vrolijk / OSDD

Sharing ideas about using data diodes
Apache License 2.0
26 stars 9 forks source link

Linux kernel packet loss - Help needed! #6

Open Vrolijk opened 11 months ago

Vrolijk commented 11 months ago

As described in https://github.com/Vrolijk/OSDD/blob/main/packetloss_explained.md Linux does drop UDP packets. There are several ways to optimize UDP traffic like Forward Error Control (FEC) within the application, optimizing the UDP network buffers but even with these optimizations UDP remains unreliable.

During the creation of the workshop we collected some idea's but where not able to add them to the workshop. Use eXpress Data Path XDP: https://github.com/Vrolijk/OSDD/blob/main/examples/XDP_to_prevent_packet_loss.md Modify udp.c within the kernel with function when using data diodes: https://github.com/torvalds/linux/blob/master/net/ipv4/udp.c Create an FEC application: https://github.com/Vrolijk/OSDD/blob/main/netcat-diode.md

If you have more suggestions or know how to implement these suggestions (if they are viable) please leave a comment.

Regards, Rene

Vrolijk commented 11 months ago

XDP Example: https://github.com/gamemann/XDP-Forwarding Not tested.

Vrolijk commented 11 months ago

Use Flute protocol: https://github.com/ypo/flute Not tested.

poweredgenl commented 4 months ago

hey - im unsure wether this helps - but i have made some mods to my linux (routers) to optimize for max traffic throughput ...

could one of these settings perhaps help you?

https://github.com/poweredgenl/networkstuff/blob/main/sysctl.conf_bgp_RHEL9

Vrolijk commented 3 months ago

tried the sctp protocol without success...

Vrolijk commented 3 months ago

hey - im unsure wether this helps - but i have made some mods to my linux (routers) to optimize for max traffic throughput ...

could one of these settings perhaps help you?

https://github.com/poweredgenl/networkstuff/blob/main/sysctl.conf_bgp_RHEL9

Peter Paul, Thank you for the suggestion. The sysctl optimization is already part of the workshop. It does improve the packetloss but when i send large files or streams the networkbuffers still drops packets (as designed in the UDP protocol)

Vrolijk commented 1 month ago

Some tips https://stackoverflow.com/questions/7968566/what-would-cause-udp-packets-to-be-dropped-when-being-sent-to-localhost