Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
13 ratings:
 2.46 out of 5     Rate this Document

Using Lookout, LabVIEW DSC and Network-Published Shared Variables with Firewalls

Hardware: PXI/CompactPCI>>Controllers

Problem:
I have Windows firewall or another firewall hardware/software enabled on my computer. How can I use LabVIEW Datalogging and Supervisory Control Module, Lookout and/or Shared Variables successfully?

Solution:
The underlying foundation for NI networking is called Logos. The Shared Variable uses the National Instruments Publish-Subscribe-Protocol (NI-PSP), which is built on Logos. Similarly, communications between remote machines and between software and databases is based on Logos in Lookout 6.0.x and LabVIEW DSC 7.x and greater. In order for these technologies to work in conjunction with security enhancing firewalls some settings need to be adjusted from the default installation settings.

Prior to LabVIEW 8.5, the NI networking technologies in question all used UDP communication. With the release of LabVIEW 8.5, the NI Variable engine now supports a more efficient TCP-based implementation of the NI-PSP protocol.  Both the TCP-based (LabVIEW 8.5) and UDP-based (LabVIEW versions prior to 8.5) versions of NI-PSP add layers such as error checking.  Firewalls often block some or all TCP and UDP ports.

In order to determine port settings, we must determine the version of Logos in use on your machine. The best way to find this on a Windows machine is to check the values of the Logos DLL or EXE files in the WINDOWS\system32 directory.  Look for the highest visible version there, and follow the settings for that version below. For example, you can right-click the lksock.dll (Logos Sockets), select Properties, and then select the Version tab.


Logos 4.5 and previous:
UDP Ports for communication are assigned randomly in a range from 1024 up to the maximum of 65535. These ports should not be blocked.
The UDP port for the directory service which allows NI software to find the right port for the right data is 2343.
NI software will first connect to port 2343, ask which port the requested service is currently residing on, and then find that port in the range of 1024 - 65535.

Logos 4.6 and greater:
UDP port 2343 is still used as a directory service. This port should remain open.  In these new versions of Logos, ports are assigned incrementally rather than randomly.

Clients will attempt to connect to a given host at port 5000. They will then increment upwards until they find an available port.

Server ports will be used by each service (NI-PSP, LabVIEW DSC, or Lookout) running on your machine. These start at 6000, and increment upward until available ports are found.

Open a minimum of 20 server and 20 client ports as a starting point. If communication problems persist, open up more ports of each until the problems are resolved.

LabVIEW 8.5 and the TCP based NI-PSP:
Because the newer implementation of the NI-PSP protocol is TCP based, a number of TCP ports will need to be opened in addition to the UDP ports opened for the Logos protocol.

The following only applies to machines running Microsoft Windows, and targets running LabVIEW Real-Time. The new protocol is not currently supported on other platforms.

The NI-PSP protocol will claim TCP ports starting with port 59110 and will increment upwards until an available port is found. Open ports in this range, using the same method that is described above for the Logos protocol. Only one TCP port is used per running application, so opening 5-10 ports in this range should be sufficient for most users.

If necessary, users may configure the range of TCP ports used by the NI-PSP protocol by modifying the following lines in the protocol configuration file:

[logosXT]

LogosXT_PortBase = 59110

LogosXT_NumPortsToCheck = 100

LogosXT_PortBase gives the base port of the range, and LogosXT_NumPortsToCheck gives the maximum number of ports that the protocol will attempt to use.

The protocol configuration file is ni-rt.ini for LabVIEW Real-Time targets, and Logos XT.ini on Windows machines.  The Logos XT.ini file is located in the \National Instruments\Logos XT\ subfolder under the common application data directory on the Windows machine.
The Windows firewall will block services that need to run on your machine in order for these technologies (in any Logos and NI-PSP version) to function properly. To allow the services to run, allow the exceptions listed in the related link Configuring LabVIEW, LabVIEW DSC and Lookout to Work With the Windows Firewall  The guidelines there are also necessary to allow LabVIEW users to take advantage of Network-Published Shared Variables.

Related Links:
KnowledgeBase 3HUD6PUW: Configuring LabVIEW, LabVIEW DSC and Lookout to Work With the Windows Firewall

Attachments:





Report Date: 01/10/2006
Last Updated: 07/07/2009
Document ID: 3T9B75XL

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit