Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

networks
cybersecurity
mac
communitycreator

What is a MAC address and what is it used for?

AKASH BAJWA

What is a MAC?

The local physical address assigned to a network interface controller for local communication is the Media Access Control (MAC) address.

This communication occurs between multiple devices on a network. In computer networking, different types of addresses are present, and each has its own role.

However, a MAC address is a physical address that works in the Data Link Layer in the TCP/IPTransfer Control Protocol Internet Protocol model.

Why are MAC addresses used?

MAC addresses are unique 6-byte long hardware-encoded identifiers also known as EUI (Extended Unique Identifier).

MAC addresses identify senders uniquely and receivers on a network or over a communication channel.

Data Link Layer

According to IEEE 802 Standards, the Data Link Layer is divided into two sublayers.

The first sublayer is the Logical Link Control (LLC), and the second is the Media Access Control (MAC).

On the second sublayer, MAC addresses are used by the Data Link layer to establish a communication channel.

Anatomy of MAC addresses

MAC addresses are unique and used worldwide. Millions of online devices communicate through them. We use the 48-bit or 6-byte long MAC address in Hexadecimal for the unique identification of devices.

The first three bytes are used by vendors, and the remaining are used as a serial number of that vendor’s interface card.


Hexadecimal is a number system with base 16. Include the following numbers: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.

Types of MAC addresses

Below are the types of MAC addresses:

  1. Unicast: represents a specific port in the network.
  2. Multicast: represents a group of devices in the network.
  3. Broadcast: represents all devices in a network.

How to find a MAC address

Below are some commands to check your device’s or network card’s MAC address:


// For windows users open Command Prompt and execute
Command for Windows OS:     ipconfig /all 

// For Linux users open your Terminal and execute
Command for Linux/UNIX OS:  ifconfig -a // -a means all
                            ip link list 
                            ip address show

// For Apple users
MacOS:                      TCP/IP Control Panel / Settings

RELATED TAGS

networks
cybersecurity
mac
communitycreator
RELATED COURSES

View all Courses

Keep Exploring