Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ethernet module and device configuration
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mgnut57
Apprentice
Apprentice


Joined: 12 Jan 2008
Posts: 190

PostPosted: Mon Oct 31, 2016 11:24 pm    Post subject: Ethernet module and device configuration Reply with quote

I have a couple of systems where the original installation is over 10 years old and now see issues with Ethernet device naming. Clearly, I need to reconfigure the systems from the old "eth*" naming schemes to the new predictable naming scheme.

The systems run OpenRC.

1. Do the files in /etc/modprobe.d and /etc/modules.d do anything today?
2. Is the sole place for module configuration /etc/conf.d/modules ?
3. With the old names, in netfilter rules, I could specify an interface with aliases as something like "eth0+". Will something similar work with the new names (for example, "enp5S0+")?


Last edited by mgnut57 on Sun Nov 06, 2016 8:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7164
Location: almost Mile High in the USA

PostPosted: Tue Nov 01, 2016 12:42 am    Post subject: Reply with quote

1. Yes the modprobe.d still do stuff, you can set up blacklists, options, and configure ordering.
2. No you can configure in above.
3. You can get udev to rename to anything you want, but you won't have to worry about these enp0s0 changing to enp1s2 in the future so that security risk is gone. You can also revert back to the old eth0 names too.
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ and look for "I don't like this, how do I disable this?"
Yes it says systemd, but it's still the same udev/eudev.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13990

PostPosted: Tue Nov 01, 2016 1:20 am    Post subject: Reply with quote

For (3): the trailing + is a kernel feature, so while you would need to adjust the portion of the name left of the plus to match your new interface naming, you can continue to use + as a trailing wildcard, regardless of what interface name convention you choose to use.
Back to top
View user's profile Send private message
mgnut57
Apprentice
Apprentice


Joined: 12 Jan 2008
Posts: 190

PostPosted: Tue Nov 01, 2016 6:04 am    Post subject: Reply with quote

eccerr0r wrote:
1. Yes the modprobe.d still do stuff, you can set up blacklists, options, and configure ordering.
2. No you can configure in above.
3. You can get udev to rename to anything you want, but you won't have to worry about these enp0s0 changing to enp1s2 in the future so that security risk is gone. You can also revert back to the old eth0 names too.
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ and look for "I don't like this, how do I disable this?"
Yes it says systemd, but it's still the same udev/eudev.



If I go down the route of disabling the new names, can I create several .link files in /etc/systemd/network/ and use that to force the names to the old format (eth0, eth1, etc.)?
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1699

PostPosted: Tue Nov 01, 2016 6:13 am    Post subject: Reply with quote

you could possibly use the .link files, though an easier way would be to just add net.ifnames=0 to your kernel command line, and it will use the kernel names instead. The link files would probably be more helpful if you want specific network cards labeled something specific.
Back to top
View user's profile Send private message
mgnut57
Apprentice
Apprentice


Joined: 12 Jan 2008
Posts: 190

PostPosted: Wed Nov 02, 2016 5:47 am    Post subject: Reply with quote

OK, these "predictable names" are not. This seems to be a waste of time.

In one of my systems, I have an onboard LAN and a PCI card with another 2 interfaces. Sometimes, on boot up (typically, cold boot), the PCI card doesn't come up. Which interface the name "enp4s0" is attached to depends on whether the PCI card comes up on boot up. With the card detected, what was enp4s0 without the card becomes enp6s0.

So what was the point of this change? It doesn't deliver predictable names.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7164
Location: almost Mile High in the USA

PostPosted: Wed Nov 02, 2016 7:07 am    Post subject: Reply with quote

You may have a special case, probably your firmware confuses the predictable device names routine, likely it enumerates your onboard devices later than PCI cards, which is a bit weird. Most machines it actually works right...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2644

PostPosted: Wed Nov 02, 2016 7:56 am    Post subject: Re: Ehternet module and device configuration Reply with quote

mgnut57 wrote:
I have a couple of systems where the original installation is over 10 years old and now see issues with Ethernet device naming. Clearly, I need to reconfigure the systems from the old "eth*" naming schemes to the new predictable naming scheme.

Why not make them keep the old names?
Back to top
View user's profile Send private message
mgnut57
Apprentice
Apprentice


Joined: 12 Jan 2008
Posts: 190

PostPosted: Sun Nov 06, 2016 8:28 pm    Post subject: Re: Ehternet module and device configuration Reply with quote

charles17 wrote:
mgnut57 wrote:
I have a couple of systems where the original installation is over 10 years old and now see issues with Ethernet device naming. Clearly, I need to reconfigure the systems from the old "eth*" naming schemes to the new predictable naming scheme.

Why not make them keep the old names?


I created .link files to force the use of the old eth* names. This worked and gave me the first boot in a long time where the Ethernet interfaces all came up with their expected names.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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