cant change mac address

Issues related to configuring your network
Post Reply
ochena
Posts: 4
Joined: 2017/03/21 10:25:08

cant change mac address

Post by ochena » 2017/03/21 10:49:31

Hi,

I installed centos 6.5 on a workstation(not vm) we had.
Now i need to change the mac address so i found out that i have to add the line :
MACADDR=00:11:22:33:44:55 to /etc/sysconfig/network-scripts/ifcfg-eth1 file.
I did that and the nic vanished from the connection panel, only to return after deleting that line.
I even tried removing or edit the line HWADDR and no go.
later i learned that i might need to edit the file /etc/udev/rules.d/70-persistent-net.rules and change the line
in that file to that matches my connection and nic, to the new mac address, so i did that and no change to the
mac and the connection is working ok but with the old mac...
My nic is 3c905.
My goal is to be able to change mac address as needed.
thanks in advance for any help...

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: cant change mac address

Post by TrevorH » 2017/03/21 10:58:07

From /usr/share/doc/initscripts-*/sysconfig.txt

Code: Select all

    MACADDR=
      Set the hardware address for this device to this.
      Use of this in conjunction with HWADDR= may cause
      unintended behavior.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ochena
Posts: 4
Joined: 2017/03/21 10:25:08

Re: cant change mac address

Post by ochena » 2017/03/21 11:36:52

TrevorH wrote:From /usr/share/doc/initscripts-*/sysconfig.txt

Code: Select all

    MACADDR=
      Set the hardware address for this device to this.
      Use of this in conjunction with HWADDR= may cause
      unintended behavior.
Thanks for your reply.

I tried deleting HWADDR line and adding MACADDR with new mac address and no go...
When starting the network service i get "failed" while "bringing up interface Auto_eth1: unknown connection"

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: cant change mac address

Post by TrevorH » 2017/03/21 12:46:58

That sounds more like you are using NetworkManager. What is the output from chkconfig --list | grep -i netw ?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ochena
Posts: 4
Joined: 2017/03/21 10:25:08

Re: cant change mac address

Post by ochena » 2017/03/21 13:00:40

TrevorH wrote:That sounds more like you are using NetworkManager. What is the output from chkconfig --list | grep -i netw ?
Here it is :
NetworkManager 0:off 1:off 2:on 3:on 4:on 5:on 6:off
network 0:off 1:off 2:off 3:off 4:off 5:off 6:off

I have 2 nics - 1 on board(eth0) which i dont use and the 3com(eth1) whic i use.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: cant change mac address

Post by TrevorH » 2017/03/21 14:50:14

Yeah, NetworkManager. I think that in order to do something like this you probably need to switch over from NM to the network service and to do that I would want to have access to the local console so that I could recover in case anything went wrong. To enable network, run chkconfig network on and to turn off NM use chkconfig NetworkManager off but, again, make sure you have a way to recover in case it doesn't work.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ochena
Posts: 4
Joined: 2017/03/21 10:25:08

Re: cant change mac address

Post by ochena » 2017/03/22 06:09:43

TrevorH wrote:Yeah, NetworkManager. I think that in order to do something like this you probably need to switch over from NM to the network service and to do that I would want to have access to the local console so that I could recover in case anything went wrong. To enable network, run chkconfig network on and to turn off NM use chkconfig NetworkManager off but, again, make sure you have a way to recover in case it doesn't work.
Thank you.
After i turned off the nm and enabled network, i can now change the mac.

Post Reply