How to change MAC address of Ethernet interface in Linux or Windows or Mac OS X
The physical MAC address will be permanently programmed to Ethernet adapter by the manufacturer. In other words, each Ethernet adapter carries an unique MAC address in the world.
However the operating systems like Windows or Linux can logically change the MAC address while the adapter in operation. If a MAC address is changed from the original physical MAC address to an another, it is called MAC address spoofing.
The following explains how a MAC address can be modified in various operating systems.
In Linux
[root@techpulp ~]# ifconfig eth0 down [root@techpulp ~]# ifconfig eth0 hw ether 11:22:33:44:55:66
In FreeBSD,
[root@techpulp ~]# ifconfig nc0 ether 11:22:33:44:55:66
In OpenBSD or MAC OS X,
[root@techpulp ~]# ifconfig nc0 lladdr 11:22:33:44:55:66
In Microsoft Windows XP/2003,
Mac address can be changed in Ethernet adapter’s properties menu.
Properties menu > Advanced tab > Look for MAC Address > Locally Administered Address > Ethernet Address > Physical Address option.
Some internet service providers (ISP) record MAC address of your PC and do not accept any incoming traffic with other MAC addresses. If you are dealing with such ISPs, it would be difficult for you to switch from the Desktop PC and Laptop as they use differetn MAC addresses. In such cases you can change the MAC address of Laptop by using above explained method so that Laptop also uses same MAC address as Desktop PC. Similar problem occurs when you want to keep a router to let you work with Dektop PC and Laptop in tandem. In such scenario, the router should be configured with MAC address of the Desktop PC.
In case of Linux or other varients, you can place these commands at the end of /etc/rc.d/rc.local file so that you don’t have to do it manually each time Laptop is power cycled. However you should revert the changes back in Laptop if you want Laptop and Desktop to communicate back-to-back using cross-over cable as both Desktop and Laptop will be having same MAC address.


about 1 year ago
Action requires knowledge, and now I can act!