My raspberry pi keeps randomly changing its ip adress from 10.255.45.90 to 10.255.47.90. To counter this I wanted to set a static ip adress but when following this tutorial (https://www.makeuseof.com/raspberry-pi-set-static-ip/) I found that it has two DNS IP adresses in /etc/resolv.conf. Could this be the reason for the changing IP adresses? Now I'm unsure which address to pick for the configuration or if it's even possible. Did someone already encounter something like this?
Asked
Active
Viewed 262 times
1
-
This does not happen by chance. You must have configured this as you were experimenting. Perhaps re-install and leave the system at the defaults. – joan Jan 19 '23 at 12:07
-
I'm pretty sure I never experimented with the network connections and I have two other raspberry pis in the network that were not set up by me and they also have the double DNS IP address. All of them are in a company network. I guess that could be the reason? – Julia Jan 19 '23 at 12:13
-
If its a company network, contact the NOC or network admin. And please add the network mask since 10.255.45.90 or 10.255.47.90 can be a valid IP depending on the subnetmask and DHCP settings. – MatsK Jan 19 '23 at 16:27
-
Welcome -- but the DNS server addresses have nothing to do with the Pi's own address. They are addresses of external servers used to do DNS lookups. They are usually set during DHCP lease negotiation to values supplied by the router. WRT trying to set a static IP see https://raspberrypi.stackexchange.com/q/37920/5538 There is not enough information here for anyone to be helpful beyond that. – goldilocks Jan 19 '23 at 19:54
-
You've asked a reasonable question, but as others have noted you've not supplied enough information for anyone to answer the question without making lots of assumptions. Please edit your question, and it will be considered for re-opening. You might start by telling us what OS your RPi is running. N.B. if it's on a "company network", it's very possible you will not be allowed to use a fixed IP of your own choosing. – Seamus Jan 19 '23 at 21:18