Bug 751965 - Changing MAC Address in device manager does not work
Summary: Changing MAC Address in device manager does not work
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virtio-win
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Yvugenfi@redhat.com
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-08 07:37 UTC by Mike Cao
Modified: 2011-11-14 10:15 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-13 14:24:33 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Mike Cao 2011-11-08 07:37:36 UTC
Description of problem:
change the netkvm properties "MAC Address" to "00:00:00:1a:1B" ,then I found the mac address does not change after using #ipconfig -all 


Version-Release number of selected component (if applicable):
virtio-win-1.4.0-1.el6

How reproducible:
100%

Steps to Reproduce:
1.start guest w/ virtio-net-pci
eg: <CLI》 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:42:0b:01
2.in the device manager ,right-click Redhat virtio Ethernet Adapater-->properties-->Advanced
3.change the value of Mac Address to "00:00:00:1A:1B:1C"
4.save it and reboot the guest 
5,in cmd ,#ipconfig -all
  
Actual results:
the MAC Address still remains 00:1a:4a:42:0b:01 which specified in the qemu-kvm CLI

Expected results:
The MAC Address should change to "00:00:00:1A:1B:1C“


Additional info:

Comment 1 Yvugenfi@redhat.com 2011-11-08 07:58:35 UTC
"00:00:00:1A:1B:1C“ does not have "locally administered" bit set and thus was rejected. There was already such BZ open. Please check that you are entering valid mac address and it must have "locally administered" bit set when setting from inside the guest. Invalid mac adress will be rejected.  

Also in DbgView you should see printout - "WARNING: Invalid MAC address ignored" if the mac is invalid or "WARNING: MAC address reloaded" if mac is OK.

http://en.wikipedia.org/wiki/Organizationally_Unique_Identifier#Format

Comment 2 Mike Cao 2011-11-08 09:07:44 UTC
Tried with IP "52:54:00:02:9a:8f" (the 2nd bits in second nibble of the first octet is 1),still hit this issue .

Yan,any sugguestions ?

Best Regards,
Mike

Comment 3 Mike Cao 2011-11-09 09:26:55 UTC
Re-open this issue according to comment #2, 
Pls provide QE a valid MAC address if this is not a bug 

Thanks,
Mike

Comment 4 Yvugenfi@redhat.com 2011-11-10 14:58:37 UTC
I got to the bottom of the problem.
In driver we are using NdisReadNetworkAddress (http://msdn.microsoft.com/en-us/library/windows/hardware/ff564512%28v=vs.85%29.aspx) function that read for us MAC address entered by user. Actually we are using standard MS interface for defining parameters that are shown in advanced tab and latter on reading them in driver.

NdisReadNetworkAddress function expects the mac address either to be with out delimiters (525400029a8f) or with hyphen as delimiter (52-54-00-02-9a-8f) - in both such cases driver will accept the new value.

In case of 52:54:00:02:9a:8f - NdisReadNetworkAddress will return garbage that the driver will reject.

Please verify MAC address assignments in both acceptable ways. Also documentation is needed similar to - http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008473 - pay attenchion to bullet number 6: "Enter the desired MAC address without the colons (:). ".

Comment 5 Mike Cao 2011-11-11 03:33:35 UTC
(In reply to comment #4)
> I got to the bottom of the problem.
> In driver we are using NdisReadNetworkAddress
> (http://msdn.microsoft.com/en-us/library/windows/hardware/ff564512%28v=vs.85%29.aspx)
> function that read for us MAC address entered by user. Actually we are using
> standard MS interface for defining parameters that are shown in advanced tab
> and latter on reading them in driver.
> 
> NdisReadNetworkAddress function expects the mac address either to be with out
> delimiters (525400029a8f) or with hyphen as delimiter (52-54-00-02-9a-8f) - in
> both such cases driver will accept the new value.
> 

Hi, Yan 

Changing the MAC with local "locally administered" bit and w/o colons works ,thanks .

bcao--->Ronen

Hi, Ronen 

Pls view comment #4 and comment #1 ,Need we add this to kbase or somewhere ?

Best Regards,
Mike

Comment 7 Mike Cao 2011-11-13 14:24:33 UTC
Based on comment #5 ,close as notabug

Comment 8 Yvugenfi@redhat.com 2011-11-14 10:15:29 UTC
I would add it to some KB.


Note You need to log in before you can comment on or make changes to this bug.