This content is submitted by a BigAdmin user. It has not been reviewed for technical accuracy by Sun Microsystems, though it may have been lightly edited to improve readability. If you find an error or would like to comment on the article, please contact the submitter or use the comment field at the bottom of the article.
Community submissions may not follow Sun trademark guidelines. For information on Sun trademarks, please see http://www.sun.com/suntrademarks/.
Changing a Host Name or IP Address on the Solaris OS
This tech tip shows how to change the host name or IP address of a system running the Solaris OS.
This information is sourced in part from Sun InfoDoc 21252, "How to Change the hostname and/or IP Address Without Running the sys-unconfig Command". (Editor's note: For more information, please see SunSolve; content is available to registered users with a Sun Service Plan.)
Option 1: Using sys-unconfig
Using sys-unconfig resets a number of files back to default, then shuts down the host.
What isn't pointed out in the man page is that on reboot,
you are asked configuration questions to populate the files.
The questions are the same as when a new server is delivered,
or when you load the operating system from scratch.
So on boot you will get something like this:
Select the language you want to use: <select your language>
Select a Locale,
Please make a choice (0 - 59), or press h or ? for help:
<select your location>
What type of terminal are you using?
Type the number of your choice and press Return:
<select your terminal type, I use a DEC VT100>
F2 continue, F2 continue
Network Connectivity
Networked [X] Yes
DHCP
Use DHCP [X] No
Primary Network Interface
Primary network interface [X] eri0
Host Name <hostname>
IP Address <ipaddress>
Subnets
System part of a subnet [X] Yes
Netmask
<netmask>
IPv6
Enable IPv6 [X] No
Set a default Route
[X] Specify one
Default Route IP Address
Router IP Address: <defaultrouter>
Confirm Information
F2 continue
Configure Security Policy:
Configure Kerberos Security [X] No
Confirm Information
F2 continue
Name Service
Name service [X] DNS
Domain Name
<dnsdomain>
DNS Server Address
Servers IP Address: <nameserver1>
Servers IP Address: <nameserver2>
Servers IP Address:
DNS Search List
Search Domain: <dnsdomain>
Search Domain:
Search Domain:
Search Domain:
Search Domain:
Confirm Information
F2 continue
Time Zone
Regions [X] <select your region>
Time Zone
Time zones [X] <select your time zone>
Date and Time
> Accept the default date and time or enter new values.