Solaris: Changing an IP address

solaris.jpg Changing an IP address is a little more difficult than your usual commands in linux. At least if you want to change it permanently.
If you just use the ifconfig command, that is only a temporary solution. It will automatically reset itself upon a reboot. So you have to do that and also edit /etc/hosts, change your /etc/defaultrouter (this is the file that points to your router or whatever is sending your broadcast).
Usually this is enough, but in Solaris 9 and up, you might need to edit your /etc/inet/ipnodes if it’s been changed before. Also, if you use VLSM (variable length subnet masks), then you’ll also need to edit /etc/netmasks.
No one ever said Unix was easier. Just more stable.