why arp protocol is used?
Address resolution protocol (ARP) and reverse ARP (RARP) are used by IP in hosts that are attached to a broadcast LAN (such as Ethernet or token ring) in order to determine the physical MAC address of a host or gateway given its IP address (ARP), and, in case of the RARP, the reverse function.