Static IP address for the raspberry Pi suddenly changed

February 16, 2024, 10:22

overlordma

I have been using a raspberry pi4b connected with my mobile hotspot since i travel a lot , the static ip address worked well for a month and today when i tried to connect with the vnc it didn't connect , when i checked connecting to the monitor the ip address was changed and the edits that i did on the dhcpcd using nano was removed. Did anyone found this kind of issue , any solutions for it, or can anyone share a suitable guidelines to follow as i am new to raspberry pi .

overlordma

the issue was the same when i checked another raspberry pi 4b

overlordma

we often connect our phones to university wifi and then use wifi tether to connect lapotp and raspberry pi to the mobile hotspot

oops.se

And please add info that could get you assistance. - What OS ? cat /etc/os-release - How did you configure the static IP - And do you know that you can use the hostname instead of a IP ?

overlordma

i don't know about the hostname to connect

overlordma

I actually went to sudo nano /etc/dhcpcd.conf

overlordma

then used

overlordma

interface wlan0

inwamos

Follow the official documentation for this case

overlordma

then went on putting static ip_address , static routers , static domain_name

overlordma

the os is 64bit debian bookworm

oops.se

But Bookworm uses "Network Manager" not dhcpcd.

oops.se

And your hostname, echo $HOSTNAME