Why and how fake ARP works

From Xen


netfront driver should send a fake arp package to encourage switches to learn the MAC. This wiki page will show you why should we do that and how to get it.

Why?

This feature is mainly for live migration. In the following example, if the VM migrated from Server 1 to Server 2, Switch 1 still forward ICMP packages from Workstation 1 to Switch 2; until a ARP timeout (may take long time) in Switch 1 or the VM send some package out.

FakeArp$fake arp.png

How?

We force the netfront drive to send a fake ARP package on every initializing time. Then all the switches will be flushed about the MAC <-> Port association.

The fake ARP package detail:

HTYPE
PTYPE
HLEN
PLEN
OPER
SHA
SPA
THA
TPA

The Ethernet transmission layer header:

dst_hw
src_hw
type

TODO?

Reference