UDP checksum error causes DHCP service unavailability solution

Source: Internet
Author: User


Two days ago, when O & M colleagues deployed environments for customers, they encountered a situation where virtual machines could not obtain IP addresses.
When packets are captured by the virtual machine network adapter eth0, DHCP requests and replies are normal, but the virtual machine does not respond. You can manually configure the IP address to allow access.

If you analyze the problem from tcpdump or wireshark, you cannot see the exception.

At this time, we need to have good search capabilities. google goes to the following article:
Https://github.com/Metaswitch/calico/issues/40

The solution in this article is to add iptables rules on the computing node and add checksum in the udp message:
Iptables-a postrouting-t mangle-p udp-dport 68-j CHECKSUM-checksum-fill

Explanation of checksum-fill:

-Checksum-fill

Compute and fill in the checksum in a packet that lacks a checksum. this is particle ly useful, if you need to work around und old applications such as dhcpclients, that do not work well with checksum offloads, but don't want to disable checksum offload in your device.

Wireshark enables UDP checksum:

This solution does not solve the problem, but after knowing the udp checksum problem, we can further analyze the packets captured by wireshark, wireshark's validation of tcp, udp, and ip is disabled by default.
Enable UDP checksum check: edit-> preference-> select UDP protocol in protocol, and check the corresponding area.

Let's take a look at wireshark's package:

The error message of checksum may be caused by udp checksum offload.

Next, capture packets on each device that passes through the packet and find that the udp checksum error starts from the network node. Then, execute the following command on the network node data network adapter, and then OK:
Ethtool-K ethX tx off

Disable the Nic Checksum Offload function, but this may increase the cpu load.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.