Solved

2 network interface tcp server

Posted on 2013-01-22
6
525 Views
Last Modified: 2013-01-28
I am trying to make labview program to replace a java program on a pc(192.168.1.88). The PC has 2 network interfaces with different subnet.
 
The first step is the program will start a tcp server, then a client(192.168.1.44) will connect in. The java program works fine, but my labview program all the time waiting and no connection in.
 
I tried when both program run, the port 5001 will be open, and the client package will be arrive.
 
But only the java program will response
 
Any suggestion, thank.
0
Comment
Question by:turbot_yu
  • 4
  • 2
6 Comments
 
LVL 5

Assisted Solution

by:Harsem
Harsem earned 500 total points
ID: 38804595
Hello,

you state your server has got 2 interfaces, and from the sound of things you start the program yet you cannot conenct to it from 192.168.1.44 to 192.168.1.88.

One thing to test would be to see on which IP address the server is waiting. I do not know what Operating System your PC is running, in Windows you can type:

netstat -nab

For linux you can type:

netstat --tcp --listening --programs

which will show you what applications are waiting on what ports & IP addresses. I would appreciate if you could shuw us that output.

Another thing you can check is to make sure your Firewall (Windows Firewall or Linux iptables) allows incoming connections on the port your application is using (TCP 5001).

Can your PC with the 2 interfaces connect to itself on port 5001? I would just want to make sure that this works first.

One more thing, I would always try to use telnet to test if the Server (your PC with 2 network interfaces) is accepting incoming connections on the port. So I would go on to the 192.168.1.44 and telnet to 192.168.1.88 on port 5001:

Windows (from a cmd prompt)/Linux (same command):
telnet 192.168.1.88 5001

If successful the screen will just blank out. If it is not successful then you will see it time-out and then state that the connection was unsuccessful.

Please let me know how you go with the above.

Jens
0
 

Author Comment

by:turbot_yu
ID: 38805102
It is win7, the netstat record is as attached for port 5001. Or the whole result is needed. The avast firewall is off.

I write a small test client program run locally, can connect to labview and java both.

I tried tera term can also connect to labview and java both.

I also check the routing table, there is one for 0.0.0.0   0.0.0.0   172.16.5.1

Any suggestion, thanks.
ss.png
0
 
LVL 5

Assisted Solution

by:Harsem
Harsem earned 500 total points
ID: 38805124
Hello,

for directly connected networks no route is required - so I doubt it is that.

From the print-screen it looks like Java was bound to all available IP Addresses, while Labview is bound to a single IP address.

I am not familiar with Labview - is there a way to bind it to all available IP Addresses?

Jens
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:turbot_yu
ID: 38805726
Labview has a setting to choose network interface for tcp server, but I already set it.
0
 

Accepted Solution

by:
turbot_yu earned 0 total points
ID: 38808323
The routing table is attached, is there any thing not correct, thanks.
0
 

Author Closing Comment

by:turbot_yu
ID: 38826097
thk
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface There are many applications where some computing systems need have their system clocks running synchronized within a small margin and eventually need to be in sync with the global time. There are different solutions for this, i.e. the W3…
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question