Mike Ashe Posted November 17, 2004 Report Share Posted November 17, 2004 Hi, I have a couple of distributed applications that communicate with TCP/IP. Lots of clients, etc. Development is ongoing. Occasionally I find that a client cannot connect into the server and it turns out that the IP address that LabVIEW sees for the local machine has been superceeded by another IP assigned by some other program, like a VPN tunnel. Has anyone else experienced this, and if so, does anyone: 1. Have a method to automatically detect this in LabVIEW? 2. Have a way to switch the IP that LabVIEW sees, back to the network card? 3. Have a way to prevent LabVIEW from switching to the new address in the first place. Thanks in advance for all replies and code! Quote Link to comment
Michael Aivaliotis Posted November 18, 2004 Report Share Posted November 18, 2004 I guess what you need to do is find out what IP address the client sees. I don't really have a good solution but I know that you can ping external resources and they will give you back your IP. One example is getting the HTML for the website: http://whatismyip.net/cgi-bin/your_ip_is.cgi You can then parse the html and find out what your external IP is. Quote Link to comment
Christian Kjeld Posted January 12, 2005 Report Share Posted January 12, 2005 Hi I am not sure I have understanded the question correct. :question: But I am using this little VI in many of my programs, so maybe it can help you. Best regards Christian Download File:post-288-1105534812.vi 1 Quote Link to comment
Mike Ashe Posted January 13, 2005 Author Report Share Posted January 13, 2005 Hmm, I should have provided more detials. I also have learned a little more. Your (my) computer can have several IP connections at the same time. Under Windows in Control Panel >> Network Connections. You can see your connections here. You can also go to a command prompt and run IPCONFIG which will give you a list of the current connections. Normally I only have one IP address. But if I then open a VPN client to another network, the VPN Client adds a connection to the list. It appears that new connection IPs are added to the *TOP* of the list/stack and become the default until closed or another new IP supercedes it. When you start up LabVIEW, it takes the top of the list as it's default IP, but, that can be the wrong one depending on what software you have running at the time. By opening your Network Connections dialog and going to the Advanced menu >> Advanced Settings submenu you can get to a dialog with an Adapters & Bindings tab and you can reorder the Adapters & Binders. This is effective if you have multple cards, etc, but IT people at some of my clients are frowning even as I type this. The real solution is to have you specify an IP in LabVIEW for your server or client side and have LabVIEW connect to that and only that IP/mask or else return an error which should include the default IP. Guess I should post this to the bugs section... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.