1834827 Members
2639 Online
110070 Solutions
New Discussion

Re: change IP address

 
Jeff Hagstrom
Regular Advisor

change IP address

How do I change the IP address? I have an RP7410 and we are running 11.i. And we have k460/9000 box running 11.00 that we also need to changed the ip address.
7 REPLIES 7
Robert-Jan Goossens
Honored Contributor

Re: change IP address

Hi Jeff,

Change
/etc/hosts
/etc/rc.config.d/netconf

or use the script

# set_parms ip_address

and reboot.

Regards,
Robert-Jan
Steven E. Protter
Exalted Contributor

Re: change IP address

Two ways:

Temporary

ifconfig lan0 192.168.0.15 netmask 255.255.255.0 up

This will crash certain networking programs, but it will instantly change the ip address.

You can use sam, but sam makes mistakes and sometimes makes double entries disabling all networking.

Way 2:

vi /etc/rc.config.d/netconf

Change the appropriate line. reboot the box or at least restart networking.

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
Ivajlo Yanakiev
Respected Contributor

Re: change IP address

you can use SAM but you will need reboot
if you don't want reboot

first

vi /etc/rc.config.d/netconf

INTERFACE_NAME[5]="lan1"
IP_ADDRESS[5]="10.100.0.61"
SUBNET_MASK[5]="255.255.255.0"
BROADCAST_ADDRESS[5]=""
INTERFACE_STATE[5]=""
DHCP_ENABLE[5]=0
----------------------------------------
From shell

#ifconfig lan1 10.100.0.61

Change 10.100.0.61 with your ip address
change lan1 with your LAN

Stuart Abramson
Trusted Contributor

Re: change IP address

When SEP says restart networking, he means:

/sbin/init.d/net stop; /sbin/init.d/net start

Make sure that your netmask, gateway, etc, don't also change, or you will have to edit those also.

In addition, you wnat to change one line in /etc/hosts:

NEW_IP hostname
Ivajlo Yanakiev
Respected Contributor

Re: change IP address

net stop
net start

do not work for me !
Emanuele De Angelis
Frequent Advisor

Re: change IP address

Hi,

vi /etc/rc.config.d/netconf
Search IP_ADDRES and applay modify.
/sbin/init.d/net stop
/sbin/init.d/net start

O

set_parms (this is a wizard)

By
piyut_1
Frequent Advisor

Re: change IP address

SAM is very easy to configure ip.user friendly...
u can aslo set IP in command line.
#ifconfig lan0 x.x.x.x netmask x.x.x.x
or u can configure file /etc/rc.config.d/netconf

i love hp-ux.

thanks,

-piyut-