Changing MAC address disconnects Wi-Fi

I am using OpenSUSE 13.2 with kernel 3.16.7-21-desktop x86_64. I am trying to change the MAC address of my system by using the following commands:

ifconfig | grep HWaddr
ifconfig wlp2s0 down
macchanger -r wlp2s0
ifconfig wlp2s0 up

This is changing the MAC address but as soon as the MAC address is changed, it disconnects from my Wireless network. When it connects back to the network, the MAC address reverts back to the original address.

Any ideas how I can prevent this from happening?

Well, of course that happens.

If you are using “wicked” to set up the network, then you should check if there is a wicked setting to specify the MAC address for the device. If using NetworkManager, check if NetworkManager has a setting. I doubt that either has a setting, but that’s where you have to check.

The remaining option is to configure the interface manually. And that can be tricky for WiFi.

I was using “Terminal” to change “MAC address”. I also used ‘Network Manager’ to change MAC address using “Cloned Address” field. But the moment, I change the MAC address in ‘Cloned Address’ field, it disconnects from the Wi-Fi network. I even restarted the system and it wasn’t connecting back to the network. It was only after I deleted the ‘Cloned Address’ field that it connected back to the network automatically.

[QUOTE=nachos;2721347]But the moment, I change the MAC address in ‘Cloned Address’ field, it disconnects from the Wi-Fi network.[/QUIT]
The connection is tied to the MAC address. Network frames carry the MAC address of source and destination. As soon as you change MAC address, what you send out stops being recognized by all other systems on the network.

I even restarted the system and it wasn’t connecting back to the network.

The system tried to re-establish the existing DHCP lease. But that lease is only valid for the old MAC address.

You could try setting the router to short lease times. Then, after you change the MAC address in NetworkManager settings, wait until the lease time has expired before you try to reconnect.

Or perhaps it would work to delete the saved DHCP information (I think that’s in “/var/lib/NetworkManager”), and then immediately reboot (to eliminate possible cached information).

You don’t give the full details of your setup but some routers are configured to serve only one MAC address. So, if the router detects a change in the MAC address, it will drop the signal. If your Wi-Fi is connected to your router in such a way that it can detect the change in the MAC address, that may be the problem.

How do I figure that out? Is there some help for me to start looking on how to get about this? I am a newcomer and am not armed with an array of information at my disposal.

Thanks

I am sorry but, if you are a newcomer, you certainly shouldn’t be changing the MAC address of anything. The best way to move forward is to restore everything to its original state.