Operating System - HP-UX
1835420 Members
2522 Online
110078 Solutions
New Discussion

Re: Changing IP address...

 
Bill Woodson
New Member

Changing IP address...

I'm a Solaris admin. I've never touched hpux. How do I change the IP address on hpux? I've modified the /etc/hosts file and rebooted. the interface still holds the old address. Also, how do I add a default gateway and DNS info?
10 REPLIES 10
Craig Rants
Honored Contributor

Re: Changing IP address...

Bill,
To change on reboot edit /etc/rc.config.d/netconf. You can set the ip and routing information in there.

To do on the fly use ipconfig just like solaris.

There is not a defaultrouters or nodename file like Sun, much simpler in HP.

Good Luck,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Craig Rants
Honored Contributor

Re: Changing IP address...

Missed the DNS stuff, /etc/nsswitch.conf and /etc/resolv.conf, just like Solaris. HP and Sun are both System 5 so a lot of the stuff should be similar for you.

C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Sridhar Bhaskarla
Honored Contributor

Re: Changing IP address...

Hi Bill,

There are couple of ways to change the IP Address.

1. set_parms ip_address (for IP) and set_parms addl_netwrk (for router).
2. ifconfig lan? IP_ADDRESS netmask; route add
3. SAM
4. Manually edit the following
a) /etc/rc.config.d/netconf
The syntax is mentioned in there. You can uncomment the examples and use it. route statements are also there.
b) Edit /etc/hosts and keep the entry for the host
c) /sbin/init.d/net stop; /sbin/init.d/net start

The best way is to use 1 if you are novice to HP-UX.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
G. Vrijhoeven
Honored Contributor

Re: Changing IP address...

hi,

Take a look at set_parms.
Mind the databese
edit /etc/issue

Hope this will help,

Gideon
James R. Ferguson
Acclaimed Contributor

Re: Changing IP address...

Hi Bill:

An easy way to change the IP address, hostname and/or setup various network parameters is to run:

# /sbin/set_parms

If you issue the above, you will be provided the various valid arguments.

You can use 'ip_address' or 'hostname' or 'addl_netwrk' for example to change the IP address, hostname, or declare a name server.

Regards!

...JRF...
Sanjay_6
Honored Contributor

Re: Changing IP address...

Sanjay_6
Honored Contributor

Re: Changing IP address...

Hi Bill,

You can change the ip address in this manner too,

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=c08a2c09173c5106e4/screen=ckiDisplayDocument?docId=200000045204867

Hope this helps.

regds
John Bolene
Honored Contributor

Re: Changing IP address...

Sam is your best friend.

I use Sam for this purpose.

Be sure and do it on the console as you probably have to change the default gateway also. When you do this, your connection may go south.

Sam -> networking

You probably have to change DNS wherever it is pointed also. Most systems use DNS. Get with whoever maintains your DNS server and tell them you want the IP changed.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Kevin Wright
Honored Contributor

Re: Changing IP address...

Bill,
There's really not alot different between Solaris and HPUX in this type of configuration, Bind is Bind, no matter what it runs on..ifconfig, route add, nsswitch.conf are all the same. no /etc/defaultrouter, use /etc/rc.config.d/netconf..your boot options are in /etc/rc.config.d.
Kelli Ward
Trusted Contributor

Re: Changing IP address...

Try if you want to change just the ip address or if you want to modify "all" of your network set up.
A word of advise:
Do not let set_parms reboot your system when it asks and make sure the ip address information in /etc/hosts matches that in /etc/rc/config.d/netconf where applicable.
Good luck.
Kel
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!