[pkg-dhcp-devel] Bug#592539: Improved patch

C.J. Adams-Collier cjac at colliertech.org
Wed Jan 21 23:13:01 UTC 2015


Hello Steven, ALCON,

I've applied your patch to the 4.2.4 .deb source from Ubuntu Trusty and
removed the apparmor and apport references:

http://archive.ubuntu.com/ubuntu/pool/main/i/isc-dhcp/isc-dhcp_4.2.4-7ubuntu12.dsc

I doubt that you used this source for the base of your patch, but it
applied with only one rejection, so it was close enough for me.  There
were compile-time problems on my Wheezy build machine relating to
apport / apparmor, but these were easy enough to deal with using

        $ grep -rsil -e apport -e apparmor isc-dhcp-4.2.4 | grep -v changelog

Still, it would be nice to have the source you built from so that I
could skip this stage.  It would be nicer still if the patch applied to
4.2.2 (Wheezy) or 4.3.1 (Jessie).

Once installed, I verified that stopping and starting the daemon did not
cause an outage with the v4 server.  It did not; I was able to request
v4 leases on all interfaces as expected.  I then modified
the /etc/default/isc-dhcp-server config file to set the following
variables:

        V6_ENABLED="true"
        INTERFACES_V6="vl78 eth4.100 eth4.101 eth3"

A re-start of the daemon succeeded for v4, but failed for v6 due to a
missing dhcpd6.leases file:

        Jan 21 09:17:35 sip1 dhcpd: Can't open lease database /var/lib/dhcp/dhcpd6.leases: No such file or directory --
        Jan 21 09:17:35 sip1 dhcpd:   check for failed database rewrite attempt!
        Jan 21 09:17:35 sip1 dhcpd: Please read the dhcpd.leases manual page if you
        Jan 21 09:17:35 sip1 dhcpd: don't know what to do about this.
        
It might be nice if the daemon grepped the log for this message and gave
a more specific error message.  I created the leases file with:

        $ sudo touch /var/lib/dhcp/dhcpd6.leases

Re-starting succeeded for v4 and failed again for v6 because I had not
written any subnet6 declarations and the daemon had no interfaces on
which to listen.  It might be nice if the daemon grepped the log for
this message and gave a more specific error message:

        Jan 21 09:39:53 sip1 dhcpd: No subnet6 declaration for eth3 (fe80::290:bff:fe0a:6c2).
        ...
        Jan 21 09:39:53 sip1 dhcpd: No subnet6 declaration for eth4.101 (fe80::290:bff:fe0a:e08b).
        ...
        Jan 21 09:39:53 sip1 dhcpd: No subnet6 declaration for eth4.100 (fe80::290:bff:fe0a:e08b).
        ...
        Jan 21 09:39:53 sip1 dhcpd: No subnet6 declaration for vl78 (2607:ff08:f5:1337::1).
        Jan 21 09:39:53 sip1 dhcpd: ** Ignoring requests on vl78.  If this is not what
        Jan 21 09:39:53 sip1 dhcpd:    you want, please write a subnet6 declaration
        Jan 21 09:39:53 sip1 dhcpd:    in your dhcpd.conf file for the network segment
        Jan 21 09:39:53 sip1 dhcpd:    to which interface vl78 is attached. **
        Jan 21 09:39:53 sip1 dhcpd:
        Jan 21 09:39:53 sip1 dhcpd:
        Jan 21 09:39:53 sip1 dhcpd: Not configured to listen on any interfaces!

I added a subnet6 declaration for the vl78 interface
to /etc/dhcp/dhcpd6.conf and re-started the service successfully:

        # vl78                                                                                                                       
        subnet6 2607:ff08:f5:1337::0/64 {
          # ::ac10:4e66 -::ac10:4e6d = ::172.16.78.102 - ::172.16.78.109 ; matches v4 subnet range                                   
          range6 2607:ff08:f5:1337::ac10:4e66 2607:ff08:f5:1337::ac10:4e6d;                                                                 
        
          option dhcp6.name-servers 2607:ff08:f5:1337::64,2607:ff08:f5:1337::19,2607:ff08:f5:3a::2;
          option dhcp6.domain-search "esd.colliertech.org","colliertech.org";
        
          # laptop / virtual machine                           
          host ubuntu0 {
            host-identifier option dhcp6.client-id 00:01:00:01:1c:52:b8:47:08:00:27:04:be:09;
            fixed-address6 2607:ff08:f5:1337::5d;
          }
        }

