Ethernet mac address resets when cable unplugged

Bug #1116421 reported by Andrew Ho
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm not exactly sure if this is a network-manager bug, but if not perhaps you could point me in the right direction (or tell me how to find out what the right direction is)..
A friend running 12.10 and myself running 12.04.1 both experienced the same problem.

Using the following series of commands to change the ethernet MAC address works fine under some specific circumstances:
ifconfig eth0 down
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
ifconfig eth0 up

If there is a wired connection defined in the network-manager gui (click the wireless signal-> Edit Connections...) and there is a Cloned Mac Address defined in there, the MAC address of eth0 WILL REVERT to it's original (hardware) MAC address upon connection of an ethernet cable. This is very strange and frustrating. In order for the above MAC address changes to take effect, there needs to be nothing filled in with the GUI.

Second issue (I guess it is related) is that if everything is working correctly, the MAC address WILL REVERT to it's original (hardware) MAC address upon DISconncetion of the ethernet cable.

Perhaps I am doing something horribly, horribly wrong here, but it's frustrating and hours of searching the forums have not given me any indication of the correct place/time to change MAC address. If network-manager does not want to respect the changes I have requested, then it should at least provide a functioning, documented alternative method in order to make the same change.

What I would expect:
Changing the MAC address of eth0 using the network-manager gui will actually change the MAC address everytime the interface is brought up.

Current workaround:
In /etc/rc.local, run the above commands for changing hardware address
In /etc/network/if-post-down.d/ create a script that will sleep for 5 seconds and then run the above commands.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: network-manager 0.9.4.0-0ubuntu4.2
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Uname: Linux 3.2.0-29-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
Date: Tue Feb 5 08:15:48 2013
IfupdownConfig:
 auto lo
 iface lo inet loopback
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120823.1)
IpRoute:
 default via 192.168.1.254 dev wlan0 proto static
 169.254.0.0/16 dev wlan0 scope link metric 1000
 192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.65 metric 2
MarkForUpload: True
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
ProcEnviron:
 LANGUAGE=en_CA:en
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
SourcePackage: network-manager
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.NetworkManager.NetworkManager.conf: 2013-02-03T13:48:28.620664
nmcli-con:
 NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT READONLY DBUS-PATH
 BattlecruiserOperational 61ddc2db-76fa-4c7e-9b11-fc68440e8a47 802-11-wireless 1360080712 Tue 05 Feb 2013 08:11:52 AM PST yes no /org/freedesktop/NetworkManager/Settings/1
 magiclab f1b348f9-ff96-4729-b690-dcdb69c729e5 802-11-wireless 1360014380 Mon 04 Feb 2013 01:46:20 PM PST yes no /org/freedesktop/NetworkManager/Settings/7
 ubcsecure a141ff8b-b47f-47a4-81be-c01335b9aa0a 802-11-wireless 1360034251 Mon 04 Feb 2013 07:17:31 PM PST yes no /org/freedesktop/NetworkManager/Settings/6
 Wired connection 1 e54ce990-cd66-461c-8343-60f4f099b7ec 802-3-ethernet 1360034239 Mon 04 Feb 2013 07:17:19 PM PST yes no /org/freedesktop/NetworkManager/Settings/5
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 wlan0 802-11-wireless connected /org/freedesktop/NetworkManager/Devices/1
 eth0 802-3-ethernet unavailable /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 running 0.9.4.0 connected enabled enabled enabled enabled enabled

Revision history for this message
Andrew Ho (andrew-kenneth-ho) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Patrick Schleizer (adrelanos) wrote :

This bug needs to be forwarded to, reported upstream against Network Manager (NM) otherwise chances that it will ever get fixed are even lower if it is only reported here.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.