Jump to content
John Lokanis

Dealing with multiple DNS entries

Recommended Posts

I have run into an issue with the Open Application Instance function and multiple DNS entries.  I have two applications that I need to communicate across a network.  Sometimes one of them is running on a machine connected via VPN.  When that happens, the DNS entry for the machine contains both the local IP on the home network and the IP assigned by the VPN on the office network.  If I try to lookup the remote machine name from an internal machine on the office network, I get back both IPs.  And the order they are returned can change and is random.

The problem comes in when I try to open a connection to the remote machine by name using the Open Application Instance function.  It will try to resolve the name to an IP internally and then connect.  But if the DNS give it the local (home) IP first then it will fail to connect since that IP is not part of the office network.  If it give it the VPN IP first then it will work.  The problem is I have no control over which IP it will see.  And apparently it does not try all of them, only the first one.

Does anyone know if there is a way to control this?  I need to have it give me the local (LAN) IP if there is no VPN connection and the VPN IP if there are two IPs.  And I need it to be deterministic, not random.

 

thanks for any ideas,

-John

Share this post


Link to post
Share on other sites
5 hours ago, smithd said:

the 'multiple output' function of string to IP to get all the IPs associated with that host name. 

Oooooh. Never knew it could do that. :thumbup1:

Share this post


Link to post
Share on other sites

Nice tip!  I'll add that one to my bag of tricks.  I think I can find a way to use that to solve my issue.

Share this post


Link to post
Share on other sites

Join the conversation

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

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