5

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.

modeset
  • 347
  • 2
  • 9
RiteshC
  • 179
  • 1
  • 4

4 Answers4

11

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.conf

with the content:

[connection]
wifi.mac-address-randomization=1

[device]
wifi.scan-rand-mac-address=no

Alternatively, see this other question.

modeset
  • 347
  • 2
  • 9
0

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

0

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

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

I had the same issue. I found (I don't know how) Network Manger had been installed. Removed it. All now ok.

Pete M
  • 11