Solaris 10 ifconfig problems
I installed Solaris 10 beta 72 on a Sun Ultra 60 and have had a strange occurance. I had to give the machine a new IP address so I went through ifconfig, using the following commands:
# ifconfig hme0 down
# ifconfig hme0 unplumb
# ifconfig hme0 192.168.10.10 netmask 0xffffff00 broadcast 192.168.10.255 up
That worked fine. So I went into /etc/hosts and changed the IP address and saved the file. I rebooted and after logging in found it was still using the old IP address.
I must be missing something, but I looked everywere and couldn't find the old address still stored in a file. Has anyone else seen this problem?
Bob
[674 byte] By [
leicaguy] at [2007-11-26 0:43:32]

# 4
I had that idea, but I'm not using dhcp. And in fact it is going back to it's old addresses each time, not some random address.
I used the early betas of Solaris 10 and I noticed that in the late betas Sun is configuring as many things as they can as services. I know that the physical interface is configured by svcadm at boot time. I traced it back a file in /lib/svc/method called net-physical. But I don't see where it's doing really anything different that what was done in the past.
Somewhere the OS is holding onto the old IP and I can't for the life of me figure this out.
Bob
# 6
Not that this is the cause, but the proper file is /etc/inet/hosts. /etc/hosts is a symlink for legacy purposes.If your /etc/hostname.hme0 contains a hostname exacly as listed in /etc/inet/hosts then your interface should be configured properly.
# 7
Well as far as I understand /etc/inet/hosts is for IPv4 addresses and /etc/inet/ipnodes is for IPv4 and IPv6 addresses. If you have the same host name in both files, but with different IPv4 addresses, which one gets used by default?
# 8
rom508,
Thanks! The problem was that /etc/inet/ipnodes containded the old IP address. I had changed /etc/inet/hosts to be:
192.168.10.10 sherlock loghost
/etc/hostname.hme0 read:
sherlock
But /etc/inet/ipnodes was the old address. That was the problem.
Thanks again! This was driving me crazy.
Bob