While implementating path MTU discovery for a virtual networking product, I was constantly surprised by the fragmentation of packets I saw in my packet traces. My coworkers were surprised too. And when I searched the internet, I found a lot of people confidently assuring each other that what I was seeing in my packet traces was definitely not happening.
So I wrote a program in go to actually test out every scenario of sending a packet via UDP or TCP, over IPv4 or IPv6, with fragmentation enabled or disabled. But first you have to guess what will happen. At the end, it will tell you your score.
Example score from playing with an audience of network operators:
Thank you for playing fragquiz! Share this with your friends: .-- .+. .+. +.+ +.+ +.. ..+ ..+ ..+ +-- +++ +.. My fragquiz score: 15/19 https://valerieaurora.org/fragquiz.html
Want to play? Download the source and compile it using go:
Currently only macOS and Linux are supported. On Linux, you must run it as root. Tip: for a fun surprise, run:
$ sudo ./fragquiz -p udp4 -f default -a bing.com:80 $ sudo ./fragquiz -p tcp4 -f default -a bing.com:80 $ sudo ./fragquiz -p udp4 -f default -a bing.com:80If you have visited bing.com in the last ten minutes, substitute a different web server that you have not. On macOS you, don't need the sudo.
You can also read the Linux Weekly News article "So you think you understand IP fragmentation?"
Like this program? Want to me write something like it for your organization? Read my favorite debugging stories, which doubles as my software consulting resume.
Copyright Valerie Aurora | Back to main page