Media Access Control address (MAC address) is a
unique identifier assigned to most network adapters or network interface
cards (NICs) by the manufacturer for identification, and used in the
Media Access Control protocol sub-layer. If assigned by the
manufacturer, a MAC address usually encodes the manufacturer's
registered identification number. It may also be known as an Ethernet
Hardware Address (EHA), hardware address, adapter address, or physical
address.
1. Change MAC Address in Linux ( CentOS, Debian, Fedora, RHEL, Slackware, SuSE, Ubuntu )
# ifconfig [interface name] down
# ifconfig [interface name] hw ether [new MAC address]
# ifconfig [interface name] up
Example:
# ifconfig eth0 down
# ifconfig eth0 hw ether 1A:2B:3C:4D:5E:6F
# ifconfig eth0 up
2. Change MAC Address in FreeBSD
# ifconfig [interface name] down
# ifconfig [interface name] ether [new MAC address]
# ifconfig [interface name] up
Example:
# ifconfig xl0 down
# ifconfig xl0 ether 1A:2B:3C:4D:5E:6F
# ifconfig xl0 up
3. Change MAC address in HP-UX
Under HP-UX, you can change the MAC address in SAM by selecting
Networking and Communications, then selecting the interface, then
Action, Modify, Advanced Options. HP-UX refers to the MAC address as the
"station address".
4. Change MAC address in IBM AIX
Set the physical MAC address for NIC.
# chdev -l ent0 -a
alt_addr=<new mac addr> -P
Use the new MAC address.
use_alt_addr=yes -P
# reboot
5. Change MAC address in Mac OS X
Since Mac OS X 10.4.x (Darwin 8.x) onwards, the MAC address of wired
Ethernet interface can be altered in Apple Mac OS X in a fashion similar
to the FreeBSD/OpenBSD method.
# sudo ifconfig [interface name] down
# sudo ifconfig [interface name] ether 1A:2B:3C:4D:5E:6F
# sudo ifconfig [interface name] up
or
# sudo ifconfig [interface name] lladdr aa:bb:cc:dd:ee:ff (for Mac OS X 10.5 Leopard)
Example:
# sudo ifconfig en0 down
# sudo ifconfig en0 ether 1A:2B:3C:4D:5E:6F
# sudo ifconfig en0 up
or
# sudo ifconfig en0 down
# sudo ifconfig en0 lladdr 1A:2B:3C:4D:5E:6F
# sudo ifconfig en0 up
6. Change MAC address in OpenBSD
# ifconfig [interface name] down
# ifconfig [interface name] lladdr [new MAC address]
# ifconfig [interface name] up
Example:
# ifconfig bge1 down
# ifconfig bge1 lladdr 1A:2B:3C:4D:5E:6F
# ifconfig bge1 up
7. Change MAC address in Solaris
# ifconfig [interface name] down
# ifconfig [interface name] ether [new MAC address]
# ifconfig [interface name] up
Example:
# ifconfig hme0 down
# ifconfig hme0 ether 1A:2B:3C:4D:5E:6F
# ifconfig hme0 up
No comments:
Post a Comment