LWN.net Logo

Picking a MAC address for a FreedomBox

Picking a MAC address for a FreedomBox

Posted Dec 7, 2012 14:09 UTC (Fri) by NRArnot (subscriber, #3033)
Parent article: Picking a MAC address for a FreedomBox

One other problem.

I once saw the consequence of two PCs on the same LAN with the same MAC address. (How? Some foul-up by the NIC manufacturer. I suspect a whole batch of boards out there with that same MAC; we'd bought two of them).

It wasn't pretty. Looked somewhat like an intermittent NIC failure or cabling fault. One went down whenever the other came up ...

Anyway, it occurs to me that causing a MAC collision in some environments might be regarded as an actively hostile act ... espionage, or even sabotage. Even if not, it will most certainly attract attention if one's random address just happens to be the same address that some local system will try to use in a few minutes time.

Is there a way to detect this and back off as soon as it happens, before the other system's owner gets annoyed?


(Log in to post comments)

Picking a MAC address for a FreedomBox

Posted Dec 7, 2012 14:49 UTC (Fri) by etienne (subscriber, #25256) [Link]

> Is there a way to detect this and back off as soon as it happens, before the other system's owner gets annoyed?

You send a RARP, reverse ARP request, asking for who has this ARP to reply with its own IP, if no response nobody has such a MAC.
You can also change your MAC by sending an unsolicited gratuitous ARP with your IP address and your new MAC, without breaking TCP or UDP connections.
Unfortunately these systems fails if one of the PC on the subnet is not listening, in a deep sleep mode or temporarily disconnected from the wire (a HUB maintains LINK-UP to the PC but the upstream HUB link goes down).
Then, next time the PC wakes up and try to continue using the old MAC address to continue a TCP connection, it will talk to an unrelated PC and receive a RST packet, without checking that this MAC address is still valid for the TCP IP address.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds