Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My PC internet connection is through Dlink router. Now, I changed my mac address of RHEL5 by running below lines:

[crap@localhost ~]$ /sbin/ifconfig -a | grep HWaddr
cipsec0   Link encap:Ethernet  HWaddr 00:0C:EC:A8:09:5C  
eth0      Link encap:Ethernet  HWaddr 00:1F:3C:4D:C5:12  

[root@localhost crap]# /sbin/ifconfig eth0 down
[root@localhost crap]# /sbin/ifconfig eth0 hw ether 00:1C:30:A1:A5:D3
[root@localhost crap]# /sbin/ifconfig eth0 up

Now, I'm not able to access the internet.

[root@localhost crap]# /etc/init.d/network restart
Shutting down interface eth0:  Device eth0 has MAC address 00:1C:30:A1:A5:D3, instead of configured address 00:1F:3C:4D:C5:12. Ignoring. [FAILED]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Device eth0 has different MAC address than expected, ignoring. [FAILED]

I'm not sure what is cipsec0 & if I need to do anything with that too.

Can any one tell me what's wrong? And how do I get internet connection after changing the MAC address?

share|improve this question

migrated from stackoverflow.com Oct 6 '11 at 8:31

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

Update the config file for eth0 /etc/sysconfig/network-scripts/ifcfg-eth0 with the HWADDR you require.

I doubt that you need to worry about udev rules. cipsec0 is setup by your VPN software.

Idle curiosity: the MAC address would only change if you physically changed your NIC or it's a virtual machine and a new NIC has been configured. either way, a new NIC has been installed. the MAC address is tied to the NIC permanently and should never change.

share|improve this answer

The system stored the mac address. You probably have to remove the stored one. I do not known where it is stored under RHEL5, but under ubuntu it is stored in /etc/udev/rules.d/70-persistent-net.rules

You are probably able to locate the file using e.g. grep -r in the etc dir.

edit: not sure about udev being the issue here though, but I figure the address is somewhere stored in /etc/ which causes this issue.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .