Why is IP to MAC address translation needed?
On networks that use the TCP/IP protocol, why is the IP address translated into a MAC address?
I mean, when every device knows its IP, why further use the MAC address and not use the IP number as the address directly?
Solution 1:
The main difference is that the IP address is used by IP which is a network protocol, and the MAC address is used by Ethernet a link layer ( 2 ) protocol. IP can run over different layer 2 protocols, so it doesn't include the "media access" functionality. You can run IP over Serial lines, Ethernet, DSl, ISDN, etc.
For example, DHCP provides dynamic IP addresses over Ethernet; the DHCP server needs the MAC address so it can assign an IP address to a PC.
Solution 2:
Because TCP/IP is used over Ethernet, which uses MAC addresses.
Solution 3:
They are for different layers in the network stack. The MAC address is about the ethernet networking layer and the IP address is about, well the IP layer. You can use IP over different transports like SLIP where there is not MAC because there is not ethernet. You can also use protocol different than IP over ethernet if you wanted to.
If you think about it, if I dial in over a SLIP connection one IP packet could start with not MAC associated and then have a different MAC as it hops from one router to another as it is forwarded across the internet to the final IP destination.
Solution 4:
I could answer your question with another question: You have a phone number, so why do you need a social security number/national identification number?
In other words, they serve different purposes. One is for identifying who you are (SSN, MAC), whereas the other is for defining how to reach you (phone number, IP address).
Further, it's possible to reach someone on the phone if they don't have a SSN (different country, for example) just like it's possible to reach someone on the Internet if they don't have a MAC (different type of link layer). Different link layers have different methods of identifying the destinations and sources of data packets.