Developer builds lightweight WAN failover tool for storage-constrained OpenWrt router
A developer created a custom WAN failover tool called Wanmon after finding that the popular OpenWrt solution mwan3 was too large for their Xiaomi Mi Router C4, which has only about 5.7 MB of writable flash storage. The router needed to automatically switch from a primary wired broadband connection to a mobile hotspot backup whenever the main link failed. Wanmon is a set of shell scripts split into three stages: measuring link quality metrics like latency, packet loss, and jitter; scoring and selecting the best available interface; and updating the kernel routing table accordingly. Unlike mwan3, the tool requires no additional kernel modules or persistent daemons, keeping its footprint well under 100 KB. It also includes a basic web interface for status monitoring and manual overrides, addressing all the developer's requirements within the router's tight resource constraints.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in