Posts tagged mac
Change Network Card MAC in Ubuntu/Linux
A Media Access Control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment. Read more about MAC addresses here.
Tip: Please write down your current MAC address before you continue
To change the MAC address in Ubuntu, perform the following:
Temporary solution
- Open terminal and check your current MAC address:
ifconfig |grep HWaddrOutput should be something like this (MAC’s are red):
eth0 Link encap:Ethernet HWaddr f4:6d:0b:37:f9:83
vboxnet0 Link encap:Ethernet HWaddr 0b:00:23:00:00:00
wlan0 Link encap:Ethernet HWaddr e0:c9:d5:1a:ed:b5 - Now, disable the network interface (eth0 for the wired network connection, wlan0 for wireless etc.):
sudo ifconfig eth0 down
- Change the MAC address:
sudo ifconfig eth0 hw ether 00:15:a5:d5:39:19
- Enable the network interface:
sudo ifconfig eth0 up
- Check if the change is successful:
ifconfig |grep HWaddrShould return the changed address:
eth0 Link encap:Ethernet HWaddr 00:15:a5:d5:39:19
vboxnet0 Link encap:Ethernet HWaddr 0b:00:23:00:00:00
wlan0 Link encap:Ethernet HWaddr e0:c9:d5:1a:ed:b5
Permanent solution
- Open the interfaces file, you can choose any text editor you want:
sudo vi /etc/network/interfacesYou should see something like the following:
auto lo
iface lo inet loopback - Add this line at the bottom of the file:
hwaddress ether 00:15:a5:d5:39:19The red text is the MAC address, so replace this one with your desired address.
- Restart the networking service or your computer:
sudo /etc/init.d/networking restart
Common issue(es)
- If there is no connectivity after ifconfig eth0 up or sudo /etc/init.d/networking restart try the following:
dhclient eth0 This will request a new IP address and it should fix the connectivity issue.
Recent Comments