I want to add aliases to my network links to use them as short descriptions. I am configuring my interfaces using systemd-networkd, having systemd version 241 on a debian buster server.
I've created the file -rw-r--r-- 1 root root 68 Feb 9 12:53 /etc/systemd/network/ens19.link
with the content:
[MATCH] MACAddress=7a:08:e8:12:fc:c7 [LINK] Alias=myalias
I've tried to reboot the system, but the alias does not appear:
3: ens19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether 7a:08:e8:12:fc:c7 brd ff:ff:ff:ff:ff:ff
Doing ip l set ens19 alias myalias
gives the intended result:
3: ens19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether 7a:08:e8:12:fc:c7 brd ff:ff:ff:ff:ff:ff alias myalias
How can I achieve that using systemd-networkd?