RE: hostid derived from...

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Thu Mar 22 2001 - 08:08:01 EST


On Wed, 21 Mar 2001, David Schwartz wrote:

>
> > how does linux provide the hostid string?
> >
> > on a sun box this is a guaranteed unique identifier, since AFAIK
> > intel architecture does not have this unique identifier can
> > two linux boxes end up with same hostid by chance?
>
> If a Linux box is properly administered, it's hostid should not be the same
> as any other Linux box that is properly administered. Of course, Linux does
> nothing to stop you from shooting yourself in the foot.
>
> DS
>

The host ID is the network IP address in network order, displayed
as a hexadecimal number.

The program, `hostid` first looks in /etc/hostid.
If no such file exists, it resolves the host IP address and
uses it, but not as the typical dotted-quad. Instead, it uses
hex in network order.

IP address 204.178.40.224

0xb2cce028
   | | | |_______ 40
   | | |_________ 224
   | |___________ 204
   |_____________ 178

It has nothing to do with the kernel. If you are properly networked,
the hostid will be unique in your LOCAL network.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 23 2001 - 21:00:17 EST