I am trying to port the following alias from
auto eth0:1 iface eth0:1 inet static address 10.0.2.1/24
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
As Michael pointed out, you don’t.
Instead, you add additional
Gateway= lines to the interface.
$ 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=188.8.131.52/24 Gateway=184.108.40.206 DNS=220.127.116.11 [DHCP] UseDNS=false