?
Solved

Clone MAC address in Linux

Posted on 2002-03-03
8
Medium Priority
?
595 Views
Last Modified: 2010-04-20
In almost all DSL/Cable Routers (Barricades and Linksys) they give you the option of cloning the mac address of a machine on the network or allowing you to manual enter a new mac address for the WAN port.

Is this possible in Linux?  I have a Linux Box with two NICs, Eth0=WAN Eth1=LAN.  I want to set Eth0's MAC address to that of a machine on my network.

Please inform me how this would be done!

Thanks
0
Comment
Question by:jajej
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6837890
this can simply done with the ipconfig command
But your NIC must support setting of the MAC.
0
 

Accepted Solution

by:
John_Bell_2 earned 400 total points
ID: 6838070
Whups - the ipconfig command is MS, not Linux. I believe ahoffman meant "ifconfig". Look at the man page for ifconfig ("man ifconfig") and scroll down to the description for "hw class address". In your case, you're making the change on an ethernet interface. If the device driver for your ethernet interface supports changing the MAC (as ahoffman has mentioned), then you can run the following command to make the change:

root# ifconfig eth0 hw ether 00:01:02:03:04:05 (example)

That should do the trick. Let me know how it turns out.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6838484
oops, ifconfig

> If the device driver for your ethernet interface ..
hmm, to be more precise: this must be the driver on the NIC itself, usually in a ROM or a-like.
0
Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

 

Expert Comment

by:John_Bell_2
ID: 6839274
Right, the NIC has to support it. Ugh, layering...
0
 
LVL 1

Author Comment

by:jajej
ID: 6839293
Do 3Com and Intel cards support "temporary" changing of the MAC address using ifconfig?  I don't want to change the MAC address permanently.
0
 
LVL 1

Author Comment

by:jajej
ID: 6839337
Do 3Com and Intel cards support "temporary" changing of the MAC address using ifconfig?  I don't want to change the MAC address permanently.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6840865
most 3Com do, but check your docs
0
 
LVL 1

Author Comment

by:jajej
ID: 6863759
FOR EVERYONE: Just so you guys know, at least with 3Com 3C905c and RH 7.2 this is the order to change the MAC address of the card.

1. ifconfig eth(x) down
2. ifconfig eth(x) hw ether 00:01:02:03:04:05
3. ifconfig eth(x) up

I will award the points in a day so that people have some time to weigh in if they would like.


0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month11 days, 4 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question