Re: hostid gives identical values on all FC machines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 14 Dec 2004, Ulrich Drepper wrote:

> Andrew Mather wrote:
>
> > This morning, someone went to get the hostids and found both machines
> > return identical values (7f0100).  I also tried on an FC3 machine
> > running on an i686 box and got the same return.
>
> The ID you get is the result of
>
> a) your system(s) not having a file /etc/hostid with a 4-byte value
> containing the host ID
>
> and
>
> b) the network setup being configured so that looking up the IP address
> for the machine returns 127.0.0.1 on both machines.
>
>
> The later I consider a bug in your installation.  See what gethostname()
> reports and what the IP address associated with this name is.  Maybe
> your systems are all called localhost?  That'd be wrong, too.

Not so much that they are called localhost as that the real hostname is
associated with IP address 127.0.0.1.  In Linux, the default for hostid is
generated from the IP address of the result of gethostname().

>
> Anyway, there is no good solution for all this other than creating
> /etc/hostid files.  The old machines where this interface originates
> from had magic serial number or so.  Commodity hardware doesn't have
> this (no, CPU serial numbers don't count).

But MAC address is not bad (though, of course, anything can be forged with
more or less effort).  Solaris generates the hostid from the MAC address
of the primary NIC.

I'm not arguing the merits of the FlexLM licensing scheme.  I'd just point
out, as I have to a couple of vendors, that tying hostid to IP address
isn't very helpful for laptops.  You can fake a legit hostid if it's
looked up according to the machine's hostname.  Just add

	192.168.1.1	myhost myhost.mydomain

to /etc/hosts and remove myhost and myhost.mydomain from the

	127.0.0.1	localhost localhost.localdomain

line.  On the other hand, not all FlexLM licenses are alike.  Some seem to
want something else for key generation.  I have two different FlexLM
products.  One uses the IP address of gethostname(), and the other uses an
IP address associated with one of the NICs.  It drove me crazy.  I finally
ended up with one node-locked and one network license to make everything
happy.

But /etc/hostid sounds even simpler...

-- 
		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux