From owner-freebsd-questions Thu Feb 19 05:48:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA16075 for freebsd-questions-outgoing; Thu, 19 Feb 1998 05:48:57 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from emu.sourcee.com (emu.sourcee.com [199.201.159.173]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA16070 for ; Thu, 19 Feb 1998 05:48:51 -0800 (PST) (envelope-from nrice@emu.sourcee.com) Received: (from nrice@localhost) by emu.sourcee.com (8.8.8/8.8.3) id IAA06199; Thu, 19 Feb 1998 08:48:44 -0500 (EST) Message-ID: <19980219084843.13569@emu.sourcee.com> Date: Thu, 19 Feb 1998 08:48:43 -0500 From: Norman C Rice To: jgrosch@superior.mooseriver.com Cc: questions@FreeBSD.ORG Subject: Re: hostid equals Ethernet address or IP address ? References: <19980219004112.26662@mooseriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88 In-Reply-To: <19980219004112.26662@mooseriver.com>; from Josef Grosch on Thu, Feb 19, 1998 at 12:41:12AM -0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Feb 19, 1998 at 12:41:12AM -0800, Josef Grosch wrote: > > Maybe someone can explain this for me... Gethostid(3) says > > "Sethostid() establishes a 32-bit identifier for the current > processor that is intended to be unique among all UNIX systems > in existence. This is normally a DARPA Internet address for the > local machine. " > > The first sentence says that the identifier "is intended to be unique > among all UNIX systems in existence", ie. an Ethernet address. The > second sentence seems to contradict the first in that, for the local > machine, the hostid is based on the machines IP address. AFAIK, an > Ethernet address is guaranteed to be unique but an IP address is not > guaranteed. Of course, I mean all UNIX machines not just those connected > to a given network > > Should the hostid be based on an Ethernet address or an IP address? > Any pointers to revelant documents would be helpful. While I am not sure about supporting documents, I am pretty sure that sethostid(3) is referring to the IP address, not the MAC address. My reasoning is that IP addresses are 32-bits while MAC address are 64-bits (the first 32-bits comprises the OUI which uniquely identifies the vendor). My other thought is that if sethostid() actually rewrote the MAC address (assuming it was implemented in FLASH, EEPROM, or some other reprogrammable device) is that there would be no guarantee of uniqueness. Reprogramming the MAC address would ``break'' many vendors cards due to the steps they take to prevent this, e.g., embedded CRC-32s, checksums, inverted MAC addresses, etc.. > > > Josef > > -- > Josef Grosch | Another day closer to a | FreeBSD 2.2.5 > jgrosch@MooseRiver.com | Micro$oft free world | UNIX for the masses > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- Regards, Norman C. Rice, Jr. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message