What is a MAC Address?
A MAC (Media Access Control) address is a unique identifier assigned to a hardware called network interface controller (NIC) for use as a network address. This use is common in most IEEE 802 networking technologies, including Ethernet, Wi-Fi, and Bluetooth.
The NIC aka Network controller is computer hardware that makes it possible for your computer to connect to a network. A NIC turns data into an electrical signal that can be transmitted over the network.
The main purpose of a MAC address is to uniquely identify devices on a network. Like an IP address, it is similar to a unique home address. When a device sends data on the network, it includes its MAC address as the source address in the packet. The recipient device can then use the MAC address to determine where the data came from.
In addition to its unique identification role, MAC addresses are also used in network address translation (NAT), allowing network devices to communicate with one another even if they have private IP addresses.
It’s important to note that, unlike an IP address, a MAC address is hard-coded into a device’s NIC and cannot be changed. This makes it useful for network security purposes, as it’s possible to block or allow traffic from specific devices based on their MAC addresses.
How Addresses are Used
The importance of MAC addresses can be understood by considering the following points:
- Network Layers: MAC addresses are used at the Data Link Layer of the OSI (Open Systems Interconnection) model. This layer is responsible for managing the flow of data between devices on a network and providing reliable data transfer.
- Address Resolution Protocol (ARP): When a device wants to send a data packet to another device on the same network segment, it uses the Address Resolution Protocol (ARP) to resolve the IP address of the destination device to its corresponding MAC address. The ARP cache, which is a table stored in each device, is used to store the mapping between IP addresses and MAC addresses on the local network.
- Debugging and Troubleshooting: MAC addresses can be useful in troubleshooting network issues. By knowing the MAC address of a device, network administrators can quickly determine if the device is connecting to the network correctly and identify any potential problems.
- DHCP Functionality: Since MAC addresses are unique, Dynamic Host Configuration Protocol (DHCP) servers use them to assign IP addresses to devices on the network.
- Filtering of Network Traffic: MAC addresses are used to filter network traffic and control access to the network. Routers and switches can be configured to only allow certain devices to access the network based on their MAC address, providing an extra layer of security.
- Identification of Devices on Local Network: MAC addresses are used to identify devices on a local network. Multiple devices can be assigned the same IP address, thus using a MAC address can distinguish between different devices.
- Network Security: MAC addresses can play a role in network security. They can be used to detect unauthorized devices on the network, helping to prevent security breaches. Additionally, MAC addresses can be used in network protocols to prevent attacks such as ARP spoofing and man-in-the-middle attacks.
MAC Address Features
A MAC address is made up of six pairs of hexadecimal characters separated by colons. It typically has the format XX:XX:XX:XX:XX:XX, where each X represents a hexadecimal character.
- The first three octets (XX:XX:XX) of a MAC address are known as the organizationally unique identifier (OUI), and they identify the manufacturer of the NIC.
- The last six digits are assigned by the manufacturer of the network card to only a single card produced. Across manufacturers, this is not a unique number. Although the combination of the OUI and the card number is unique.
- MAC addresses are stored in the firmware of a device’s NIC, making them independent of the operating system and software installed on the device. This means that even if you change the operating system or reformat the hard drive, the MAC address of the NIC will remain the same. (there is a security risk where one can take a NIC out of a computer and use it in another compromised computer to gain access to network resources)
- Some NICs allow you to change the MAC address using software, but this is not the same as changing the actual MAC address stored in the NIC’s firmware. This is referred to as MAC address spoofing and is often used for security purposes, such as hiding the identity of a device on a network.
- In some cases, it’s possible for two devices on a network to have the same MAC address. This is known as a MAC address collision and can cause communication problems on the network. Network administrators can use tools such as Address Resolution Protocol (ARP) to detect and resolve MAC address collisions.
- Finally, it’s important to understand that MAC addresses are only unique within the context of a single network. This means that two devices with the same MAC address can coexist on different networks without causing any problems.
MAC Address vs IP Address
The MAC (Media Access Control) address and IP (Internet Protocol) address are both unique identifiers used in computer networking. While they serve similar purposes, they are used in different ways and at different layers of the OSI network stack.
A MAC address is a unique identifier assigned to an actual physical network interface controller (NIC) for use as a network address for a computer or other networking devices. The MAC address is used to identify a device on the local network and is essential for communication between devices on the same network segment.
An IP address, on the other hand, is a logical mechanism used at the software level to identify a device on a network or the internet. Unlike MAC addresses, IP addresses can be changed and at different times assigned to different devices. Most networks now use DHCP (Dynamic Host Configuration Protocol) to assign IP addresses to computing devices, including mobile phones.
In conclusion, an IP address is a higher level abstraction that uses network packets identified by MAC address to transfer data across the network.
You can check your IP using our “what is my IP address“, tool.
What are the Different Types of MAC Addresses?
There are three types of MAC addresses:
- Unicast MAC address: A unicast MAC address is used to identify a single device on the network. When a device sends data, it includes its unicast MAC address as the source address in the packet. The recipient device uses the unicast MAC address to determine the source of the data.
- Broadcast MAC address: A broadcast MAC address is used to broadcast data to all devices on the network. The broadcast MAC address has all its bits set to 1, and it is used when a device needs to send data to all other devices on the network. Broadcast MAC address is used for ARP (Address Resolution Protocol) to get an IP address.
- Multicast MAC address: A multicast MAC address is used to send data to a group of devices on the network. It is used when a device needs to send data to multiple devices on the network, but not to all devices. For example, when a device needs to send data to multiple devices using the same multicast IP address.
MAC Address for Wireless Devices
A MAC address can also be used in wireless communication. In wireless networks, the MAC address is used to identify the device and its location on the network. Wireless devices use their MAC address to communicate with access points and other wireless devices.
It is important to note that the MAC address of a wireless device can be changed, or “spoofed”, to impersonate another device on the network. This can be used in malicious activities such as network security breaches.
To mitigate network MAC spoofing, wireless networks implement various security measures such as WPA or WPA2 encryption, which use unique encryption keys to secure communication between devices on the network.
How do I find the MAC Address for Various Devices?
There are different ways to find a MAC address, depending on the device being used. Below I will go over the details of find MAC address of various devices and operating systems.
How to Find MAC Address on Windows
Finding the MAC address of your computer’s network interface card (NIC) on Windows is a simple process. A MAC address is a unique identifier assigned to a NIC for use as a network address in communications within a network segment. The MAC address is used to identify a device on the local network and is essential for communication between devices on the same network segment.
Here’s how you can find the MAC address on a Windows computer:
- Open the Command Prompt: Either go to start menu to open the Command Prompt or press the
Windows key + X
and then click on the Command Prompt option. - Run the ipconfig command: At the Command Prompt, type
ipconfig /all
and press enter. This will display a list of all your network adapters and their configuration information, including the MAC addresses. - Locating the MAC address: The MAC address will be listed next to the Physical Address text.
C:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : slap
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : hsd1.ca.comcast.net
Ethernet adapter Ethernet:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Killer E3100G 2.5 Gigabit Ethernet Controller
Physical Address. . . . . . . . . : D8-BB-C1-A8-52-71
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : hsd1.ca.comcast.net
Description . . . . . . . . . . . : Killer(R) Wi-Fi 6E AX1675x 160MHz Wireless Network Adapter (210NGW)
Physical Address. . . . . . . . . : 28-D0-EA-3C-C0-6C
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2601:644:8f84:cbd0::6139(Preferred)
Above you can see the output of the ipconfig
command. I have deleted a lot of extra lines to keep this clear to understand.
In the output, you will see that the first NIC, Ethernet (line #12), is disconnected. Its Physical address is on line #17.
The connected NIC is my wireless adapter, connected through DHCP (line #26) to the network. My MAC (or Physical address) is 28-D0-EA-3C-C0-6C
(line #25).
Finding the MAC address on a Windows computer is straightforward. Although if you have multiple NICs on the devices then you will have to filter to get to the active one. It is also possible that multiple NICs are enabled, and for those you see not only MAC address but IP address details as well.
How to Find MAC Address on macOS
There are two ways to find the MAC address on a macOS computer.
Find MAC Address with System Preferences
- Open System Preferences: On the top left corner click on the Apple icon and select System Preferences.
- Open Network Settings: In System Preferences, click on the Network icon.
- Select your network adapter: Select the network adapter for which you want to find the MAC address on the left. Then click on the advanced button in the bottom right.
- View the MAC address: The MAC address will be listed under the Hardware tab.
Find MAC Address Using Shell Command
- Open the Terminal: Press
Command + Space Bar
on your Mac keyboard or press press F4. Type inTerminal
. Click on the App icon to open the app. - Run the ipconfig command: At the Command Prompt, type
ifconfig
and press enter. This will display a list of all your network adapters and their configuration information, including the MAC addresses. - Locating the MAC address: The MAC address will be listed next to the ether text.
user@MacBook-Air ~ % ifconfig
*** snipped lines for brevity ***
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
ether d0:88:0c:6b:83:50
inet6 fe80::cb2:77b4:3e05:18d%en0 prefixlen 64 secured scopeid 0xb
inet 10.0.0.218 netmask 0xffffff00 broadcast 10.0.0.255
inet6 2601:644:8f84:cbd0:1069:8632:145f:db76 prefixlen 64 autoconf secured
inet6 2601:644:8f84:cbd0:addf:c627:bce6:e5d2 prefixlen 64 autoconf temporary
inet6 2601:644:8f84:cbd0::c31a prefixlen 64 dynamic
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
In the output above for the ifconfig
command, line #4 shows that the networked interface en0 is active (line #14). The MAC address is d0:88:0c:6b:83:50
(line #6).
Since I am a command line freak I find this method to be much quicker.
How to Find MAC Address on Linux (Ubuntu, CentOS, Debian, Fedora, Redhat)
Here’s how you can find the MAC address on a Linux computer:
- Open the Terminal: You can open the Terminal by clicking on the Applications menu, selecting Accessories, and then selecting Terminal.
- Run the ifconfig command: In the Terminal, type
ifconfig
and press enter. This will display a list of all your network adapters and their configuration information, including the MAC address. - Locate the MAC address: The MAC address will be listed next to the ether text, and will appear as a series of hexadecimal numbers separated by colons.
user@slap:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.25.173.216 netmask 255.255.240.0 broadcast 172.25.175.255
inet6 fe80::215:5dff:feda:6ec1 prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:da:6e:c1 txqueuelen 1000 (Ethernet)
RX packets 86955 bytes 122274524 (122.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6416 bytes 455223 (455.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
In my case I can see the MAC address 00:15:5d:da:6e:c1, on line #5 for the network adapter eth0
(line #2).
How to Find MAC Address on iOS or iPhone
Here’s how you can find the MAC address on an iOS device:
- Open Settings: On your iPhone or iPad, tap on the Settings app.
- Tap on General: Scroll down and tap on General.
- Tap on About: Scroll down to select About
- View the MAC Address: The MAC address of your iOS device will be listed under the Wi-Fi Address field.
How to Find MAC Address on Android Phones or Tablets
Here’s how you can find the MAC address on an Android device:
- Open Settings: On your Android device, tap on the Settings app icon.
- Open About: Depending on your device, scroll down to the About option.
- Tap on Status: Scroll down and tap on Status.
- View the MAC address: The MAC address and other information such as IP address and IMEI information is viewable of the status screen.
Conclusion
As you saw in the post above, a MAC address is used by all digital devices that have the capability to be part of a network. With this unique identifier, a device loses its ability to communicate with other external devices.
Check out my other posts on: