Operating System - HP-UX
1753878 Members
7158 Online
108809 Solutions
New Discussion юеВ

Best practice to configure IP address

 
haimi
Frequent Advisor

Best practice to configure IP address

Hello Gurus,

May I know what is the best way to configure IP address in HP-UX? I have been using the manual method to perform this task ie.

- modify the /etc/rc.config.d/netconf
- update the /etc/hosts
- execute /sbin/init.d/net start

Problems are:

1) This will hang my system if my CDE is running.
2) The hostname is not updated and I still have to manually run the "hostname" command.
3) Have ever tried using SAM to do this and my CDE got hanged like problem (1)

I do not face all such problems when using Solaris. Any suggestions?
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: Best practice to configure IP address

You can also run /sbin/set_parms. Arguments that apply in this case are "ip_address", "hostname", or "initial", which will go through the entire list of set_parms args. After you finish, set_parms will suggest that you reboot for your changes to take effect. You can decline, but I would suggest that you should accept.


Pete

Pete
Robert-Jan Goossens
Honored Contributor

Re: Best practice to configure IP address

Hi Haimi,

If you would like to change the ip of the server, you could use the set_parms script. It is similar to sys-unconfig of solaris. If you run the script with no arguments, the options will be printed.

# set_parms

# set_parms initial

http://docs.hp.com/en/B3921-90010/set_parms.1M.html

Regards,
Robert-Jan
haimi
Frequent Advisor

Re: Best practice to configure IP address

Hi,

Thanks for the reply.

However, if situation does not allow me to reboot my server for the IP and hostname configuration changes, is there a better way than the set_parms command?

Thanks
kannan N
New Member

Re: Best practice to configure IP address

Type this command

ifconfig lan0 ipaddress netmask

It will update itself
impossible itself says i 'm possible.
Steven E. Protter
Exalted Contributor

Re: Best practice to configure IP address

Shalom,

You are hanging your system because you are doing the change while connected through 1 IP address and changing it to another.

Of course you lose your connection.

If you were connected to your system via the console, which has its own ip address you could effect this change without losing your connection.

Your procedure is fine, though you have network services such as nfs running that will become very confused by it.

Best to reboot the system after you change your IP address so that your network services don't hang.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com