Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
enp1s0 changed to eno0
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
engineermdr
Guru
Guru


Joined: 08 Nov 2003
Posts: 304
Location: Altoona, WI, USA

PostPosted: Thu May 02, 2024 3:13 pm    Post subject: enp1s0 changed to eno0 Reply with quote

My home experienced a power outage this morning. I have a dedicated small Atom computer I use as a firewall/router. It powered back up when the power was restored, but no internet for the internal network.

Problem 1: I discovered the internal network port enp1s0 is now named eno0. When did that happen? Why did that happen? My kernel is 5.10.93 compiled Jan 31, 2022, and I'm almost certain I've rebooted since installing it, so I doubt it's the kernel. I did have to transition away from eudev, was that it?

So, I fix /etc/conf.d/net and use the new name and I get the net device up, but still not able to contact anything on the internal network.

Problem 2: Since this a firewall, iptables was configured for the old device name. Another fix there.

An hour later, I finally have networking again (we won't talk about one of the other computers that won't even post now :cry:). So now I want to avoid this ever again. I think I have 3 options:

1. Prevent the renaming and revert to eth1 and eth0. However, I'm worried they might switch places someday.
2. Force the renaming somehow myself, if that's possible and I believe it is
3. Toss udev and use static /dev - nothing ever changes on this machine and it would be quite reasonable to set up and forget

Thoughts? #2 seems like the safest with the least effort, but if the process to force the naming changes, then I'm screwed again. I'd like to use #1 if my concerned aren't warranted. And #3 would be the most permanent and take me back to the early days of linux, but likely the most work.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22657

PostPosted: Thu May 02, 2024 3:32 pm    Post subject: Re: enp1s0 changed to eno0 Reply with quote

engineermdr wrote:
Problem 1: I discovered the internal network port enp1s0 is now named eno0. When did that happen?
Shortly after boot. The device is created with its canonical name of eth0, then systemd-udevd renames it to a Predictable Network Interface Name (which is generally much less predictable than the obvious eth0).
engineermdr wrote:
Why did that happen?
This is a systemd-udevd default, if you do not specifically tell it not to mangle your network interface name.
engineermdr wrote:
My kernel is 5.10.93 compiled Jan 31, 2022, and I'm almost certain I've rebooted since installing it, so I doubt it's the kernel. I did have to transition away from eudev, was that it?
That could be it, yes. It is possible that eudev either had forked from a version that had a different default mangling scheme, or that the migration changed a configuration setting to use a different mangling scheme.
engineermdr wrote:
So now I want to avoid this ever again. I think I have 3 options:
Option 4: get an Uninterruptible Power Supply, and stop having unplanned reboots. ;)
engineermdr wrote:
1. Prevent the renaming and revert to eth1 and eth0. However, I'm worried they might switch places someday.
Yes, that is a risk, especially if they are the same model card. I've never had that happen in any of my dual-Ethernet systems, but I am not aware of any guarantees that it can never happen.
engineermdr wrote:
2. Force the renaming somehow myself, if that's possible and I believe it is
With the right udev rule, yes, you can assign a name of your choosing.
Back to top
View user's profile Send private message
engineermdr
Guru
Guru


Joined: 08 Nov 2003
Posts: 304
Location: Altoona, WI, USA

PostPosted: Thu May 02, 2024 3:55 pm    Post subject: Reply with quote

Yes, the uninterruptible power supply is an excellent suggestion. Thanks, I will look into that.

I should probably also get into the habit of rebooting immediately after updates on this important machine so I'm not so surprised when reboots do happen - they are always at the worst time.
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