Gelbe Linie

ADDRESS RESOLUTION PROTOCOL (ARP)


LOCAL IP ADDRESS:

When 2 computers try to communicate, an ARP request is initiated. If the IP address is on the local network, the source host checks its ARP cache to see if it already has the hardware address(MAC address) of the receiving host. If not, a broadcast is sent to all local hosts. If the receiving host finds that the IP address of the source host matches its own then it sends a reply to the source host with its hardware address. When received by the source host, its ARP cache is updated to include this info. If no hosts respond to the broadcast then the request is discarded.

REMOTE IP ADDRESS:

This is a little different. When the destination address is found to be a remote host, the source host checks the local routing table for a path to the receiving host. If one is not found then a broadcast is sent to the router(gateway). The router replies with its hardware address and then the packet is sent to the router. Essentially the router follows the same pattern. It checks its cache for a path to the receiving host. If one is found then it forwards the packet. If not, it sends a broadcast and waits for a reply from the host. It may again determine that it is a remote host and then the process repeats with a broadcast to the next router and so on and so forth. Once the receiving host gets the request, it sends an ICMP echo request.

WOULD YOU LIKE TO KNOW MORE?

ARP entries can be static or dynamic. If a dynamic entry is not used within 2 minutes then it is deleted. If it is used then it will remain for 10 minutes. A static entry will hang around until the computer is rebooted, it is deleted with arp -d, or a new hardware address is received via broadcast in which case the entry becomes dynamic. A tornado or earthquake could also remove your static entries.

ARP COMMANDS:

arp -a or arp -g

Both of these commands do the same thing. They display the contents of your current arp cache.

arp -s ip_address hardware_address

This commands a static entry to the arp cache.

arp -d ip_address

Removes and entry from the arp cache.