Bug 33160 - qemu/kvm+virtio: bad udp checksums for dhcpd
qemu/kvm+virtio: bad udp checksums for dhcpd
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: DHCP
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Philipp Hahn
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-06 17:45 CET by Philipp Hahn
Modified: 2018-04-13 13:40 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.137
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2015021921000377
Bug group (optional): External feedback
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2013-11-06 17:45:26 CET
KVM 1: Windows 7 with VirtIO NIC
KVM 2: UCS-3.2 dhcpd with 2 VirtIO NICs

The Windows VM does not get a DHCP lease from the UCS system.
tcpdump on the host and on the UCS systems shows the DHCP requests arriving on UDP port bootps, but dhcpd logs an error message:
> 5 bad udp checksums in 5 packets

The issue is described for example in <https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/930962>:

The VirtIO-NIC offers offload capabilities for computing TCP/UDP checksums, so the OS does not compute the checksum itself and leaves this task to the NIC.
Since both VMs are running on the same host, the host just copies the packets without calculating the checksums too.
The packets arrive on the destination host without the checksums never ever been calculated. dhcpd then complains about that.

> iptables -A POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM --checksum-fill
is not available for our kernel 3.10 and our iptables-1.4.8-3.16.201104210219.

Debian: unfixed <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717215>
Fedora patch: <http://pkgs.fedoraproject.org/gitweb/?p=dhcp.git;a=blob;f=dhcp-4.2.2-xen-checksum.patch;h=038d346d726e131f1ab2579fe015a72b49733a0d;hb=HEAD>


Workaround 1: Use e1000 instead of virtio

Workaround 2: Disable checksum offloading:

On Windows:
Netzwerk und Internet → Netzwerk- und Freigabecenter → LAN-Verbindung → Eigenschaften → Konfigurieren → Erweitert →
IPv4 Checksum Offload: Disabled
Offload.Rx.Checksum: Disabled
Offload.Tx.Checksum: Disabled
TCP Checksum Offload (IPv4): Disabled
UDP Checksum Offload (IPv4): Disabled

On UCS:
ucr set repository/online/unmaintaned=yes
univention-install ethtool
ethtool -K eth1 tx off
Comment 1 Philipp Hahn univentionstaff 2014-02-28 17:50:27 CET
This happened again in the UCS Technical Training today.
Comment 2 Philipp Hahn univentionstaff 2014-06-04 16:52:16 CEST
This also happens with Xen and GPLPV-0.11.372;

Workaround 2 for Xen: Disable checksum offloading:

On Windows:
Netzwerk und Internet → Netzwerk- und Freigabecenter → LAN-Verbindung → Eigenschaften → Konfigurieren → Erweitert →
Checksum Offload: Disabled
Comment 3 Tim Petersen univentionstaff 2015-02-19 15:52:54 CET
Reported at 2015021921000377
Comment 4 Lutz Willek 2015-06-07 17:50:00 CEST
Reported again: http://forum.univention.de/viewtopic.php?f=43&t=3943

Possible solution: https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/930962

Please review and (if possible) backport to ucs4, 

Thanks and regards
Lutz Willek
Comment 5 Philipp Hahn univentionstaff 2015-10-21 11:08:19 CEST
Happened again with our OpenStack setup.
Comment 6 Philipp Hahn univentionstaff 2017-03-08 08:41:07 CET
Hopefully fixed by v4_3_2b1~31 (Debian-Stretch) - thanks to Daniel
Comment 7 Philipp Hahn univentionstaff 2018-03-15 08:30:55 CET
Fixed in UCS-4.3.