Post the Operating System and version you are using - it matters!
For Solaris:
To change the IP address of a network interface on a machine running
Solaris 2.x simply edit the /etc/inet/hosts file and modify the line
corresponding to that network interface. Save your changes and reboot.
In general, this is all that needs to be done for the machine itself
to recognize and start using its new IP address.
However...
If the new IP address is on a different network from the original IP
address, you may need to modify the /etc/inet/netmasks file as well.
There may be additional steps you need to take for other machines to recognize
the new IP address.
If you have an /etc/defaultrouter file listing the default gateway for your
subnet you may need to modify the IP address for the gateway listed in
this file. Similar changes need to be made in files referencing
other subnet specific data if the subnet the machine resides on changed.
If you run a naming service you will need to modify the corresponding
respository on the name server.
i.e. The NIS hosts map, NIS+ hosts table or DNS zone files.
If you have referenced the IP address anywhere else on your machine or other
machines you will need to make the appropriate modifications. Solaris has
been designed such that a machine itself only references its IP address in
/etc/inet/hosts. This allows you to reference a machine using its hostname
rather than the IP address, making IP address changes very simple. A hostname
change requires a bit more work.
For more complex host configuration changes or if you are unsure of yourself
properly completing the above procedure, you can use the `sys-unconfig` command.
These directions can be found
at