Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
IP is a routing protocol, running on network layer, means its role is to route the packets between two networks.
Networks could be more than one datalink protocols (ex. Ethernet and Token ring and FDDI). Or they could use same datalink protocol; in this case breaking broadcast domains is an essential reason for using IP, before VLAN comes to the picture. In both cases we need network protocol (ex. IP) to interconnect more than one network
On the other hand, MAC (Ethernet terminology) cannot be used to route traffic. It has been designed to deliver the frames within the same network, no Next hop concept in datalink protocols. That is why is cannot be used to connect more than one network.
To put it simple IP addresses are hierarchical, you can reach any IP adress going through mutiple router. Using IP addresses the amount of data routers need to handle is kept to a manageable size.
MAC addresses are ramdom, routing by MAC addresses routers would have to account for every machine on the network individually which is impossible for a network the size of the Internet.