ckudpcksum(8)

NAME
ckudpcksum - check if a host accepts UDP packets wih bad checksums

SYNOPSIS
ckudpcksum [ -p port ] [ -q nqueries ] [ -w waittime ] host

DESCRIPTION
Many hosts do not check UDP checksums in order to try to improve network performance, and because of historical reasons. ckudpcksum utilizes UDP packets with BAD checksums and attempts to elicit an ICMP PORT_UNREACHABLE response from the host. If the host responds, this shows that the host did not ignore this packet with a bad checkum. This is BAD, and some protocols, including the DNS are not protected regarding errors than can clobber some UDP packets without checksum.

The only mandatory parameter is the destination host name or IP number.

Other options are:

OPTIONS

-p port
    Set the base UDP port number used in probes (default is 33434). ckudpcksum hopes that nothing is listening on the UDP port base at the destination host (so an ICMP PORT_UNREACHABLE message will be returned to the sender). If something is listening on a port in the default range, this option can be used to pick an unused port range.

-q nqueries
    Set the desired number of probe queries. The default is 3.

-w waittime
    Set the time (in seconds) to wait for a response to a probe (default 3 sec.).

INTERNALS
This program attempts to check if a remote host will accept packets with a bad UDP checksum. Most hosts based on NET/BSD networking code have a kernel variable udp_cksum that indicates not only that the host will not generate the checksum of UDP packets, but also that this host will ignore the checksum of received UDP packets.

The program works by launching UDP probe with a wrong checksum to a hopefully unused UDP port and then listening for an ICMP "port unreachable" reply from the host. Three probes (change with -q flag) are sent. If there is no response within a 3 sec. timeout interval (changed with the -w flag), this may indicate that the host rightfully dropped the packets.

We don't want the destination host to process the UDP probe packets so the destination port is set to an unlikely value (if some clod on the destination is using that value, it can be changed with the -p flag).

This program is intended for use in network and host testing. It should be used primarily for manual fault isolation. Because of the load it could impose on the host and the spurious errors that can be logged to consoles or counters that may be incremented on the remote host, it is unwise to use ckudpcksum during normal operations or from automated scripts.

It is a lot easier to do things this way by sending bad packets and waiting for a reply than trying to look into received packets to see if the checksum is corret. The latter solution requires some network tapping, and may not be easily portable. The former solution can not give authoritative information about a host doing the correct thing, but can flag most of the hosts doing incorrect UDP processing.

AUTHOR
Implemented by Benoit Grange from a suggestion by Francis Dupont. Everything, the code and the manual are copied from traceroute sources, a program written by Van Jacobson.

SEE ALSO
traceroute(8)