The Wayback Machine - https://web.archive.org/web/20240823175711/https://www.geeksforgeeks.org/mac-address-in-computer-network/
Open In App

What is MAC Address?

Last Updated : 19 Oct, 2023
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

To communicate or transfer data from one computer to another, we need an address. In computer networks, various types of addresses are introduced; each works at a different layer. A MAC address, which stands for Media Access Control Address, is a physical address that works at the Data Link Layer. In this article, we will discuss addressing a DLL, which is the MAC Address. 

So, go through the article if you are eager to learn what is MAC address and its components.

What is MAC (Media Access Control) Address?

MAC Addresses are unique 48-bit hardware numbers of a computer that are embedded into a network card (known as a Network Interface Card) during manufacturing. The MAC Address is also known as the Physical Address of a network device. In the IEEE 802 standard, the data link layer is divided into two sublayers:

  1. Logical Link Control (LLC) Sublayer
  2. Media Access Control (MAC) Sublayer

The MAC address is used by the Media Access Control (MAC) sublayer of the Data-Link Layer. MAC Address is worldwide unique since millions of network devices exist and we need to uniquely identify each. 

Media Access Control Address

Format of MAC Address

To understand what is MAC address is, it is very important that first you understand the format of the MAC Address. So a MAC Address is a 12-digit hexadecimal number (6-bit binary number), which is mostly represented by Colon-Hexadecimal notation.

The First 6 digits (say 00:40:96) of the MAC Address identify the manufacturer, called the OUI (Organizational Unique Identifier). IEEE Registration Authority Committee assigns these MAC prefixes to its registered vendors. 

Here are some OUI of well-known manufacturers:

CC:46:D6 - Cisco 
3C:5A:B4 - Google, Inc.
3C:D9:2B - Hewlett Packard
00:9A:CD - HUAWEI TECHNOLOGIES CO.,LTD

The rightmost six digits represent Network Interface Controller, which is assigned by the manufacturer. 

As discussed above, the MAC address is represented by Colon-Hexadecimal notation. But this is just a conversion, not mandatory. MAC address can be represented using any of the following formats:

Format of MAC Address

Note: Colon-Hexadecimal notation is used by Linux OS and Period-separated Hexadecimal notation is used by Cisco Systems.  

Types of MAC Address

1. Unicast: A Unicast-addressed frame is only sent out to the interface leading to a specific NIC. If the LSB (least significant bit) of the first octet of an address is set to zero, the frame is meant to reach only one receiving NIC. The MAC Address of the source machine is always Unicast. 

Unicast

2. Multicast: The multicast address allows the source to send a frame to a group of devices. In Layer-2 (Ethernet) Multicast address, the LSB (least significant bit) of the first octet of an address is set to one. IEEE has allocated the address block 01-80-C2-xx-xx-xx (01-80-C2-00-00-00 to 01-80-C2-FF-FF-FF) for group addresses for use by standard protocols. 

Multicast

3. Broadcast: Similar to Network Layer, Broadcast is also possible on the underlying layer( Data Link Layer). Ethernet frames with ones in all bits of the destination address (FF-FF-FF-FF-FF-FF) are referred to as the broadcast addresses. Frames that are destined with MAC address FF-FF-FF-FF-FF-FF will reach every computer belonging to that LAN segment. 

Broadcast

Reason to Have Both IP and MAC Addresses.

The reason for having both IP and MAC addresses lies in the way the Internet works, specifically in the structure of the OSI Model. This model is a conceptual framework that describes how data is sent and received over a network. It’s divided into seven layers, each performing specific functions.

  • Layer 2 uses MAC addresses and is responsible for packet delivery from hop to hop.
  • Layer 3 uses IP addresses and is responsible for packet delivery from end to end.

Layer 2 (Data Link Layer) uses a MAC (Media Access Control) address. These are unique identifiers assigned to network interfaces for communications at the data link layer. The primary function of MAC addresses is to manage how data is transported from one network node to another on a direct, physical basis – this is also referred to as “hop to hop” delivery.

On the other hand, Layer 3 ( Network Layer ) uses an IP (Internet Protocol) address. These IP addresses are used to identify devices on a network and to route traffic between networks. The IP addresses ensure that the data gets from its original source reaches its final destination and it is also called “end-to-end” delivery of data.

When a computer sends data, it first wraps it in an IP header, which includes the source and destination IP addresses. This IP header, along with the data, is then encapsulated in a MAC header, which includes the source and destination MAC addresses for the current “hop” in the path.

As the data travels from one router to the next, the MAC address header is stripped off and a new one is generated for the next hop. However, the IP header, which was generated by the original computer, remains intact until it reaches the final destination. This process illustrates how the IP header manages the “end to end” delivery, while the MAC headers handle the “hop to hop” delivery.

So, Both IP and MAC addresses are essential for the functioning of the Internet. While MAC addresses facilitate the direct, physical transfer of data between network nodes, IP addresses ensure that the data reaches its final destination.

Why Should the MAC Address Be Unique in the LAN Network?

Consider a LAN (Local Area Network) as a large gathering where everyone is engaged in conversations. Now, let’s suppose that there are two individuals at this gathering who coincidentally share the same name. This scenario would inevitably create confusion, right? If someone calls out that name, both individuals would respond, making it challenging to discern the intended recipient of the message.

In a similar manner, within a network, each device possesses a distinct identifier referred to as a MAC (Media Access Control) address. Think of it as a unique name assigned to the device. When information is transmitted across the network, it is directed to a specific MAC address, much like a letter being addressed to a specific individual.

However, if multiple devices within the same network were to have identical MAC addresses, it would result in confusion and disrupt the network’s functioning. The network would struggle to ascertain which device should receive the transmitted information. To prevent this confusion and ensure the accurate delivery of information, it is vital for each device on a network to possess a unique MAC address.

How Do I Find the MAC Address?

A MAC address is mostly used to configure a router for a network device or during troubleshooting. The address of our computer device can be easily checked with any operating device. All the Apple devices connected to our home network contain a unique MAC address. Manufacturers may identify a MAC address by other names, such as the physical address, hardware ID, wireless ID, and Wi-Fi address.

Following are the steps which help to find MAC addresses for different OS

MAC address on Windows

Here is the Step-by-Step guide to finding MAC addresses on Windows.

Command:

ipconfig /all 

Step 1 – Press Window Start or Click on Windows Key.

windows-ss-1Step 2 – In the search box, type cmd, and the command prompt will get open.

cmd-ss-2

Step 3 – Click on cmd, the command prompt window will display,

ss-cmd-new

Step 4 – In the command prompt type ipconfig/all command and then press enter.

ipmg

Step 5 – As you will scroll down, each physical address is the MAC address of your device.

ipmg-(1)

MAC Address on MacOS

Here is a step-by-step guide to finding MAC addresses on a Mac operating system.

Command for MAC Address in MacOS:

TCP/IP Control Panel

Step 1 – Click on System Settings.

tt

Step 2 – In the system settings, click on the MAC network option.

network-mac-3

Step 3 – Then go to the advanced settings.

advanced-mac-3

Step 4 – Here you find your MAC address.

ip-mac-1

MAC Address on Unix/Linux

Here is a step-by-step guide to finding MAC addresses on a Unix/Linux operating system.

Command For MAC Address in Unix/Linux:

ifconfig -a
ip link list
ip address show

Note: LAN technologies like Token rings and Ethernet use MAC Addresses as their Physical address but there are some networks (AppleTalk) that do not use MAC addresses. for further details.

What is MAC Cloning?

Some ISPs use MAC addresses to assign an IP address to the gateway device. When a device connects to the ISP, the DHCP server records the MAC address and then assigns an IP address. Now the system will be identified through the MAC address. When the device gets disconnected, it loses the IP address.

If the user wants to reconnect, the DHCP server checks if the device is connected before. If so, then the server tries to assign the same IP address (in case the lease period has not expired). In case the user changed the router, the user has to inform the ISP about the new MAC address because the new MAC address is unknown to ISP, so the connection cannot be established. 

Or the other option is Cloning, user can simply clone the registered MAC address with ISP. Now router keeps reporting the old MAC addresses to ISP and there will be no connection issue.

Characteristics of MAC Address

The Media Access Control address (MAC address) is a unique identifier assigned to most network adapters or network interface cards (NICs) by the manufacturer for identification and use in the Media Access Control protocol sub-layer.

An Ethernet MAC address is a 48-bit binary value expressed as 12 hexadecimal digits (4 bits per hexadecimal digit). MAC addresses are in a flat structure and thus they are not routable on the Internet. Serial interfaces do not use MAC addresses. It does NOT contain a network and host portion with the address. It is used to deliver the frame to the destination device.

  • MAC addresses are used in LAN (Local Area Network) environments to identify devices and allow communication between them.
  • MAC addresses are burned into the hardware of a network interface card (NIC) and cannot be changed, except in some rare cases where the manufacturer has provided a specific tool to do so.
  • The first 3 bytes of a MAC address represent the manufacturer ID, while the last 3 bytes represent a unique identifier assigned by the manufacturer.
  • MAC addresses are often used in conjunction with ARP (Address Resolution Protocol) to resolve IP addresses to MAC addresses for communication on a LAN.
  • Some operating systems, such as Windows and Linux, allow you to view the MAC address of your network adapter through a command prompt or network settings.

Advantages of MAC Address

  1. Uniqueness: Each MAC address is unique, which means that devices on the network can be easily identified and managed.
  2. Simplicity: MAC addresses are easy to configure and manage, and do not require any additional network infrastructure.
  3. Compatibility: MAC addresses are widely used and supported by a variety of networking technologies and protocols, making them compatible with many different systems.
  4. Security: MAC addresses can be used to restrict access to a network by only allowing devices with authorized MAC addresses to connect.
  5. Fault-tolerance: In case of hardware or software failure, a device can be easily replaced without affecting the network, as long as the new device has the same MAC address as the old one.
  6. Multicasting: MAC addresses can be used for multicasting, allowing a single packet to be sent to multiple devices at once.
  7. Efficiency: MAC addresses allow for efficient communication on the network, as they enable devices to quickly and easily identify and communicate with each other.
  8. Lower network overhead: MAC addresses reduce network overhead by allowing devices to communicate directly with each other without the need for additional routing or addressing.
  9. Ease of troubleshooting: MAC addresses can be used to troubleshoot network issues by identifying the source of problems and tracking network activity.
  10. Flexibility: MAC addresses can be used to support a variety of network configurations and topologies, including peer-to-peer, client-server, and hybrid models.

Disadvantages of MAC Address

  1. Limited address space: MAC addresses are 48-bit numbers, which means that there is a finite number of possible MAC addresses. This can lead to address conflicts if multiple devices have the same MAC address.
  2. Spoofing: MAC addresses can be easily spoofed, allowing unauthorized devices to gain access to the network.
  3. Inefficiency: MAC addresses are not hierarchical, which can make it difficult to efficiently manage large networks.
  4. Static addressing: MAC addresses are typically assigned at the time of manufacture and cannot be easily changed. This can be a disadvantage in situations where devices need to be reconfigured or replaced.
  5. Limited scope: MAC addresses are only used for identifying devices within a local network segment, and cannot be used to identify devices outside of this segment.
  6. Hardware-dependent: MAC addresses are tied to the network interface card (NIC) of a device, which means that if the NIC fails or is replaced, the MAC address also changes.
  7. Lack of encryption: MAC addresses are sent in plain text, which can make them vulnerable to interception and eavesdropping.
  8. No inherent security: While MAC filtering can be used to restrict access to a network, MAC addresses themselves do not provide any inherent security features.
  9. MAC address collisions: In rare cases, MAC addresses can collide, which can cause network disruptions and make it difficult to identify and manage devices on the network.

FAQs on MAC Address

Q1. What is MAC address used for?

Answer

MAC address is used to identify devices in the same network. On the other hand, IP Addresses also did the same thing but that is used to identify Device devices globally or through its internet address.

Q2. Can we change MAC address?

Answer

No, MAC address is a permanent address of a device which is also hardcoded in the Network Interface Card (NIC). However, many drivers allow the MAC address to be changed.

Q3. What is my MAC address number?

Answer

To find the MAC address of any device, you can follow these general steps:

  1. Open the Settings app on your device.
  2. Navigate to the Network & Internet section.
  3. Select Properties.
  4. Scroll down to the bottom of the page until you find the Physical Address (MAC).

For Further Details:- Check Here

Q4. Difference between MAC Address and IP Address?

Answer

The Difference points between MAC Address and IP Address

MAC Address IP Address
MAC Address stands for Media Access Control Address. IP Address stands for Internet Protocol Address.
MAC Address is a six byte hexadecimal address. IP Address is either a four-byte (IPv4) or a sixteen-byte (IPv6) address.
A device attached with MAC Address can retrieve by ARP protocol. A device attached with IP Address can retrieve by RARP protocol.
NIC Card’s Manufacturer provides the MAC Address. Internet Service Provider provides IP Address.

For more Details :- Check Here



Previous Article
Next Article

Similar Reads

Why is the IP address called a "logical" address, and the MAC address is called a "physical" address?
Let us try to deeply understand, why IP address is known as "Logical" while, MAC Address is known as "Physical" address. The IP address and the MAC address are both used for addressing and identifying devices on a computer network, but they serve different purposes and operate at different levels of the network stack. An IP address is a logical add
7 min read
IP address as logical address and MAC address as Physical address
Overview :IP addresses and MAC addresses are essential for data communication. Assume there are two networks. The first network has three devices: A, B, C and the second network has three devices: X, Y, Z. If a device A from the first network wishes to send data to a device Y in the second network, it must first determine where Y is located in the
6 min read
MAC Address and Random MAC Address
MAC Addresses are the address which are specified by the Manufacturer.MAC address help in communicating with the devices with communicating with other devices over the network. They are 12 digit hexadecimal numbers in which first three set bits specify the manufacturer of the device and last 3 specify the specific device. Random MAC Address They ar
3 min read
Difference between MAC Address and IP Address
Both MAC Address and IP Address are used to uniquely define a device on the internet. NIC Card’s Manufacturer provides the MAC Address, on the other hand, Internet Service Provider provides IP Address. The main difference between MAC and IP address is that MAC Address is used to ensure the physical address of the computer. It uniquely identifies th
2 min read
Why Do We Need IP Address if We Have Already MAC Address?
Answer: The network allots an IP address to every connected device making sure that every device can be identified separately within the network. Each device is identified by its MAC address, which cannot be shared by two devices. The MAC address is assigned by the embedded Network Interface Card (NIC) of each device and cannot be altered once set.
1 min read
How to validate MAC address using Regular Expression
Given string str, the task is to check whether the given string is a valid MAC address or not by using Regular Expression. A valid MAC address must satisfy the following conditions: It must contain 12 hexadecimal digits.One way to represent them is to form six pairs of the characters separated with a hyphen (-) or colon(:). For example, 01-23-45-67
6 min read
Extracting MAC address using Python
MAC address also known as physical address is the unique identifier that is assigned to the NIC (Network Interface Card) of the computer. NIC helps in connection of a computer with other computers in the network. MAC address is unique for all the NIC's. Uses of MAC address : Useful in places where IP address change frequently. Helps network admin.
3 min read
How To Modify MAC address in Windows 10 (Both Wired and Wireless Adapter)?
Prerequisite - Introduction of MAC Address, and Difference between MAC Address and IP Address A Media Access Control address is unique in nature which is doled out to a Network Interface Card to be utilized as a network address in communications within a network. In the Open Systems Interconnection network model, these addresses are utilized under
5 min read
How does a switch learn PC MAC Address before the PING process?
The switch has some intelligence and its networking device operates in the Layer 2 Data link layer in the OSI model. Here, we will see how the switch learns the MAC address of an end device PC even before the PING process between Switch and PC. Let's take an example of 2 PC'S connected to Switch. Note: There are no assigned IP Addresses to PCs. The
3 min read
How to Find Your Mac Address?
Prerequisite : Introduction of MAC Address In this article we will learn How to Find Our Mac Address. 1. Finding mac address in Windows : Click Start or click in the search box and type cmd. Click on the Command Prompt.In cmd window type ipconfig /all and press enter. All the adapters are listed and each have physical address known as mac address.
1 min read
What is MAC Address Table ?
MAC stands for Media Access Control it is a physical address that uniquely identifies a device and hardware manufacturer on a network. Most commonly used in  (IEEE 802) networking technologies, like Ethernet, WiFi, and Bluetooth technology. A mac address is globally unique so suppose two devices are on the internet they can not have the same MAC ad
3 min read
When You Move the NIC Cards from One PC to Another PC, Does the MAC Address Gets Transferred As Well?
Answer: Yes, the MAC Address Moves with the NIC Card. The MAC address is permanently embedded in the NIC circuitry, not the PC.When another NIC card is installed, the PC may have a different MAC address. When a Network Interface Card is transferred or is moved to another PC, the Media Access Control address also travels. It cannot use it; instead,
1 min read
Difference Between Network Address Translation (NAT) and Port Address Translation (PAT)
Network Address Translation (NAT): NAT, in which the Private IP address or local address is translated into the public IP address. NAT is used to slow down the rate of depletion of the available IP addresses by translating the local IP or Private IP address into a global or public IP address. NAT can be a one-to-one relation or many-to-one relation
4 min read
Difference between 3-address instruction and 1-address instruction
The main difference between 3-address instructions and 1-address instructions is the number of operands or addresses they can operate on. 1-address instructions have only one operand or address specified in the instruction, which is typically a memory location or a register. The instruction operates on the contents of that operand and the result ma
3 min read
Difference between 3-address instruction and 0-address instruction
Prerequisite - Instruction Formats 1. Three-Address Instructions : Three-address instruction is a format of machine instruction. It has one opcode and three address fields. One address field is used for destination and two address fields for source. Example: X = (A + B) x (C + D) Solution: ADD R1, A, B R1 <- M[A] + M[B] ADD R2, C, D R2 <- M[C
2 min read
Difference between 3-address instruction and 2-address instructions
Prerequisite - Instruction Formats 1. Three-Address Instructions : Three-address instruction is a format of machine instruction. It has one opcode and three address fields. One address field is used for destination and two address fields for source. Example - X = (A + B) x (C + D) Solution: ADD R1, A, B R1 <- M[A] + M[B] ADD R2, C, D R2 <- M[
2 min read
Difference between 2-address instruction and 1-address instructions
Prerequisite - Instruction Formats 1. Two-Address Instructions : Two-address instruction is a format of machine instruction. It has one opcode and two address fields. One address field is common and can be used for either destination or source and other address field for source. In computer architecture and assembly language programming, 2-address
3 min read
How do You Calculate the Subnet Address from an IP Address and Subnet Mask?
Answer: To calculate the subnet address from an IP address and subnet mask we first convert both into its binary form and perform the bitwise AND operation between IP address and subnet mask.Subnet MaskThe subnet mask of a network is the number in which all the network bits are set to 1 and all host bits are set to 0. Subnet ID or Subnet AddressThe
2 min read
What is Physical Address and Logical Address in Networking?
A physical address is a unique identifier given to network interfaces for communication over a physical network segment. A logical address is a unique address assigned to each networked device to identify its location and enable routing. In this article, we will discuss Physical Address and Logical Address. What is a Physical Address?The physical a
5 min read
MAC Protocol Used in Wireless Sensor Networks
Pre-requisites: Classification of MAC Protocols In Wireless Sensor Networks (WSNs), the Medium Access Control (MAC) protocol is a set of guidelines that dictate how each node should transmit data over the shared wireless medium. The primary objective of the MAC protocol is to minimize the occurrence of idle listening, over-hearing, and collisions o
6 min read
MAC Filtering in Computer Network
There are two kinds of network Adapters. A wired adapter allows us to set up a connection to a modem or router via Ethernet in a computer whereas a wireless adapter identifies and connects to remote hot spots. Each adapter has a distinct label known as a MAC address which recognizes and authenticates the computer. Mac address is shown in the format
10 min read
IEEE 802.11 Mac Frame
Prerequisite – Basics of Wi-fi MAC layer provides functionality for several tasks like control medium access, can also offer support for roaming, authentication, and power conservation. The basic services provided by MAC are the mandatory asynchronous data service and optional time-bounded service. IEEE 802.11 defines two MAC sub-layers:- Distribut
5 min read
S-MAC Protocol in WSNs
S-MAC (Sensor MAC) is a low-power, duty-cycled MAC (medium access control) protocol designed for wireless sensor networks. It tries to save energy by reducing the time a node spends in the active (transmitting) state and lengthening the time it spends in the low-power sleep state. S-MAC achieves this by implementing a schedule-based duty cycling me
11 min read
MAC Contention based with Reservation D-PRMA
Prerequisite - Classification of MAC Protocols First category which comes under classification of MAC protocols is MAC protocols using contention and Reservation mechanisms. First type of contention based protocols is Distributed Packet Reservation Multiple Access Protocol (D-PRMA). Packet Reservation Multiple Access is already built protocol, diff
3 min read
How to Change DNS Server Settings Windows, Mac, Ubuntu and Android?
DNS stands for Domain Name System. It is a translation service that converts a domain name to Ip address. DNS server is an implementation of DNS. Whenever you try to visit any URL, then the browser requests the IP address of that URL from the DNS server provided by your ISP, and the DNS Server in response to this request sends the corresponding IP
4 min read
Difference between DAC and MAC
1. DAC :DAC is identity-based access control. DAC mechanisms will be controlled by user identification such as username and password. DAC is discretionary because the owners can transfer objects or any authenticated information to other users. In simple words, the owner can determine the access privileges. Attributes of DAC - Users can transfer the
3 min read
IEEE 802.11 MAC Enhancement
IEEE 802.11 Architecture, more popularly known as WiFi is widely used to provide anywhere-anytime networking access. New enhancements keep getting introduced as global connectivity demands evolution and improvement. The IEEE 802.11 amendment was introduced to enhance the traditional 802.11 for higher throughput and improve wireless technologies. Th
8 min read
How does a computer get its MAC and IP addresses?
Answer: A computer obtains its MAC address from its network interface card (NIC) and its IP address from a DHCP server or manual configuration & both addresses are essential for network communication.A computer obtains its MAC (Media Access Control) address from its network interface card (NIC), which is a unique identifier assigned to the hard
2 min read
Difference Between Mac and Message Digest
MAC and Message Digest are two widely used terms in computer security and cryptography. Although the two are important in the process of ensuring data integrity and authenticity, they differ in their use and characteristics. This article seeks to differentiate MAC from Message Digest by expounding on each concept’s definitions and how each works in
6 min read
Classification of MAC protocols
MAC protocol is the first protocol layer above the Physical Layer in ad hoc .The primary task of any MAC protocol is to control the access of the nodes to shared medium. Classification of MAC protocols : These are as following below. Contention-based protocols without reservation/scheduling - Bandwidth are not reserved. No guarantees. Contention-ba
2 min read
Article Tags :
Practice Tags :
three90RightbarBannerImg