Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[solved] Network device naming

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
nebain
Posts: 2
Joined: 2017-08-15 14:22

[solved] Network device naming

#1 Post by nebain »

I have installed Stretch today for the first time and I'm not sure what I'm missing with regard to network device naming in systemd. As per the manpage for systemd.link (https://www.freedesktop.org/software/sy ... .link.html), I created /etc/systemd/network/10-dmz0.link:

Code: Select all

[Match]
MACAddress=11:22:33:44:55:66

[Link]
Name=dmz0
After that, I've tried systemctl restart systemd-networkd and even rebooting, but my device still comes up as ens18. I've checked that I have the MAC address correct many times (it matches the output of ip addr show). What am I missing?
Last edited by nebain on 2017-08-16 22:27, edited 1 time in total.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Network device naming

#2 Post by debiman »

are you trying to rename an ethernet connection?
why, in $DEITY's name?

aah, identical question asked here:
https://superuser.com/questions/914646/ ... th-systemd

nebain
Posts: 2
Joined: 2017-08-15 14:22

Re: Network device naming

#3 Post by nebain »

The question you linked to is indeed identical, but the answers assume who-knows-what conditions are present under Fedora, and those assumptions do not fix the issue. Maybe that's a better place to ask the question, though.
  • systemd-networkd is, in fact, the default in Debian 9, yes? Then why is my .link file being ignored? udevadm info does list the link file, but it seems that other names override it.
  • An answer to the above-linked question suggested placing a .rules file in /etc/udev/rules.d, which I have tried and that did not work. This is no surprise, since /usr/share/doc/udev/NEWS.Debian.gz specifically tells you not to do that anymore.
After more reading, I noticed that /usr/share/doc/udev/NEWS.Debian.gz points you to /usr/share/doc/udev/README.Debian.gz, which has a mention of doing a

Code: Select all

update-initramfs -u
After rebooting, my interface is now renamed correctly. Hope that helps for anyone else looking to rename their interfaces.

Post Reply