Bug 619246 - Change mac addr through MAC Address item in device manager does not work
Change mac addr through MAC Address item in device manager does not work
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virtio-win (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Yan Vugenfirer
Virtualization Bugs
: RHELNAK
Depends On:
Blocks: 580953
  Show dependency treegraph
 
Reported: 2010-07-28 23:05 EDT by Shirley Zhou
Modified: 2015-03-04 19:51 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-17 08:36:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shirley Zhou 2010-07-28 23:05:01 EDT
Description of problem:
Change mac addr through MAC Address item in device manager does not work

Version-Release number of selected component (if applicable):
virtio-win-1.1.8-0

How reproducible:
always

Steps to Reproduce:
1.Start windows guest with virtio network
/usr/libexec/qemu-kvm -m 4G -smp 4 -cpu qemu64,+x2apic -usbdevice tablet -drive file=/mnt/win7x64-s1.qcow2,if=none,id=drive-virtio0,boot=on,werror=stop,rerror=stop,cache=none,format=qcow2 -device virtio-blk-pci,drive=drive-virtio0,id=virtio-blk-pci0 -netdev tap,id=hostnet0,script=/etc/qemu-ifup,vhost=on,ifname=virtio_nic_1 -device virtio-net-pci,netdev=hostnet0,mac=02:00:78:3F:20:1f,bus=pci.0,id=virtio1  -uuid 1234127c-8765-4e67-95da-8dd0a8891cc4 -name win08r2 -qmp tcp:0:4445,server,nowait   -device virtio-balloon-pci,id=ba1 -monitor stdio -vnc :1
2.Check ipaddr and mac addr using ipconfig /all
Ethernet adapter Local Area Connection:



   Connection-specific DNS Suffix  . : nay.redhat.com

   Description . . . . . . . . . . . : Red Hat VirtIO Ethernet Adapter

   Physical Address. . . . . . . . . : 02-00-78-3F-20-1F

   DHCP Enabled. . . . . . . . . . . : Yes

   Autoconfiguration Enabled . . . . : Yes

   Link-local IPv6 Address . . . . . : fe80::b0df:e7d7:1128:3274%11(Preferred)

   IPv4 Address. . . . . . . . . . . : 10.66.91.38(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.255.0

   Lease Obtained. . . . . . . . . . : Thursday, July 29, 2010 1:43:00 AM

   Lease Expires . . . . . . . . . . : Thursday, July 29, 2010 3:43:00 AM
3.Type new mac addr, like "0032345a3f12" to MAC Address Value text box from device manager
4.Click on OK
5.Disable virtio network, then enable it
6.Check ipaddr and mac addr using ipconfig /all again
   Connection-specific DNS Suffix  . : nay.redhat.com

   Description . . . . . . . . . . . : Red Hat VirtIO Ethernet Adapter

   Physical Address. . . . . . . . . : 02-00-78-3F-20-1F

   DHCP Enabled. . . . . . . . . . . : Yes

   Autoconfiguration Enabled . . . . : Yes

   Link-local IPv6 Address . . . . . : fe80::b0df:e7d7:1128:3274%11(Preferred)

   IPv4 Address. . . . . . . . . . . : 10.66.91.38(Preferred)

   Subnet Mask . . . . . . . . . . . : 255.255.255.0

   Lease Obtained. . . . . . . . . . : Thursday, July 29, 2010 1:45:41 AM

   Lease Expires . . . . . . . . . . : Thursday, July 29, 2010 3:45:42 AM

  
Actual results:
After step6, we find the mac addr does not change to new value.

Expected results:
The mac addr should be changed to new mac.

Additional info:
Comment 2 RHEL Product and Program Management 2010-07-28 23:27:32 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 3 Yan Vugenfirer 2010-08-17 08:36:04 EDT
This is not a bug.

The driver tests if the MAC address apply to the rules of the MAC addresses (this driver behavior is also tested by the WHQL). If the MAC address is invalid - you should see "WARNING: Invalid MAC address ignored" printout in debug space (can be view by DbgView.exe application down-loadable from MS).

If you set the address through device manager it should be set according to the locally administered addresses rules:

Universally administered and locally administered addresses are distinguished by setting the second least significant bit of the most significant byte of the address. If the bit is 0, the address is universally administered. If it is 1, the address is locally administered.

Other rules apply too - no empty or broadcast addresses.


Here is validation function for future reference:
BOOLEAN ParaNdis_ValidateMacAddress(PUCHAR pcMacAddress, BOOLEAN bLocal)
{
	BOOLEAN bLA = FALSE, bEmpty, bBroadcast, bMulticast = FALSE;
	bBroadcast = ETH_IS_BROADCAST(pcMacAddress);
	bLA = !bBroadcast && ETH_IS_LOCALLY_ADMINISTERED(pcMacAddress);
	bMulticast = !bBroadcast && ETH_IS_MULTICAST(pcMacAddress);
	bEmpty = ETH_IS_EMPTY(pcMacAddress);
	return !bBroadcast && !bEmpty && !bMulticast && (!bLocal || bLA);
}

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