The officially official Devuan Forum!

You are not logged in.

#1 2019-10-28 17:01:47

e97
Member
Registered: 2019-07-06
Posts: 8  

eth0 losing static ip

cat /etc/network/interfaces

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
#network 192.168.1.0
gateway 192.168.1.1

allow-hotplug enx0042
#auto enx0042
iface enx0042 inet dhcp

after about 24 hours, eth0 switches to a dynamic ip

is this not the proper way to set a static ip on devuan beowulf ?

Offline

#2 2019-10-29 00:38:08

aut0exec
Member
Registered: 2018-11-21
Posts: 81  

Re: eth0 losing static ip

Had this problem when network manager is installed on the system. NM likes to randomly start controlling the NIC. You're supposed to be able to issue:

nmcli device set <ethX> managed no

In practice it rarely stays consistent and in theory NM isn't supposed to be managing stuff in the interfaces file either. I usually resort to adding the following in

/etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[keyfile] 
unmanaged-devices=interface-name:eth0

Then restart network-manager and networking. The output of nmcli should state that the interface is no "unmanaged".

root@Devuan:~# nmcli
eth1: unavailable
	"Broadcom Limited NetXtreme BCM5755 Gigabit Ethernet PCI Express"
	ethernet (tg3), DE:AD:BE:EF:00:01, hw, mtu 1500

eth0: unmanaged
	"Realtek RTL8169 PCI Gigabit Ethernet Controller (GA311)"
	ethernet (r8169), CA:FE:C0:FF:EE:01, hw, mtu 1500

lo: unmanaged
	loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

****EDIT*****
My preferred route is to just remove network manager all together with

apt purge network-manager

big_smile

Last edited by aut0exec (2019-10-29 00:39:41)

Offline

#3 2019-10-29 13:19:50

e97
Member
Registered: 2019-07-06
Posts: 8  

Re: eth0 losing static ip

thanks @aut0exec ! I suspected it was another network control manager but couldn't figure out what it was. Its disabled and removed.

Reset dnsmasq as well because I probably misconfigured it resulting in a conflict with my router. 

With those changes, everything seems good.

Offline

#4 2019-10-30 17:32:47

bbatten
Member
Registered: 2017-07-02
Posts: 54  

Re: eth0 losing static ip

FWIW, I find that wicd *does* leave uncommented /etc/network/interfaces entries alone. It has its own idiosyncracies, but that's not one of them.

Offline

#5 2019-11-06 00:56:54

aut0exec
Member
Registered: 2018-11-21
Posts: 81  

Re: eth0 losing static ip

e97 wrote:

thanks @aut0exec ! I suspected it was another network control manager but couldn't figure out what it was. Its disabled and removed.

Reset dnsmasq as well because I probably misconfigured it resulting in a conflict with my router. 

With those changes, everything seems good.

No problem and glad all is well!

Offline

Board footer