[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DHCP client discovering too many interfaces



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A long time ago, in a galaxy far, far way, someone said...

> I just noticed something weird on my firewall Linux box (Debian
> GNU/Linux 2.2 standard, plus security.debian.org fixes).
> 
> This box has 3 interfaces: lo of course, plus eth0 which is hooked to my
> cablemodem (an external interface) and eth1 which is hooked to my
> internal LAN.  Obviously eth1 has a static IP address; my cable company
> wants me to use DHCP to discover the IP address for eth0, although I've
> had the same one since installation on June 1.

The IP number one gets on their cable modem very rarely changes, but it
can happen.  Don't count on it being the same 24/7, even though it is.

> Up until Sep. 9, it all worked fine and I'd see DHCPREQUEST notices in
> my daemon.log every 30 minutes or whatever the default was, and no other
> DHCP activity to speak of.
> 
> On Sep 9 I apparently installed a new security fix for dhcp-client, and
> it restarted.  Ever since that moment, I've had DHCPDISCOVER requests
> for both my lo and eth1 interfaces logged to daemon.log every few
> seconds, per interface!

[...]

> I see (in the man page for dhcp-client) where I specify what interfaces
> dhcp-client should attempt to manage on the command line, but that would
> involve changing the /etc/init.d script, which I'm loathe to do since it
> would mean maintaining that through package updates, etc.

No need to change /etc/init.d/dhcp-client.  See below.

> Isn't there some kind of configuration option I can specify in
> dhclient.conf to tell dhcp-client to manage eth0 only, and ignore all
> other interfaces?  I tried the dhclient.conf man page but couldn't
> really come up with the proper syntax.  There doesn't seem to be
> anything relevant in the DHCP mini-HOWTO, there're no docs to speak of
> in the ISC page, and I can't get to www.debian.org to check the mailing
> list archives :-/.

This is what I usually do:

1) take away the symlink /etc/rcS.d/S20dhcp-client (or something like
   that)
2) use /etc/network/interfaces to configure all interfaces.

> Also, does anyone have any idea why this suddenly started happening when
> I updated DHCP?  I've since rebooted and still see this.  Or, was it
> always doing this but not logging it before?

When the package dhcp-client gets installed it (and upgraded) it starts
dhclient (which promptly tries to get IP numbers for all interfaces) and
creates a symlink under /etc/rcS.d, causing dhclient to get IP numbers for
all interfaces at boot time.

Very annoying behavior.  IIRC there's an effort going on to fix this in a
generic way for woody.

- -- 
- ----------------------------------------------------------------------
Phil Brutsche				    pbrutsch@tux.creighton.edu

GPG fingerprint: 9BF9 D84C 37D0 4FA7 1F2D  7E5E FD94 D264 50DE 1CFC
GPG key id: 50DE1CFC
GPG public key: http://tux.creighton.edu/~pbrutsch/gpg-public-key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5zY+h/ZTSZFDeHPwRAsihAJ9NWHbIpx3VDFIV0h5iMlV9Fx8dcgCgoK5d
65ycmDREOOWlwRcIgfmmDr4=
=HgjE
-----END PGP SIGNATURE-----



Reply to: