MAC address vs. IP address: What's the difference? | TechTarget (2024)

Answer

Article 3 of 6

Part of:The fundamentals of computer networking

A MAC address and an IP address each identify network devices, but they do the jobs at different levels. Explore the differences between the two and learn why both are necessary.

By

  • John Burke,Nemertes Research
  • Chris Partsenidis,Firewall.cx

Published: 23 Jul 2024

Every computer or device on the internet has two types of addresses: a physical address and an internet address.

The physical address -- or media access control (MAC) address -- identifies a device to other devices on the same local network. The internet address -- or IP address -- identifies the device globally. A network packet needs both addresses to get to its destination.

What's the difference between MAC and IP addresses?

MAC addresses and IP addresses both identify a network device but in different ways. Some of the main differences between a MAC address and an IP address include the following:

  • Local identification vs. global identification.
  • Layer 2 vs. Layer 3 operation.
  • Physical address vs. logical address.
  • Number of bits.
  • Address assignment and permanence.
  • Address formatting.

A MAC address is responsible for local identification and an IP address for global identification. For example, the MAC address is only significant on the LAN to which a device is connected. It is not used or retained in the data stream once packets leave that network. This is the primary difference between a MAC address and IP address, affecting how the addresses differ in their number of bits, address assignment and interactions.

Another difference between a MAC address and IP address is the way the addresses are assigned. Manufacturers assign a unique MAC address to each device, and these addresses are typically regarded as permanent. But it is possible to alter or spoof a MAC address with command-line tools and software settings. An IP address is bound to a network device via software configurations. Network administrators can manually change the address at any time or use Dynamic Host Protocol Configuration (DHCP) to change it dynamically.

MAC address vs. IP address: What's the difference? | TechTarget (1)

What is a MAC address?

Media access control refers to the piece of hardware that controls how data is pushed out onto a network. A MAC device operates on Layer 2 -- the data link layer -- of the OSI model for networking. Each device has a MAC address that acts as a unique identifier for the network interface card (NIC) installed on the device. This address operates at Layer 2, letting devices talk to each other within the same broadcast domain.

In the current internet era, most devices are connected physically with Ethernet cables or wirelessly with Wi-Fi. Both methods use MAC addresses to identify a device on the local network.

A MAC address consists of 12 hexadecimal digits, usually grouped into six pairs separated by hyphens. MAC addresses are available from 00-00-00-00-00-00 through FF-FF-FF-FF-FF-FF. The first half of the number is typically used as a manufacturer ID, while the second half is a device identifier. In nearly all enterprise network devices today, this number is hardcoded into the device during the manufacturing process.

The number of device-identifying bits is limited, however, so manufacturers do reuse them. Each manufacturer has about 1.68 million available addresses, so when it burns a device with a MAC address ending in FF-FF-FF, it starts again at 00-00-00. This approach assumes it is highly unlikely two devices with the same address will end up in the same local network segment.

No two devices on a local network should ever have the same MAC address. If that does happen, both devices have communication problems because the local network gets confused about which device should receive the packet. When a switch broadcasts a packet to all ports to find the intended recipient, the device that responds first receives the packet stream. If the device reboots, is taken away or shuts down, the other node then receives the packets.

What is an IP address?

Internet Protocol controls how devices on the internet communicate and defines the behavior of internet routers. It corresponds to Layer 3, the network layer, of the OSI reference model. The internet was initially built around IPv4 and is in transition to IPv6.

An IP address identifies a device on the global internet, acting as the device's logical address to identify its network connection. Typically, an ISP assigns the IP address to a customer's device. Network administrators use DHCP to assign and manage IP addresses within the local network.

An IPv4 address consists of 32 bits, usually written as four octets using decimal numbers, separated by periods. This format is also known as a dotted quad. Possible values range from 000.000.000.000 through 255.255.255.255, although many possible addresses are disallowed or reserved for specific purposes. One example is 192.0.2.127.

The IP address combines network identification and device identification data. The network prefix is anywhere from eight to 31 bits, and the remaining bits identify the device on the network. Steady, rapid growth in the number of internet-connected devices has led to the looming exhaustion of the IPv4 address list -- one of several reasons for the development of IPv6.

An IPv6 address consists of 128 bits, with the first 64 reserved for network identification and the second 64 dedicated to identifying a device on the network. The address is typically written as eight sets of four hexadecimal digits separated by colons -- for example, 2001:0DB8:A1CD:1234:0000:48B3:4001:BA92. In this case, the segment consisting of 0000 can also be written with a single 0, and 0DB8 can be written as DB8 to omit the leading zero. Many conventions are available to shorten an IPv6 address when writing it.

