Operating System - HP-UX
1820390 Members
3466 Online
109623 Solutions
New Discussion юеВ

Changing IP Addresses on Servers

 
SOLVED
Go to solution
Peter Maitland
Occasional Advisor

Changing IP Addresses on Servers

I am new to this so I need a little help. What is the best way to change IP related information on servers. These servers are going to be moved so I have to give them new addresses. Can anyone help?

Peter

7 REPLIES 7
Vincenzo Restuccia
Honored Contributor

Re: Changing IP Addresses on Servers

edit /etc/hosts and /etc/rc.config.d/netconf,
/sbin/initd.d/net [stop|start].
Or set_parms tool interactive.
Paula J Frazer-Campbell
Honored Contributor

Re: Changing IP Addresses on Servers

Hi Peter

The easiest way is by using sam
Networking and Communications
Network interface cards

select the card that you wish to change the address on.
Actions
Modift

Paula
If you can spell SysAdmin then you is one - anon
Marc Dijkstra
Trusted Contributor

Re: Changing IP Addresses on Servers

Temporary IP changes can be made with

#ifconfig lan0

More permanent changes can be made with
#set_parms ip_address

This changes all neccessary files.

MND
"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila"
Rob Smith
Respected Contributor

Re: Changing IP Addresses on Servers

If you are moving the servers when you power them back up interrupt the boot sequence and boot into single user mode.

hpux -is

Then when you are in single user mode do a mount -a. Change into the /etc/rc.config.d directory and use vi to edit your network related settings in the netconf file. When you are done save the file and either issue the reboot command or do an init 3 to bring the system into multi user mode. Whatever you do, do not user set_parms from single user mode. This caused me many problems on one or two occasions. Hope this helps.

Rob

Learn the rules so you can break them properly.
melvyn burnard
Honored Contributor

Re: Changing IP Addresses on Servers

look at the set_parms utility in /sbin
or as root do:
/sbin/set_parms -? for help
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Jeff Thomas_1
Contributor

Re: Changing IP Addresses on Servers

I only have command line access, so I normaly use sam. (Type sam at the command line.)

This will bring up a menu type interface using all characters.

Choose Networking and Communications, Network Interface Cards, highlight the card you want to change the address on, and then tab and arrow to actions, and select modify. That will allow you to change your IP address.
Thanks so much for helping a newbie!
Christopher Caldwell
Honored Contributor
Solution

Re: Changing IP Addresses on Servers

Let me count the ways ...

Do this from the console. If you mod the IP via telnet, you'll lose IP connectivity, and you won't be happy.

---WAY 1---
# sam
->Networking and communication
->Network Interface Cards
[Select your NIC card]
Actions -> Modify

Change the IP.

Your in luck. Since Microsoft had little or nothing to do with the design of HP-UX, you won't have to reboot ;-).

If you're using a default gateway, you need to mod the gateway. I think you can do this via sam, but I usually use route add/route delete from the command line.

e.g.
#route delete default a.b.c.d
#route add default a.b.c.d

(check man route to verify the syntax).

To make the change permanent, you'll need to add the route in
/etc/rc.config.d/netconf
Change these lines to reflect your situation:
ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=A.B.C.D
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

Again, sam may do this for you, I don't remember. (if sam works, it would probably update
/etc/rc.config.d/netconf
for you.

--WAY 2--

#set_parms ip_address
from the command line will also work

--WAY 3--

You can use ifconfig from the command line (man ifconfig for details). You'll need to
update the /etc/rc.config.d/netconf file. Look here:

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=A.B.C.D
SUBNET_MASK[0]=ADD.YOUR.NET.MASK
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

Don't forget to update the default route.


Your path depends on your comfort level. It wouldn't hurt to look through the config files, it'll help you understand how things are put together.