The MAC address is a critical element of networking, and you'll learn all about it in this post. However, the first thing to remember is that a MAC address differs from an IP address, although the two coexist nicely. You can even say one depends on the other.
That said, it's a good idea to check out my explainer on the IP address before (or after) this post. You might want to do that anyway.
Dong's note: I first published this post on March 1, 2019, and updated it on January August 23, 2024, to include additional relevant information.
What is a MAC address?
MAC stands for media access control. A MAC address—I'll call it MAC from now on—is a unique identifier to control the access of a network interface controller (NIC), which is often known as a network adapter.
Your device—be it a computer, a tablet, or a phone—can connect to the Internet because it has a NIC. This NIC is available as a Wi-Fi receiver (such as the Intel BE200,) an Ethernet adapter (wired), or a cellular modem.
An actual device, like a phone or a computer, only has a MAC address when it has a network adapter. If the device has more than one adapter, each will have its own MAC address.
A MAC address consists of six groups, called octets, of two hexadecimal numbers— 0 to 9 and A to F—separated by colons, hyphens, or nothing. That said, here is a MAC address as you'd see on a Windows computer:
D4-FB-6A-7C-31-B4
This same address can also appear as d4:fb:6a:7c:31:b4 or D4FB6A7C31B4, depending on what platform or application you use to view it.
(This is a random address I made up for this post. If it belongs to an actual device, that's just a coincidence.)
As you might have noticed, MAC is not case-sensitive but tends to appear in all lower or upper cases. Generally, when you alter a digit or letter, you'll get a new MAC.
Things to keep in mind about MAC
Here are some interesting facts about the MAC address.
- Every network adapter must have a MAC. (The MAC address of a device, such as a phone or a computer, is that of its network adapter.)
- The MAC address can be called with different names. Here are a few examples: Physical address, basic service set identifier (BSSID), Ethernet hardware address (EHA), hardware address, or adapter address.
- A MAC is unique and permanent. It's embedded in each networking adapter by the manufacturer—the MACs of a company often share the first three numbers. It's like the vehicle identification number (VIN) of a car. (Take "permanent" with a grain of salt because, just like a VIN, it's susceptible to manipulation. More below.)
- Eventually, we'll run out of MAC addressing space. But considering this is a 48-bit scheme with a total of 281,474,976,710,656—that's 281 trillion and then some hundred billion more—possible addresses, it's safe to say many things more consequential, like humanity or hopefully just the need for the MAC itself, would expire before we have to worry about a MAC shortage. That's not to mention it's OK to use the same (virtual) MAC on two devices as long as they are not part of the same local network—more below.
- MAC addresses are allocated in large groups to hardware vendors. For this reason, connected network devices are often identified within the network as the name of the vendor—such as Dell, Cisco, Hon Hai, Netgear, etc.—instead of their MAC addresses or the names you give them. This is purely a matter of identity.
Generally, a device has its MAC on its label. It's not a secret; everyone can see it. Again, it's like the VIN of a car—it must be visible. However, once the device is yours, it's a good idea to keep this address secure. You'll know why by the end of this post.
Usage: MAC address vs. IP address
If MAC is the VIN of a car, then the IP address is the license plate. Both are used to identify a car, but at different levels and purposes. Specifically, you can't register your vehicle (and get a new license plate) if it doesn't have a VIN.
The use of a MAC address
A DHCP server (like your router) uses a MAC address to assign an IP address to a network adapter. Without MAC, an adapter can't get an IP address. Without an IP address, the device can't connect at all.
You can also use the MAC to reserve a particular IP address for an adapter within a local network. When this happens within the network, the device will get the same IP address each time it connects. This IP reservation feature is necessary for advanced network applications.
Conversely, you can also use MAC to deny (or explicitly allow) access to an adapter via MAC filtering, a kind of security feature. "Kind of" because it's not absolutely secure since you can actually "change" this address, as shown below.
For the most part, though, a MAC address is permanent when you don't do anything. Consequently, if someone knows your device's MAC (like your phone's), they can potentially keep track of you—both at local (LAN) and Internet (WAN) levels.
For this reason, by default, modern mobile devices automatically use a temporary random "virtual" (or "private") MAC address when they connect to a new or public Wi-Fi network. That's also one of the reasons why, now and then, you might want to change your device's MAC.
Reasons you might want to change your MAC
Take "change" with a loose meaning of the word. It's more of a spoofing than changing since this is only temporary at the software level. Specifically, you can only make a device appear to a third party with a virtual MAC address. Its actual MAC is always the same, only disguised by another.
Here are a few occasions where you might want to change your device's MAC.
- You want to re-use an already-approved MAC address on a new device—this is why many routers have a "MAC clone" feature. (By the way, in this case, on the reverse, if you change the MAC of an approved device, it will be disconnected.)
- You know your computer has been blocked or restricted from a network and want to sneak through.
- You're about to join a new network—like a public Wi-Fi—and don't want folks to know your device's real MAC.
And, finally, you don't need any reason. You can change the MAC for the hell of it because you can. But before you can do that, you need to know what your device's MAC is.
How to figure out your device’s MAC
Depending on the device type, there are many ways to find out a device's MAC address. For example, on a router or a modem, the address is generally on the underside of the hardware itself. Just flip it up and take a close look.
But most of the time, we need to figure this out via software, like the device's operating system. So, in a mobile device (like a phone), this tends to be in the "About Device" area.
You can find out about the MAC on computers the way you find out your current IP address—in the ipconfig command, it's the physical address.
Since MAC and IP are closely related, the two are almost always stored next to each other. In other words, if you see the IP, chances are the MAC is around.
Some computers have two network adapters—one for Wi-Fi and the other for Ethernet. In this case, here's how to know which MAC address belongs to which NIC: Connect one of the adapters to a network—only that one will also have an IP address.
How to change a device’s MAC address
Now that you know what a MAC is and where to locate it let's find out how you can (temporarily) change it. Unlike a VIN, it's not illegal to alter your device's MAC address. That's partly because you cannot permanently change a device's MAC address anyway. What you can do is disguise a NIC's actual MAC address as another using software.
This change is temporary. When you reset (or reinstall) the application, move the NIC to a different device, or even restart the device, its original MAC address will return.
Again, keep in mind the limited sense of the word "change" in this case. I'd say "MAC spoofing" is a more accurate choice of expression.
There are many different types of networking devices, some of which you can change the MAC address, others you can't. Generally, that's universally possible with a router or a computer. And that's probably all we'd need to do anyway.
How to change the MAC address of a router
It's only possible to change a router's MAC address if the router has the MAC Clone feature—most routers do.
In this case, all you have to do is log into the router's web interface, navigate to the WAN (Internet) setting area, and choose to enter a new MAC address—whichever you want as long as it fits the format.
Or you can clone the MAC of the computer you're using. After that, apply the change, and the router will carry that MAC address (when working with a third party) until you reset it to default factory settings.
How to change the MAC address of a Windows computer
There are many ways to change the MAC on a Windows computer. The following is the easiest way. You need to use an account with the administrator's privilege.
- Click on the Start button, and type in ncpa.cpl then press Enter to call up the Network Connections window.
- Right-click on the network adapter you want to work with and choose Properties. The Properties window of the connection will appear.
- Click on Configure button, then on the Advanced tab.
- Navigate to the "Network Address" (or "Locally Administered Address") entry.
- Change the Value to a MAC address of your liking. It needs to be entered without any dash or colon, like this: D4FB6A7C31B4, then hit OK. If the new address doesn't work out, enter a new one until it does.
Again, there are complicated rules to form a MAC, but it's faster to start with a known valid one and then change a letter or number randomly until it creates a new MAC.
That's it. Restart your computer, and your new address will appear. To undo this, repeat steps 1 to 4, then choose Not Present before clicking OK. Also, if you reinstall Windows from scratch, the real MAC will be restored.
How to change the MAC address of a Mac computer
Again, there are a few different ways to change MAC on an Apple computer, but the following is the most convenient. Note that you need to log in to a Mac with an admin account for this to work.
- Determine the NIC you're working with: This is called the interface name in the Apple world. If the computer has just one network adapter (all Wi-Fi-only computers are like that), then the interface name is always en0 (that's en—short for Ethernet—and zero). But if the machine has another NIC, its interface name will be en1, and so on. Determine which one's MAC you want to change.
- Make sure the NIC is not being used: If this is an Ethernet NIC, disconnect the network cable. If it's a Wi-Fi adapter, press and hold the Option key on the keyboard, then click on the Wi-Fi icon (top right corner), then on Disconnect from the current Wi-Fi network. Do not disable (turn off) the adapter!
- Call up Terminal: Use Spotlight (Command + Space bar) and then search for "Terminal". When you find it, click on it. The Terminal program will run.
- Execute the MAC change command as shown below.
Assuming you want to use our example MAC address above—that's d4:fb:6a:7c:31:b4—and the NIC's interface name is en0.
Now copy and paste the following command into Terminal, then press Enter (enter your account's password, then press Enter again, if prompted):
sudo ifconfig en0 ether d4:fb:6a:7c:31:b4
(Clearly, d4:fb:6a:7c:31:b4
is the new MAC that you want to use. Replace it with one of your likings.)
Alternatively, you can use the following command to create a random MAC address:
openssl rand -hex 6 | sed 's/(..)/1:/g; s/.$//' | xargs sudo ifconfig en0 ether
And that's it. From this moment on, your NIC will have a new MAC address. When you restart the computer, the NIC's original MAC will return. To make the change persistent, you can write a startup script using the command above.
By the way, if you want to test if the new MAC is in effect, use this command:
ifconfig en0 | grep ether
It will show the current MAC address the adapter is using.
The takeaway
And that's all there is to know about the MAC address. You won't need to worry about it most of the time, but sometimes, knowing how to change your MAC can come in handy in handling some special situations. At the very least, it makes you feel like you're in control.
By the way, considering the vast number of MAC addresses, it's virtually impossible to have two devices sharing one MAC address in the same local network via randomizing.
But you can do that on purpose. In this case, both devices will get the same IP address, or neither will get one. Either case is no good. Generally, the result is that, at best, only one of the two can get connected, and most of the time, neither can. So, pick another MAC address for one of them or let the system handle the randomizing automatically.
Doesn’t the MAC address have to be hexadecimal numbers, not just any letter?
You’re correct, Morris. If you enter a wrong MAC, the system won’t accept it, anyway.
Dong.
Thank you for this excellent explanation. Especially the VIN and the license plate example is great. Even my olde 80 year brain was able to follow this. I was aware that MAC addresses can be “spoofed” but now it all makes much more sense.
Thank you again.
Albert.
👍
HI MISTER Dong:
MY MODEM ROUTER IS: (TP-LINK TD-W8901N Ver. 3)
THAT MODEM ROUTER HAS NOT THE OPTION OF CLONE MAC ADDR. BUT… HAVE THE OPTION OF PUFFIN THE MAC ADDR PREVIOUS ENTER THE NEW MAC ADDR.
AFTER ENTER THE NEW MAC ADDR., I CLIC ON BUTTON (SAVE), EXIT OF THE CONFIG PORTAL AND WHEN I RE ENTER, THE NEW MAC ADDR IS SHOWED IN THE FIELD WHERE WAS SAVED BUTTTTTTT… THE MAIN MAC ADDRESS, WHICH ONE BE ON THE LABEL OF THE BOTOM OF THE MODEM ROUTER, ALWAYS IS SHOWED AS THE MAIN AND PERMANENT MAC ADDR OF MY MODEM ROUTER.
ANY IDEA OR ADVICE TO DFEAT AND REALLY CHANGE THAT SOLID MAC ADDR?
THANKS IN ADVANCE AND HAVE A NICE LIVE.
As mentioned, you CANNOT change the MAC address, Fer. You can only spoof it to the other party, which is the case of the MAC clone feature, or the MAC-changing tips mentioned here.
PS: Please turn off the Caps Lock on your keyboard going forward. It’s very hard to read.
hi,
my tc-4350 is not good.only the power led is on.
with this modem my profile is 30/10.
so, i took my brother’s modem tc-4300 since he switched to fiber he had a 15/10 profile.
when i connect to my line i get his profile 15/10 more or less.
so, what determines the download , upload speed ??
the MAC address of the modem ?? my profile with my ISP ??
Is there a way to change my modem’s tc-4300 mac address and serial number to my previous tc-4350 modem that came with my original profile 30/10.
i cannot get hold of my provider… he has or had a small isp firm and hooked me with a bigger isp..and now he vanished..
i have to admit it’s a weird situation…!!!
i would appreciate your input…
Eddie
I don’t think anyone has any input for you, Eddie, other than the provider. Generally, only an approved modem will work with a particular provider. More on modems in this post.
i would contact my provider..the only problem…this guy has disappeared…i don’t even know if he is alive or dead…!!!
Thanks for your fast reply…!!!
I was told I could change my IP address by changing my MAC address on my PC but I have tried and failed. Is there a workaround even if it’s temporary? I have an ISP Motorola Aris Modem (if that helps).
It’s unclear what you tried and where you failed, Justin. But this post will help with any Mac-related matter. Give it a serious read. Also, check out the related post on IP addresses.
Hi Dong. Nice article. I’m making a server with Node.js. Have you had experience using libnet and pcap? It’s taking some doing to load those net libraries in node but I can generate and receive packets from a bash shell. I insist on having layer 2 access, including MAC addresses. Thanks for the article! It’s nice to see similarly interested individuals.
I use a Synology server with higher-level Node.js-based packages and that’s good enough for me, Robert. Javascript is fun but only when you have a lot of time :). So the quick answer is no, I don’t have a lot of hands-on experience coding and compiling customized applications. Not anymore.
hey,cant find network address on my pc.
Check out this post, Andrew.
If you change the MAC you should be aware of how to construct one correctly.
The basic format looks like this
xx:xx:xx:xx:xx:xx:xx:xx
There are 8 hex values known as octets, labeled below:
o1:o2:o3:o4:o5:o6:o7:o8
Each octet consists of 8 bits, labeled below in reverse order:
b7-b6-b5-b4-b3-b2-b1-b0
b1 must be set to 1 if you are locally making up your own MAC
b0 should be set to 1 for unicast (what you normally will want), otherwise set to 0 for multicast.
Example for local unicast MAC
o1 in binary = 00000010
o1 = 02:xx:xx:xx:xx:xx:xx:xx
The remaining xx:’s can all be randomly chosen as long as there are no conflicts in your zone.
Here is another local unicast example:
o1 in binary = 00000110
o1 = 06:xx:xx:xx:xx:xx:xx:xx
If the above MAC was a local multicast then b0 is set to 1
o1 in binary = 00000011
o1 = 03:xx:xx:xx:xx:xx:xx:xx
You can choose any MAC number as long as b1 is set to 1, and b0 is set to either 1 or 0.
Note that b0 is almost always set to 0 unless you are sending out multicast packet transmissions.
Thanks for the input, Josh. Appreciate it. 👍
Hi Dong
What are your thoughts.
I have a 1gb internet plan.
Cat6 Ethernet cable direct from modem to laptop produces speeds up to 800mbps atm.
Over 5ghz wifi however when the cable is not in sitting a meter from the Asus RoG Rapture gt-ax11000 and im getting avg 500mbps.
Provider said thats loss from the router when its broadcasting.
So my question is what can i do to get any better speed from this router. I mean i spent whatever i needed to, to get possibly the best router australia can offer atm and its been set up well but is there any fine tuning i can do to pull that loss of 200-300mbps back out of the router?
Can understand why the loss.
And its not just over wifi on the PC its also same deal over wifi on the phone.
What to do knowing the router i have ?
It’s you, Jamie. 🙂
But I’m quite serious. Check out this post on Gigabit broadband and follow related posts for more. Make sure you read them in their entirety with the intention to learn and NOT to validate what you already believe or want to believe. Be open-minded, that is.
Or take my word that your experience is quite typical and be happy about it.
Hello Dong
Ok yes im going to ready this now and also take your word for it that this scenario is typical and normal 🙂
Ok read it
Good info to take in actually and makes perfect sense.
In your opinion knowing my router (Asus Rog Rapture GT-AX11000) is there any particular settings i should change that may help me…i mean any advanced settings i may have missed that may help download speed?
There’s no one-size-fits-all “particular” setting for top performance. That depends on the hardware (not just the router) and the environment. You have to understand how things work to set that up. More on testing in this post, more on “settings” in this post. Make sure you read them thoroughly (don’t just scan for what you want) and follow the related links if you have more questions.
Forgot to include my source: https://www.geeksforgeeks.org/introduction-of-mac-address-in-computer-network/
Cool! Thanks again. 🙂
I have an S8 android. Verizon is my carrier through Straight Talk. From my home, my phone usually detects 2 cell towers (or antennas). It is registered with one of them. My problem: I am constantly being handed over to the unregistered antenna which has a very poor signal. Consequently, I have dropped calls other problems associated with a weak signal. A tech manager was able to fix it, and keep me connected to the good Verizon tower. That is, until I restarted my phone 4 days later. Immediately, the bad tower tried taking over again. Is this a MAC issue? P.S. The airplane mode trick will give me the good tower, but it’s only temporary. I used the Phone Signal app for this info. How can I permanently change my MAC address, IF that’s the problem?
Only Verizon can fix this issue, John. And no, as stated in the post, you can’t permanently change the MAC.
Hey Dong, I tried changing the MAC on the router and when I did, I had NO internet. The options were { Default MAC } { Use this MAC } { Computers MAC }
what did I do wrong?
Also, do you have a Patreon account?
Thanks
That’s because your ISP requires a device of a specific MAC, Dave — that’s why many routers have a MAC-Clone feature. Reread the post. I mentioned that specifically.
Understood. Thanks for clarifying.
I guess this “ MAC cloning feature “ is unique to only certain router manufacturers, and if so, who?
Also, if manufacturers included this feature into the makeup of a router, then it most have a legitimate reason for doing so right?
Many, if not most, routers have this feature. It’s designed for when you have a device already registered with a provider, be it an ISP or just a hotel router, and now needs to replace it with a router of your own. And yes in this case it’s totally legit. It doesn’t change the real MAC of the replacement device anyway.
Last question Dong I promise…Do you know if the newer versions of the Netgear Nighthawk routers have this feature and if so, how does one determine if it does?
I followed your directions as stated in the article but, didn’t see this feature anywhere, and you already know what happened when I tried to do so, based on my last comment.
Enjoy your ko-fi…..
Only Netgear can answer that question, David. But many (if not all) of them I’ve seen do have this feature, including the Orbi. This is true for those from other vendors two (Asus, TP-Link, etc.) It’s generally in the WAN (Internet) section. It’s not always called “MAC clone” but something else, basically it allows you to use the router’ to use its real MAC or another one.