pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Bauland <Michael.Bauland@knipp.de>
To: pgsql-jdbc@postgresql.org
Subject: Re: Defining local IP address when opening connections to database
Date: Wed, 07 Mar 2012 18:04:55 +0100
Message-ID: <4F579537.10203@knipp.de> (raw)
In-Reply-To: <03b601ccfc82$4badef60$e309ce20$@yahoo.com>
References: <4F578AB8.2050002@knipp.de>
	<03b601ccfc82$4badef60$e309ce20$@yahoo.com>

Hi David,

thanks for your quick reply.


> Are you missing the obvious, in which case read Kevin's and Dave's
> responses, or do you mean that on the "client" machine (i.e., the one using
> JDBC) you have multiple network adapters and only one of them is allowed to
> connect to the database?
> 
> If the latter is the case I am not sure about JDBC but I would presume you
> could setup some form of routing table on your machine so that any traffic
> to the server IP address is forced to be routed through the appropriate
> network card.

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.

Cheers,

Michael



view thread (7+ messages)  latest in thread

Message-ID: <4F579537.10203@knipp.de>
Permalink:  ../4F579537.10203@knipp.de/
Also on:    postgresql.org/message-id/4F579537.10203@knipp.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: Michael.Bauland@knipp.de
  Subject: Re: Defining local IP address when opening connections to database
  In-Reply-To: <4F579537.10203@knipp.de>
  References: <4F578AB8.2050002@knipp.de> <03b601ccfc82$4badef60$e309ce20$@yahoo.com> <4F579537.10203@knipp.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox