
An Introduction to ARP Cache Poisoning
Other posts in the ARP series: The ARP protocol explained, Viewing and manipulating the ARP cache on Windows and Linux
Remember that each network interface maintains a table of (IP->MAC) mappings in its ARP cache. The ARP protocol packet has the following structure:
-
- Structure of an ARP packet
There are two types of ARP packets: request and reply. The type is determined by the Operation Code field. The tabel below shows a scenario of normal operation:
- Host A sends an ARP request looking for the MAC address of Host B
- Host B responds with ARP reply.
This ARP packet is encapsulated in an Ethernet frame with the following values:
Normally an ARP request is sent because the sender wants to talk to a given IP address and needs to find out the associated MAC address. But sometimes the sender generates an ARP packet to inform the receivers about some information, instead of asking for information. This is called gratuitous ARP and is commonly used in the following situations:
- Duplicate address detection
- Change of MAC address
- Virtual IP
Routers and other network hardware may cache routing information gained from multiple gratuitous ARP packets. Read this page for more information. For gratuitous…