Computing.Net > Forums > Solaris > Change the Host name and IP address

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Change the Host name and IP address

Reply to Message Icon

Name: Rao Devulapally
Date: January 23, 2001 at 17:29:39 Pacific
Comment:

I have installed the Solaris 7 on intel machine connected to LAN with some arbitrary Host name and IP address. Now I have started using the system and I wish to change the Host name and IP address without reinstalling the OS. How to do it?



Sponsored Link
Ads by Google

Response Number 1
Name: Paul Beck
Date: January 24, 2001 at 05:18:21 Pacific
Reply:

You can do this easily by changing a couple of files. First, your IP address is stored in the file associated with your NIC. Look in /etc for a file 'hostname.xxx' where xxx is your ethernet device name. This file contains the IP address for the machine. I am assuming you are not using DHCP. If you have more than one NIC, there will be a file for each NIC. Next, look for a file called 'nodename' in /etc. This contains the machine name. If you are connected to a router you will also have to change /etc/defaultrouter to reflect the IP address of the router. Next you will have to change /etc/inet/netmasks to reflect the IP network address and subnet mask. Finally, of course, you will have to change /etc/inet/hosts if your machine is in the host table. If you are using DNS for name resolution, you will also probably have to change /etc/resolv.conf. There, now wasn't that obvious? I hope I haven't left anything out.


0

Response Number 2
Name: rick
Date: January 25, 2001 at 11:37:15 Pacific
Reply:

Paul's method is generally considered the one for thrillseekers. I think he's got about half the files involved. I have memories of about 18 files involved.

alt.solaris.x86 faq has a post for this process from the horse's mouth.

doing a sys-unconfig as root is the method recommended by Sun, this reverts your system to vanilla, then reboots, comes up with the prompts for root password, hostname, net status etc. as per a new install.

I can't remember whether it leaves /etc/hosts intact, maybe best to back any hand modded asppp, /etc/System and nsswitch related files to a admin level user home directory for safekeeping. (a ufsdump 0 of / slice at least would be prudent, of course, but you do that as a matter of procedure, don't you, and restoring it will back you out of your changes)

man sys-unconfig and man ufsrestore before you start and make sure you understand what you're doing. repost or email (flammage to /dev/nul ) if you wnat more help.


0

Response Number 3
Name: Saskia
Date: March 28, 2001 at 11:28:57 Pacific
Reply:

In the first reply, a few files are forgotten... To make it work, check for files that contain your old hostname and change it for the new one:

/etc/inet/hosts
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
/etc/hostname.
/etc/nodename

Also enter the command "hostname" with the new name as an option.
In the hosts file, you can also change your IP number. Then reboot the machine.


0

Response Number 4
Name: markr@guld.spray.se
Date: May 8, 2001 at 03:34:45 Pacific
Reply:

but what commands can you use if you don't want to reboot?


0

Response Number 5
Name: rupert murdoch
Date: July 20, 2001 at 13:16:45 Pacific
Reply:

use ifconfig to take down, change address, netmask, etc., and restart the NIC.
You can change the IP address, netmask and gateway without rebooting, but a hostname change requires a reboot.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

printer port-Scsi drivers Voodoo5 5500 with Solaris...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: Change the Host name and IP address

CAN www.computing.net/answers/solaris/can/1715.html

CANT BOOT www.computing.net/answers/solaris/cant-boot/1720.html

Solaris 7 boot www.computing.net/answers/solaris/solaris-7-boot/1045.html