The officially official Devuan Forum!

You are not logged in.

#1 2024-11-11 15:12:44

chomwitt
Member
Registered: 2019-09-24
Posts: 129  

Setting static ip on Devuan

One common case in my home is setting static ip in order to setup
nfs shares on client PCs.
I prefer cabled ethernet lan.

More recenty i tried to set static ip in a devuan(daedalus)+xfce pc.

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.30
netmask 255.255.255.0
gateway 192.168.1.1

Now i try to restart networking either from the xfce panel or the command line.
Not being experienced in runit i checked for relative network service under runit but couldnt find something:

$ less /etc/network/interfaces

$ sudo sv status /etc/service/*

So i tried with:

$ sudo /etc/init.d/networking restart

But that didnt worked either so i rebooted and then i got static ip.

$ sudo ip addr show

So my question is : do i have to reboot ?

Last edited by chomwitt (2024-11-11 15:13:33)


Devuan(Chimaera)(Daedalus)  DS+WM: XorgX11server+StumpVM

Offline

#2 2024-11-11 16:06:00

Dutch_Master
Member
Registered: 2018-05-31
Posts: 285  

Re: Setting static ip on Devuan

Yes.

Having said that, your router can set (or at least should be capable of setting) semi-static IP addresses if you configure it to match certain MAC addresses to specific IP addresses. I do too and NFS should work (it did on previous iterations but currently no NFS share available due to the server being offline for financial stuff tongue )

Offline

#3 2024-11-11 18:26:58

chomwitt
Member
Registered: 2019-09-24
Posts: 129  

Re: Setting static ip on Devuan

Thank a lot Dutch_Master. I wasnt aware of dhcp reservation of IPs. Indeed in my adsl gateway is called DHCP binding
but also 'leased ip' seems a good term.

But why i have to reboot ? Is that due to linux or runit ?

Last edited by chomwitt (2024-11-11 18:57:39)


Devuan(Chimaera)(Daedalus)  DS+WM: XorgX11server+StumpVM

Offline

#4 2024-11-11 20:43:46

Dutch_Master
Member
Registered: 2018-05-31
Posts: 285  

Re: Setting static ip on Devuan

From what I understand, it's a kernel thing. I'm not familiar with the particulars, but rebooting is never a bad option in such cases.

Last edited by Dutch_Master (2024-11-11 20:43:54)

Offline

#5 2024-11-11 23:12:09

alexkemp
Member
Registered: 2018-05-14
Posts: 357  

Re: Setting static ip on Devuan

There is one main route that requires a reboot, and that is following install of a new kernel. The kernel will need installing at bootup (the only time it gets installed) and the process to that requires an initramfs, which makes a setup from RAM & at the end loads the kernel, etc., etc. initramfs is always specific to a specific kernel.
Here is some user-level info on the setup device:

dpkg -l initramfs-toolss
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name            Version       Architecture Description
+++-===============-=============-============-================================>
ii  initramfs-tools 0.142+deb12u1 all          generic modular initramfs genera

Online

Board footer