This content has been marked as final. Show 9 replies
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.
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
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.
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.
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
it still shows the old IP and below is the last line of the screen capture
inet 10.10.100.2 ---> 220.127.116.11 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.