Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
stop udev from switching names (choose old behaviour instead
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kokyu
n00b
n00b


Joined: 22 Dec 2011
Posts: 13

PostPosted: Wed Jul 03, 2013 10:27 pm    Post subject: stop udev from switching names (choose old behaviour instead Reply with quote

Hey all,

since recently, the systemd/udev developers decided to use enp1s0 instead of eth0, or where-ever your ethernet card is plugged into.

This all seems ignorable when it comes down to desktop hardware, but I just installed Gentoo on one of your nodes in the data center
which now have a name as enp7s0f0 and enp7s0f1 which is by far no fun if you want to deploy some software on every node that were used to have eth0 for internal and eth1 for external traffic but now the interface name can vary almost like anything.

So is there a way to revert this back, such as adding a udev rules entry to set this explicitely back to eth0/eth1, something homogenous ?
I tried adding a 70-mynames.rules into /etc/udev/rules.d/ and rebooted. but it seemed like udev ignored my file.
Maybe I mispelled it or it should look different now?

This is the contents:

KERNEL=="eth?", SYSFS{address}=="00:25:90:2b:8e:34", NAME="eth0"
KERNEL=="eth?", SYSFS{address}=="00:25:90:2b:8e:35", NAME="eth1"


Best regards.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Wed Jul 03, 2013 10:40 pm    Post subject: Re: stop udev from switching names (choose old behaviour ins Reply with quote

kokyu wrote:
Hey all,

since recently, the systemd/udev developers decided to use enp1s0 instead of eth0, or where-ever your ethernet card is plugged into.

This all seems ignorable when it comes down to desktop hardware, but I just installed Gentoo on one of your nodes in the data center
which now have a name as enp7s0f0 and enp7s0f1 which is by far no fun if you want to deploy some software on every node that were used to have eth0 for internal and eth1 for external traffic but now the interface name can vary almost like anything.

So is there a way to revert this back, such as adding a udev rules entry to set this explicitely back to eth0/eth1, something homogenous ?
I tried adding a 70-mynames.rules into /etc/udev/rules.d/ and rebooted. but it seemed like udev ignored my file.
Maybe I mispelled it or it should look different now?

This is the contents:

KERNEL=="eth?", SYSFS{address}=="00:25:90:2b:8e:34", NAME="eth0"
KERNEL=="eth?", SYSFS{address}=="00:25:90:2b:8e:35", NAME="eth1"


Best regards.


yes, create a symlink

/etc/udev/rules.d/80-net-name-slot.rules -> /dev/null


Last edited by dmpogo on Thu Jul 04, 2013 2:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21619

PostPosted: Wed Jul 03, 2013 11:04 pm    Post subject: Reply with quote

That file can also be empty to disable the behavior. OP: you should read your Gentoo news before upgrading. Specifically, look at news item Upgrading udev to version >=200, which discusses in considerable detail how to override the stupid defaults that the systemd-udevd maintainers decided to use (and which the Gentoo udev maintainers decided to pass through).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum