Operating System - HP-UX
1830207 Members
1820 Online
109999 Solutions
New Discussion

Adding New IP for the HPUX machine

 
Nikhil Porwal
Occasional Advisor

Adding New IP for the HPUX machine

Hi,

I have HPUX machine in extranet configured for a IP which my Webserver listens too. Now i have a new IP created for the application Alias and i want the HPUX server to be assigned with the new IP, so that the webserver can listen on that new IP too.

What I know, is we need to update the netconf/host files for the new IP. But i am not sure how to do this, or the exact steps required here.

Adding an IP through ifconfig or router add or sbin/set_parms , which one should i use and do any of these would require a server re-start? Is it possible to add and make server listen to new IP without a re-start, and how?

Thanks in advance for all the support!

Regards
Nikhil
7 REPLIES 7
Oviwan
Honored Contributor

Re: Adding New IP for the HPUX machine

Hey

you can use sam to configure it and as far as I know it does not require a reboot.

Regards
Ramesh S
Esteemed Contributor

Re: Adding New IP for the HPUX machine

Hi

Edit the /etc/rc.config.d/netconf file with IP, Routes, Hostname...

Restart the net servuce by

/sbin/init.d/net stop

/sbin/init.d/net start

You need to be at system Console / MP console to do this.

Once the net service is been restarted, new IP chnages should take effect.Doesn't need system reboot.

Thanks & Regards

Ramesh
Nikhil Porwal
Occasional Advisor

Re: Adding New IP for the HPUX machine

Thanks for the reply Guys!

Oviwan, Using SAM where should i add the new IP? I am quiet new to HPUX and SAM though is quiet intractive but i am not sure where to add this new IP configuration.

Ramesh, i tried the above steps, to add a new IP, but i got an ifconfig no lan2 found on net start. It seems it is to update the current IP, is it possible to add a new IP. Or do i have to create a new Virtual LAN and then try to add new ip on that???

Regards
Nikhil
Ramesh S
Esteemed Contributor

Re: Adding New IP for the HPUX machine

I do not understand you question.

Are you trying to add multiple IP to the same interface ? Ex: assigning 2 IP's to lan0

If so, please see below steps.

Put the appropriate entries in /etc/rc.config.d/netconf to make the changes permanent.

INTERFACE_NAME[0]=lan0 #primary ip
IP_ADDRESS[0]=192.168.3.4
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

INTERFACE_NAME[0]=lan0:1 #virtual ip
IP_ADDRESS[0]=192.168.3.5
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

Restart the net service.

Thanks & Regards

Ramesh
Nikhil Porwal
Occasional Advisor

Re: Adding New IP for the HPUX machine

Thanks Ramesh, this is what i am intending to do here. I want to have my server two IP's. where the new IP i will be using for listening to webserver for the application Alias!

Do i have to update the Alias in the host file for the new IP???

Nikhil
Ramesh S
Esteemed Contributor

Re: Adding New IP for the HPUX machine

Hi

You could update both IP address for the same host on /etc/hosts file.

No need of alias in hosts file.

Thanks & Regards

Ramesh
Nikhil Porwal
Occasional Advisor

Re: Adding New IP for the HPUX machine

Requirement Changed. I got the alias to point to my Server IP instead!