LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 11-26-2011, 11:17 AM   #1
venom4u31
Member
 
Registered: Oct 2011
Distribution: Debian 6
Posts: 47

Rep: Reputation: Disabled
How can I change the mac address for eth1 in linux?


I want to change the mac address using the interface file inside /etc/network/ directory. Can you please tell me how to do that? Please tell me what if I need to restart something for the changes to have an effect.
 
Old 11-26-2011, 12:31 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,896

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
Google is your friend. Use it to find answers to questions. Most of the questions you have about Linux have probably already been answered and are available on the web.

Searching for this "how to change mac address in linux" gets me 5 million 800 thousand plus hits.
 
Old 11-26-2011, 12:37 PM   #3
venom4u31
Member
 
Registered: Oct 2011
Distribution: Debian 6
Posts: 47

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bigrigdriver View Post
Google is your friend. Use it to find answers to questions. Most of the questions you have about Linux have probably already been answered and are available on the web.

Searching for this "how to change mac address in linux" gets me 5 million 800 thousand plus hits.
Yes, I found out several pages that tell me the same thing:

that I should add those lines in interface.

auto eth1
iface eth1 inet static
hwaddress ether 00:00:00:00:00:01

and then I should restart the network using the /etc/init.d/networking restart command.

I tried that and it does not work. I was wondering if someone would tell me what are the correct lines to be put in the /etc/network/interfaces file to successfully change the mac address.
 
Old 11-26-2011, 12:52 PM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debian
Posts: 2,221
Blog Entries: 1

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
here is a search on google about mac changer http://www.google.co.uk/#hl=en&cp=11...w=1024&bih=680
Here.s 1 for debain
http://www.debianadmin.com/change-yo...l-address.html

Last edited by spiky0011; 11-26-2011 at 12:54 PM.
 
Old 11-26-2011, 05:07 PM   #5
brak44
Member
 
Registered: Aug 2010
Location: Brisbane Australia
Distribution: Centos, Fedora
Posts: 87

Rep: Reputation: 24
In RedHat systems you need to go to /etc/sysconfig/network-scripts
As su edit the ifcfg-eth1 with and editor eg nano ifcfg-eth1
HWADDR=your new mac address
where your new mac address is in the format 00:00:00:00:00:00
Note that this will not change an existing mac address assigned to eth1 - it will however assign the mac address to eth1 if it was already assigned to eth0 for example.
 
Old 11-26-2011, 05:22 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

http://www.linuxquestions.org/questi...erface-915487/
 
  


Closed Thread


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
how to permanent spoof "fake" mac address for eth0 & eth1? in NEW linux distro"s... vastvet Linux - Newbie 22 02-02-2013 01:40 AM
Unable to activate eth1 - device eth1 has different MAC address than expected. wkk1020@gmail.com Linux - Networking 18 10-29-2012 08:09 AM
How to change eth1 address from /etc/network/interface? venom4u31 Linux - Newbie 7 11-28-2011 10:02 AM
bad mac address in eth1 (wireless) setup FC4 seraph-oo- Linux - Wireless Networking 3 11-24-2005 03:46 AM
change mac address possible? kahn Linux - Networking 4 04-22-2005 05:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:28 AM.

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