Skip site navigation (1)Skip section navigation (2)
Date:      05 Mar 2002 20:57:48 -0700
From:      John-David Childs <jdc@nterprise.net>
To:        Vijai Gandikota <vijai_gandikota@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Hostid Question (and DHCP freebie to boot ;-)
Message-ID:  <1015387069.14115.253.camel@lohr>
In-Reply-To: <20020306030604.80376.qmail@web9807.mail.yahoo.com>
References:  <20020306030604.80376.qmail@web9807.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Note: no need to send the same message three times.  PS: Your editing
program isn't word-wrapping at 70-75 chars per line :(

On Tue, 2002-03-05 at 20:06, Vijai Gandikota wrote:
>=20
> =20
> Regarding hostid
>=20
> -----------------
>=20
> So should I use lmutil to set the hostid of my machine?

Depends entirely on the application which wants to know the hostid.  If
you want to use lmutil to set the sysctl hostid variable  (permanently
in /etc/sysctl.conf), I don't see why it wouldn't work. =20

> Networking Problem
>=20
Whoa dude...how is lmutil/hostid related to networking problem??? ;-)

>=20
> 1. Initial System State and Description
>=20
> ---------------------------------------
>=20
> I have Windows NT, Windows XP and FreeBSD on my system. Immediately
> after the install when I configure the network, I say yes to the
> IPv6 configuration

Why?  Unless you're connecting via an IPv6 "aware" research/university
site/network, there's absolutely no need to do this.  There's probably
no harm done either, but you don't strictly need it and it's not apropos
to your problem.

> and the DHCP configuration. All the values including the IP address,=20
> gateway address and the domain name are automatically filled and=20
> I only enter the host name.=20

Yep...that's the way DHCP works.  In many/most cases, you don't even
need to fill in the host name.

> My machine connects to the internet through a cable modem. Most of the=20
> time when I boot up the system with FreeBSD, even though the IP address
> has changed, the system works fine and I connect to the internet.=20

Yep...exactly the way DHCP is supposed to work.  You might want to do a
Google search for DHCP and read-up on how it functions.

> 2. Problem
>=20
> -----------
>=20
> Now once in a while for now good reason the network connection is lost
> and when I try to configure it again using /stand/sysinstall,

If you're using DHCP, you should NEVER have to reconfigure anything via
/stand/sysinstall.  Your DHCP config should be in /etc/rc.conf.  Even if
your network connection is lost (i.e.shutdown/reboot the machine, power
loss, bad cable company)...DHCP should automatically "do the right
thing" when the connection comes back up.

> I find that all the values in the various fields are same as the=20
> last time the network connection worked=85 though invalid=85 because=20
> I know that the IP address is different (from ipconfig  on a DOS
> prompt in XP). I find that even if I remove all the values and=20

You're not making any sense.  Is the XP box *the same machine* (i.e.
dual-boot)?  If you're dual-booting, you're not necessarily going
to get the same IP address in XP as you did in FreeBSD (because DHCP has
something called a "lease cache" file...and the OS will reuse a
previously cached IP address if at all possible...which might be a
different IP address than the one FreeBSD cached).  If the XP machine is
different from the the FreeBSD machine, then of course there's NO WAY
the IP addresses should ever be the same.

>=20
> reboot, they are not automatically detected again=85 but the fields are
> populated with the previous values again.=20

Yep...DHCP lease.

> I also find that even if I get the IP address, gateway address etc
> from ipconfig in Windows XP and enter it during the network=20
> configuration in /stand/sysinstall, I still cant connect to the network.=20

That sounds like a problem totally unrelated to your network config.=20
Once you've got DHCP working, the first time, if you suddenly find you
can't connect...then that is a problem with your ISP/provider, not
FreeBSD.

>=20
> 3. Questions
>=20
> -------------
>=20
> 1.    Can you suggest why this problem occurs and what the possible
> remedy is?

Not from the evidence presented.  It sounds like you don't understand
how DHCP works.  Once DHCP works the first time (via /stand/sysinstall),
don't EVER change it via /stand/sysinstall (unless, of course, you're
going to use a static IP or you're rebuilding the machine from
scratch).  Look at /etc/rc.conf...you'll see a whole bunch of --
generated from /stand/sysinstall -- configurations there.  Learn to love
that file.

>=20
> 2.    Is the fact that my machine=92s ip address is constantly changing
>  a cause for concern here?

No.

> 3.    Should I buy a router and connect to the internet through that?
>  Would that in anyway help avoid this problem?

Nope.  Unless you like wasting money.  The only use for a router in this
scenario would be (potentially) as a firewall.

>=20
> Thank you ,
>=20
> Vijai
>=20
> =20
>=20
> =20
>=20
> Your reply to my previous email
>=20
> --------------------------------
>=20
> hostid is broken in FreeBSD (it isn't, apparently, automatically
>=20
> set...and I could only find one bug report about it: kern/21132.  You
>=20
> might try using the lmutil program from
>=20
> http://www.globetrotter.com/lmgrd.htm".  They have Linux, BSDI, and
>=20
> FreeBSD (3.4) versions of lmutil.  At the time I wrote this, it
>=20
> *appeared* as if Globetrotter Software was having DNS problems (I got=20
>=20
> an
>=20
> internal IP address for their FTP server - ftp.globes.com).  The IP
>=20
> address you want is 192.156.198.196
>=20
> =20
>=20
> =20
>=20
>   John-David Childs <jdc@nterprise.net> wrote: hostid is broken in FreeBS=
D (it isn't, apparently, automatically
> set...and I could only find one bug report about it: kern/21132. You
> might try using the lmutil program from
> http://www.globetrotter.com/lmgrd.htm". They have Linux, BSDI, and
> FreeBSD (3.4) versions of lmutil. At the time I wrote this, it
> *appeared* as if Globetrotter Software was having DNS problems (I got an
> internal IP address for their FTP server - ftp.globes.com). The IP
> address you want is 192.156.198.196
>=20
>=20
>=20
> On Tue, 2002-03-05 at 15:19, Vijai Gandikota wrote:
> > Hello Everyone,
> >=20
> > I have a question regarding the hostid of a machine
> > running FreeBSD. Entering the following command at
> > command line
> >=20
> > % sysctl kern.hostid
> >=20
> > gives me
> >=20
> > kern.hostid: 0
> >=20
> > I noticed in a couple of emails sent by other people
> > using FreeBSD (with the output of various system
> > values including hostid) that their hostid's also said
> > 0.=20
> > Is this normal? On UNIX normally when I enter the
> > command=20
> > % hostid
> >=20
> > I get a 8 letter alphanumeric value like 23a4076b.=20
> >=20
> > My next question is do I need to change the hostid
> > from 0 to any other value?
> >=20
> > If anyone has any suggestions in the regard please let
> > me know.=20
> > Thank you
> > Vijai
> >=20
> > __________________________________________________
> > Do You Yahoo!?
> > Try FREE Yahoo! Mail - the world's greatest free email!
> > http://mail.yahoo.com/
> >=20
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
>=20
>=20
>=20
>=20
> ---------------------------------
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1015387069.14115.253.camel>