how to make ip static

Hi everybody,
which is the right command to make the Dietpi IP static?

use dietpi-config to change network option from DHCP to STATIC

1 Like

Thanks :wink:

Sorry to revive an old thread, but I don’t see any network options to change from DHCP to STATIC under dietpi-config->network options: adapters or dietpi-config->network options: misc. Using dietpi64 (latest stable as of 8/14/2023) on RPi 3B hardware.

You need to select Ethernet or WiFi adapter.

@Joulinar
Hey, Changing DHCP to static causes DNS issues for me.
I get there’s no upstream resolver configured when I can see that in /etc/resolv.conf.

I have tailscale also installed, so the DNS is pointed to their DNS.

Can you help me out with this.

Also, when using DHCP, I am unable to get a address from an openWrt router, unless i reboot or manually reconnect the lan cable. (This is after whole system reboot, meaning the router also booted along with dietPi device).

for testing, can you set STATIC IP, reboot your system and share content of /etc/resolv.conf. Maybe the file is overwritten by another process

I assume that the SBC is simply online earlier than the OpenWRT router. This means that the SBC is not assigned an IP via DHCP. Theoretically, however, the SBC should still get an IP after a while. Of course, this could be avoided with a STATIC IP.