talos icon indicating copy to clipboard operation
talos copied to clipboard

Use predictable network interface names

Open davidspek opened this issue 3 years ago • 6 comments

Feature Request

Use predictable network interface names (eno1, eno2, etc).

Description

Talos currently uses the legacy scheme with interface names eth0, eth1, etc. However, the name of an interface is unpredictable, and can change after reboots. This caused me to try and bind a VIP to the wrong interface. Other projects that need to deal with this use predicable network interface names. Some related documentation about this:

https://github.com/harvester/harvester/issues/2073 https://wiki.debian.org/NetworkInterfaceNames https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-understanding_the_predictable_network_interface_device_names https://specs.openstack.org/openstack/fuel-specs/specs/8.0/network-interfaces-naming-schemes.html

davidspek avatar Jun 01 '22 20:06 davidspek

please see #4203 as a Talos way (it's coming in 1.1.0) to avoid this issue.

we can't change interface names right now as it would break backwards compatibility

smira avatar Jun 01 '22 20:06 smira

Docs: https://www.talos.dev/v1.1/talos-guides/network/device-selector/

smira avatar Jun 01 '22 20:06 smira

Thanks for the information. While that is a solution, it’s not the most user friendly I’d say. Wouldn’t it be possible to have a config flag to enable interface renaming, which is enabled by default for new installations but disabled for existing ones?

davidspek avatar Jun 01 '22 20:06 davidspek

it's hard as some interface names might be used before machine config is available - kernel args might reference them as well

smira avatar Jun 01 '22 20:06 smira

it's hard as some interface names might be used before machine config is available - kernel args might reference them as well

@smira yes, this is the reason why new Linux distros have new predictable network interface names.

maxpain avatar Aug 14 '22 10:08 maxpain

Please read this article https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

maxpain avatar Aug 14 '22 10:08 maxpain