Some Bits: Nelson's log

Linux network interfaces can have more than one IP address

Had to re-learn this. Normally a network interface in Linux has a single IP address. But there’s nothing stopping you from adding several.

Adding a second address is as simple as running something like ip addr add 192.168.3.254/24 dev eth0.

Here’s a config I just set up in Alpine in /etc/network/interfaces. Not sure what the netplan equivalent looks like.

auto eth0
iface eth0 inet static
        address 192.168.9.5/24
        gateway 192.168.9.1
        hostname $(hostname)

auto eth0:0
iface eth0:0 inet static
        address 192.168.3.254/24

More details in this Reddit post where I originally tried to make it much more complicated.