Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change IP address on HP UX 10.2?

Status
Not open for further replies.

sanjose239

Technical User
Feb 28, 2003
2
US
On HP UX 10.2, I'd like to change the IP address of my
workstation. Other than changing the IP address on /etc/hosts, what other thing(s) do I need to do before
rebooting my workstation?

Thanks in advance.
 
You will need to edit your "/etc/rc.config.d/netconf" file.
In this file your IP is bound to your network interface card.
This file is used during the system boot to bind IP/mask/broadcast/route statements/DHCP to all network interfaces in your system.

1. Run "lanscan" from the command line to identify your interface. ie:(lan1, lan2).

2. Run "netstat" to identify the IP address assigned to your interface.

3. Edit "/etc/rc.config.d/netconf", find the "INTERFACE_NAME" entry for your card (lan1, lan2).

4. Notice the number in the "[]" this is used to keep track of the various statements assigned to different interfaces.

5. Find the "IP_ADDRESS" entry that has the matching number in the "[]" as the number in the "[]" next to your "INTERFACE_NAME" entry. This the IP assigned to the interface you need to change.

6. Run "/sbin/init.d/net stop" from the command line to stop network services.
7. Re-start network services by running "/sbin/init.d/net start" from the command line.

8. Re-run "netstat" to confirm the IP address assigned to your interface has changed.


Example of "/etc/rc.config.d/netconf" entry for "lan1":

INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=192.168.123.253
SUBNET_MASK[1]=255.255.255.0
BROADCAST_ADDRESS[1]=192.168.123.255
INTERFACE_STATE[1]=up
DHCP_ENABLE[1]=0

This should do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top