add multiple static ip addresses to a server with systemd-networkd
According to systemd.network(5), you can simply add multiple Address=
lines to the [Network]
section, with the required addresses.
[Network]
Address=10.2.3.4/16
Address=10.6.7.8/16
Gateway=...
Alternatively, create a separate [Address]
section for each address.
[Network]
Gateway=...
[Address]
Address=10.2.3.4/16
[Address]
Address=10.6.7.8/16
(The same applies to [Route]
sections and Gateway=
parameters.)
Note that systemd-networkd is still very new and receives bug fixes almost daily. Make sure you're using the latest systemd release, and test the Git builds if possible. See the mailing list and the IRC channels #systemd
& #gentoo-systemd
on freenode in case of bugs.