If my computer has an IP address,why does it need a MAC address?
-
3In order to give the best answer to you, could you expand your question to include why you think you would not need a MAC address if your computer has an IP address? – Brett Lykins Sep 22 '13 at 16:10
-
1I would recommend picking up a good basic book on Networking and reading it; will be worth it. It will answer this question and many more: http://www.amazon.com/Computer-Networking-Top-Down-Approach-Edition/dp/0132856204 – Manoj Pandey Sep 22 '13 at 18:02
-
5This sounds pehaps snarky, but it is the simplest way to reduce the confusion. Why did you put an *ethernet* NIC in your computer? Answer that question, and it answers the question about the necessity of a mac address. – Mike Pennington Sep 22 '13 at 18:39
-
I really don't understand the " this is basic stuff , you shouldn't really be here " answers to this question.There's lots of accomplished network engineers who don't really know how to answer this.It's Irrelevant to them getting the Job done so they skim over the whys and hows. – Feb 09 '14 at 08:55
-
5@Reprovo, the only place where comments/answers really make this statement is when the OP responds to Teun Vink's answer with a desire to avoid networking models in the answers. If you don't know the why's and how's of the network models, you really don't understand your network and "getting the job done" will either be much more painful or create additional problems. There are many things you don't really need to know as a network professional (for example, how bits are put on the wire, etc), but the network models are not something they can avoid getting at least a basic understanding. – YLearn Feb 09 '14 at 14:17
-
@Reprovo,exactly no question is basic and everyone needs to learn.It wasn't the case that I wanted to avoid the network models but if one had to explain it to a naive user,could it be explained without the reference models. – user1369975 Feb 10 '14 at 10:39
-
2@user1369975, I think you are missing the point. We are not saying the question is invalid, nor are we saying people don't need to learn. However this is a site for network engineers/professionals and asking to frame an answer here while ignoring the basic foundations of networking is not reasonable. If you want an answer not directed at other network professionals, you should ask it on one of the other sites such as [SuperUser](http://superuser.com/). – YLearn Feb 10 '14 at 18:07
-
Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 10 '17 at 00:36
-
1"_If my computer has an IP address,why does it need a MAC address?_" It may or may not need a MAC address. _Some_ layer-2 protocols (the IEEE LAN protocols, e.g. ethernet, Wi-Fi, etc.) use MAC addresses, but others (PPP, HDLC, frame relay, ATM, etc.) use something else or nothing at all. The IEEE maintains its layer-1/2 protocols, and the IETF maintains the layer-3 IPv4 and IPv6 protocols. They are two completely separate entities. Layer-2 protocols do not care which layer-3 protocols they carry, and layer-3 protocols do not care which layer-2 protocol carries them. – Ron Maupin Apr 16 '18 at 14:58
-
I believe the question should be, why do you need an IP address if you have a MAC address. I would say this is the answer. https://www.quora.com/Why-MAC-address-are-not-used-for-routing-and-other-communication-instead-of-IP-addresses/answer/David-Waldo – jw56578 May 24 '20 at 23:35
-
An excellent question! – Frank Breitling Aug 08 '20 at 13:31
-
For example: in your local community or locality, you just need your first name of identification. But if you go out of your community or locality you would need your full name of identification. Same logic applies here, inside the network we use MAC Address, but once you leave that particular network you would need an IP address. – Faraaz Kurawle Jan 30 '22 at 18:05
-
I got an [Wikipedia article](https://en.wikipedia.org/wiki/MAC_address) which might help. `Network nodes with multiple network interfaces, such as routers and multilayer switches, must have a unique MAC address for each NIC in the same network. However, two NICs connected to two different networks can share the same MAC address.`. – Faraaz Kurawle Jan 30 '22 at 18:18
-
I think the question is profound (if you look at it in a different angle). Why do you need a phone number if you already have a unique fingerprint? it would be nice to reach someone just by having a scan of his fingerprint!! that will make us operator free. The answer is that with this type of addressing, routing will be a nightmare – Soulimane Mammar Feb 11 '22 at 20:32
10 Answers
MAC addresses and IP addresses operate on different layers of the internet protocol suite. MAC addresses are used to identify machines within the same broadcast network on layer 2, while IP addresses are used on layer 3 to identify machines throughout different networks.
Even if your computer has an IP address, it still needs a MAC address to find other machines on the same network (especially the router/gateway to the rest of the network/internet), since every layer is using underlying layers. On the page mentioned earlier you can find some nice diagrams explaining the protocol suite in detail.

- 16,953
- 6
- 44
- 70
-
,thanks a lot for your answer but it would be better if anyone could give an answer,without going into the specifications of the O.S.I. Layer or T.C.P. Layer – user1369975 Sep 22 '13 at 16:44
-
12If that's too hard, this really isn't the site for you. You could argue this question is off-topic as it is, since this is considered common knowledge for network engineers. – Teun Vink Sep 22 '13 at 17:04
-
11@user1369975, the models you reference are the frameworks for how networks are designed to operate (both hardware and software). Without that basic understanding, there would be no meaningful answer to your question. That would be similar to asking (about a US citizen), "if they have a name why they need a social security number" without allowing mention of government in the answer. – YLearn Sep 22 '13 at 18:45
-
6Think of a MAC address as a description of a house on your street. To your neighbors, they will all understand "The green house" or "Mr. Johnsons house" or "The duplex on the corner" -- These are comparable to a MAC address, descriptive only locally. An IP address is publically routable, so it would be like using the full addres: 123 Main St, Somewhere, CA 92069. Then I guess IP to MAC would be like the mailman coming to the street and yelling "WHO IS AT 123 MAIN?!?!?" and Mr. Johnson hearing him and saying "Here, the green house!" I guess? Horrible analogy. – David Houde Sep 26 '13 at 10:27
-
3That explains why it's needed given the current architecture. But why was the architecture designed that way in the first place? I could easily imagine a world where there are only local IP addresses and WAN IP addresses. It's technically possible. – Hello World Jul 27 '15 at 10:34
-
You could just explain the guy what the MAC address **is used for**, with one more level of depth than just saying "MAC operates on layer 2" or "MAC is used to identify the machine", you could say something like "MAC address is used in the following way: the host with MAC address XYZ receives a frame. It looks the destination MAC address on the frame. If it is XYZ, it
. If it is not XYZ, it – Rafael Eyng Jun 20 '18 at 03:14". That is the kind of high level explanation I am (and I believe the OP is also) looking for.
When you understand that IP-to-IP communication is really just a series of MAC-to-MAC communication taking place at each router hop, then you'll see why both are necessary.
The IP header of a packet leaving your workstation destined to an IP in a different subnet will maintain the source IP and destination IP, forgetting about NAT for the moment. [Later, I will discuss what happens when the destination is within the same subnet.] The Ethernet header contains your source MAC and the destination MAC of your default gateway. There's no knowledge of the final destination MAC from your perspective. That first router will rewrite the source MAC to itself and the destination MAC to the next router hop, and so on, until the packet arrives at the last router that is directly connected to the destination subnet.
To attempt a simple illustration, consider the L2/L3 headers as a packet moves from the source IP (sIP) to a destination IP (dIP) and the source and destination MACs are rewritten along the way -- fs=first-source and ld=last-destination, and r1-r3 are routers:
fsMAC-r1MAC / sIP-dIP
r1MAC-r2MAC / sIP-dIP
r2MAC-r3MAC / sIP-dIP
r3MAC-ldMAC / sIP-dIP
Any L2 switches involved will not modify the MAC addresses.
Now for communication to another IP within your subnet, direct MAC communication is needed, but to get that MAC addr requires the ARP protocol that uses a broadcast in the subnet to find it. By the way, this is how your workstation gets the MAC address of your default gateway that must exist in your same subnet.

- 7,094
- 6
- 32
- 65
-
6So to summarize, `MAC` is what gets the message from one hop to another, while IP keeps track of the original source and destination. This seems analogous to a post office, where I address my letter to Grandma in Phoenix, but the mailman who picks it up from the mailbox only cares about bringing it to the post office, and the post office only cares about bringing it to the sorting center etc... – CodyBugstein Jun 24 '14 at 17:17
-
5My question however is, why have a separate protocol for MAC? Why not just determine the next IP address to hop to, and store current source/destination IPs alongside original source/destination IPs? – CodyBugstein Jun 24 '14 at 17:18
-
@Imray: First problem with eliminating the MAC protocol requires a redesign/rewrite of the Ethernet and TCP/IP standards. Second, IP is not the only protocol at L3 that uses MAC addresses at L2 to communicate. Third, MAC addresses are *normally* tied to hardware (burned-in) addresses on NICs while the IP at the higher level are allowed to be somewhat arbitrary for flexibility. Fourth, MACs are only locally relevant while IPs are globally relevant (not considering more recent changes with NAT'ing and private addresses that were not part of the original design). – generalnetworkerror Jun 28 '14 at 08:20
Without going into OSI model, TCP layer, etc.:
Back in time, networks were created: some computers would communicate with each other to share something. TO do that, they need to know who was talking and who was being talked to. So, instead of giving each computer a name, we gave them an ID. This ID is called MAC address, is should uniquely identify each computer.
(ok, identify each network card, but back that time, you could think of one MAC address for each computer).
There wasn't a unique specification on how computers would talk to each other: many protocols appeared: TCP/IP, IPX/SPX, and so on. Each protocol would specify things as they thought were ok. For example, IPX/SPX would address each computer using the MAC address and some more information.
But the TCP/IP protocol was designed a little bit different: they decided that having an virtual address, made of 4 bytes (0.0.0.0 to 255.255.255.255) was enough, and was even easier to manage: it doesn't matter if your network cards all have a similar MAC address or not; we'll group our computer so that all TCP/IP address that began with 10.0.x.x. are part of the engineering group, and those of 10.1.x.x. are the printers, and...
So, if a TCP/IP address needs to communicate with another, is just uses the TCP/IP address. But the network devices need to know to which network card that message is going, so they, somehow, translate the TCP/IP address with to the MAC address.
Why not simply eliminate the MAC and instead use just TCP/IP ?
some reasons:
- easy to group TCP/IP addresses,
- all devices are built to take care of the MAC address, in that low-level requirement, and would need to be changed.
- despite being the vast majority (I think :-P ), some other protocols are still in use and they rely on the MAC address.

- 111
- 4

- 992
- 2
- 13
- 18
-
Why not simply eliminate the MAC and instead use just TCP/IP ? perhaps we don't need the services of the whole stack – Soulimane Mammar Feb 11 '22 at 20:35
There isn't anything physically stopping you from designing a network which has just IP addresses for L2 and L3. Then 'ethernet switch' would learn the SIP address of incoming packets and flood or forward towards a DIP address.
However, this network would only ever support IP, when the next-generation of IPvX come's, it would not work, as the 'ethernet switch' couldn't support that protocol. You also couldn't run various other protocols, like IPX and AppleTalk, or some new protocol you're developing and testing in your home.
Abstraction layers increase development speed and encourage innovation, as you don't need to rebuild the whole house to change a window.
Now you could have ran the same ethernet switches and migrated your network in between from IPX to IPv4 to IPv6, without touching your LAN at all.

- 111
- 4

- 9,776
- 42
- 53
-
There is nothing physically stopping you from designing this network, other than these components, which exist only in your imagination: A) an ethernet switch that learns source IP addresses B) an ethernet NIC without a mac address – Mike Pennington Sep 23 '13 at 13:02
-
IP doesn't provide any mechanism for forwarding across broadcast-type networks, so your "switch" would essentially be a brouter. – Zac67 Feb 13 '22 at 13:43
The IP address and MAC address serve different (but crucial) purposes:
The MAC address gets a frame from one NIC to the next. The IP address gets a packet from one Computer to the Server
So given the following:
Source Computer <---> RouterA <---> RouterB <---> Destination Server
What directs the packet from the "Source" to the "Destination" is the IP address. But what gets the packet from the Source Computer to RouterA, and then from RouterA to RouterB, and then from RouterB to Destination is the MAC addresses.
You can see the relationship in this illustration:

- 103
- 2

- 14,808
- 6
- 42
- 82
-
3Of course, it is very common for the router-to-router links to use a protocol that doesn't have MAC addresses. – Ron Maupin Apr 12 '18 at 14:49
-
@RonMaupin Yes. Of course. But... how is that relevant given the question asked specifically about MAC addresses =)? – Eddie Apr 12 '18 at 14:53
-
5It just seems that your answer implies there will be a MAC address assigned at every hop, which can be misleading. It also works if your diagram shows MAC addresses on only the first and last hops. It is a bit incomplete, which is why I made the comment. – Ron Maupin Apr 12 '18 at 14:58
-
1MAC addresses appear only on IEEE type of devices 802.3 (Ethernet), 802.11 (Wifi) etc. On serial links such as HDLC, FrameRelay, ATM there are no MAC addresses – Soulimane Mammar Feb 11 '22 at 20:16
To start with, this is a very good question, which touches upon the basic network foundations.
The bottom line to your question is, we don't really need a MAC address in order to achieve connectivity. Theoretically, a network could be built implementing IP addresses alone!
However, some practical difficulties may arise out of using such a scheme. If you expect to manually assign an IP address to each network device, then you may avoid the major pitfalls. However, if you need to automatically assign IP addresses, as when there are too many network nodes to manually administer, then there is no way to make sure each node is allocated exactly a single IP address, or a predetermined number of them, because you cannot tell one from the other, unless the address distribution entity can uniquely and unequivocally identify the requesting device, e.g. by its MAC address, which is assumed to be unique for any device in a LAN.
Such an unidentifiable device may repeatedly ask for additional IP addresses and, eventually, wreak havoc on the network viability.
Back to the topic, all you need to establish an IP-only network, is to let network interface adapter's Data Link Layer pass through any data frame it receives, directly to the Network Layer, regardless of any MAC comparable address type, where it can be filtered according to its destination IP address, instead of being filtered at the Data Layer.
Just to illustrate the concept, assume a network is established by interconnecting RS-232 UART ports: UART devices don't have MAC addresses, or any other unique identifier, for that matter, yet you could construct a local network using UARTs and IP addresses alone, providing you install the proper UART drivers.
Hope this passage gave you some insights on the subject.

