Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id D214E19DE837 for ; Wed, 7 Mar 2012 15:55:56 -0400 (AST) Received: from hogranch.com ([75.101.82.47]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S5Mxj-0007LV-9B for pgsql-jdbc@postgresql.org; Wed, 07 Mar 2012 19:55:55 +0000 Received: from [127.0.0.1] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id q27JtQ913245 for ; Wed, 7 Mar 2012 11:55:26 -0800 Message-ID: <4F57BD29.5000400@hogranch.com> Date: Wed, 07 Mar 2012 11:55:21 -0800 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Defining local IP address when opening connections to database References: <4F578AB8.2050002@knipp.de> <03b601ccfc82$4badef60$e309ce20$@yahoo.com> <4F579537.10203@knipp.de> In-Reply-To: <4F579537.10203@knipp.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/13 X-Sequence-Number: 22752 On 03/07/12 9:04 AM, Michael Bauland wrote: > yes, I was referring to the latter. I have a client machine which as > several network adapters, but I would like to always have the connection > to the database using exactly one of the IPs available to my client. I > couldn't find a way to specify this IP. > > Yes, the routing table might be one solution. But in my case we're > actually having two services running on the client, and both connect to > the same database. And both services should use a different IP. In which > case the routing table won't help. There doesn't seem to be a way of > doing this with JDBC, is there? Since on > http://jdbc.postgresql.org/documentation/head/connect.html > there are a few connection parameters, but none that lets me set my > local IP for the connection. what is the point of multiple network adapters connecting to the same network other than MPIO style ethernet link bonding (whereupon the physical adapters would appear as a single logical ethernet endpoint) IP networks route by destination address. if there's multiple paths to the same destination that are all the same 'length', the decision as to which path to use is completely arbitrary. putting different firewall rules on different interfaces that are all on the same subnet will just cause some VERY hard to debug problems. -- john r pierce N 37, W 122 santa cruz ca mid-left coast