I’m a little confused. I searched on the internet, but I couldn’t find a suitable answer.
Suppose we transfer a packet from node A to node B (both have public IP addresses assigned). The packet is currently on some router (say R1) between A and B, and we know the IP address of the next hop (say R2) because we have the routing table. Why don’t we send the packet from R1 to R2 using the IP address only? The IP address uniquely identifies the device. Why do we have to run ARP to get the MAC address of R2 and then send the packet using the data link layer? Why can’t the data link layer use the IP of R2 directly instead of the MAC?
In fact, when we run ARP, we broadcast the ARP packet within the subnet to get the MAC of the next hop. Similarly, why can’t we just broadcast our packet within the subnet and have it accepted by the next hop?
AND
I am aware that the IP address scheme assigns a logical number to uniquely identify a device over the internet, and we can change the topology of the IP address assignment according to our logical needs. I also know that a MAC address is unique for all devices and is more reliable for forwarding the packet.
I am just confused whether is there a way to send the packet directly from one node to another (neighbors) just using IP addresses? or can we make a protocol that does not use APR to forward a packet using MAC?
Avinash is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.