[vox-tech] dhcp question
Jeff Newmiller
vox-tech@lists.lugod.org
Tue, 6 Aug 2002 01:31:04 -0700 (PDT)
On Tue, 6 Aug 2002, Henry House wrote:
> On Mon, Aug 05, 2002 at 11:39:16PM -0700, Peter Jay Salzman wrote:
> > this is the first time i've ever done anything with dhcp. please regard
> > me as a newbie here.
> >
> > from reading the man page, it sounds like:
> >
> > pump -i eth0
> >
> > or
> >
> > pump -i eth0 -l 120 (for 120 hours)
> >
> > will get an IP assigned to a machine. right? does this also configure
> > DNS servers? will it also take care of the default gateway?
>
> Since I know you use Debian exclusively, I will tell you the Debian Way. Edit
> your /etc/network/interfaces so that it looks like mine:
>
> # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
>
> # The loopback interface
> # automatically added when upgrading
> auto lo
> iface lo inet loopback
>
> # The first network card - this entry was created during the Debian installation
> # automatically added when upgrading
> auto eth0
> iface eth0 inet dhcp
>
> Run ifdown eth0; ifup eth0 and all should be well. The DNS servers will not
> be configured but the default gateway will (by ifup, not pump or /sbin/dhcp).
The use of ifup is highly recommended, but In The Inevitable Corrections
Dept:
a) ifup doesn't deal directly with dhcp... it hands off the work to a dhcp
client. The default is dhcpcd, with pump as an alternate. Debian
typically installs pump but not dhcpcd.
b) The dhcp server you access should be configured to tell your client
machine(s) what default gateway to use. Not doing so would be extremely
unusual. :)
c) The dhcp server you access may or may not be configured to tell your
client machines which dns server to use... it will almost always be
configured to pass this information to you (the client). This gets
written to /etc/resolv.conf by pump unless you setup an /etc/pump.conf
with a nodns option for that interface. dhcpcd uses a script to make
these changes, that you can edit so the information gets merged into your
resolv.conf without smashing any settings you want there.
d) The lease time is subject to the constraints configured by the server
setup. It may ignore requests for specific lease times... it will always
tell the client what the lease time actually is.
DHCP is pretty cool. I use a dnscache and tinydns setup so my internal
net uses consistent names without maintaining all those hosts files.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...2k
---------------------------------------------------------------------------