Adding or editing the IP address on a Solaris 10 server is different from the previous versions of the OS (Solaris 9, Solaris 8 etc).
In the previous versions of the Solaris Operating System, you need to edit the /etc/hosts file and add/edit the entry for the IP address and the hostname.
Example:
192.168.1.1 sun1
However, in Solaris 10, you should edit the /etc/hosts file (a symlink to /etc/inet/hosts file) and the /etc/inet/ipnodes file and add an entry for IP address and hostname.
Once done, restart the Network service using
# svcadm restart network/physical
or reboot the server for the changes to take effect.
Although, the /etc/inet/ipnodes files is primarily for IPv6 only, without adding an entry to the file, the IP address (IPv4) doesn't become active. This seems to be a known problem but the good news is this is now fixed in the Solaris 10 U4 (08/07 build).
Also, ensure that the /etc/netmasks file with the network ID and the netmask.
You make no mention of /etc/defaultrouter. Why is that?
You need to change the Default router only if the gateway changes. In other words, if the server is moved to a new subnet with a new Gateway then yes, default router needs to be changed.
I’ve written a seperate article for that
http://www.itsyourip.com/networking/howto-change-the-default-gateway-or-default-router-in-sun-solaris/
May be I should add a note to this article. Thanks for that. I’ll do that!
Great, please modify the permissions on the hosts file to read & write before you start editing the file.
Hi
I had to change only netmask on my solaris 10 server. I entered the command like above: svcadm restart network/physical. Before I did it, I had changed mask on file /etc/netmasks. After I entered YOur’s command nothing change. So I had to entered this:
ifconfig bge0 IP_address netmask NET_MASK
and this help :)))
Hi Makakut,
If you do that, you will only make the IP address to change temporarily, it will revert back when you do a reboot
you need to change /etc/netmask
and then run that command only write network address. network address dot zero’s in place of node address.
I need some help with dual stacking a Solaris 10 box is this possible and if so can someone please give me a good link to use so that I may read the procedures