Skip to main content
  1. Posts/

Customizing systemd’s network device names

··220 words·2 mins·

1

Earlier today, I wrote a post about my first thoughts on the Supermicro 5028D-T4NT server. The 10Gb interfaces on the server came up with the names eth0 and eth1. That wasn’t what I expected. There’s tons of detail on the problem in the blog post as well as the Github issue.

Kay Sievers gave a hint about how to adjust the interfacing naming in a more granular way than simply disabling the predictable network names. The documentation on .link files is quite helpful. Skip to the NamePolicy= section under [Link] and look the options there.

Looking back to another post I wrote about predictable device naming in systemd, we can see how these names fit. In my case, I’d like to have the network device names enp3s0f0 and enp3s0f1 instead of eth0 and eth1.

Here’s the file I created:

# cat /etc/systemd/network/10gb.link
[Match]
Driver=ixgbe

[Link]
NamePolicy=path

The interfaces came up with the expected names after a reboot:

# ip link
6: enp3s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 0c:c4:7a:75:91:c8 brd ff:ff:ff:ff:ff:ff
7: enp3s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 0c:c4:7a:75:91:c9 brd ff:ff:ff:ff:ff:ff

That will be my workaround until something can be fixed in the server’s firmware itself or in systemd.

Photo credit: Wikimedia Commons