Solved

Specify Outbound Network Interface in ODBC Connection

Posted on 2011-09-26
3
277 Views
Last Modified: 2012-05-12
Background:
A client machine needs to be able to query a SQL Server over the network using an ODBC connection.  The server will only accept connections from a specific IP range, and the client machine is not in the range.

We've come up with the idea of adding a second network card to the client machine, and configuring the second network card with an IP address that is in the specific range.  With that done, we now need to make the ODBC connection use that second network interface.  That is, the client needs to be configured to always connect to the SQL server using the second network interface.  Is this possible?  How?

Please note I have read this post already.  That question is the same as mine, but neither of those answers addresses the question.
0
Comment
Question by:mactfines
3 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36600481
I have dual NICs in several computers here.  Windows uses the one that connects to the IP range I ask for.  I have two networks using private IP address ranges, one in 10.202.xx.xx and the other is 172.23.xx.xx.  On two machines I have web servers with two IP addesses, one in each range, and it works fine.

How is your setup different?  And how are you connecting to the SQL server?
0
 

Author Comment

by:mactfines
ID: 36600568
The difference here is that the SQL Server we are connecting to is not in the IP range of either of the network interfaces.  It is actually at another company altogether.  All connections to it need to come from a specific range of addresses, so I need to make the client always tries to connect using the new, second interface.  The logic Windows uses results in it always using the first--which makes sense to me, given they both have the same path through the Internet to the SQL server...

However, now that I write all that out, we should be able to just use the route command to specify that the route to the SQL server's IP always uses the second network interface.
0
 
LVL 42

Accepted Solution

by:
kevinhsieh earned 500 total points
ID: 36600764
I was going to suggest using the route command to route traffic for the SQL server out to a gateway available to the second NIC.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

813 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now