At this point, I was able to solicit the server for an address from my
laptop VM client, ubuntu0.  Logs from server:

        Jan 21 15:02:44 sip1 dhcpd: Solicit message from fe80::a00:27ff:fe04:be09 port 546, transaction ID 0xC6EFEB00
        Jan 21 15:02:44 sip1 dhcpd: Sending Advertise to fe80::a00:27ff:fe04:be09 port 546
        Jan 21 15:02:45 sip1 dhcpd: Request message from fe80::a00:27ff:fe04:be09 port 546, transaction ID 0xD04C9800
        Jan 21 15:02:45 sip1 dhcpd: Sending Reply to fe80::a00:27ff:fe04:be09 port 546

Logs from client:

        cjac at ubuntu0:~$ sudo dhclient -v -6 eth0
        Internet Systems Consortium DHCP Client 4.2.4
        Copyright 2004-2012 Internet Systems Consortium.
        All rights reserved.
        For info, please visit https://www.isc.org/software/dhcp/
        
        Bound to *:546
        Listening on Socket/eth0
        Sending on   Socket/eth0
        PRC: Soliciting for leases (INIT).
        XMT: Forming Solicit, 0 ms elapsed.
        XMT:  X-- IA_NA 27:04:be:09
        XMT:  | X-- Request renew in  +3600
        XMT:  | X-- Request rebind in +5400
        XMT: Solicit on eth0, interval 1010ms.
        RCV: Advertise message on eth0 from fe80::5c89:b9ff:fee0:68e2.
        RCV:  X-- IA_NA 27:04:be:09
        RCV:  | X-- starts 1421881365
        RCV:  | X-- t1 - renew  +3600
        RCV:  | X-- t2 - rebind +7200
        RCV:  | X-- [Options]
        RCV:  | | X-- IAADDR 2607:ff08:f5:1337::5d
        RCV:  | | | X-- Preferred lifetime 604800.
        RCV:  | | | X-- Max lifetime 2592000.
        RCV:  X-- Server ID: 00:01:00:01:1c:52:ae:e0:00:90:0b:0a:06:c4
        RCV:  Advertisement recorded.
        PRC: Selecting best advertised lease.
        PRC: Considering best lease.
        PRC:  X-- Initial candidate 00:01:00:01:1c:52:ae:e0:00:90:0b:0a:06:c4 (s: 155, p: 0).
        XMT: Forming Request, 0 ms elapsed.
        XMT:  X-- IA_NA 27:04:be:09
        XMT:  | X-- Requested renew  +3600
        XMT:  | X-- Requested rebind +5400
        XMT:  | | X-- IAADDR 2607:ff08:f5:1337::5d
        XMT:  | | | X-- Preferred lifetime +7200
        XMT:  | | | X-- Max lifetime +7500
        XMT:  V IA_NA appended.
        XMT: Request on eth0, interval 910ms.
        RCV: Reply message on eth0 from fe80::5c89:b9ff:fee0:68e2.
        RCV:  X-- IA_NA 27:04:be:09
        RCV:  | X-- starts 1421881366
        RCV:  | X-- t1 - renew  +3600
        RCV:  | X-- t2 - rebind +7200
        RCV:  | X-- [Options]
        RCV:  | | X-- IAADDR 2607:ff08:f5:1337::5d
        RCV:  | | | X-- Preferred lifetime 604800.
        RCV:  | | | X-- Max lifetime 2592000.
        RCV:  X-- Server ID: 00:01:00:01:1c:52:ae:e0:00:90:0b:0a:06:c4
        PRC: Bound to lease 00:01:00:01:1c:52:ae:e0:00:90:0b:0a:06:c4.
        cjac at ubuntu0:~$ ip -6 addr show dev eth0
        2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
            inet6 2607:ff08:f5:1337::5d/64 scope global 
               valid_lft forever preferred_lft forever
            inet6 fe80::a00:27ff:fe04:be09/64 scope link 
               valid_lft forever preferred_lft forever
        

Thanks for the hard work on this!  I'll post an update if I have any
problems with either the v4 or v6 server

Cheers,

C.J.


PS:

There is a typo in the init script under the "status" case:
        check_status -v "$DHCPD6_PID" "NAME6"
should be
        check_status -v "$DHCPD6_PID" "$NAME6"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-dhcp-devel/attachments/20150121/22264373/attachment.sig>


More information about the pkg-dhcp-devel mailing list