eth0 → ens33
Posted by Pei-Pa-Koa@reddit | linuxadmin | View on Reddit | 9 comments
Hi,
On Debian (VMware) I used to pass biosdevname=0 and net.ifnames=0 as kernel parameters to have a network interface named "eth0" but now I'd like to have the standard name "ens33" for my network interface.
I've removed the kernel parameters from /etc/default/grub, re-generated grub.cfg and rebuild initrd but my interface keeps coming as "eth0".
"eth0" is mentioned nowhere in /boot, /etc, how can I have my nic as "ens33" without creating an udev rule?
Thanks,
ConstructionSafe2814@reddit
Would be cool if you can fix it. I tried recently because I migrate from VMware to Proxmox and it went from ens192 to ens18. Eventually I gave up on this because I was able to conpletely eliminate VMware.
Pei-Pa-Koa@reddit (OP)
Partially solved, I had the file
/etc/systemd/network/00no-altname.link, containing:[Match]OriginalName=*[Link]AlternativeNamesPolicy=Now my interface name is ens192.
spif@reddit
The number is based on what slot the interface is in. If you want it to be ens33 regardless of the slot it's actually in, that's kind of missing the point of not having it be eth0.
Unlucky-Shop3386@reddit
Maybe you should use udev rules to rename the infacename to eth0 always .
chronic414de@reddit
We have udev rules on a few servers with like 10 network interfaces. Since a few kernel updates when I do a reboot not all interfaces come up. I need to reboot the servers multiple times to get all interfaces up.
Academic-Gate-5535@reddit
OPs doing the reverse, he doesn't want the interface renamed
Unlucky-Shop3386@reddit
In that case .. systemd-networkd arch-wiki will point him in the direction he needs to go. Op must create a correct wired or wireless connection.. then remove defaults . ...
Academic-Gate-5535@reddit
He already sorted it in networkd's config
nut-sack@reddit
ifrename