We are using MAC addresses to identify PCs as licensed to run software. (Don't care about MAC spoofing; licenses are hard to get :) PCs may have multiple Ethernet controllers (we also don't worry about the case where there isn't one; we haven't met such a machine in 5 years), and so there's a problem with reliably choosing a stable one.
I thought we had this nailed but apparantly not. We use GetAdaptersInfo from the Microsoft SDK iphlpapi module, and walk down the list. We use the last adapter in the as presumably it is the motherboard Ethernet controller. Alas, we've run into a Thinkpad that appears to change which controller is last depending on whether it is docked or not.
Is there a way to reliably find the MAC address for the motherboard Ethernet controller on a system, if it exists? And for those motherboards that have 2 or more, choose one of them that is stable? [If I knew that a set were motherboard-based, I can easily pick the lowest address MAC].
Add Static MAC Address. Navigate to Switch -> Port Security -> Port Security -> Port Security Interface Config. You can manually enter single MAC addresses one port at a time, or convert all "learned" addresses to static.
Select the Advanced tab. Within the Property box, scroll down, select Locally Administered Address, and select the Value radio box; there, you will see your adapters MAC address. Click in the Value box, clear its contents, and enter a new address to edit the address.
In the selected network connection's Properties window, press the Configure button. In the Properties window of the network adapter, go to the Advanced tab. Locate and select Network Address in the Property list and type the new MAC address Value you want on the right side. Once you're done, press the OK button.
It's a muddy issue. How do you deal with virtualization? On my machine I have several Ethernet adapters, only one of which is actually hardware-based. And my virtual machines all have software-generated MAC addresses. And, if I really want to, I can set up multiple VMs on different computers with the same MAC address (not on the same network, of course).
No - there is no reliable way to do this. USB dongles are cheap and easy - use them.
I have had the "pleasure" of using MAC locked software before and all I can say is don't do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With