Hacker News new | past | comments | ask | show | jobs | submit login
Simulating Crap Networks on a Raspberry Pi (2018) (nicecupoftea.org)
40 points by DanBC 52 days ago | hide | past | web | favorite | 7 comments



At Maker Faire Tokyo this year there was a booth handing out PCBs for their side project: an interactive packet delay and packet loss simulator. Underneath it uses tc commands, but they used rotary encoders and a little LCD screen to make it super easy to use.

I took a PCB, bought the other parts, and put one together. Still need to try it out this week.

Here's the repo for it:

https://github.com/pandax381/PACKDROP


A little over 10 years ago I was on an engineering internship and worked on a NASA project that was part of the overall goal of converting ad hoc links to being IP-based. I wrote a test tool which allowed simulating long distance and/or unreliable links. You could specify chains of filters on the command line for both uplink and downlink, as well as introduce taps. The reason I couldn't use an off-the-shelf tool was that by "long distance" I mean "interplanetary". It's one thing to introduce a delay/drop, but my tool simulated the possibility of gigabytes of data being "in flight" along the link.


This for others following along more than you, but the work that Luigi Rizzo did on IPFW [1] and FEC (forward error correcting codes) for internet scale video delivery is amazing.

I used ipfw (my router was running FreeBSD) to give ICMP traffic 300ms of jitter and 5% packet loss. Enough to make my DSL endpoint sour enough that the hack attempts went to zero. They would scan with ping, decide that my link was garbage and move on.

[1] https://github.com/luigirizzo/dummynet

[2] http://www.iet.unipi.it/l.rizzo/research.html


Was this part of Vince Cerf's "Interplanetary Internet" project? He's spoken about that at NASA Goddard a few times.

I once toyed with the idea of using "in flight" data as mass storage, where data would be kept in a ring the size of a planetary orbit, with satellites stationed along the orbit to receive and re-transmit the data. You'd need a lot of redundancy...


Very interesting. The author may also be able to use throttling functionality on the Network tab of Firefox dev tools. I think chrome has something similar. It probably won’t simulate disconnects through. Using ip tables works nicely.

I found webrtc to be quite tricky to get working. It feels like a house of cards when you’re starting out but it genuinely does work if you persist. Kudos to the community for making a truly amazing technology. STUN is magical.


This could be improved so that it can simulate noisy lines, not just connection interruptions, by injecting noise (random data) into the data path. The amount of random data/time could be mapped to a "crappiness" control and be used to test either hardware appliances or software protocols for resilience against data corruption. Pretty sure this already exists though as an old friend of mine developed something like that to be used on serial lines over 25 years back.


This is really interesting.

I've been playing about with trying something like this as well, but as an experiment to see how considerate I would be of spending time online if I was to be tied down by loading times like back when using dial-up, if/how my habits would change.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: