What is a MAC address » Easy & Quick Guide
If you want to know more about how MAC addresses work and what the functions of the MAC address are, then this post is for you.
What is a MAC address? A Media Access Control (MAC) address is a unique identifier assigned to a Network Interface Controller (NIC) for use as a network address. The MAC address is a hardware address that identifies each device on a network and is essential for communication on local area networks.
Understanding MAC addresses is critical for network administrators and can be used for tasks such as network monitoring, access control, and troubleshooting. Below I go deeper into functions and examples of a MAC address.
Index
How does a MAC address work?
Electronic devices such as a smartphone, computer, printer, smart TV etc. may have a MAC address.
The MAC address serves as a fundamental element of computer networking, providing a unique identifier for each network interface of a device.
The MAC address is a unique identifier that shows which devices are connected.
Each MAC address is unique to a particular network interface, meaning no two devices should have the same MAC address.
In practice, however, there may be rare cases where MAC addresses are duplicated, especially in the case of network interfaces manufactured by different companies.
When two devices on the same network have the same MAC address, it can lead to network problems and disruptions. Fortunately, it is extremely rare.
How a MAC address is used in practice:
When data comes to your router, it has to decide which device requested that data.
If, for example, you open a website, you order data.
It does this by using a MAC address which tells the router who ordered what.
It is the same principle as when the postman comes by.
To deliver the package or letter correctly, the postman must use an address.
The way it works is that your router assigns a private IPv4 or IPv6 address to all devices.
Many internet providers such as Norlys (formerly: Stofa) and YouSee use NAT/CGNAT which has the same function.
The MAC address and the private IP address work together to:
- 1 - Find your device
- 2 - Find the data
- 3 - Find the MAC address and find the private address
- li>
- 4 - Add the correct data to the correct unit
MAC address structure and format
The structure of the MAC address can be divided into two, structure and format. Structure is about how the MAC address is built from scratch and how it can be read. Format is about formatting and use in practice.
Structure
It is important to note that while these formats are used for human-readable representation, the internal storage of a MAC address in a device is typically as a 48-bit binary value.
The MAC address is based on hardware, so it is not something that can simply be changed.
The MAC address serves as a fundamental element of computer networking, providing a unique identifier for each network interface of a device.
Structurally, a MAC address is a 48-bit (6-byte) hexadecimal number, commonly represented in one of two primary formats: the native format and the EUI-64 format.
In the original format, the MAC address is divided into six groups of two hexadecimal digits, separated by either colons or dashes.
On the other hand, the EUI-64 format extends the MAC address to 64 bits and inserts an additional 16 bits in the middle of the address. This extended format is sometimes used in IPv6 addressing.
For example, a MAC address may appear as: "00:1A:2B:3C:4D:5E" or "00-1A-2B-3C-4D-5E< /strong>" or "00.1A.2B.3C.4D.5E" behind a router.
I have included illustrations for you showing MAC addresses of a router in different forms:
Image: MAC address illustration prepared by avXperten staff
Image: MAC address illustration prepared by avXperten staff
Image: MAC address illustration prepared by avXperten staffFormat
When a manufacturer needs MAC addresses for their devices, they apply for a block of addresses from the IEEE.
IEEE then assigns a unique Organizationally Unique Identifier (OUI) to the manufacturer, which the manufacturer uses to create unique MAC addresses for its devices.
Each segment of a MAC address has significance.
The first half (24 bits) typically indicates the manufacturer or vendor responsible for the network interface card, while the second half (24 bits) is a unique identifier assigned to the specific device.
This hierarchical structure ensures a globally unique identifier for each network interface, minimizing the likelihood of address conflicts within a network.
While MAC addresses are fundamental to local communication on a network, it is important to note that they operate at the Data Link Layer (Layer 2) of the OSI model, primarily facilitating communication within a local network.
The original representation of MAC addresses with its standardized grouping and delimiters improves readability and configuration tasks.
It is commonly used in various networking contexts, such as configuring network devices, setting up access control, and troubleshooting.
The EUI-64 format, although less common, is used in IPv6 addressing, contributing to the generation of interface identifiers.
In addition to the visual representation, the internal storage of a MAC address is a binary value, ensuring compatibility with the digital nature of data transmission in the network.
The structure and format of MAC addresses thus play a decisive role in ensuring problem-free communication within networks.
Data Link Layer and the OSI model
The Open Systems Interconnection (OSI) model is a theoretical framework that standardizes the functions of a telecommunications or computer system in seven abstraction layers.
Here is a visual representation for you of what the OSI model looks like:
Image: Illustration of the OSI Model prepared by avXperten staffEach layer has specific responsibilities, and the model helps ensure compatibility and communication between different systems in a network environment.
Here is a video for you that goes in depth on the OSI model and the Data Link Layer:
What functions does a MAC address have?
A MAC address has a longer range of functions, here are some examples:
- Device Identification - MAC addresses uniquely identify each network interface and help distinguish one device from another on a network.
- Local Area Network Addressing - MAC addresses are used for local communication within a network. Devices use MAC addresses to route frames to the intended destination on the same local network.
- ARP (Address Resolution Protocol) - MAC addresses are essential to ARP, a protocol , which is used to map IP addresses to MAC addresses in local networks. ARP helps devices find the MAC address associated with a particular IP address.
- Switching and Bridging - MAC addresses play a role in switching and bridging within local networks. Network switches and bridges use MAC addresses to forward frames to the appropriate ports.
- MAC Address Filtering and Access Control - Network administrators can use MAC addresses for access control by configuring network devices to to allow or deny access based on specific MAC addresses.
- Network Troubleshooting - MAC addresses are valuable when troubleshooting network problems. Analyzing MAC address tables on switches and examining ARP caches can help identify connectivity issues.
- Network Security - MAC addresses are used in security measures such as MAC address filtering to control, which devices are allowed or denied access to a network.
- Preventing network collisions - MAC addresses help prevent network collisions by providing a unique identifier for each device. Network devices use MAC addresses to avoid sending data simultaneously and causing collisions.
- Communication at Layer 2 - MAC addresses operate at Layer 2 (Data Link Layer) of the OSI- model and is essential for framing and addressing data for local network communication.
- Wake-on-LAN (WoL) - MAC addresses are used in Wake-on-LAN scenarios where a device can be turned on remotely by sending a special packet containing its MAC address.
- Dynamic Host Configuration Protocol (DHCP) - In DHCP, MAC addresses are used to uniquely identify devices when IP addresses are obtained dynamically from a DHCP server.
- Vendor Identification - The first half of a MAC address often identifies the manufacturer or vendor of the network interface and provides information about the origin of the unit.
You can read more about MAC address related features in these blog posts: How to Secure Your Home Network, How WiFi Works and IP Address Guide