Operating System - HP-UX
1826214 Members
2510 Online
109691 Solutions
New Discussion

Re: Changing IP addresses for a network

 
Adam M. Schwaber
Occasional Advisor

Changing IP addresses for a network

Our local network has an HPUX server (11.0) and an NT 4 server. All of the clients are NT 4 and Win2K. There are about 30 clients and they get their IPs from a DHCP server. The 2 servers have static IPs. We need to change our IP addresses in the near future. I was wondering how I could go about figuring out what configurations and settings I would need to change when this is done. I know I will need to change the IP addresses of the servers, but is there a way I can find out if any applications that we currently run are using the static IP addresses? Can I search for files on the HPUX box that contain those static IP addresses? I tried to write a script to do it, but I am new to Unix and haven't been able to get it to work.

Any help would be greatly appreciated.
7 REPLIES 7
Mark Vollmers
Esteemed Contributor

Re: Changing IP addresses for a network

Mike-

One big file is /etc/hosts. This file has the server and clients name, alias, and ip address. If you change a static IP address for something, you have to make sure it is changed in here.

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Edward Alfert_2
Respected Contributor

Re: Changing IP addresses for a network

I don't know of any applications that hard code the ip address into configuration files. They get it from the OS when they need it.
I don't think you need to search your config files.

just change the ip for the lan card using

set_parms ipaddress
"Do what you love and you will never work a day in your life." - Confucius
Sachin Patel
Honored Contributor

Re: Changing IP addresses for a network

Hi Mike,
I don't think any application work using strict ip-address. it generally gets its ip address using systemcalls gethostbyname gethotent gethostbyaddr etc.....

files to change when you want to change IP of HP-UX are
/etc/hosts, /etc/rc.config.d/netconf

But best way is to use command
#set_parms ip_address
#set_parms hostname
#set_parms addl_network (if you are changing anything else)
Or just type set_parms and it will gives you possible arguments.

Sachin
Is photography a hobby or another way to spend $
Joseph C. Denman
Honored Contributor

Re: Changing IP addresses for a network

Modify IP address of the LAN Card: /etc/rc.config.d/netconf

Modify DNS IP Change: /etc/resolv.conf

Modify Host IP Changes: /etc/hosts

Most applications do not hard code IP's. However, there may be some that use configuration files with hosts in them. If, when configured, the ip was used instead of the hostname, you may run into a little trouble. An example would be listener.ora for oracle. If the IP was used instead of the hostname, this file would need to be modified as well. It really depends on what applications you have loaded on the system and how they were setup.

...jcd...
If I had only read the instructions first??
Darrell Allen
Honored Contributor

Re: Changing IP addresses for a network

Hello Mike,

As others have said, I'd use set_parms to set ip_address, hostname, and addl_network parameters. /etc/hosts should get changed and more importantly, /etc/rc.config.d/netconf which is used at boot time to set IP stuff.

If the HP is the server, then it should not be initiating the connections so no app should be specifying an IP address or hostname on the HP. On the other hand, the clients have to specify the host or IP address to connect to. Though well written apps should depend on hostname resolution, they don't always. In your case, it appears you should be checking the apps on the Windows clients.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Sanjay_6
Honored Contributor

Re: Changing IP addresses for a network

Hi Mike,

Most of the application would be using the name of the server, if at all. An example would be the listener for an oracle database. So as long as your system name and ip is resolved, you should not have any problem. I don't think the ip address would be hardcoded in any application.

However your windows user may be using the server ip address to telnet, ftp etc to the hp box.

Rest i can't think of anything that you may be required to change.
Rob Smith
Respected Contributor

Re: Changing IP addresses for a network

Hi, people have said a lot on this already but do yourself a favor. Do not use set_parms to do this. I have had some weird problems on two occassions doing it that way. Bring the system into single user mode, vi /etc/hosts and /etc/rc.config.d/netconf with your new informarion then init 3 to bring the system into multiuser state, ping the router etc. and you are done. Hope this helps.

Rob
Learn the rules so you can break them properly.