Subject RE: [firebird-support] Fwd: Re: linux installation
Author Helen Borrie
At 10:57 AM 18/11/2005 +1100, you wrote:
> > At 08:25 AM 17/11/2005 -0500, Jason Dodson wrote:
> > >There is no good reason to confuse an already confused
> > person with the task of
> > >defining a name lookup for a machine.
> > >
> > >Simply use the IP address of the database server, EX:
> > >
> > >
> >
> > Oh yes, there is good reason. If dynamic IPs are being used, the IP
> > address is unstable unless there is a hosts entry in the host
> > server to
> > anchor the address (making it unavailable for dynamic assignment) and
> > corresponding hosts entries in the clients to pass a value to
> > GetHostByName().
>If dynamic IP's were being used then would it not be required to keep the
>hosts file up to date?

Now, does one answer that question with a Yes or a No? :-)

If dynamic IP addresses are being assigned, the individual client user has
no way to know the IP address of the server and the static hostname
registered by the server machine itself *must* be used by the client, since
the server's IP address is likely to be reassigned to another node.

If you anchor the IP address of the host node in the hosts file, then that
IP address becomes unavailable for dynamic assignment. It's "always
there", associated with the hostname. Which means, each new client that is
added to the network can access the server through either its hostname or
its IP address. However, using the hostname, rather than the IP address,
is faster.

If the clients don't have that hosts entry in their local hosts files, the
"anchored" IP address should work, except on Win95. However,
GetHostByName() works faster, on Windows networks at least, since Winsock
uses a very roundabout route to handle an IP address.

If you use hosts on both sides of the connection, you have the ability to
assign a specific server name to the host, that's not the same as the
static node name. So, for example, the database clients could have a
custom entry for the anchored IP address, such as mydataserver. mydataserver # custom hostname for database client access betty # static hostname of the server node

The higher up in the list of hosts the database server's entry is in the
client's hosts file, the faster the client will connect.