Discussion:
ifconfig change MAC address
(too old to reply)
Victor Dorneanu
2009-07-28 14:26:15 UTC
Permalink
Hi there!

Is there any reason why "ifconfig" doesn't implement any options on
changing MAC addresses? Why do I have to use this
(http://wiki.netbsd.se/Faking_a_MAC_address) workaround?

I've read on the mailing lists there have been several discutions about
this issue. Did anybody try to patch "ifconfig" in order to add that
functionality?

Greets,

Victor

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
der Mouse
2009-07-29 09:01:18 UTC
Permalink
Post by Victor Dorneanu
Is there any reason why "ifconfig" doesn't implement any options on
changing MAC addresses?
I think this is part history, part hardware incapability, and part lack
of generality.
Post by Victor Dorneanu
Did anybody try to patch "ifconfig" in order to add that
functionality?
That wouldn't be enough; you'd have to add the capability to all the
Ethernet drivers as well.

I think the original basis for the resstriction is that some hardware
can't change its MAC. While I suspect such hardware is exceedingly
rare these days - even on ports able to connect to the hardware,
soft-MAC hardware is probably more common - I don't see any reason
drivers for such hardware couldn't refuse the change.

The workaround you mention (in text I cut) amounts to putting the
hardware in promiscuous mode and doing MAC address filtering in host
software. While this works, it is comparatively inefficient; Ethernet
interfaces normally filter on MAC addresses in hardware for a reason.
Worse, the additional expense is least affordable on the ports that are
most likely to have hard-MAC interfaces, such as vax.

Another, minor, reason is that not all network interfaces are
Ethernets, and it's not clear what should happen for interfaces not
sufficiently similar to Ethernet to use MACs. (Given the stuff that's
already been shoehorned into ifconfig that belongs elsewhere, such as
vlan and ssid, this carries comparatively little force - that's why I
call it a "minor" reason - but not no force; having made a mistake N
times does not mean the N+1st instance isn't still a mistake.)

/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML ***@rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Mihai Chelaru
2009-07-29 07:44:41 UTC
Permalink
Post by Victor Dorneanu
Is there any reason why "ifconfig" doesn't implement any options on
changing MAC addresses?
ifconfig int0 link ma:cc:ad:dd:re:ss active

See EXAMPLES section in ifconfig(8)



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Victor Dorneanu
2009-07-29 08:16:42 UTC
Permalink
I should have read the man pages more carefully.

ifconfig <interface> link <mac address> active

Greetings,

--Victor
Post by Victor Dorneanu
Hi there!
Is there any reason why "ifconfig" doesn't implement any options on
changing MAC addresses? Why do I have to use this
(http://wiki.netbsd.se/Faking_a_MAC_address) workaround?
From what I understand from the man, it is supported since 5.0 using
ifconfig iface link layer2_addr activate
(see section examples and explanation for keyword activate).
Regards,
--
Arnaud Degroote
PhD student
RIA LAAS / CNRS
--
Victor Dorneanu

Contact
- Web: http://dornea.nu
- Mail: ***@dornea.nu

GnuPGP information
- KeyID = 0xFFABDCB4 (subkeys.pgp.net)
- Key fingerprint = 926F 8BFE 010A 8992 8914 BA5A 8919 BE7E FFAB DCB4


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Joerg Sonnenberger
2009-07-29 09:45:09 UTC
Permalink
Post by Victor Dorneanu
Is there any reason why "ifconfig" doesn't implement any options on
changing MAC addresses? Why do I have to use this
(http://wiki.netbsd.se/Faking_a_MAC_address) workaround?
ifconfig fooo link

Joerg

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
David Laight
2009-07-29 19:50:54 UTC
Permalink
Post by der Mouse
The workaround you mention (in text I cut) amounts to putting the
hardware in promiscuous mode and doing MAC address filtering in host
software...
There are some ethernet chips that only have a single fifo - and will
never manage to transmit if in promiscuous mode on a busy lan.

David
--
David Laight: ***@l8s.co.uk

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...