- 103
- 4

- 71
- 2
The IP protocol provides the foundation to support the notion of subnets and routing. This means IP doesn't assume your destination is on the same network as you-if it's not, your traffic needs to be forwarded through an intermediary device such as a router. IP has TTL and Hop Limit fields that support this.
Ethernet assumes that the destination MAC is directly reachable when data is shipped out of its interface. Ethernet was originally designed when the most common way to connect computers in a network was through a physical bus topology. Even though almost all wired Ethernet traffic is switched now, logically, it still works like a bus topology. So the underlying assumption with Ethernet is that the node with the destination MAC is physically on the same network as the source. There is no such assumption with IP.
I guess you could "hack" Ethernet into doing subnets and routing. But you might as well engineer a protocol that doesn't rely on the low-level details and assumptions of Ethernet, and that's why we have IP.

- 111
- 4

- 161
- 3
To be as simple as possible:
A Mac Address is the physical or virtual address of your NIC card or network interface. From a computer on a network's standpoint, it is the physical address of that computer's NIC card. It is used to bring information to that computer on Layer 2 of the OSI model.
The IP address is required on layer 3. You require it to communicate with computers on different subnets and devices.The IP Address verifies "where" the device is located within a network.
The IP addresses and Mac Addresses are used in tandem. Address Resolution Protocol is used to link the two together by resolving IP Addresses to Mac Addresses within the Link Layer within a single network.
You might want to also check here for a more in-depth explanation.
-
1Keeping it Simple: If you have a Name, you identify yourself in the locality. You need to have a SSN, to keep you identified at the Global level – pulsarjune Mar 14 '14 at 11:57
To keep things simple, we can't use MAC addresses for the simple reason that the space of these addresses is FLAT. Why do we mean by that?
Knowing the MAC address doesn't inform you about the location (routing) of that address. So we need a more hierarchical type of addresses, addresses that we can summarize.
For analogy purposes imagine that every house in the world has a unique number, if I decide to send you a letter by specifying only your number, the mailing service will have no idea how to reach you (the only way is to copy that letter and send it to everyone in the world, hoping that one of these copies will reach you eventually -- this is what we call flooding--)
To solve this problem, we use a more hierarchical type of addressing (house number + street name + district name + town + county name). This time, the mailing service has not to know the exact location of an address, but just a part of it (and this is exactly what happens with IP: Routers have route summaries)

- 111
- 4

- 131
- 4
MAC address represents the hardware ones(IDs), its assembled it is constant and different systems in our network made by different vendors have very different range of mac address so that they are difficult to arrange as a network. But using IP address we can arrange the devices in our network in arrange that is simultaneous addresses.
Also we can not send our mac address to outside networks

- 111
- 4

- 69
- 1
- 6