This question already has an answer here:
I am trying to change the MAC address of my device. I tried the
ifconfig way as well as the
macchanger tool way. However although the MAC address changes on interface
eth0. I do not get a DHCP based IP address. When I tried a
nework-manager restart, then the old
eth0 MAC is assigned and I get an IP.
Is there a way to get an IP based on my new random MAC?