Jump to content

Locking IP address that LabVIEW sees


Recommended Posts

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!

Link to comment

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.

Link to comment
  • 1 month later...

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...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.