Netplan replaces /etc/network/interfaces in Ubuntu 22.04: handling leftover entries and custom ifupdown scripts after upgrade
0 reputation · 02 Dec 2023, 02:42 UTC
0 reputation · 02 Dec 2023, 02:42 UTC
After upgrading a server from Ubuntu 20.04 to 22.04 LTS, the documented default network configuration path is Netplan YAML under /etc/netplan/ rather than /etc/network/interfaces. The goal is to complete this transition cleanly on a host that has both legacy ifupdown entries and a few custom ifupdown hook scripts, without losing connectivity or ending up with duplicate routes.
The documentation indicates that legacy interfaces may be ignored when both configuration styles exist, but it is not clear how the system decides precedence during an in-place upgrade, or whether orphaned entries can still produce duplicate routing in some renderer combinations. The setup also includes a bonded interface with a VLAN on top, which may require an explicit renderer choice rather than relying on defaults. The custom ifupdown scripts apparently need to be rewritten as Netplan-compatible actions, but the exact supported mechanism for hooking pre/post events is uncertain.
/etc/network/interfaces and Netplan YAML exist after a 20.04-to-22.04 upgrade, which configuration actually wins, and how can leftover entries be detected before they cause duplicate routes?netplan try be relied on to roll back safely if the rewritten configuration fails to bring the interface up?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.