MAC Address (Media Access Control) are permanent by design, several mechanisms allow modification, or “spoofing”, of the MAC address that is reported by the operating system. This can be useful for privacy reasons, for instance when connecting to a Wi-Fi Hotspot, or to ensure interoperability. MAC Address is a unique identifier of your computer.
Some internet service providers bind their service to a specific MAC address; if the user then changes their network card or intends to install a router, the service won’t work anymore. Changing the MAC address of the new interface will solve the problem. Similarly, some software licenses are bound to a specific MAC address. Changing the MAC address in this way is not permanent- after a reboot, it will revert to the MAC address physically stored in the card. A MAC address is 48 bits in length.
A MAC address is a physical hardware address assigned to each device that has the capability of connecting to a network. The internet is nothing more than a large network. The MAC address is something that is assigned in the chip on the device and is not something the user can change.
As a MAC address can be changed, it can be unwise to rely on this as a single method of authentication. IEEE 802.1x is an emerging standard better suited to authenticate devices at a low level.
Types of MAC address:
- Unicast address : An address for a specific computer.
- Multicast address : An address for a specific group of computers in network.
- Broadcast address : An address for all computers in network.
To know Your MAC Address go to command prompt by CMD command
After command ipconfig/all … It will show your Physical Address and that is our MAC Address.
Also you find by typing command getmac /v /fo list and Enter.
You will get the output for each of your NIC adaptor (Ethernet, WiFi, Bluetooth devices) will be displayed…
How can you Change your MAC Address-
> Press the Windows Key + Fn +Pause key and select Device Manager from the list.
Once Device Manager opens, locate your network adapter, right click it and choose Properties.
> Click on Network Adapter and navigate to Advanced tab and select Network Address from the list of Properties.
> Select Value option and enter any 12-character hexadecimal value.
> Click OK to save changes.
> All Done
If you want to reset then just select Not Present radio button. You will get reset to your default MAC Address.
The method to change the MAC address of a router varies with the router. Not all routers have the ability to change their MAC address. The feature is often referred to as “clone MAC address”. This take the MAC address of one of the machine on your network and replaces the router’s existing MAC address with it. Some support the option to manually enter the MAC address.
To Change MAC Address In Linux
To change your MAC address in Linux and all it takes is two easy to script commands:
ifconfig eth0 down hw ether 00:00:00:00:00:01
ifconfig eth0 up
These two little commands would set your eth0 interface to use the MAC 00:00:00:00:00:01. Just plug in the NIC you want to set and the MAC address you want to use into the commands above and your done. Changing your MAC address is one of those things that is much easier to do in Linux then under Windows.
By IPRoute Command
- First, turn off the Network card using command:
ip link set dev enp0s3 down
- Next, set the new MAC is using command:
ip link set dev enp0s3 address XX:XX:XX:XX:XX:XX
- Finally, turn it on back with command:
ip link set dev enp0s3 up
- Now, verify new MAC id using command:
ip link show enp0s3
- Sample output:
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
- Alternatively, you can do this using ‘ifconfig’ command as described below.
ifconfig eth0 down ifconfig eth0 hw ether 00:80:48:BA:d1:30 ifconfig eth0 up ifconfig eth0 | grep HWaddr
- All done
To Making Changes Permanent – Surviving a Reboot
In openSUSE and other SUSE-based systems (SUSE enterprise desktop\server, etc.) you can make changes “permanent” across reboots by adding an appropriate entry to the /etc/sysconfig/network/ifcfg-ethN file ( ifcfg-eth0 for the first Ethernet interface config file, ifcfg-eth1 – for the second, etc.):
In Red Hat Enterprise Linux (RHEL) and other similar systems (Fedora, CentOS, etc.) an easy way to make changes “permanent” across reboots is to add an appropriate entry to the /etc/sysconfig/network-scripts/ifcfg-ethN file ( ifcfg-eth0 for the first Ethernet interface config file, ifcfg-eth1 – for the second, etc.):
Note: in the file is a value HWADDR – This is not the same thing. Use MACADDR for permanent changes.
The HWADDR “directive is useful for machines with multiple NICs to ensure that the interfaces are assigned the correct device names regardless of the configured load order for each NIC’s module. This directive should not be used in conjunction with MACADDR.”
The MACADDR “directive is used to assign a MAC address to an interface, overriding the one assigned to the physical NIC. This directive should not be used in conjunction with HWADDR.”
Upper and lower case letters are accepted when specifying the MAC address, because the network function converts all letters to upper case.
You can test changes without restarting the system by executing:
service network restart
(WARNING: doing this will break all existing network connections!)
On Debian, Ubuntu, and similar systems, place the following in the appropriate section of /etc/network/interfaces (within an iface stanza, e.g., right after the gateway line) so that the MAC address is set when the network device is started:
hwaddress ether 02:01:02:03:04:08
References – Centos, Wiki, Windows