Operating System - HP-UX
1832460 Members
2991 Online
110043 Solutions
New Discussion

Impact of chaning the hostname and IP address of a server

 
Marc Ahrendt
Super Advisor

Impact of chaning the hostname and IP address of a server

i have a rp5470 running 11i that will get a hostname and IP change next week. my concern is what the impacts will be after rebooting ...hoping that i caught everything

how do i address ssh keys? do the *.pub files need to be recreated? and how can i do that if so?

any other general thing i need to worry about besides netconf, hosts, sendmail.cw, and inetd.sec? like httpd.conf?

this server will be replacing a server that is used by many people and applications ...so i need to preserve/maintain that IP and hostname
hola
6 REPLIES 6
Abdul Rahiman
Esteemed Contributor

Re: Impact of chaning the hostname and IP address of a server

IP change on a production server could generally have multiple impacts depending on your networking environment as well as how the applications and clients are configured and setup.
Few things to look into in addition to the things you mentioned.

1. If the IP address is changing to another one on the same subnet or different? If different, you must check your default gateway and subnet mask. If on the same subnet, you should ping the gateway to make sure that it works.

2. Any files where the your system's ip address is hardcoded have to be checked and changed. (It will be a good idea to utilise this as an opportunit to eliminate hardcoded configurations) eg: If using Oracle, tnsnames.ora, listener.ora etc..

3. If you are in a DNS environment, make sure that the MX record on the DNS server is updated.

4. Make sure that the application is accessible for the clients (by checking the client configs,hosts file etc.)

5. If you are using key based authentication with SSH, your old keys may not work, use ssh-keygen commands to generate new key pair and send it to the remote hosts.

These are a few things you may want to check, but there could be much more again depending on your env.

HTH,
No unix, no fun
Marc Ahrendt
Super Advisor

Re: Impact of chaning the hostname and IP address of a server

thx abdul for the feedback

before responding to your 5 statements i want to give some more detail

now the two servers are as follows
K460 is hulk with *.200 for its IP
rp5470 is newhulk with *.201 for its IP
next week the two servers will be as follows
K460 offline ...not connected to the LAN
rp5470 as "hulk" and with *.200

1) the rp5470 will be in the same subnet so i am not worried about the gateway ...etc
2) i am worried about not only the old IP address (*.201) being hardcoded but also the old hostname (newhulk) being hardcoded in files too ...any tricks with the "find" command to hunt these down?
3) DNS needs no changes because both hulk and newhulk are in the tables already ...basically i am swaping the IPs and hostnames between these two servers (will actually not change the K460 for a day or so and keep it offline until then)
4) all the clients accessing the server i think will be OK since they will still look for hulk at *.200 but now they will go to the rp5470 instead of the K460
5) so for SSH i guess i will run the following
/opt/ssh/bin/ssh-keygen -t dsa -f /opt/ssh/etc/ssh_host_dsa_key -N ""
(add also for rsa1 and rsa)
and inform users to update their keys

just hoping there are not any more subtle things i am missing. this is an Informix server so i will update the sqlhosts file, but other than Informix it is basically HP-UX apps that come from 11i install CDs. I am working with EMC people to address the impacts to Navisphere when changing the IP and hostname. I am also working with our internal Java people about their custom application that sits on top of Informix.


hola
Jeroen Peereboom
Honored Contributor

Re: Impact of chaning the hostname and IP address of a server

Marc,

it's hard to tell if your applications have hostname or ip address hard coded. I remember Ingres has (or had?) such a file.
Also have a look at your backup software. Running an incremental backup on hulk after replacing hulk by newhulk may lead to a large incremental backup. ssh keys have to be re-generated (you can probably easily check for yourself the first time you ssh to the new hulk.

To search for files with IP address or hostname:

find / -type f | xargs grep 'hostname'
You may want to grep '[hostname|IP address]'.
Check this first on a small sub directory (find . -type f | grep ...
to check the grep command.

(You may want to rename & renumber hulk to oldhulk, such that both systems will be accessible after the swap. Only make minimal change because it's your fall-back server.)

JP.
Thomas Bianco
Honored Contributor

Re: Impact of chaning the hostname and IP address of a server

unix itself largley doesn't care about it's hostname, as long as it can resolve.

some other applications are different. i think CODA cares about it's hostname, but i can't be certain.

I would change the name and IP, then leave an alias record for the old name pointing to the new name. this should cover all your bases. when you have downtime, you can go back and remove the alias and fix whatever breaks.

i doubt you'll need to recreate SSH keys, as they are based on nither name nor IP. you will probably need to reauthorize the server with SSH clients.

old standby: grep -R -i "hostname" /*
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.
Marc Ahrendt
Super Advisor

Re: Impact of chaning the hostname and IP address of a server

thx to all ...got the point that the issue is really with the applications that are being used

below are the basics of what i will modify and then the rest will most likly be discovered as i test/do the conversion

/etc/hosts
/etc/rc.config.d/netconf
/var/adm/inetd.sec
/etc/mail/sendmail.cw
/etc/sudoers
DNS
sqlhosts file for Informix
license.dat for FLEXlm
...
hola
Mark Ellzey
Valued Contributor

Re: Impact of chaning the hostname and IP address of a server

Marc,

Just a note about flexLM. The license file may be tied to the old machine's hostid. You may need a new license from your application vendor for the new server with a new hostid.

When changing the IP and host name, you may want to use the set_parms utility. This will pretty much insure that the change occurs to *all* the host/IP Addr files that the system uses.

Other than that, looks like you have things well in hand.

Regards,
Mark