How to change the IP address in Solaris 10

Here is a list of files that you need to edit when changing the IP address of an interface in Solaris 10.
/etc/hosts
/etc/hostname.interface-name
/etc/nodename
/etc/defaultrouter
/etc/resolv.conf
/etc/netmasks

Add the ip address and server name to the host file.

vi /etc/hosts
10.0.0.10 server-name

Select the interface you want, your server may have more than one network interfaces.

vi /etc/hostname.bge0
10.0.0.10 netmask 255.255.255.0

Change the node name

vi /etc/nodename
server-name

Add the gateway ip address

vi /etc/defaultrouter
10.0.0.1

Add the DNS servers ip addresses

vi /etc/resolv.conf
nameserver 168.20.0.10
nameserver 168.20.10.22

Add the network address

vi /etc/netmasks
10.0.0.0 255.255.255.0

Now reboot the server.