All of lore.kernel.org
 help / color / mirror / Atom feed
* What makes a good fake MAC address?
@ 2009-04-22 21:34 Mark Smith
  2009-04-22 22:15 ` Inaky Perez-Gonzalez
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Smith @ 2009-04-22 21:34 UTC (permalink / raw)
  To: Inaky Perez-Gonzalez; +Cc: netdev

Hi Inaky,

(please CC me, I'm not on the list)

"The problem with using a zero mac address is that it confuses the
bridging software (and maybe others). I was wondering, what would be a
fake mac address we could put in there that is legal for this kind of
"faking"? [or the closest thing to legal?]"

Since you're from an organisation with an OUI allocation or two, I
think a real Intel one would be best. It then wouldn't be fake, and no
matter where it was exposed (host only, local network, or globally
e.g. in IPv6 node addresses), it would be guaranteed not to collide
with any other addresses (unless Intel make error an error in their own
OUI administration.) 

The other alternative would be locally assigned addresses i.e. those
out of the "0x02" range. There is a function in the kernel
(random_ether_addr()) to generate random ones which should minimise the
chances of collision with any others. If you don't have an OUI, then I
think they're a reasonable compromise. However, I don't think the
"global" linux kernel automatically assigning local addresses
completely fits with the idea of those addresses are only locally
significant and administered.

Don't do what Microsoft have done, and "globally" use a 0x02 address.
They've "stolen" some static 0x02 addresses for use with their high
availability software for Windows (0x02:01:01:01:01 is one of them
IIRC). I happened to discover it by assigning those addresses in a test
environment (i.e. *locally assigning* them), and then found Wireshark
displayed them as "belonging" to Microsoft. Fortunately I didn't happen
to have a MS HA environment, so I didn't break anything. If anybody has
ever had to troubleshoot duplicate MAC addresses, I'm sure they'd agree
that in the least MS should have randomised the addresses. Or
better yet, spent probably less than a millisecond's worth of their
revenue and got themselves an OUI, ensuring global uniqueness.

(Any chance Intel want to donate an OUI to the Linux kernel to used
instead of locally assigned addresses for things like dummy, tap and
etc. interfaces? From memory they're only US $1250 :-) )

Regards,
Mark.



^ permalink raw reply	[flat|nested] 10+ messages in thread
* What makes a good fake MAC address?
@ 2009-04-22 20:48 Inaky Perez-Gonzalez
  2009-04-22 21:13 ` Stephen Hemminger
  2009-04-22 21:13 ` Eric Dumazet
  0 siblings, 2 replies; 10+ messages in thread
From: Inaky Perez-Gonzalez @ 2009-04-22 20:48 UTC (permalink / raw)
  To: netdev


Hi All

The Intel i2400m WiMAX driver behaves as an ethernet device, and currently 
when sending packets to the netdev stack, it fakes an ethernet header, sets 
the "from" mac address to zeroes and the "to" to it's own MAC address.

The WiMAX network can be considered to be a point-to-point (up to the gateway) 
connection, all IP based, so there are not MAC addresses from our gateway 
(not to mention that it can change behind us).

The problem with using a zero mac address is that it confuses the bridging 
software (and maybe others). I was wondering, what would be a fake mac 
address we could put in there that is legal for this kind of "faking"? [or 
the closest thing to legal?]

Thanks!

-- 
Inaky

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-04-22 23:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-22 21:34 What makes a good fake MAC address? Mark Smith
2009-04-22 22:15 ` Inaky Perez-Gonzalez
2009-04-22 22:25   ` Stephen Hemminger
2009-04-22 22:38     ` Inaky Perez-Gonzalez
2009-04-22 22:59       ` Stephen Hemminger
2009-04-22 23:35         ` Inaky Perez-Gonzalez
  -- strict thread matches above, loose matches on Subject: below --
2009-04-22 20:48 Inaky Perez-Gonzalez
2009-04-22 21:13 ` Stephen Hemminger
2009-04-22 21:13 ` Eric Dumazet
2009-04-22 21:28   ` Inaky Perez-Gonzalez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.