this post was submitted on 24 Dec 2023
17 points (90.5% liked)

Linux

48200 readers
871 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi all :)

Apologies for the long writeup, but I'm not sure if the background is important or not.

I've got a media server currently running Xubuntu (getting ready to be transitioned to a proper server OS before anyone asks), and I've been having a problem with static IP addresses.

About a year ago I was having a problem with the ethernet card switching from a static IP to DHCP, and screwing up the services that depended on the IP address. It appeared to be a problem with my ISP router (BT SmartHub 2). I thought I'd fixed it, and didn't have any trouble for a while.

I added a second ethernet card to split my traffic. My VPN doesn't allow split tunneling on Linux, and I wanted some traffic to go through the VPN while some bypassed it. I hadn't set anything up for that yet, but did give the second ethernet card a static IP address. I changed the DNS servers on both to go through my AdGuard installation on the same machine, and some other ad blocking DNS servers.

When I first installed the second ethernet card I had a few problems, but my network switch died at the same time, and replacing it appeared to cure the issues. The issues were similar to before, in that I couldn't get a static IP to stick.

To now - Last night we were having some power issues in the area, power surges and brownouts. In the time that it took me to get to my PC and log in to the media server to shut it down, it had rebooted at least three times. I shut everything down successfully, and after I turned everything back on this morning, the services like Plex that don't need the IP all seemed to be working properly.

After my kid went to bed, I tried to log onto the server to check it. Nothing that needed the IP address would work. I tried the second IP address and that was the same. I managed to log in with NoMachine and saw that there were two new ethernet connections, both set to DHCP, and they were being used instead of the previous connections. The previous connections apparently haven't been used for the last six days.

I tried deleting one of the new connections to see if it would force Xubuntu to use the old ones, and it seemed to work, but deleting the second one cut off the network connections completely. After connecting a monitor and peripherals to the server, I could see an option for an Auto Connection in the network dropdown menu, and that let me connect again.

My previous connections are still in the network manager with all the static IP settings, but there are two new Auto Ethernet connections too, using DHCP.

Can anyone give me a clue as to what's happened here please? I thought it was a problem caused by the power problems, but it's apparently been going on for almost a week.

Apologies in advance if I'm slow to reply for the next few days, and thank you in advance for any help :)

you are viewing a single comment's thread
view the rest of the comments
[–] pete_the_cat@lemmy.world 2 points 10 months ago (1 children)

Glad that helped you, they shouldn't be changing since the names are based on their location in the PCI bus instead of being generic (eth0, eth1, etc..). IIRC you can specify udev rules to name the devices what you want using UUIDs or something that way you'll always know what they're called. I'd suggest reading about Ethernet device naming in Linux if you want to know more.

[–] Tippon@lemmy.dbzer0.com 1 points 10 months ago (1 children)

I've always dealt with names like eth0 and eth1 in the past, but now I'm only getting enp2s0 and enp5s0. I assumed that it was something that had changed over the last few years that I hadn't noticed, but I'll look into it further. Thanks :)

[–] pete_the_cat@lemmy.world 2 points 10 months ago

Yeah,Persistent Device Naming became mainstream a few years back.