Thursday, September 15, 2011

Changing Host name and IP address in Solaris 10

Changing host name only:

Change the hostname in the following files:


/etc/nodename

/etc/hostname.*interface

/etc/inet/hosts

/etc/inet/ipnodes

and rename directory under /var/crash

# cd /var/crash

# mv oldname newname
then reboot the server.

Changing IP address:
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 you don't know the names of your network interfaces, 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, you will need to edit one or more Solaris configuration files. If you do not, then your IP address will change back to the old address the next time you reboot the system.


You will need to edit the hosts entry in /etc/hosts.

If you have moved the system to a new network, you will need to change the default route in /etc/defaultrouter.

If you are using VLSM (Variable Length Subnet Masks), you may need to edit /etc/netmasks.

If you are using Solaris 9 or above, you may need to edit the IP address in /etc/inet/ipnodes.

You should then reboot the server to test your changes and ensure that they operate correctly

No comments:

Post a Comment