Address Resolution Protocol
If a machine talks to another machine in the same network, it requires its physical or MAC address. But ,since the application has given the destination's IP address it requires some mechanism to bind the IP address with its MAC address. This is done through Address Resolution protocol (ARP).IP address of the destination node is broadcast and the destination node informs the source of its MAC address.
- Assume broadcast nature of LAN
- Broadcast IP address of the destination
- Destination replies it with its MAC address.
- Source maintains a cache of IP and MAC address bindings
Example displaying the use of Address Resolution Protocol:
Consider a scenario where a computer tries to contact some remote machine using ping program, assuming that there has been no exchange of IP datagram’s previously between the two machines and therefore arp packet must be sent to identify the MAC address of the remote machine.
The arp request message (who is A.A.A.A tell B.B.B.B where the two are IP addresses) is broadcast on the local area network with an Ethernet protocol type 0x806. The packet is discarded by all the machines except the target machine which responds with an arp response message (A.A.A.A is hh:hh:hh:hh:hh:hh where hh:hh:hh:hh:hh:hh is the Ethernet source address). This packet is unicast to the machine with IP address B.B.B.B. Since the arp request message included the hardware address (Ethernet source address) of the requesting computer, target machine doesn't require another arp message to figure it out.
0 comments:
Post a Comment