焦作哪个洗浴有小姐:Re: how is hostid determined?

来源:百度文库 编辑:偶看新闻 时间:2024/05/09 08:58:52

Re: how is hostid determined?


  • From: Thomas Mandl
  • To: Werner Puschitz
  • Cc: redhat-install-list
  • Subject: Re: how is hostid determined?
  • Date: Sun, 02 Dec 2001 03:44:39 +0100

Werner Puschitz wrote:> > On Sun, 2 Dec 2001, Thomas Mandl wrote:> > > Hi List,> >> > i wonder if anyone knows this:> > How is the 'hostid' determined under Linux?  On a SUN/SPARC system the> > hostid is hardcoded in the onboard NOVRAM, but how does Linux compute> > the hostid. Is it possible to override the hostid reported by> > /usr/bin/hostid.  Does the hostid correspond to the MAC address of the> > NIC?> > It first looks into /etc/hostid. If no such file exists, it takes the> host IP address. So he hostid should be unique within your local network.> > E.g. hostid of IP address 172.16.41.220 should be:> > 0x10acdc29>    | | | |___ 41>    | | |_____ 220>    | |_______ 172>    |_________ 16> > WernerFYI:The hostid is really based on the IP Address, but on a RH 6.1 (x86)system (2.2.12-20) /usr/bin/hostid does not check for /etc/hostid butrather for /var/adm/hostid (a SunOS/Solaris port???). I checked thiswith strace. Putting a /var/adm/hostid file in place will change/alteryour current default hostid (/etc/hostid is ignored)!Would be interesting how Linux assigns the hostid if you have more thanone NIC installed (which one sets the hostid - eth0 or eth1) ?Currently i can't verify this on a higher kernel release, but i'll letyou know next week, when i've access to my other RH 7.1/7.2 systems.regardsThomas