Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change Ip address for Solaris? 3

Status
Not open for further replies.

hongtli

MIS
Jun 12, 2000
3
0
0
CA
I installed my Solaris but I want to change the IP address. How do I do so that I don't neet to reinstall the system?

Thanks in advance!
 
What I did was simply to change to ip address in /etc/hosts, and re-boot (on Solaris 2.5.1). The system should pick up the new IP and configure itself accordingly.

I'm sure others will disagree and I'm sure on the newer version of Solaris. You'll find a lengthy discussion on the subject here: thread60-31076

Greg.
 
I did this a couple timees myself on different machines and it has worked each time. Just change the IP in /etc/hosts and reboot. For reference I cahnged the IPs on machines running Solaris 2.6 (Sun E3500, E3000 and a 1000).

- Stuart
 
You can also start from scratch.
To do it "live" look for your device in /etc/path_to_inst.
The interface will be either le0, hme0, glm0, or something along those lines. Then you can if you wish create entries in /etc/hosts and the hostname.Xe0 (the interface).
For example to make a 10/100 work type.
ifconfig hme0 plumb
ifconfig hme0 IPADDRESS NETMASK
ifconfig hme0 up
ifconfig -a should now show the working interface. Also see the man for route,resolv.conf,nsswitch.conf....
This will help you get up and running.
 
There are several ways to do this..

1) Run /usr/sbin/sys-unconfig ( This will take you through the first part of the Solaris install, system identification. Requires reboot. This is safe!

2) If /usr/sbin/ifconfig interface ipaddress ( This is immediate but will reset back when you reboot.)

3) assuming your interface is hme0, edit /etc/hostname.hme0 and insert the new IP address. ( reboot ).

As far as I am concerned #1 is the best way, but if you cannot afford to reboot first do #2 then #3. #3 will make sure the settings remian when you reboot next.

have fun!
 
Two other files that you may want to edit is /etc/defaultrouter and /etc/netmasks, if you are moving this machine to a different subnet.




Yahoo Messenger: coily2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top