mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* hostid derived from...
@ 2001-03-22  0:12 kern
  2001-03-22  0:55 ` Alan Cox
  2001-03-22  1:43 ` David Schwartz
  0 siblings, 2 replies; 4+ messages in thread
From: kern @ 2001-03-22  0:12 UTC (permalink / raw)
  To: linux-kernel

hi,

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?

thanks in advance
mark


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: hostid derived from...
  2001-03-22  0:12 hostid derived from kern
@ 2001-03-22  0:55 ` Alan Cox
  2001-03-22  1:43 ` David Schwartz
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Cox @ 2001-03-22  0:55 UTC (permalink / raw)
  To: kern; +Cc: linux-kernel

> how does linux provide the hostid string?

Its up to the C library

> 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?

Easily. hostid is generally only useful to proprietary license managers so
its a relatively minor issue in the Linux world. You can set it by sticking
the data you want in /etc/hostid


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: hostid derived from...
  2001-03-22  0:12 hostid derived from kern
  2001-03-22  0:55 ` Alan Cox
@ 2001-03-22  1:43 ` David Schwartz
  2001-03-22 13:08   ` Richard B. Johnson
  1 sibling, 1 reply; 4+ messages in thread
From: David Schwartz @ 2001-03-22  1:43 UTC (permalink / raw)
  To: kern, linux-kernel


> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: hostid derived from...
  2001-03-22  1:43 ` David Schwartz
@ 2001-03-22 13:08   ` Richard B. Johnson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard B. Johnson @ 2001-03-22 13:08 UTC (permalink / raw)
  To: David Schwartz; +Cc: kern, linux-kernel

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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-03-22 13:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-22  0:12 hostid derived from kern
2001-03-22  0:55 ` Alan Cox
2001-03-22  1:43 ` David Schwartz
2001-03-22 13:08   ` Richard B. Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®