public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Change MAC address permanently
@ 2012-02-23  9:52 Christian Gmeiner
  2012-03-07 15:46 ` Calvin Walton
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Gmeiner @ 2012-02-23  9:52 UTC (permalink / raw)
  To: linux-kernel

Hi all,

I have found out that ioctl SIOCSIFHWADDR could be used to change the
current MAC address
of an Ethernet device. But the big problem is that after an reboot the
change is gone. Is there
an other way of changing the MAC address permanently?

I am asking, as I am working in a company which does produce devices
which are using Intel
based NICs and where Linux is used as OS. At the moment we need to
boot vxworks to change
the MAC address and could the "install" Linux on the device. The
biggest problem here is that
for vxworks we need an other BIOS as for Linux.

Thanks for any hints
--
Christian Gmeiner, MSc

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

* Re: Change MAC address permanently
  2012-02-23  9:52 Change MAC address permanently Christian Gmeiner
@ 2012-03-07 15:46 ` Calvin Walton
  0 siblings, 0 replies; 2+ messages in thread
From: Calvin Walton @ 2012-03-07 15:46 UTC (permalink / raw)
  To: Christian Gmeiner; +Cc: linux-kernel

On Thu, 2012-02-23 at 10:52 +0100, Christian Gmeiner wrote:
> Hi all,
> 
> I have found out that ioctl SIOCSIFHWADDR could be used to change the
> current MAC address
> of an Ethernet device. But the big problem is that after an reboot the
> change is gone. Is there
> an other way of changing the MAC address permanently?

An option that may be sufficient for your needs is if you simply modify
your Linux startup scripts to reset the MAC address of the card every
time the computer boots, by using a udev rule or editing the network
init script.

But if you /really/ want to change the MAC address burned into the
hardware...

In most PC network cards, the MAC address of the device is stored in an
EEPROM on the device, and has an initial value flashed when the device
is assembled.

Depending on the network card and driver in question, you may be able to
view and modify the contents of the EEPROM (which will contain various
other data that you want to avoid changing!) with the ethtool -e and -E
options. This can be a dangerous operation, so read the ethtool man page
first, and be careful.

-- 
Calvin Walton <calvin.walton@kepstin.ca>


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

end of thread, other threads:[~2012-03-07 15:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-23  9:52 Change MAC address permanently Christian Gmeiner
2012-03-07 15:46 ` Calvin Walton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox