Improve company productivity with a Business Account.Sign Up

x
?
Solved

2 network interface tcp server

Posted on 2013-01-22
6
Medium Priority
?
598 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 2000 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 2000 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
Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

 

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

Building an Effective Phishing Protection Program

Join Director of Product Management Todd OBoyle on April 26th as he covers the key elements of a phishing protection program. Whether you’re an old hat at phishing education or considering starting a program -- we'll discuss critical components that should be in any program.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

580 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