Proxy ARP
In the section "Processing Ingress ARP Packets," we saw how requests
for local addresses were handled by arp_process. Now we
will see how and when requests for remote addresses are handled by the same function.
We saw in the sections "Conditions
Required by the Proxy" in Chapter 26
and "Per-Device Proxying and Per-Destination
Proxying" in Chapter 27, that the
kernel supports two types of proxying : device-based and
destination-based (or global). Per-device proxy ARP is disabled on a host by default. It
can be enabled either globally or on a per-device basis via the /proc interface. The kernel can check whether proxying ARP is enabled on a
given device through the IN_DEV_PROXY_ARP macro defined
in include/linux/inetdevice.h. Per-destination
proxying can be configured with either the arp or the
ip neigh command (see the section "System Administration of Neighbors" in
Chapter 29).
ARP adds one more condition under which it does proxying: Destination Network Address Translation. We will see in the section "Destination NAT (DNAT)" why the kernel needs to proxy requests when DNAT is configured.
For an ARPOP_REQUEST to be eligible for handling by
a proxy server, the following conditions must be true:
Forwarding is enabled on the receiving device, or globally on the proxying host.
The target IP address is unicast (because other address types don't need ARP to be resolved, as we saw in the section "Special Cases" in Chapter 26). In code terms,
addr_type==RTN_UNICAST.The device receiving ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access