Operating System - HP-UX
1833796 Members
4642 Online
110063 Solutions
New Discussion

Change IP address and hostname on a HPUX 11.23 machine

 
SOLVED
Go to solution
joyce k. yung_1
Occasional Advisor

Change IP address and hostname on a HPUX 11.23 machine

We are in the process of migrating a T600 machine to a rp3440 machine. Currently the new machine has a difference name and IP address of the production machine. On the day of migration, the new machine will need to have a same IP address and hostname of the current production machine.

How can I accomplish that? Thanks
13 REPLIES 13
DCE
Honored Contributor

Re: Change IP address and hostname on a HPUX 11.23 machine

Don't lnow about 11.23, but in other versions of HPUX you can usethe following commands:

set_parms hostname
set_parms ip_address


each will then ask for the new information


joyce k. yung_1
Occasional Advisor

Re: Change IP address and hostname on a HPUX 11.23 machine

Would that require a reboot immediately?

Thanks
DCE
Honored Contributor

Re: Change IP address and hostname on a HPUX 11.23 machine

No, it would not
joyce k. yung_1
Occasional Advisor

Re: Change IP address and hostname on a HPUX 11.23 machine

I have two network cards live on the system, I wonder how does the system decide which IP address it will change?

Thanks
DCE
Honored Contributor
Solution

Re: Change IP address and hostname on a HPUX 11.23 machine

The program assumes the IP address you wish to change is the lowest numbered IP adress/interface card data set in /etc/rc.config.d/netconf. If you want to change additional IP addresses, I would recomend using SAM.

You can also issue the command

man set_parms

to learn more about the set_parms command
Thayanidhi
Honored Contributor

Re: Change IP address and hostname on a HPUX 11.23 machine

Changing the name requires a reboot!!

"set_parms initial" will set both.
While configuring it will ask which adaptor to configure (lan0 or lan1...)

Regds
TT

Changing the IP through SAM doesn't require reboot.
Attitude (not aptitude) determines altitude.
joyce k. yung_1
Occasional Advisor

Re: Change IP address and hostname on a HPUX 11.23 machine

Does the lowest number mean the last IP network card interface in the file? If it is the case, that would be a great news because that is the IP address I would like to change.

Thanks
joyce k. yung_1
Occasional Advisor

Re: Change IP address and hostname on a HPUX 11.23 machine

I was reading the man page on set_parms. When it comes to the ip_address option, it said

Non-first-boot: In multiple-LAN systems, set_parms assumes the IP address to change is the one for the lowest-numbered IP address /LAN Interface Card dataset in the /etc/rc.config.d/netconf file. I gather, that would be lan0. Unfortunately, I need to change the lan1 card instead. Any idea??? Thanks
Selvaraj
Advisor

Re: Change IP address and hostname on a HPUX 11.23 machine

How about modifying /etc/rc.config.d/netconf file manually and run "ifconfig" command to take effect without reboot. When you reboot next time, it will read from "netconf" directly and configure that lan to right IP address.

You can put the production IP address in that file and run the following command manually:

#ifconfig lan1 netmask broadcast

You can also manually unplumb and plumb the interface to reconfigure the IP address. The change will be effect immediately.

Good luck,
Selva
You can do it man !
Thayanidhi
Honored Contributor

Re: Change IP address and hostname on a HPUX 11.23 machine

Hi,
I suggest change ip through sam, which doesn't require a reboot. Then run "set_parms hostname". This will change hostname and reboot the server.

Regds
TT
Attitude (not aptitude) determines altitude.
Fabio Ettore
Honored Contributor

Re: Change IP address and hostname on a HPUX 11.23 machine

Hi,

you can launch

/sbin/set_parms ip_address

The command would recognize the first lan available (in your instance lan1).
So don't worry and launch it.

Alternative is change /etc/rc.config.d/netconf manually.
Keep in mind to change /etc/hosts too and DNS (if you use DNS).
DNS can be another machine, so contact administrator of that machine to do that.

Hope this helps you, let us know if you have problems.

Best regards,
Fabio
WISH? IMPROVEMENT!
Mahesh Kumar Malik
Honored Contributor

Re: Change IP address and hostname on a HPUX 11.23 machine

Hi Loyce

"set_parms initial" is preferred way of changing hostname and IP together. A reboot is required.

Check /etc/rc.config.d/netconf and /etc/hosts files for the reflected changes

Regards
Mahesh
Deepak.R
Frequent Advisor

Re: Change IP address and hostname on a HPUX 11.23 machine

Hi,

set_parms initial would be the good one to use according to me, It guides you through various optins like changing hostname , IP, subnet, default gateway, DNS etc and takes a reboot.

If you try to have both systems with same IP/hostname its just not possible.

thanks
deepak