Subject: Re: Trouble configuring DHCP
To: Laine Stump <lainestump@rcn.com>
From: Yasir Malik <ymalik@cs.stevens-tech.edu>
List: port-i386
Date: 06/07/2003 11:19:41
Thank you very much!  Right now I am writing this message on my laptop.
My sysadmin, who, by the way, takes long vacations, kept telling me that I
was not following the directions properly.  Also, is there a way to set my
hostname.  dhcp automatically assigns me my hostname (r-ymalik).
Thanks,
Yasir

On Sat, 7 Jun 2003, Laine Stump wrote:

> Date: Sat, 07 Jun 2003 10:49:42 +0300
> From: Laine Stump <lainestump@rcn.com>
> To: Yasir Malik <ymalik@cs.stevens-tech.edu>
> Cc: NetBSD mailing list <port-i386@netbsd.org>
> Subject: Re: Trouble configuring DHCP
>
> At 06:05 PM 6/6/2003 -0400, Yasir Malik wrote:
> >I want to connect my laptop to the campus network, but I am having trouble
> >configuring the DHCP client.  What I have changed is what was asked in
> >http://www.netbsd.org/Documentation/network/dhcp.html#configure_dhcp
> >
> >The output after running '/etc/rc.d/dhclient restart' is attached.  When I
> >type 'ssh ymalik@guinness.cs.stevens-tech.edu', which is what I use to
> >connect to my account when I am at home, I get the following output:
> >'ssh: attila.stevens-tech.edu: No address associated with hostname'.
> >
> >Which means that DHCP has not been configured yet.
>
> No, it doesn't mean that. It means that whatever nameserver your system is
> configured to use can't find an IP address associated with the name you
> gave (or maybe that nameserver isn't responding at all). Look in
> /etc/resolv.conf to see what DNS server you're using.
>
> According to your output log, dhclient did get started properly and leased
> an IP address from the dhcp server. Possibly you ended up with DNS server
> set to 127.0.0.1 (as is indicated in the lease that you put in your
> dhclient.conf - I didn't even know that could be done (nor do I see why
> anyone would have recommended it)!)
>
> You really shouldn't need *anything* in dhclient.conf to have dhcp work in
> a standard configuration. I'd bet that just leaving it empty and restarting
> will give you a working system.
>
> If you really want to override things like your hostname and dns server,
> use the "supersede" commands in dhcpd.conf (it seems to me that the
> documentation page you used as reference is quite a bit out of date - I'd
> never heard of putting a complete lease in the .conf file before; does that
> really work?).
>
> For example, if you want to hardcode use of the DNS server at 10.0.0.1, set
> the default domain name used by your system to bopper.org, and your
> hostname to "big.bopper.org", your dhclient.conf would contain the following:
>
>    supersede domain-name-servers 10.0.0.1;
>    supersede domain-name "bopper.org";
>    supersede host-name "big.bopper.org";
>
> But of course as I previously said, you probably don't need *anything* in
> dhclient.conf. Just set dhclient_flags="fxp0" and "dhclient=YES in rc.conf,
> and do /etc/rc.d/dhclient restart.
>
>
> >rc.conf and dhclient.conf is also attached.
> >Is there anything else I need to add to the files?
>
> No. Take things out! ;-)
>