Every time I restart my raspberry pi the MAC address changes. Due to this, while connecting remotely I have to hunt for its new IP.
4 Answers
If you decide you want to keep NetworkManager, it looks like this solution might work:
Found a post on the rpi forums. Apparently NetworkManager can randomize your mac to make it harder to people to snoop on traffic.
Here is a blog post on how to turn it off. https://blog.muench-johannes.de/networkmanager-disable-mac-randomization-314 in case it goes down:
To disable the MAC address randomization create the file
/etc/NetworkManager/conf.d/100-disable-wifi-mac-randomization.confwith the content:
[connection] wifi.mac-address-randomization=1 [device] wifi.scan-rand-mac-address=no
Alternatively, see this other question.
- 347
- 2
- 9
I had the same issue and realised it is because you have two different MAC addresses
- one for the wifi
- one for the ethernet
You can check your MAC address with
ifconfig
in the console. look for the info ether for wlan0 and eth0
- 101
- 1
While I agree that the MAC SHOULD not change (except during search, where most manufacturers use a random MAC) you really don't need to know the IP address. (I don't know the IP addresses of my 7 Pi or dozen or so computers on my local network.)
It is simple to connect without knowing IP and also to find the IP address. See https://raspberrypi.stackexchange.com/a/96215/8697
- 62,573
- 32
- 113
- 225
I had the same issue. I found (I don't know how) Network Manger had been installed. Removed it. All now ok.
- 11