Why and how fake ARP works
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.
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?
- This feature is not implemented in the upstream linux kernel (which is using pv_ops): http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=drivers/net/xen-netfront.c;hb=HEAD (as of 20090703)
- For HVM guest using the ioemued vif, the solution is already in qemu upstream. So xen 3.4+ doesn't have this issue.