Which UDP Ports Are My NI Services Using?

Updated Jul 25, 2023

Reported In

Programming Language

  • LabVIEW G

Issue Details

I have an application where I need to use UDP port 6001 to communicate to a network device. However, when I try to use the this port it seems to be already in use. When I disable NI Services, I can use the UDP port 6001 without issues.

Which UDP ports do NI services use? How can I monitor which UDP ports they are actually using?

Solution

For most NI services, you can refer to the Configuring Software and Hardware Firewalls to Support National Instruments Products to find a list of the default TCP and UDP used.

For example, Shared Variables and Network Streams use TCP port 2343, UDP ports 6000-6010, TCP ports 59110 and above by default. You can monitor the exact UDP ports it uses by running netstat command in command prompt to display active connections.

You can see below that UDP ports 5003,6003,6005, 6006, and 6007 are being used by PID (process ID) of 6360.
 
The corresponding process to the PID can be found from Task Manager or using the Tasklist command.

Additional Information

If you need to use a specific UDP port that the NI service is using, you can temporarily disable the service to release the UDP port so that it is free to use. Once you enable the NI service again, the NI service should attempt to find an available UDP port to use.

You can automate this process with the System Exec VI