Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Port Number Ranges for Various TCP/IP Connections in an sbRIO System

I have a total of six TCP/IP connections that need to be made. Here's my census:

 

Nodes:

 

PC = laptop PC running Windows 7 Ultimate, LabVIEW 2009 SP1, IP Address 192.168.1.10

Main = sbRIO 9642XT, NI-RIO 3.4.0, IP Address 192.168.1.11

EL = sbRIO 9642XT, NI-RIO 3.4.0, IP Address 192.168.1.12

FC = sbRIO 9642XT, NI-RIO 3.4.0, IP Address 192.168.1.13

RFID = 3rd party RFID Reader, IP Address 192.168.1.14

 

Connections:

 

PC-FC: PC has the Open Connection VI, and the FC has the Create Listener and Wait On Listener VI's. 

PC-Main: PC has the Open Connection VI, and the Main has the Create Listener and Wait On Listener VI's.

PC-EL: PC has the Open Connection VI, and the EL has the Create Listener and Wait On Listener VI's.

Main-FC: Main has the Open Connection VI, and the FC has the Create Listener and Wait On Listener VI's.

Main-EL: Main has the Open Connection VI, and the EL has the Create Listener and Wait On Listener VI's.

Main-RFID: Using Telnet VI's here. 

 

Of these connections, two are giving me trouble: the Main-FC and the Main-EL, which are the only two connections made between two separate sbRIO's. 

 

My question is this: for each connection I wish to make, what would be a good port assignment? I'm confused as to the following categories of ports in the context help:

 

Well Known Ports (Help says these are 0 through 1023)

Registered Ports (Help says these are 1024 through 49151

Valid Port Number (Help says these are 49152 through 65535)

 

Then Help says that Windows assigns "Dynamic Ports" as 1024 through 5000. 

 

So which grouping of ports is used for what? And which grouping of ports should all my connections be in?

 

Thanks!

Adrian C. Keister, Ph.D.

Certified LabVIEW Architect
Certified Professional Instructor

B.S. in Applied Physics/Computer Hardware and Software Systems, Mathematics, 2001, Grove City College.
M.S. in Mathematical Physics, 2004, Virginia Polytechnic Institute and State University.
Ph.D. in Mathematical Physics, 2007, Virginia Polytechnic Institute and State University.
0 Kudos
Message 1 of 4
(5,636 Views)

Hi there,

 

I tend to just let the operating system assign a port by using the dynamic ports (put in 0 to the local port terminal).

 

There are a few ports that are generally used for certain processes that you want to avoid (see the following links: Configuring Software and Hardware Firewalls to Support National Instruments Products and What Ports Do I Need to Open on My Firewall for National Instruments Software Products?)

 

Other than those ports I would either just group them together for ease of remembering or assign them dynamically.

 

Cheers,

Scott A
SSP Product Manager
National Instruments
Message 2 of 4
(5,617 Views)

Scott A,

 

Thanks for the reply. I'm a bit confused on the application, however. There are two VI's, residing on different controllers, that need information. 

 

On, say, Controller A, I have the TCP Create Listener VI, that has a required input: port. 

On, say, Controller B, I have the TCP Open Connection VI, that has a required input: remote port or service name. 

 

The "local port" terminal is not a required input on any TCP VI that I can see. So exactly what should I put in the Create Listener VI, and exactly what should I put in the Open Connection VI? I think I tried putting 0 into both of those inputs, and it didn't work. Doesn't the Open Connection VI need to know exactly what port to open?

Adrian C. Keister, Ph.D.

Certified LabVIEW Architect
Certified Professional Instructor

B.S. in Applied Physics/Computer Hardware and Software Systems, Mathematics, 2001, Grove City College.
M.S. in Mathematical Physics, 2004, Virginia Polytechnic Institute and State University.
Ph.D. in Mathematical Physics, 2007, Virginia Polytechnic Institute and State University.
0 Kudos
Message 3 of 4
(5,598 Views)

Hi Adrian,

 

On the Create Listener and the Open Connection I would put the same port number (other than zero in this case).  In the Data Server.vi and Data Client.vi examples found in the LabVIEW Example Finder they both default to 6340 which is fine.  Are you able to run those examples in your sbRIO system?  You can also try the Simple Data Server and Simple Data Client examples.

 

Please let me know if these examples are not running properly in your system.

 

Scott A
SSP Product Manager
National Instruments
Message 4 of 4
(5,583 Views)