chiris
February 21, 2025, 9:06am
1
Hi all, I have a problem, I can't give my Raspberry Pi 4 a static IP address
I follow all the instructions online to do this, but then I get a blank screen
I can't see anywhere where I can set my DHCP address to a static IP address
Does anyone have any idea where this could be, because I want to install Pi-Hole on my Raspberry Pi 4
But then I want to be able to set a static IP address
I am using Raspberry Pi OS Lite 64 bit Where there is no user interface
This isn't a Pi-hole issue.
You have two options to set a fixed IP address for a given device's network interface:
a) configure a fixed IP / DHCP lease reservation for a device in your router's DHCP server
b) manually configure a static IP on your machine, by using whatever network management tool your OS on that machine favours
You'd have to consult your router's and OS's documentation and support on how to achieve that.
nero355
February 21, 2025, 7:23pm
3
I have configured SystemD-NetworkD a while ago like this :
# nano /etc/systemd/network/1-eth0.network
with this content :
[Match]
Name=eth0
[Link]
RequiredForOnline=yes
RequiredFamilyForOnline=ipv4
ActivationPolicy=up
[Network]
Description=Main Interface
LinkLocalAddressing=ipv6
IPv6LinkLocalAddressGenerationMode=eui64
LLMNR=false
DNSOverTLS=false
DNSSEC=false
LLDP=true
EmitLLDP=true
#DNS=127.0.0.1
DNS=8.8.8.8
# I switch between these two DNS Servers depending on how the Pi-Hole update goes...
Domains=home.lan
DNSDefaultRoute=true
NTP=ntp.ubuntu.com
IPv6AcceptRA=false
[Address]
Scope=global
Address=192.168.1.3/24
[Route]
Gateway=192.168.1.1
Destination=0.0.0.0/0
Source=192.168.1.3
Scope=global
I am sure you can copy > paste this and then run
systemctl restart systemd-networkd
to have a Static IPv4 Address for your Raspberry Pi
system
Closed
March 14, 2025, 7:24pm
4
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.