QuestionAccepted answer
How to configure interface aliases using Systemd-Networkd?
sunknudsen
20 Sept 2023, 14:00 UTC
88.9K views1
I am trying to port the following alias from /etc/network/interfaces to /etc/systemd/network/eth0.network.
auto eth0:1
iface eth0:1 inet static
address 10.0.2.1/24
1 answer
Accepted answer · original discussion
sunknudsen
Permalink25 Sept 2023, 09:12 UTC
As Michael pointed out, you don’t.
Instead, you add additional Address= and Gateway= lines to the interface.
Example:
$ cat /etc/systemd/network/eth0.network
[Match]
Name=eth0
[Network]
Address=2a0a:3840:1337:126::b9c1:7ecb:1337/64
Gateway=2a0a:3840:1337:126::1
IPv6AcceptRA=no
Address=185.193.126.203/24
Gateway=185.193.126.1
DNS=95.215.19.53
[DHCP]
UseDNS=false
3 question comments
Use comments to ask for clarification. Post a solution as an answer.
Michael HamptonPermalink
21 Sept 2023, 18:48 UTC
You don't. Interface aliases don't exist anymore.
sunknudsenPermalink
22 Sept 2023, 23:36 UTC
@MichaelHampton Thanks Michael, so how can I add another IP to
eth0 then? I am trying to solve serverfault.com/questions/1029000/….Michael HamptonPermalink