public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Calvin Walton <calvin.walton@kepstin.ca>
To: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Change MAC address permanently
Date: Wed, 07 Mar 2012 10:46:04 -0500	[thread overview]
Message-ID: <1331135164.2516.8.camel@ayu> (raw)
In-Reply-To: <CAH9NwWcbYRq9z_i8BcuQoK05+=ugyLqymHh9H6y963xWNnp2EA@mail.gmail.com>

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>


      reply	other threads:[~2012-03-07 15:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23  9:52 Change MAC address permanently Christian Gmeiner
2012-03-07 15:46 ` Calvin Walton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331135164.2516.8.camel@ayu \
    --to=calvin.walton@kepstin.ca \
    --cc=christian.gmeiner@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox