K64F - Guarantee uniqueness of local MAC-address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K64F - Guarantee uniqueness of local MAC-address

1,373 Views
nikolausbauly
Contributor II

Hi,
I'm just working with the ENET-Module of my K64F, and I want the Ethernet Connection to be up, as soon as the device is plugged into a local network.
Since the K64F does not have its own MAC address, I randomly generate a local MAC address.
My problem is now, that I can't find a way to check if the local MAC address is already used by another device on the network. I know the odds that this happens are very little , but still.

ARP needs an IP address to receive the respective MAC, it could only be used as a scanner to scan through all local IPs
RARP would probably work, but  it needs an RARP-Server on the network.


Are there any other level-2/3 protocols, which a normal DHCP-server has implemented,that could be used for that?

Thanks a lot in advance,
Nik

Labels (1)
5 Replies

1,220 Views
mjbcswitzerland
Specialist V

Hi

Basically random MAC addresses are not allowed so there is no standard technique to do what you want to do - to request other devices to return their details (eg. via an ARP resolution scan of all IP addresses in the local sub-net) would involve already using an illegal MAC address for them to respond to.

Details of MAC address use, management and purchase:
http://www.utasker.com/forum/index.php?topic=21.msg68#msg68

Regards

Mark

1,220 Views
nikolausbauly
Contributor II

Hi,
thanks for your contribution. The thing is, from what I've read up to now, local(=private) MACs are common in embedded systems, as long as they are only used in private LANs.

But it makes sense , that there was no standard technique at the beginning of IPv4, I only thought this might have changed.

Thanks anyway, you are doing a great job in here with your support.

0 Kudos
Reply

1,220 Views
mjbcswitzerland
Specialist V

Nikolaus

If you are developing professional products the IEEE rules for MAC addresses will need to be respected to avoid a potential law suit, which means that the question of using random/unregistered MAC addresses is only really of relevance for private hobby use.

In the case of hobby use a fixed MAC address will not be an issue. The chance of it colliding with another in the local network is a billion to one if chosen randomly and that random value can be then fixed when it works. Simpler is to enter a value manually like 00-00-00-00-00-01 which will not be used (as long as not by another such device of yours).

Regards

Mark

0 Kudos
Reply

1,220 Views
nikolausbauly
Contributor II

So, long story short, best practice for commercial products in small- to midscale would be to include an pre-programmed  EEPROM with a MAC on it into your design?

1,220 Views
bobpaddock
Senior Contributor III

Yes.  Don't over look the hassles/costs of maintaining the production floor requirements of assigning sequential numbers in the address block that you may buy.

MAC Address Chips Products - Microchip Technology Inc