Analysis of the causes of UDP packet loss in Linux system kernel
1. UDP Checksum Error
Phenomenon: You can use NETSTAT-SU to see that there is a UDP error packet.
Tcpdump catch packet, open the captured UDP message in Wireshark, turn on checksum option, error packet.
Scenario: Finding link Failure www.ahlinux.com
2, Firewall Open
Symptom: A package for a specific port is not receiving
Scenario: Use service iptables stop to shut down.
3, Rp_filter Open
Phenomenon: Tcpdump has a package, the protocol stack is not received. A package sent by one address cannot receive a package, but the other one is only sent over.
Scenario: Set the Rp_filter in/etc/sysctl.conf to 0.
See also: Http://serverfault.com/questions/163244/linux-kernel-not-passing-through-multicast-udp-packets
Check the source address of the packet and its network card address switch to prevent IP spoofing, Linux 2.6.32 by default.
4. Application performance issues, buffer full.
Symptom: The application can receive UDP packets intermittently.
Scenario: Use the Vmstat and top commands to discover CPU or IO overloads. Increase the buffer to optimize the program.
- This article is from: Linux Tutorial Network
Analysis of the causes of UDP packet loss in Linux system kernel