an attempt at documentation of my ongoing struggles with solaris and opensolaris on x86. I believe strongly in the (public) documentation of trials, struggles and failures, even more so than in the documentation of success: With a long standing commitment to solaris, looking for answers and just finding "I tried it on distibution 'X' and it worked for me" is not very informative.

Saturday, June 10, 2006

Act one: recitative "my server as a DHCP client"

the manuals say it's so easy. all you have to do is the following:

# touch /etc/hostname.hme2
# touch /etc/dhcp.hme2

reboot and you're done.
Which I did.

And cursed.

And cursed again.

I always forget that solaris doesn't stick to it's own hostname when it has DHCP configured addresses. And since windows clients do, no ISP in their right mind provides a hostname over DHCP. Endresult: the hostname is set to "unknown".

So: my initial attempt was to put the hostname in /etc/nodename.
In my opinion, an IP-address is tied to an interface. When naming them, I prefer to have some logical description as their name. in this case: the ip-address on hme2 should be associated with "dc-utr01-ext" which is short for "the external (ISP facing) interface in my datacenter in Utrecht, location #1"
A bit over the top for just a single box, but hey. think big.
following the same logic, I assigned hme2 a static address and name: "dc-utr01-int". This makes for easy interpretation of lots of network stuff like network snoops, dhcp server, firewall rules etc etc

So I did:

# echo "dc-utr01-ext" > /etc/nodename
and rebooted.

Only to find out that when I log in, the hostname has changed to this as well!
e.g.:
# uname -a
SunOS dc-utr01-ext 5.10 Generic_118822-30 sun4u sparc SUNW,Ultra-2

that doesn't make sense at all! It's ugly!

At this point I left it for what it was and went for some sleep.

No comments: