Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

2 network interface tcp server

Posted on 2013-01-22
6
Medium Priority
?
548 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist 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

Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

Question has a verified solution.

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

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
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…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

604 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