# Ethernet module and device configuration

## mgnut57

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

----------

## eccerr0r

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.

----------

## Hu

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.

----------

## mgnut57

 *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.
> ...

 

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.)?

----------

## ct85711

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.

----------

## mgnut57

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.

----------

## eccerr0r

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...

----------

## charles17

 *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?

----------

## mgnut57

 *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.

----------

