Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-26-2005, 02:22 AM   #1
LQ Newbie
Registered: Oct 2005
Location: South Africa
Distribution: Fedora Core 4 / FreeBSD
Posts: 1

Rep: Reputation: 0
DNS Problems After Changing a MAC Address

Hi All,

I am having problems with a system which has had Fedora Core 4 installed. The DHCP server on my netowork issues IP Addresses based on the machines MAC Address. Therefore, when I want to connect my new Linux box to the network, I need to change its MAC Address to whatever.

That part is easy:
ifconfig eth0 down hw ether 00:00:00:00:00:00 up
If I do that and then use the KDE Network Dialog to reactivate eth0, then it gets is IP Address and the Network works fine. (I don't know how to do that (IE get DHCP'd) without the dialog. Wish I knew...

However, the problem comes in when I want to change my MAC Address from boot, such that when the computer boots, it boots up with an IP Address, and I can go away with no extra effort. I wasn't really sure how to go about this, so I fiddled, and added the line of code above to /etc/sysconfig/network which seemed to work. When my computer boots, it gets an IP Address from the DHCP and (according to the before mentioned Network Dialog) the DNS servers addresses have been downloaded. However, DNS resolution now does not work. At all. I've tried browsing the web, doing a nslookup, nothing works.

Does anyone know what I've done wrong, or have any idea on how to fix it? I've looked and looked and can't find anything.

Thanks alot,
Old 10-26-2005, 09:32 PM   #2
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
Try the pre-up option in the interfaces file after the iface eth[x] line instead of what you did:

auto eth0
iface eth0 inet dhcp
pre-up /sbin/ifconfig eth0 down hw ether 00:00:00:00:00:00 up


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
changing ethernet mac address and retaining the same after reboot guy24x Linux - Hardware 3 02-06-2009 07:51 AM
Changing Mac Address on Network Card? neopiper Linux - Networking 10 11-21-2007 03:14 AM
Changing my Mac address griggt Linux - Networking 3 07-26-2005 06:34 AM
changing nic mac address bishal Linux - Hardware 4 07-16-2004 05:44 PM
MAC address problems mrant Linux - Wireless Networking 2 01-22-2004 02:39 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration