Can't Set Up Static IP on 4 Model B

November 13, 2023, 19:26

thecultofra

does anyone know why I can't set a static ip on my raspberry pi 4B? I'm runnig bookworm and using LITE so no gui /etc/dhcpcd.conf: interface eth0 static ip_address=192.168.1.3/24 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 /boot/cmdline.txt: console=serial0,115200 console=tty1 root=PARTUUID=a54f8212-02 rootfstype=ext4 fsck.repair=yes rootwait net.ifnames=0

thecultofra

so I managed to get it to a static ip but when I ping the hostname it looks for it at the old ip

null

This is probably due to the DHCP of the router. DHCP and Static IP are not compatible. It is better to set the IP in the router to Static or in your DHCP server, if you have one.

thecultofra

hmm gotcha