Subject: Re: DHCP Configuration Problems
To: Gene ENonymous <yancm@otaku.freeshell.org>
From: Fernando y Yohara <fvillalo@sinfo.net>
List: netbsd-help
Date: 03/27/2002 14:06:22
you need to include another entry in the rc.conf file, namely:

dhclient_flags=sn0

This will tell dhclient to just configure int sn0.  No dhclient.conf or ifconfig
needed.

To try it from the prompt just try the command

dhclient sn0

if you specify the dhclient alone it will give you the bunch of messages that
scroll off the screen.  My experience is that it does this because the script
is not in the /etc directory.

I had to experiment too to get my cable modem working via DHCP.

If you go with the dhclient.conf file, for the dhclient-client-identifier 
parameter you need to specify the MAC address of the interface not the host
name.

Fernando

Gene ENonymous wrote:
> 
> I have attempted to set up a DHCP client to communicate with
> my InsightBB.com cable modem service. I have a mac68k box (Centris 650)
> with 40M ram, 2G HD, 1.5.2 binary install and 2 ethernet interfaces.
> 
> DHCP works fine with a Win98 box, so I figured it would be a
> breeze to get it working with NetBSD 1.5.2 (the FAQ says so!).
> Unfortunately, here I am writing to help....
> 
> The first thing I did was to verify that I could configure both
> ethernet interfaces onto my local network. The allowed me to
> test the interface functionality and the cables. THis worked
> fine. THat is I could telnet out to both interfaces and
> telnet in from another win98 box to both IP's.
>  (what do I need to turn on in inetd.conf so I am ping-able?)
> 
> My two interfaces are ae0 and sn0. For the verify tests, I used
> two files ifconfig.ae0 and ifconfig.sn0 which specified a
> local IP (10.10.10.1 and 10.10.10.11 repectively). Since I wanted
> to let DHCP configure sn0, I removed (renamed, I never delete
> until forced too!) ifconfig.sn0.
> 
> 1) I read the FAQ and searched the last years worth of mail archives
>    to get as far as I have.
> 
> 2) The main FAQ just says to turn on dhcpclient in the rc.conf.
>    THis assumes that there is a dhclient.conf and a dhclient-script
>    in your /etc directory. Mine did *not* (I just downloaded/installed
>    my MacBSD from the ftp site - so most of the /etc files came
>    from etc.tgz - should the dhclient* files come from a different
>    set/archive???)
> 
> 3) I finally downloaded the dhcp distribution from www.isc.org
>    (dhcp301rc8) so I could get a dhclient-script (and an example
>    dhclient.conf file) for netbsd.
> 
> 4) From some combination of FAQ's and mail archives I arrived at
>    this dhclient.conf:
> 
> ## dhclient.conf #####################################################
> Send host-name "bloober.insightbb.com";
> send dhcp-client-identifier "bloober.insightbb.com";
> # I also tried the sn0 ethernet address as the ident...no difference
> # insightbb.com was the domain name that the win98 box showed
> # in the winipcfg diagnostics output.
> 
> request subnet-mask, broadcast-address, routers,
>     domain-name-servers;
> 
> timeout 30;
> retry 60;
> select-timeout 5;
> 
> script "/etc/dhclient-script";
> 
> lease {
>   interface "sn0";
>   option host-name "bloober.insightbb.com";
>   option subnet-mask 255.255.255.0;
>   option domain-name "insightbb.com";
>   option domain-name-servers 127.0.0.1;
>   renew 2 2000/1/12 00:00:01;
>   rebind 2 2000/1/12 00:00:01;
>   expire 2 2000/1/12 00:00:01;
> }
> ########################################################################
> 
> The result is:
> a bunch of DHCPDISCOVER messages,
> a no DHCPOFFER received message
> a no valid leases in the database message
> and a sleep message
> with the thing repeatin. And I cannot see or
> get to anything which is out on the net.
> 
> The cable modem shows some activity on the status lights
> (both on the ethernet port and the cable port). The cable
> modem needs to be reset before it will reconnect to my win98
> box. I also reset it and let it register before I start up
> NetBSD.
> 
> Anybody have any hints???
> Suggestions of other things to look at, diagnostic tools to use?
> 
> Please help,
> gene

-- 
A lot of people approach risk as if it's the enemy when it's really fortune's
accomplice. (Sting)
Choose well. Your choice is brief, and yet endless. (Goethe)