DENOG MeetUp 2023-04

ifnamedhcp - Server Interface Names configured via Custom DHCP Option
28.06.2023 , LAB³

After several hardware generations of our servers we had enough of the ever-changing naming schemes of the network interfaces.
This had troubled us in so many different ways:

  • "Does this NIC count the ports from left to right or right to left!?" during hardware install.
  • Interface names need to be specified in BGP daemon config.
  • Prometheus alerting rules specify the interfaces.
  • ...

The solution is simple, but very effective:

  1. During installation of the server OS, we are installing a small utility binary (ifnamedhcp).
  2. This binary iterates over all Ethernet interfaces, does a DHCP request and waits for the response containing a custom Option that specifies the interface name to configure.
  3. The name is then configured using systemd-networkd config.
Siehe auch: Slides (1,3 MB)