What is Mac Address? How does It Work?

Every device connected to an Ethernet or Wi-Fi network needs a way to identify itself at the local network level. This is where a MAC address comes in.

A MAC address is a unique identifier associated with a network interface, such as an Ethernet port or Wi-Fi adapter. Network switches use MAC addresses to decide where Ethernet frames should be forwarded.

For business and industrial networks, understanding MAC addresses is important when designing CCTV networks, SCADA systems, PLC networks, access control systems, industrial Ethernet networks, and enterprise LANs.

In this article, we will explain what a MAC address is, how it works, how switches learn MAC addresses, and how it differs from an IP address.

What Is a MAC Address?

MAC stands for Media Access Control.

MAc Address

A MAC address is a Layer 2 hardware or interface identifier used to identify a network interface on a local network.

A typical MAC address looks like this:

00:1A:2B:3C:4D:5E

It is usually represented as 48 bits (6 bytes) and written in hexadecimal format.
MAC addresses are primarily used by Ethernet and Wi-Fi network interfaces for communication within a local network.

How Does a MAC Address Work?

A MAC address works at Layer 2 of the OSI model, also called the Data Link Layer.

When one device sends an Ethernet frame to another device, the frame contains source and destination MAC addresses.

The Ethernet frame contains information such as:

  • Source MAC address
  • Destination MAC address
  • Payload/data
  • Ethernet frame information

The switch examines the destination MAC address and forwards the frame toward the appropriate port. This is one of the fundamental functions of an Ethernet switch.

What Does a MAC Address Look Like?

A traditional MAC address contains 48 bits, represented as 12 hexadecimal characters.

3C:52:82:7A:91:F0

Each hexadecimal character represents 4 bits.

Therefore:

12 hexadecimal characters Ă— 4 bits = 48 bits

The address can be divided into two major portions:

3C:52:82 | 7A:91:F0

   ↓             ↓

Vendor/OUI     Interface-specific part

The first portion traditionally identifies the manufacturer or organizational assignment, while the remaining portion identifies the particular network interface.

The first 24 bits are commonly associated with the OUI (Organizationally Unique Identifier).

However, modern systems can also use locally administered MAC addresses, so the first portion does not always mean the device was permanently assigned that address by the manufacturer.

What Is the Purpose of a MAC Address?

The main purpose of a MAC address is to provide local Layer 2 identification.

Consider an industrial facility with:

  • 50 CCTV cameras
  • 4 NVRs
  • 20 PLCs
  • 10 engineering workstations
  • 15 access-control devices
  • Several Ethernet switches

Each network interface has a MAC address.

When an Ethernet frame travels through a switch, the switch uses these MAC addresses to determine where the frame should go.

This makes MAC addressing particularly important in networks containing many connected devices.

How Does a Network Switch Use MAC Addresses?

One of the most important concepts to understand is the MAC address table.

An Ethernet switch continuously learns which MAC addresses are connected to which ports.

MAC AddressSwitch Port
AA:BB:CC:11:22:33Port 1
AA:BB:CC:44:55:66Port 2
AA:BB:CC:77:88:99Port 3
AA:BB:CC:12:34:56Port 4

What Happens When the Switch Does Not Know the MAC Address?

Suppose a switch receives a frame for:

But this MAC address is not currently present in its MAC table.

The switch does not know which port contains the destination device.

In this situation, the switch may flood the frame out of the relevant ports within the VLAN, except the port where the frame was received.

When the destination device responds, the switch learns its source MAC address and updates its MAC address table.

This learning process allows the switch to become more efficient over time.

MAC Address vs IP Address

MAC addresses and IP addresses are both important, but they perform different functions.

FeatureMAC AddressIP Address
OSI LayerLayer 2Layer 3
PurposeLocal network/interface identificationLogical network addressing
Common format00:1A:2B:3C:4D:5E192.168.1.10
Used byEthernet/Wi-FiIP networking
Usually associated withNetwork interfaceNetwork configuration
Used by switchesYesNot primarily
Used by routersNot for routing decisionsYes
Changes between networksUsually stays with interfaceUsually changes

A simple way to remember the difference is:

MAC address = local Layer 2 identity

IP address = Layer 3 logical address

Frequently Asked Questions

Is a MAC address the same as an IP address?

No. A MAC address is used primarily for Layer 2 communication, while an IP address provides logical Layer 3 addressing.

How many bits is a MAC address?

A traditional Ethernet MAC address is 48 bits, or 6 bytes.

Can two devices have the same MAC address?

They should not have the same MAC address within the same network. Duplicate MAC addresses can cause communication and switching problems.

Can I find a device using its MAC address?

Yes. On a managed switch, you can often search the MAC address table to determine which switch port and VLAN have learned that MAC address.

Does a router use MAC addresses?

Yes, routers use MAC addresses when sending Ethernet frames on their local interfaces, but routing decisions are primarily based on IP addresses.

Conclusion

A MAC address is a Layer 2 identifier used by Ethernet and Wi-Fi network interfaces for local network communication. When a device sends an Ethernet frame, the source and destination MAC addresses help switches determine how that frame should be handled.

For network engineers, understanding MAC addresses is essential because they form the foundation of Ethernet switching. In CCTV, SCADA, PLC, access control and industrial Ethernet networks, MAC address tables can also be valuable troubleshooting tools for identifying devices and their connected switch ports.

CX-NPA-24GS4I-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-8GS40I-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-16GS4I-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-SPD01-40K2P DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-SPDP02-10KS1 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

Tell Us Your Requirement

CX-NMS DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-PS-485-D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-PS-487-R DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

Get A Quote

Please fill this form to get best price for projects. 

CX-ND-0GSF24S20-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-PS-487-R DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-PS-482-D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-nPA-4GS2I-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-8GS4I-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-16GS2I-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-8GSF24S40-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-1GS1l-MC DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-8GS2I-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-0GSF12S0-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-24GS60D-L3DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-0GSF48S60-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-4GS2D-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-8GS2D-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-8GS4D-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-16GS2D-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPG-4GS2D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPG-8GS2D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPG-8GS4D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPG-16GS2D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPG-24GS4D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NG-4GS2D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NG-8GS2D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NG-8GS4D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NG-16GS2D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NG-24GS4D DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-4GS2D-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-16GS2D-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-24GS4D-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-24GS4S2-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-4GS2I-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

Selected Value: 0

CX-NA-8GS2I-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-8GS4I-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-16GS2I-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-24GS2D-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-48GS40D-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-48GS40D-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-24GS40D-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-8GS4D-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-24GS4D-L2 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-24GS40D-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-4GS2I-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-8GS40I-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NR-8GSF2S10I DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-ND-0GSF24S20-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPD-24GS60D-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-24GS40I-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NA-24GS40I-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-48GS60D-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-ND-0GSF48S60-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-8GS20I-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-16GS40I-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NPA-24GS60D-L3 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-NE-5HS0I DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.

CX-SFP-1 DATASHEET DOWNLOAD​

Enter your details to receive the datasheet instantly in your email.

CX-SFP-10 DATASHEET DOWNLOAD

Enter your details to receive the datasheet instantly in your email.