arp

What is arp_announce?

Assume that a linux box X has three interfaces - eth0, eth1 and eth2. Each interface has an IP address IP0, IP1 and IP2.
When a local application tries to send an IP packet with IP0 through the eth2.

Unfortunately, the target node’s mac address is not resolved. The linux box X will send the ARP request to know the mac address of the target(or the gateway).
In this case what is the IP source address of the “ARP request message”? The IP0- the IP source address of the transmitting IP or IP2 - the outgoing interface?

Until now(actually just 3 hours before) ARP request uses the IP address assigned to the outgoing interface(IP2 in the above example)
However the linux’s behavior is a little bit different.
Actually the selection of source address in ARP request is totally configurable by the proc variable “arp_announce”

If we want to use the IP2 not the IP0 in the ARP request, we should change the value to 1 or 2. The default value is 0 - allow IP0 is used for ARP request.