How to Change an IP Address on Solaris
To change an IP address on a Solaris system immediately, use the `ifconfig` command.
The syntax for `ifconfig` is:
ifconfig <interface> <ip address> <netmask> <broadcast address>
If the user does not know his/her network interface names, he/she should use the `ifconfig -a` command to list all of the available network interfaces.
Permanently Change an IP Address on Solaris
To make this change permanent, users need to edit one or more Solaris configuration files. If they do not, then their IP address will change back to the old address the next time the system is rebooted.
Edit the hosts entry in /etc/hosts.
If the system is moved to a new network, change the default route in /etc/defaultrouter.
If using VLSM (Variable Length Subnet Masks), users may need to edit /etc/netmasks.
If using Solaris 9 or above, users may need to edit the IP address in /etc/inet/ipnodes.
Reboot the server to test the changes and ensure that they operate correctly.