How to change mac address
Rick Stevens
rstevens at internap.com
Thu Apr 26 18:00:39 UTC 2007
On Thu, 2007-04-26 at 15:29 +0700, The Linux System & Configuration Your
Server wrote:
> Details here. http://www.sontayamyblog.com
>
> gerard labadie wrote:
> >
> >
> > 2007/4/26, Andrew Kelly <akelly at corisweb.org>:
> >
> >
> > Isn't the MAC provided by the NIC and unique to every NIC?
> >
> > Andy
> >
> >
> > Yes, but you can change it.
> > For Vms (www.openvms.compaq.com) for example, when Decnet starts
> > (before any other protocol like Tcpip, Lat, Lavc, Amds or any) it
> > changes the Mac address from (for example 08-00-2B-.... to
> > AA-00-04-00..., because it has the Decnet address in it.
> > A Decnet address of 3.2 means (3*1024)+2= 3074
> > In hex, this is 0C04, so the Mac address will be (reversed)
> > aa-00-04-00-04-0C
> >
> > See http://h71000.www7.hp.com/wizard/wiz_4244.html
Gang, PLEASE bottom post on this list. Top posting makes following the
logic of the thread REALLY hard.
As to the the original request:
To change the host name:
Edit /etc/sysconfig/network and change the "HOSTNAME=" item.
This changes the name of the machine permanently and takes
effect on a reboot.
Use "hostname new-name-of-host" as root to change it
immediately.
To change the hardware (MAC) address of a NIC, do one of the following
as root:
ifconfig ethX down
ifconfig ethX hw ether aa:bb:cc:dd:ee:ff
ifconfig ethX up
--or--
ip set link dev ethX brd aa:bb:cc:dd:ee:ff
Note that there is no way to do this during the normal network setup.
You have to either do it yourself or run a script that does it for you.
If you MUST change the MAC on a NIC every time (a dubious thing in the
first place), put the commands you want at the end of the commands in
/etc/rc.d/rc.local.
----------------------------------------------------------------------
- Rick Stevens, Principal Engineer rstevens at internap.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- "People tell me I look at the dark side. That's not true. I have -
- the heart of a small boy......in a jar right here on my desk." -
- -- Stephen King -
----------------------------------------------------------------------
More information about the Redhat-install-list
mailing list