Procedure on how to change IP address on SUN Solaris

Hi,

I need help from SOLARIS expert. Can someone please tell me how to change the IP address on SUN Solaris?

I have two NMS-SUN machines (Ultra 10) to manage our network with the following IP addresses and SM:

cwmws1: 10.10.100.2 255.255.255.0

cwmws2: 10.10.100.3 255.255.255.0

Due to our network migration, I need to change the IP address of each machine to the new assignment given below.

cwmws1: 10.10.51.100 255.255.255.0

cwmws2: 10.10.51.101 255.255.255.0

Hence, please send me the comprehensive procedure how I can achieve this.

Thanking you in advance.

Sincerely,

gkr

[649 byte] By [gkr] at [2007-11-26 11:59:15]
# 1

Hello.

If the host name of the machine remains this is quite simple.

On the Solaris machines you must modify the file /etc/hosts (every Solaris version) and on Solaris >= 10 the file /etc/inet/ipnodes.

Simply replace 10.10.100.2 by 10.10.100.100 and 10.10.100.3 by 10.10.100.101.

Then reboot the machine.

Type "/usr/sbin/ifconfig -a" just to verify that the change was successful.

Martin

Martin_Rosenau at 2007-7-7 12:20:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2
Hi Martin,I'm sorry for my late response. I am just wondering if it is necessary to change also the IP address of the ethernet interface (hme0) of each machine by using the command "ifconfig hme0 IP add netmask". Please advise. Thanks a lot.gkr
gkr at 2007-7-7 12:20:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3

The IP address of hme0 is indeed the IP address of the machine,

if it only has one interface.

When you run the reboot as suggested, the boot scripts assign the

interface a *hostname* from the contents of /etc/hostname.hme0, then

search for the IP address of that (ie, the current) host in /etc/hosts

or /etc/inet/ipnodes.

You could run

# ifconfig hme0 <newIP> netmask <new netmask>

if you want, but the reboot will have that effect -- *and* you'll know

the config files are correct!

If you only run ifconfig but do not edit the hosts/ipnodes files, the

old IP address will reappear on reboot.

cheers,

kidari

kidari at 2007-7-7 12:20:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 4

Hello.

The IP address of the interface is taken from the file /etc/hostname.hme0.

Normally this file does not contain an IP address but a host name which will be looked up in /etc/hosts and /etc/inet/ipnodes.

(However a re-boot is required.)

You should take a look at /etc/hostname.hme0 anyway.

The "ifconfig" command can be used to temporarily change the host's IP address without re-booting. "Temporarily " means that the changes will be lost after re-booting the system.

Martin

Martin_Rosenau at 2007-7-7 12:20:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 5
Snap! :-) And at exactly the same time.
kidari at 2007-7-7 12:20:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 6
Hi Guys,Thank you for your assistance. I really appreciate your help. I will do this as suggested. Best regards,gkr
gkr at 2007-7-7 12:20:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 7

Hi,

I have successfully changed the IP address of my SUN machine by modifying the file /etc/hosts.

However, when I verified the IP address of hme0 using the ff command

#ifconfig -a

it still shows the old IP and below is the last line of the screen capture

inet 10.10.100.2 > 192.187.172.14 netmask ffffff00

Upon knowing that the IP has not been changed, I run the command

#ifconfig hme0 inet <newIP> netmask <mask>

After that I rebooted the machine. However, when I verified the IP of interface hme0, it is still showing the old IP which is 10.10.100.2.

Please advise if this will have an effect on my machine and let me know what are the other ways to eliminate the old IP.

Thanks a lot.

Best regards,

gkr

gkr at 2007-7-7 12:20:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 8
hope this issue is resolved by now.
jssatishkumar at 2007-7-7 12:20:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...