Subject: Re: bpf write() to local host
To: Curt Sampson <firstname.lastname@example.org>
From: David Laight <email@example.com>
Date: 01/23/2003 11:22:16
> > Would you like to do something like this?
> > ifconfig en0 link 00:03:93:ce:11:32
> > I think I can throw together a patch for ifconfig to enable that...
> Yes! Please! It would also be nice, if possible to be able to
> ifconfig en0 lladdr 00:03:93:ce:11:35 alias
Changing the MAC address of an ethernet interface on the fly isn't
for tne faint-hearted. It is relatively easy (with code in the driver)
to reset the chip with a different address, however this is only part
of the story!
You need to tell your own ARP code to send out a different answer,
and get everyone else to change their own ARP table. Otherwise
you can't talk to any systems.
Some systems will update their arp table if you send then an ARP
request (scan your own table to find the necessary systms). Some
PC systems don't even time out requests after 10 minutes.
Adding an alias really requires that the ethernet hardare support
multiple MAC addresses, some modern ones do. Otherwise you would
have to put the card into promiscuous mode and filter in software.
This has its own problems, some cards don't have the bus bandwidth
(ie most ISA ones) to receive all traffic, some (eg any lance ones)
cannot transmit onto a very busy lan when in promiscuous mode.
David Laight: firstname.lastname@example.org