cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1679
Views
3
Helpful
9
Replies

why do we still need an IP address if MAC address is present?

Prasannad
Level 1
Level 1

When a MAC address itself is unique, why do we still need an IP address to uniquely identify network devices in the network? 

Online CCNA exam 

9 Replies 9

balaji.bandi
Hall of Fame
Hall of Fame

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.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Joseph W. Doherty
Hall of Fame
Hall of Fame

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.

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.

HTH

Rick

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.

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

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).

M02@rt37
VIP
VIP

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.

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Gopinath_Pigili
Spotlight
Spotlight

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 *******

 

"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.

Review Cisco Networking for a $25 gift card