I was just going through the computer networking basics, but none of the books or any sites was unable to clear the following doubt on the ARP
( Address Resolution protocol ) and MAC destination address.
Would appreciate if anyone can please able to clear my doubt ? Thanks in advance.
Here goes my doubt in detail
As we all know that the TCP/IP host in a LAN shall use ARP broadcast to find the MAC destination address of another host in the same LAN segment, or the default gateway. The ARP broadcast happens only when there is no mapping entry in the ARP cache for the destination IPaddress.
But my question is that the ethernet protocol at layer 2 which encapsulates the IP packet, can fill in the source MAC address part of the ethernet frame for the most part, but where does it gets the destination MAC address to fill in the destination part of the ethernet frame ? since that has to be determined by the IP protocol along with ARP. Does it get from the IP protocol module directly ? or it extracts the same from the ARP cache ?
And also thinking in that same line, does the network layer itself hands over the IP packet and also the destination MAC address of the next hop router or the receipient host to the data link layer ?
Thanks & Regards,