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]
# 1
make a file /etc/hostname.hme0 and in it put the hostname that is on the line with the IP you want assigned. Make sure the name in /etc/hosts matches what you put in hostname.hme0
tmcmurph at 2007-7-5 19:39:15 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2
Thanks, I had already done that. I forgot to mention it. That's why it's so strange.Bob
leicaguy at 2007-7-5 19:39:15 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 3
may be you have a dhcp server and your Solaris runs dhcp client to obtain IP address automatically?
rom508 at 2007-7-5 19:39:15 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 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

leicaguy at 2007-7-5 19:39:15 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 5
I'm using the same release of Solaris 10 and never had such problems, I think something else is wrong with your set up. Show us what your files look like:/etc/inet/ipnodes/etc/inet/hosts/etc/hostname.[interface]
rom508 at 2007-7-5 19:39:15 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 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.
tk02069 at 2007-7-5 19:39:15 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 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?
rom508 at 2007-7-5 19:39:15 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 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

leicaguy at 2007-7-5 19:39:15 > top of Java-index,Solaris Operating System,Solaris 10 Features...