Automatically persist DHCP provided network settings (Debian, Arch)

This is just from my personal lab. Not well tested.

These scripts use the network settings from the DHCP client, and persist them statically.

Ubuntu 22.04 LTS, Debian 12

 

https://netplan.io/

  • Netplan

  • Systemd-resolved

Arch Linux

  • systemd-networkd