Script to check network MTU, detect blackhole, and check system PMTUD cache using standard Python libraries. Icecream output is optional.
Required system utilities:
pingutilityiputility on Linuxnetshutility on Windows
git clone https://github.com/ChieftainGreen/mtu_lookupOr
Copy-paste mtu_lookup.py to a local .py file
For icecream debug output, install icecream:
pip install icecream # (or pip3...)And comment out the HAVE_IC = False line
python3 mtu_probe.py <ip or hostname> # - Linux
python mtu_probe.py <ip or hostname> # - Windows- Available without root/admin privileges
- Available without other Python modules or external programs (e.g., scapy requires Npcap on Windows)
- Different output for Linux or Windows
- No reliable error code
- Windows version may be localized
- Linux version has no clear 'timeout' message
- Jumbo Frames
- Resolve problem with hostname containing "ttl" substring
- Colored Rich version
- Better no-icecream fallback (no manual commenting)
Igor Perfilov (GitHub). AI also deserves a cookie. 🍪
MIT
