Thursday, June 30, 2011

Back to the basics- ARP

I was using  wireshark and noticed all the the ARP requests going thru my network. I knew what the protocol did and the basic function but I for got how it works with the Default Gateway to resolve MAC addresses.So I did a lil readimg and here is a little write up on ARP that helped me out.



-Use of the default gateway and arp
 Host A  wants to send data to Host B. Host A has the IP address of Host B becuase it was obtained from a higher level.Host A still needs  the MAC address of host B to send the data. The first thing Host A will do is check to see if Host B's MAC address is in its ARP cache. If the MAC address is not in the ARP chache then a broadcast is sent to all devices on the LAN segment.  Host B notices that the IP address in the frame is its own and sends a ARP Reply with its MAC address back. After reciving the ARP Reply Host A will update its ARP cache.

If Host B  is not the same LAN segment  as Host A, Host A will send a broadcast ARP Request  to the IP address of its Default Gateway.  The Default Gateway realizes that this frame contains its IP address and sends back a ARP Reply with the MAC address of that interface. Host A will update its ARP chace.   

Here is something from Microsoft that explains it with a little more detail along with a few commands that come  in handy sometime
http://technet.microsoft.com/en-us/library/cc758357%28WS.10%29.aspx

Im not a big linux user but when i do its Ubuntu so here are the man pages, just in case feel the need
http://manpages.ubuntu.com/manpages/natty/man8/arp.8.html

No comments:

Post a Comment