Quote:
Originally Posted by
earlysame55
Thanks Neo,
So when i lookup the dns, get the ip. Meaning when the application runs a gethostbyname(), it updates the dns cache. How and when is the server's arp cache get updated. I thought it's after the ipaddress is returned and when a transmission happens to that ip, it's stored in the arp cache(after the llokup procedure for the mac address). Correct me if i'm wrong.
TIA
No, that is not actually correct.
If the IP address of the destination is on the same LAN segment as the origin, then when you send the first packet to that designation, the ARP tables on that LAN segment will update.
However, if your destination is 2 hops away, then there will be no ARP entry for the destination address.
ARP is for mapping IP address to MAC addresses for LAN traffic, not for IP routing.
Just doing a DNS lookup will not update an ARP table.
For example, right now you sit down and you want to visit
www.unix.com .
There is no ARP entry on your server for
www.unix.com because your computer is not on the same LAN segment as
www.unix.com.
Is this clear now?