How MAC and IP addresses work together

Any piece of internet software, such as a web browser or email client, directs data to a destination on the internet using the destination's IP address. For example, if a user wants to access a website via a web browser, they could enter the domain's IP address. Most people don't know a website's IP address, however, and use human-readable DNS names instead, which a DNS server translates into the corresponding address.

MAC address vs. IP address: What's the difference? | TechTarget (2)

The source network software stack inserts the IP address information into the data packets and forwards the packets toward their destination. Internet routers move the packets from the source network to the destination network. Once the packets reach the destination network, the LAN translates the IP address to a MAC address using Address Resolution Protocol (ARP). It then adds the MAC address to the data stream and sends the data to the right device on the local network.

Local network switches maintain ARP tables that map IP addresses to MAC addresses. When a router sends the switch a packet with a destination specified by an IP address, it uses the ARP table to know which MAC address to attach to the packet when it forwards the data to the device as Ethernet frames.

Editor's note: This article was originally written by Chris Partsenidis. It has been updated by John Burke and TechTarget editors to improve the reader experience.

John Burke is CTO and principal research analyst with Nemertes Research. With nearly two decades of technology experience, he has worked at all levels of IT, including as an end-user support specialist, programmer, system administrator, database specialist, network administrator, network architect and systems architect. His focus areas include AI, cloud, networking, infrastructure, automation and cybersecurity.

Next Steps

Introduction to IP addressing and subnetting

Related Resources

Dig Deeper on Network infrastructure

  • MAC address vs. IP address explainedBy: JenniferEnglish
  • ARP vs. RARP: What's the difference?By: DamonGarn
  • Address Resolution Protocol (ARP)By: MariuszZydyk
  • Use Angry IP Scanner to audit the networkBy: DamonGarn

Related Q&A from John Burke

Cloud networking vs. cloud computing: What's the difference?

Organizations might sometimes consider cloud computing and cloud networking as interchangeable due to their similarities. But the two strategies have...Continue Reading

Network simulation vs. emulation: What's the difference?

Network engineers use simulation and emulation to test changes, which ensures reliable post-change performance. Network simulators create models, ...Continue Reading

In WAN evolution, is software-defined now implied?

Networking trends and innovations, such as automation and network as a service, have started to ingrain software-defined principles into WAN ...Continue Reading

Part of: The fundamentals of computer networking

Article 3 of 6

Up Next

12 common network protocols and their functions explainedNetworking makes the internet work, but neither can succeed without protocols. Common network protocols and their functions are key for communication and connection across the internet.
What is the difference between TCP/IP model vs. OSI model?Use this expert advice to learn the differences between the TCP/IP model vs. the OSI model, and explore how they relate to each other in network communications.
MAC address vs. IP address: What's the difference?A MAC address and an IP address each identify network devices, but they do the jobs at different levels. Explore the differences between the two and learn why both are necessary.
Static vs. dynamic routing: What is the difference?Static routing uses preconfigured routes to send traffic to its destination, while dynamic routing uses algorithms to determine the best path. How else do the two methods differ?
Intro to encapsulation and decapsulation in networkingEncapsulation adds information to a packet as it travels to its destination. Decapsulation reverses the process by removing the info, so a destination device can read the original data.
How to convert binary to decimalIt's helpful for network admins to know how to convert binary to decimal, and vice versa, for IPv4 addressing, subnet masks, default gateways and network IDs.
MAC address vs. IP address: What's the difference? | TechTarget (2024)
Top Articles
The Top 10 Most Popular DeFi dApps on the Avalanche Platform
12 Ways to Make Time Pass Quickly when Looking Forward to Something
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Pearson Correlation Coefficient
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Kimberely Baumbach CPA

Last Updated:

Views: 5804

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Kimberely Baumbach CPA

Birthday: 1996-01-14

Address: 8381 Boyce Course, Imeldachester, ND 74681

Phone: +3571286597580

Job: Product Banking Analyst

Hobby: Cosplaying, Inline skating, Amateur radio, Baton twirling, Mountaineering, Flying, Archery

Introduction: My name is Kimberely Baumbach CPA, I am a gorgeous, bright, charming, encouraging, zealous, lively, good person who loves writing and wants to share my knowledge and understanding with you.