lipkerson
Posts: 3
Joined: Thu May 13, 2021 8:05 am

Network manager problem. After reboot another eth0 is created

Thu May 13, 2021 8:15 am

I use LTE mobile modem to get internet. I wanted to share it via a LAN cable. To simplify network administration i installed network maneger. Couple of clicks in NM connection editor and it works fine. I used script to automatically connect to mobile network after reboot. I changed Ethernet connection eth0 in ipv4 to "shared with others computers". Then I made the connection down and up and it is OK.

Problem starts after reboot. Another eth0 "manual" is created. And this new eth0 is the default and active. I need to put down the new connection and up my old. And only that works.

How to prevent creating a new eth0 after reboot? Or if it's a normal situation - how to make that new eth0 with "shared with others computers" by default ?

My configuration : In NetworkManager.conf i changed "managed" from false to true to obtain control over networking:

Code: Select all

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=true
In etc/Network/interfaces i deleted all except:

Code: Select all

hereauto lo
iface lo inet loopback
I have a feeling that i have 2 software trying to manage my network preferences.

please help - with regards , L

epoch1970
Posts: 6471
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Network manager problem. After reboot another eth0 is created

Thu May 13, 2021 3:09 pm

Which OS? Raspios?
In Raspios, IP configuration is handled by dhcpcd.
I'm guessing you'd need to disable it after having installed Network Manager.
Make sure you can have local access to the machine if network stops working altogether.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

lipkerson
Posts: 3
Joined: Thu May 13, 2021 8:05 am

Re: Network manager problem. After reboot another eth0 is created

Sun May 16, 2021 11:46 am

Hi

I stopped dhcpcd and then I disabled it. After reboot dhcpcd service was dead but new eth0 connection still is creating. So that didn't helped.
Finally I removed all packages apt-get remove dhcpcd* but after reboot still is the same: new eth0 is created.


I use:
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian

uname -a:
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l

fruitoftheloom
Posts: 26813
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Network manager problem. After reboot another eth0 is created

Sun May 16, 2021 12:16 pm

lipkerson wrote:
Sun May 16, 2021 11:46 am
Hi

I stopped dhcpcd and then I disabled it. After reboot dhcpcd service was dead but new eth0 connection still is creating. So that didn't helped.
Finally I removed all packages apt-get remove dhcpcd* but after reboot still is the same: new eth0 is created.


I use:
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian

uname -a:
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l

Raspbian Jessie is no longer supported, currently we have RaspiOS Buster and Bullseye is forthcoming:

https://www.raspberrypi.org/software/
The information is out there....you just have to let it in.

My other Linux machines: ChromeBox
https://www.aliexpress.com/item/32966393971.html
& Stone Desktop Intel CoreDuo circa 2010

lipkerson
Posts: 3
Joined: Thu May 13, 2021 8:05 am

Re: Network manager problem. After reboot another eth0 is created

Tue May 18, 2021 2:24 pm

OK, I installed new OS buster on my sd card. It seems that after installing the problem is solved.
After reboot no additional eth0 is created. Better repair then reinstall is not in that particular case :)

Using Network manager, should I deactivate dhcpcd or something else ?

buchalvi
Posts: 28
Joined: Thu Mar 04, 2021 12:24 pm

Re: Network manager problem. After reboot another eth0 is created

Wed May 19, 2021 2:20 pm

Just a very crude and ugly suggestion. :D
Disable/Mask the dhcpcd service and reboot; if everything works fine then you can get rid of dhcpcd. :)
\/
Want to Transform an RPi board into a secure router?

Want to try an alternative OS to OpenWrt?

Try
https://www.github.com/mahsank/pi-router
\/

bls
Posts: 1447
Joined: Mon Oct 22, 2018 11:25 pm
Location: Seattle, WA

Re: Network manager problem. After reboot another eth0 is created

Wed May 19, 2021 2:29 pm

Last time I looked at Network Manager (either on Stretch or Buster, can't remember which...darn CRS), it by default changed the eth0 MAC address. There's a setting to disable that, which you may want to look into if this causes you issues.

And yes, disable/mask dhcpcd and reboot if you're using NM. There can only be one of them active at any one time managing a network device.
Pi tools:
Quickly and easily build customized-just-for-you SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure strongSwan VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo

Return to “Networking and servers”