?
Solved

Specify Outbound Network Interface in ODBC Connection

Posted on 2011-09-26
3
Medium Priority
?
292 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 84

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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

If you’re involved with your company’s wide area network (WAN), you’ve probably heard about SD-WANs. They’re the “boy wonder” of networking, ostensibly allowing companies to replace expensive MPLS lines with low-cost Internet access. But, are they …
Unable to change the program that handles the scan event from a network attached Canon/Brother printer/scanner. This means you'll always have to choose which program handles this action, e.g. ControlCenter4 (in the case of a Brother).
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

807 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