1

Noticed when upgrading to Debian 10 (Buster) that the public eth0 network interface is now called ens5 on AWS EC2.

Is there a way to create a symbolic link or similar so that legacy applications that have eth0 hardcoded can continue to reference eth0 in tandem with the new ens5 network interface?

Justin
  • 5,328
  • 19
  • 64
  • 84

1 Answers1

1

You can try to use systemd.link for that purpose and rename ens5 to eth0. The interface can be matched based on different criteria e.g. MAC address, PCI slot, Original Name, etc. and then you can link it, meaning you can then perform different actions on it, including renaming it.

Here is an example:

Example: /etc/systemd/network/10-eth.link

This example assigns the fixed name "eth0" to the interface with the MAC address 00:a0:de:63:7a:e6:

[Match]
MACAddress=00:a0:de:63:7a:e6
[Link]
Name=eth0

More info can be found in this Debian Wiki web page: https://wiki.debian.org/NetworkInterfaceNames or the systemd.link man page: https://manpages.debian.org/buster/udev/systemd.link.5.en.html

basekat
  • 456
  • 2
  • 5