Operating System - HP-UX
1833891 Members
2097 Online
110063 Solutions
New Discussion

Refreshing IP Addresses on Server and Client Systems

 
Ray Terrell
Occasional Contributor

Refreshing IP Addresses on Server and Client Systems

What is happening is that the IP address on a main server has been changed with a modified the hosts file and then rebooted the server to acquire the new IP address. The client servers which have to access this main server has had their hosts file changed to match the IP address of the main server. But, the client servers are still pointing to the old IP address of the main server. What are the ways that I can force the client servers (without rebooting the client servers) to point the new IP address of the main server. The one way I know of are the commands below. Are there any others?

/sbin/init.d/net stop
/sbin/init.d/net start
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: Refreshing IP Addresses on Server and Client Systems

The general case answer to this question is "it depends". Typically when an application does a successful gethostbyname(), it never does another for the same host. The "fix" for this type of application is to restart the application --- and this is the fix for all of your established connections.
Ideally perhaps, an application might be coded to receive a signal and close and re-establish existing connections but changing IP addresses are such a rare occurance especially for a server that few applications would add that feature.

Your net stop and start fix probably more or less fixes it by causing your applications to die.
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: Refreshing IP Addresses on Server and Client Systems

Shalom,

I would use DNS instead of /etc/hosts networking. Obviously its not possible to keep things updated on each and every client. If the clients were using DNS, then you make a change to the DNS server and all the clients get it, pretty much the instant its made.

I just used this very same technique to switch the actual IP address of an application server. I cloned the system to a better computer with more resources, made sure all services were working and then just switched the two DNS addresses and then everybody in the building that needed to use the application accept the /etc/hosts network systems were immediately working properly again.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com