Last Updated on July 28, 2023 by Mayank Dham
The MAC address serves as a unique physical identifier for each device within a particular network, for effective communication between two connected devices, both an IP address and a MAC address are required. The Media Access Control Address, functioning at the Data Link Layer, is the specific term for this physical address. Each device equipped with a Network Interface Card (NIC) that connects to the internet is assigned a MAC address, which may also be referred to as a Physical address, hardware address, or BIA (Burned In Address).
What is MAC Address?
A MAC address, also known as a Media Access Control address, is a unique identifier assigned to each network interface controller (NIC) or network adapter of a device that connects to a network. This address is used at the Data Link Layer of the OSI model to identify and distinguish different devices within the same network.
A MAC address is a 48-bit hexadecimal number, typically represented in the format of six pairs of alphanumeric characters separated by colons or hyphens (e.g., 00:1A:2B:3C:4D:5E). The first half of the MAC address represents the vendor or manufacturer, while the second half is unique to each device manufactured by that vendor.
The MAC address is "burned in" or assigned by the manufacturer and remains constant throughout the device’s lifetime. It plays a vital role in enabling data packets to be delivered to the correct device within a local network. Unlike IP addresses that can change dynamically or be assigned by a network, MAC addresses are fixed to the hardware and cannot be modified.
How to find the MAC Address?
To find the MAC address of your device, you can follow these steps based on the operating system you are using:
- Open the Start menu and type "cmd" (without quotes) in the search bar to open the Command Prompt.
- In the Command Prompt, type the following command and press Enter:
- ipconfig /all
- Look for the network adapter you are interested in (Ethernet or Wi-Fi) and locate the "Physical Address." This is your MAC address, usually represented in the format of six pairs of alphanumeric characters (e.g., 00-1A-2B-3C-4D-5E).
C- lick on the Apple menu in the top-left corner of the screen and choose "System Preferences."
- In System Preferences, click on "Network."
- Select the network connection you are using (Wi-Fi or Ethernet) from the left panel.
- Click on the "Advanced" button in the bottom-right corner.
- Go to the "Hardware" or "Ethernet" tab. You will find your MAC address listed as "Ethernet ID," "MAC Address," or "Wi-Fi Address."
- Open a terminal window.
- Type the following command and press Enter:
- ifconfig -a
- Look for the network interface you are interested in (eth0 for Ethernet, wlan0 for Wi-Fi) and locate the "HWaddr" field. This represents your MAC address.
- Open the Settings app.
- Go to "Wi-Fi."
- Find the network you are connected to and tap the "i" icon next to it.
- The MAC address (referred to as "Wi-Fi Address") of your device will be listed on the next screen.
- Open the Settings app.
- Depending on your Android version and device, the path may differ slightly, but look for "Wi-Fi," "About Phone," or "About Device."
- Look for "MAC Address," "Wi-Fi MAC address," or similar. The MAC address of your device will be displayed there.
Types of MAC Addresses
MAC addresses can be categorized into three main types based on their origin and usage:
Unicast MAC Address:
- Unicast MAC addresses are used to identify a specific network interface card (NIC) of a single device within a local network.
- These addresses have the least significant bit of the first octet set to 0, indicating a unicast address.
- Unicast addresses are the most common type of MAC address and are used for regular point-to-point communication between devices.
Multicast MAC Address:
- Multicast MAC addresses are used to deliver data packets simultaneously to a group of devices within a local network.
- These addresses have the least significant bit of the first octet set to 1, indicating a multicast address.
- Devices that wish to receive packets addressed to a multicast MAC address must join the specific multicast group associated with that address.
Broadcast MAC Address:
- Broadcast MAC addresses are used to send data packets to all devices within a local network.
- The broadcast address consists of all binary 1s in the MAC address field, resulting in a MAC address of FF:FF:FF:FF:FF:FF in hexadecimal notation.
- When a device sends data to the broadcast MAC address, all devices on the same network will receive the packet.
Difference between MAC Address and IP Address:
MAC address and IP address are both used in computer networks, but they serve different purposes and operate at different layers of the networking stack. Here are the key differences between them:
Layer of Operation:
- MAC Address: MAC (Media Access Control) address operates at the Data Link Layer (Layer 2) of the OSI model. It is used for communication within a local network segment to uniquely identify network interface cards (NICs) of devices.
- IP Address: IP (Internet Protocol) address operates at the Network Layer (Layer 3) of the OSI model. It is used for routing and addressing devices across interconnected networks, such as the Internet.
- MAC Address: The primary purpose of the MAC address is to facilitate communication within a local network. It is used to identify a specific device within the same network segment and is essential for devices to communicate with each other directly.
- IP Address: The primary purpose of the IP address is to enable communication across different networks. It provides a logical address to each device, allowing routers to route data packets to the correct destination across the internet or other interconnected networks.
- MAC Address: MAC addresses are globally unique to each network interface card manufactured by hardware vendors. No two devices in the world should have the same MAC address.
- IP Address: IP addresses are unique within their respective network, but they may be duplicated across private networks or the internet. Network administrators must manage IP address allocation to avoid conflicts.
- MAC Address: It is a 48-bit address represented in hexadecimal format, typically shown in six pairs of alphanumeric characters (e.g., 00:1A:2B:3C:4D:5E).
- IP Address: IPv4 addresses are 32-bit addresses represented in dotted-decimal notation, consisting of four sets of numbers (0 to 255) separated by periods (e.g., 192.168.0.1). IPv6 addresses are 128-bit addresses represented in hexadecimal format, separated by colons.
Scope of Use:
- MAC Address: MAC addresses are used within a local network (e.g., Ethernet LAN) for devices to communicate directly with each other. Routers do not forward MAC addresses beyond the local network.
- IP Address: IP addresses are used for communication across interconnected networks. Routers use IP addresses to forward data packets from one network to another until they reach their destination.
In conclusion, a MAC address (Media Access Control address) is a unique identifier assigned to each network interface card (NIC) or network adapter of a device that connects to a network. It operates at the Data Link Layer of the OSI model and is used for communication within a local network. MAC addresses are vital for devices to identify and communicate directly with each other in a network segment. They are globally unique, ensuring that no two devices should have the same MAC address.
FAQs related to MAC Address:
Q1. Can a MAC address be changed?
MAC addresses are typically "burned in" during the manufacturing process and are meant to be permanent. However, some devices and operating systems allow users to change their MAC address temporarily for various reasons, such as privacy or network troubleshooting. This process is known as MAC address spoofing.
Q2. Can two devices have the same MAC address?
Ideally, no two devices should have the same MAC address. MAC addresses are designed to be globally unique, ensuring proper identification of devices on a network. However, in rare instances, MAC address duplication may occur due to errors during manufacturing or deliberate manipulation.
Q3. What happens if MAC addresses clash on a network?
If two devices with the same MAC address are connected to the same local network, it can lead to communication issues and network disruptions. Network switches and routers may not be able to distinguish between the two devices, causing conflicts and improper data delivery.
Q4. Do MAC addresses change when a device connects to a different network?
No, the MAC address of a device remains constant throughout its lifetime, regardless of the network it connects to. However, when a device connects to a different network, it will obtain a new IP address from the new network’s DHCP server.
Q5. What is the relationship between MAC address and IP address?
MAC addresses and IP addresses serve different purposes in networking. The MAC address is used for local network communication at the Data Link Layer, while the IP address is used for communication across interconnected networks at the Network Layer. Routers use IP addresses to forward data packets between networks, and MAC addresses are only used within the local network segment.