Alpine Linux as a lean router
Summary
At the Chemnitz Linux Days 2023, Thomas Liske, head of the network operation centre at IBH IT-Service GmbH, showed why Alpine Linux is excellently suited to routers. Alpine is usually associated with container images, but IBH uses it to run routers ranging from simple stateful firewalls to BGP routers in the default-free zone. The talk described the migration from proprietary routers, the software components chosen and the resulting support for open source projects.
What makes Alpine Linux special
Alpine Linux is very small, uses the lean C library musl and BusyBox, and has a fast package manager in apk. A base system fits into a few megabytes. Alpine can also run entirely from RAM and back up its configuration separately; a reboot then always brings the system into a defined state.
These are ideal properties for routers: little attack surface, little maintenance effort and fast, traceable updates. The routing software itself comes from established free projects, for example for BGP.
Why switching to open routers pays off
Proprietary routers tie you to a manufacturer, its licences and its update cycles. A Linux router on standard hardware can be managed with the same tools as any server. It is noteworthy that IBH does not just use but gives back: the talk showed how contributions to the open source projects used came out of the project.
Ideas
- A minimal distribution offers little attack surface for routers.
- A system running from RAM always starts in a defined state.
- Open routers can be managed with the same tools as servers.
Insights
- Anyone who uses free software in production can and should contribute to it.
- Even core network tasks such as BGP can be handled with Linux on standard hardware.
Facts
- Alpine Linux uses musl and BusyBox.
- IBH runs Alpine routers up to BGP routers in the default-free zone.
- A video recording of the talk is available at media.ccc.de.
References
Remarks
- The default-free zone comprises routers that do without a default route and know the complete internet routing table.
Recommendations
- For routers and firewalls, consider a minimal distribution instead of a full server system.
- Contribute improvements back to the open source projects you use; this also reduces your own maintenance effort.
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.