1833796 Members
4767 Online
110063 Solutions
New Discussion

Re: Change IP address

 
Allan T. Parreno
Occasional Contributor

Change IP address

Hello PPL,

This is a Newbie Question, :-)
Would like to ask on how to change the IP address, Netmask and Gateways in HP-UX, what file should I edit.

Thank you very much
6 REPLIES 6
Sebastian Galeski_1
Trusted Contributor

Re: Change IP address

As i wrote before:
Hi
the best way is to use command set_parms
set_parms ip_address
set_parms addl_netwrk

but if you want to do it manually do:
1. change ip address in /etc/hosts
2. modify entry in /etc/rc.config.d/netconf

it require reboot

regards seba
Peter Kloetgen
Esteemed Contributor

Re: Change IP address

Hi Allen,

you can use the command:

set_parms initial

you will get a GUI in which you can change all needed settings like IP- adress, subnet mask, gateway, DNS, hostname and so on. After these steps you will have to do a reboot.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
Stefan Farrelly
Honored Contributor

Re: Change IP address


set_parms ip_address
will ask for your new IP and will ask for a reboot once changed - but answer N for now.

set_parms addl_netwrk will ask you to change the subnetmask and def gateway (and other stuff but you can answer N to what you dont want to change) but be creaful running this. We ran it when we changed our def gateway and subnetmask recently and it hung on ALL our HP servers we ran it on. I think that was because the new def gateway wasnt up and running yet, or because the new subnetmask wasnt valid yet and it tried to invoke them immediately.
Either way it didnt update the necessary files so in future we ran set_parms ip_address but for the def gateway and subnetmask we edited the config file directly (/etc/rc.config.d/netconf) and then rebooted. This worked fine and proved much more reliable.
Im from Palmerston North, New Zealand, but somehow ended up in London...
V. V. Ravi Kumar_1
Respected Contributor

Re: Change IP address

hi,

use SAM to change the address/parameters for interface cards.
or

#ifconfig lan0

Modify the entry in /etc/rc.config.d/netconf

ROUTE_GATEWAY[0]=

regds
ravi
Never Say No
Ravi_8
Honored Contributor

Re: Change IP address


Hi,

If you ready to reboot the machine, then use
#set_parms initial

which ask you to set hostname, ip,gateway,subnet...

If don't want to reboot the machine,
1)edit /etc/hosts file,
replace the existing IP with new IP
2)cd /etc/rc.config.d
edit netconf file
replace the existing IP, netmask, and gateway with new addresses
3) cd /sbin/init.d
#./net.init stop
#./nettl stop
#./netstop
#./net start
#./nettl start
#./net.init start

will do your objective
never give up
Mark Alderman
New Member

Re: Change IP address

ifconfig lan# ip_address netmask net_mask to change the ip address without rebooting.

Routing for gateway can be changed by

route add/delete default ip_address (of gateway)

If you want to make the changes permanent then edit the file /etc/rc.config.d/netconf





are we having fun yet?