Disabling predictable interface names

Sylvain Pasche spasche at spasche.net
Sun Nov 22 23:02:38 UTC 2015


On 11/20/2015 11:10 AM, wheelz wrote:
> You need to run dracut to rebuild initramfs, or you wait for the next kernel
> update.
>
> On 2015, November 20, Friday 00:18:37 Dusty Mabe wrote:
>> According to [1] predictable interface naming can be disabled with a
>> symlink to /dev/null or by providing net.ifnames=0 on the kernel command
>> line. It seems like symlinking to /dev/null isn't working any more.
>>
>> Is symlinking to /dev/null supposed to still work? We are seeing this on
>> Atomic Cloud images where the symlink is in place but net.ifnames=0
>> isn't on the cmd line so we are getting ens* interface names.
>>
>> [1] -
>> http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterface
>> Names/
>

To expand on that from my experience:

If the network interface is loaded during early boot, it might be 
renamed before the /dev/null symlink has an effect.

That might happen if you have the dracut-network package installed, 
which injects network modules in the initrd.

In this case, you need to put the symlink in the initrd too. For 
instance with:

cat > /etc/dracut.conf.d/10-udev.conf << EOF
install_items+=" /etc/udev/rules.d/80-net-setup-link.rules"
EOF

dracut -f


And then it shouldn't be renamed.

By the way, masking 80-net-setup-link.rules has a side effect of 
breaking systemd-networkd. I'll open a ticket about it for maybe finding 
a better alternative.


Sylvain


More information about the devel mailing list