Change the Host Name of the configured Solaris server, IP (Solaris7, 10)

Source: Internet
Author: User
Tags time zones
Transferred from:
Http://www.sun.com/bigadmin/content/submitted/change_hostname.jsp#overview

Changing a Host Name or IP Address on the Solaris OS

Ross Moffatt, August 2007.

Contents

  • Overview
  • Option 1: Usingsys-unconfig
  • Option 2: Editing Files
  • About the Author

Overview

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 Runningsys-unconfigCommand ". (Editor's note: For more information, please see SunSolve; content is available to registered users with a Sun Service Plan .)

Option 1:Usingsys-unconfig

Usingsys-unconfigResets 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
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.

Option 2: Editing Files

Host Name Change

Before Solaris 7, check/edit:

/etc/inet/hosts
/etc/nodename
/etc/hostname.<interface>

Where<interface>Is the name of the primary interface, e.g. bge0.

/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts

Then reboot the system.

Solaris 7 to 9, check/edit:

/etc/inet/hosts
/etc/nodename
/etc/hostname.<interface>

Where<interface>Is the name of the primary interface, e.g. bge0.

/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
/etc/inet/ipnodes

Then reboot the system.

Solaris 10, check/edit:

/etc/inet/hosts
/etc/nodename
/etc/hostname.<interface>

Where<interface>Is the name of the primary interface, e.g. bge0.

/etc/inet/ipnodes

Then reboot the system.

 

IP Address Change

Before Solaris 7, check/edit:

/etc/inet/hosts
/etc/hostname.<interfaces>

Where<interfaces>Are the names of the interfaces, e.g. bge0, bge1, eri0.

/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts

If you are moving to a new subnet, check/edit:

/etc/inet/netmasks
/etc/defaultrouter
/etc/resolv.conf

Then reboot the system.

Solaris 7 to 9, check/edit:

/etc/inet/hosts
/etc/hostname.<interfaces>

Where<interfaces>Are the names of the interface, e.g. bge0, bge1, eri0.

/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
/etc/inet/ipnodes

If you are moving to a new subnet, check/edit:

/etc/inet/netmasks
/etc/defaultrouter
/etc/resolv.conf

Then reboot the system.

Solaris 10, check/edit:

/etc/inet/hosts
/etc/hostname.<interfaces>

Where<interfaces>Are the names of the interface, e.g. bge0, bge1, eri0.

/etc/inet/ipnodes

If you are moving to a new subnet, check/edit:

/etc/inet/netmasks
/etc/defaultrouter
/etc/resolv.conf

Then reboot the system.

About the Author

Ross Moffatt has been a UNIX System Administrator for more than 10 years and can be contacted at ross. stuff [at] telstra.com.

Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.