/etc/init.d/dhcp3-server starts dhcpd3 with parameters in wrong order ($INTERFACES)

Bug #187434 reported by jstammi
8
Affects Status Importance Assigned to Milestone
dhcp3 (Debian)
Fix Released
Unknown
dhcp3 (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: dhcp3-server

Using webmin I specified the dhcp server to listen only for two (eth0 and eth2) of my three (eth1 additionally - is ma WAN interface) network interfaces.

My pc connected to the eth0 successfully was assigned an ip. Though being connected to eth2 this failed.

After a long session on network analysis I finally found the dhcpd3 server process looking like

/usr/sbin/dhcpd3 -q eth0 eth2 -pf /var/run/dhcp3-server/dhcpd.pid -cf /etc/dhcp3/dhcpd.conf

According to the man pages this is not valid, the ethX should be the last parameters. Running the dhcpd3 with the interfaces as last parameters, everything works now as expected.

In /etc/init.d/dhcpd3-server script I moved the $INTERFACES to the end of the parameter list.

Though I have no explanation why the original version worked for eth0 ... ?

Versions:
 - ubuntu server 6.06.1 (uptodate when writing this)
 - dhcp3-server 3.0.3-6ubuntu7
 - webmin 1.300

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :

I have a similar setup in Ubuntu Hardy, dhcp3-server listens to two interfaces:

  /usr/sbin/dhcpd3 -q eth1 virbr0 -pf /var/run/dhcp3-server/dhcpd.pid -cf /etc/dhcp3/dhcpd.conf

This works just fine, so I consider this fixed in Hardy.

Changed in dhcp3:
status: New → Fix Released
Revision history for this message
jstammi (johannes-stamminger) wrote :

Just checked man dhcpd3 (now in gutsy: 3.0.5):

dhcpd [ -p port ] [ -f ] [ -d ] [ -q ] [ -t | -T ] [ -cf config-file ] [ -lf lease-file ] [ -pf pid-file ] [
       -tf trace-output-file ] [ -play trace-playback-file ] [ if0 [ ...ifN ] ]
...

So IMHO your line is wrong, too. It looks just like the one that does *not* work in my environment.

I'm not (yet) familiar with virtualization but I guess *if* it works in your environment it is because of not having two physically separated interfaces.
In my example with two NICs eth0 and eth1 only clients connected to eth0 got leases. I guess because of dhcpd ignoring the interfaces spec at all and guessing itself for the ones serving for (in my env. only eth0 then).

At least in feisty and gutsy is seems not to fixed. And I'm quite sure it is also not in hardy as there only the micro revision changed (3.0.6) and I do not expect the parameter layout having changed with such micro updated number ... ?

Changed in dhcp3:
status: Fix Released → New
Martin Pitt (pitti)
Changed in dhcp3:
assignee: nobody → pitti
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dhcp3 - 3.0.6.dfsg-1ubuntu4

---------------
dhcp3 (3.0.6.dfsg-1ubuntu4) hardy; urgency=low

  * debian/dhcp3-server.init.d: Put interface names after the dhcp3d options,
    to comply to manpage. Putting them first causes problems when using
    multiple interfaces under some conditions. (LP: #187434)

 -- Martin Pitt <email address hidden> Wed, 27 Feb 2008 12:29:26 +0100

Changed in dhcp3:
status: In Progress → Fix Released
Changed in dhcp3:
status: Unknown → New
Changed in dhcp3:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.