User Tools

Site Tools


Testing UDP Availability

Occasionally I want to know if UDP packets are being dropped between 2 machines. When they are, lots of audio/video services (such as Asterisk) can be interrupted. How do I find out if UDP is enabled between 2 servers? Simple…I connect to one of them and run a command against the other.


Using nmap (network map) is one way. I specify the port(s) I want to scan with -p, the scan type you want (UDP is -sU), and the hostname or IP of the machine I want to scan. Specifying “don't ping in advance of connect” (-P0) is optional.

[me@myhost]# nmap -p 123 -sU -P0 myotherhost

Starting nmap 3.70 ( ) at 2010-02-02 10:31 EST
Interesting ports on myotherhost (
123/udp open|filtered ntp

Nmap run completed -- 1 IP address (1 host up) scanned in 2.019 seconds

The result shows port 123 is open and be filtered, and that NTP is running there.


Using nc (netcat) is another possibility. I specified verbose with -v, UDP with -u, and scan-only with -z.

[me@myhost]#  nc -v -u -z myotherhost 123
myotherhost [] 123 (ntp) open

The result shows port 123 is open and the ntp daemon is listening.

/home/cfreyer/public_html/data/pages/technology/linux/testing_udp_availability.txt · Last modified: 2010/02/02 11:03 by Chris Freyer