change MAC Address in CentOS 7
Networking

How to change MAC Address in CentOS 7 [with Video]

March 31, 2015

This tutorial will show you how to change MAC Address in CentOS 7. I assure you this is a perfectly working and tested method. In many cases you need to change MAC to allow internet access or run any MAC based licensed software like Radius Manager. So for those situations here we go.

Steps to change MAC Address in CentOS 7:

  1. Update CentOS Repositories by:
    yum update
  2. Install nano (for editing config files) and net-tools (for enabling ifconfig command).
    yum install nano net-tools
  3. Go to the ethernet configuration file.

    nano /etc/sysconfig/network-scripts/ifcfg-ens160
  4. Add the following line. Replace the current MAC with your desired MAC Address.
    MACADDR=00:0C:29:24:79:76
  5. Save the configuration file.
  6. Restart the networking process.
    service network restart
  7. You are done. Now, verify by issuing ifconfig command.
  8. If you have a windows machine in the same network. Issue arp -d to delete current ARP table. Then ping CentOS 7 IP Address from Windows PC. Next issue arp -a. You will find the changed MAC next to your CentOS 7 IP Address.

 

Video tutorial to change MAC Address in CentOS 7


For any queries, post a comment and I’ll get back to you.