01-20-2024 07:05 AM
When a MAC address itself is unique, why do we still need an IP address to uniquely identify network devices in the network?
01-20-2024 08:17 AM
MAC address is Layer2 - for Routing you need Layer 3 - that is IP address.
High level - A MAC address is responsible for local identification and an IP address for global identification.
01-20-2024 08:23 AM
Because MACs aren't structured to be used in a hierarchical topology as IP addresses are.
Understand the basic structure of an IP address, i.e. having a network and host number, by themselves, do not make clear the importance of IP network summarization to hierarchy routing, but without such, IP couldn't scale to something the size of the Internet.
Technically, today, in theory, hardware could carry the hypothetical maximum number of possible /24 IPv4 networks but that would be a problem for IPv6, and perhaps still would be for (48 bit) MAC addresses.
01-20-2024 10:35 AM
The OP asks this question "why do we still need an IP address to uniquely identify network devices in the network". To answer this question we need to clarify the scope of the question.
If the scope of the question is the local network, then the answer is that you do not need IP to uniquely identify network devices in this network, mac address is sufficient.
But if the scope of the question is remote networks, then the answer is that there is not anything in a mac address that helps identify remote networks. To identify devices in remote networks you need IP.
01-21-2024 09:49 AM
BTW
"If the scope of the question is the local network, then the answer is that you do not need IP to uniquely identify network devices in this network, mac address is sufficient."
True, although network applications are usually configured to use protocol stacks, at a higher level, then straight L2 host-to-host intercommunication. E.g. I can telnet, FTP, HTTP, etc. IP addresses, but not, for the forgoing, MAC addresses.
"But if the scope of the question is remote networks, then the answer is that there is not anything in a mac address that helps identify remote networks. To identify devices in remote networks you need IP."
Not 100% true, i.e. you could treat MACs like host routes, but it wouldn't scale. Imagine each "router" keeping track of every host MAC, worldwide, and keep that information up-to-date on all rourters, as host go on-line or off-line and/or relocate.
Possibly if @Prasannad is just thinking, what's the difference between a globally unique MAC and a globally unique IP, for keeping track of hosts. Actually, from the host perspective, none really. But how a host "address" works in the grand scheme is critically important! MACs, although supposedly globally unique (NB: often NIC MACs can be configured too), really was never expected to provide a "flat" addressing topology for the domain size its addressing supports.
If you're at all familiar with the USA's Social Security numbers, that's sort of a personal MAC, but although it's a nine digit number, it's not designed (to my knowledge) to be used hieratically like ten digit phone numbers.
Basically, what we're saying, L2 MACs are not designed for the only addressing to be used in large scale networks, but IP is designed for that. There's much more to IP than each host has a globally unique address.
Personally, I suspect, MAC global uniqueness was designed as a convenience. I.e. you don't need to manually configure it, to insure its uniqueness on any L2 domain.
Could you design a network to route using MACs. Sure, but also keep in mind, MACs also vary per media type. IP is a logical addressing assignment too.
01-20-2024 12:21 PM - edited 01-20-2024 12:21 PM
Among all the other answers, MAC addresses aren't always unique. FHRP use the same MAC address for ARP and other functions as to not disrupt the network.
-David
01-20-2024 12:41 PM
True for something like a FHRP, but its a special case. Although multiple gateways are dealing with the same MAC, to other hosts, they believe they are dealing with a single gateway. The MAC being used by something like HSRP is a virtual MAC (also a virtual IP too), and actual physical gateway interfaces still retain, and use their physical interface MAC (and their physical IP).
01-21-2024 06:25 AM
Hello @Prasannad
IP addresses provide a logical addressing scheme that abstracts the physical details of the network. MAC addresses are tied to specific hardware interfaces, but IP addresses can be assigned dynamically or statically to devices, providing flexibility and allowing for changes in network topology.
MAC addresses are globally unique only within the context of a local network segment. They are not routable across different network segments, and routers do not forward MAC addresses. Each manufacturer is responsible for ensuring the uniqueness of MAC addresses for their devices. IP addresses provide a globally unique identifier for devices on the internet. They allow for hierarchical addressing, enabling routing between different networks. IP addresses are designed to be assigned based on geographic and organizational hierarchies, allowing for efficient and scalable routing.
While MAC addresses provide a unique identifier within a local network segment, IP addresses offer a hierarchical and routable addressing scheme for communication across different network segments, including the internet.
01-22-2024 04:37 AM - edited 01-22-2024 04:39 AM
Hi Prasannad,
The MAC address is assigned by a NIC (Network Interface Card) embedded in each device which is unchangeable once assigned. On the other hand, the network assigns an IP(Internet Protocol) address to each device connected to the network, which can uniquely identify each device on the network.
The MAC address is only significant on the LAN to which a device is connected, and it is not used or retained in the data stream once packets leave that network. Any piece of internet software, such as a web browser, directs data to a destination on the internet using the destination's IP address.
A MAC address (also called Layer-2 address) is responsible for local identification and an IP address (also called Layer-3 Address) for global identification.
Best regards
******* If This Helps, Please Rate *******
01-22-2024 06:27 AM
"The MAC address is assigned by a NIC (Network Interface Card) embedded in each device which is unchangeable once assigned."
BTW, many Ethernet NICs allow MAC reassignment.
Also, with something like HSRP, an additional virtual MAC is used.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide