Trouble getting dhclient to send a prefix delegation request

Shawn Routhier sar at isc.org
Fri May 18 21:23:32 UTC 2012


You might want to try 4.2.4rc1.  We fixed an issue with
the NA and PD allocation code.

Shawn

On May 18, 2012, at 11:55 AM, Chris Cowart wrote:

> Hello,
> 
> I've have two VMs that are connected to each other via their respective
> em1 interfaces. Both are running FreeBSD 9.0-RELEASE.
> 
> One is configured as a DHCPv6 server with isc-dhcp42-server-4.2.3_1
> installed. The other is configured as a DHCPv6 client with
> isc-dhcp42-client-4.2.3 installed.
> 
> My server configuration is based on the template file from the software
> distribution, with local values for nameservers. I'm using two ULA
> prefixes for this testing.
> 
> On a clean attempt (removed all lease objects from the lease files for
> both server and client; started server daemon), stateful
> autoconfiguration works on the client:
> 
> | % sudo /usr/local/sbin/dhclient -d -6 em1
> | Internet Systems Consortium DHCP Client 4.2.3-P1
> | Copyright 2004-2011 Internet Systems Consortium.
> | All rights reserved.
> | For info, please visit https://www.isc.org/software/dhcp/
> | 
> | Bound to *:546
> | Listening on Socket/em1
> | Sending on   Socket/em1
> | PRC: Soliciting for leases (INIT).
> | XMT: Forming Solicit, 0 ms elapsed.
> | XMT:  X-- IA_NA 29:14:e8:44
> | XMT:  | X-- Request renew in  +3600
> | XMT:  | X-- Request rebind in +5400
> | XMT: Solicit on em1, interval 1040ms.
> | RCV: Advertise message on em1 from fe80::250:56ff:fe2f:d131.
> | RCV:  X-- IA_NA 29:14:e8:44
> | RCV:  | X-- starts 1337325462
> | RCV:  | X-- t1 - renew  +3600
> | RCV:  | X-- t2 - rebind +7200
> | RCV:  | X-- [Options]
> | RCV:  | | X-- IAADDR fd64:3e9f:b2b8:1::1:beef
> | RCV:  | | | X-- Preferred lifetime 604800.
> | RCV:  | | | X-- Max lifetime 2592000.
> | RCV:  X-- Server ID: 00:01:00:01:17:48:b1:a0:00:50:56:2f:d1:31
> | RCV:  Advertisement recorded.
> | PRC: Selecting best advertised lease.
> | PRC: Considering best lease.
> | PRC:  X-- Initial candidate 00:01:00:01:17:48:b1:a0:00:50:56:2f:d1:31 (s: 155, p: 0).
> | XMT: Forming Request, 0 ms elapsed.
> | XMT:  X-- IA_NA 29:14:e8:44
> | XMT:  | X-- Requested renew  +3600
> | XMT:  | X-- Requested rebind +5400
> | XMT:  | | X-- IAADDR fd64:3e9f:b2b8:1::1:beef
> | XMT:  | | | X-- Preferred lifetime +7200
> | XMT:  | | | X-- Max lifetime +7500
> | XMT:  V IA_NA appended.
> | XMT: Request on em1, interval 1000ms.
> | RCV: Reply message on em1 from fe80::250:56ff:fe2f:d131.
> | RCV:  X-- IA_NA 29:14:e8:44
> | RCV:  | X-- starts 1337325463
> | RCV:  | X-- t1 - renew  +3600
> | RCV:  | X-- t2 - rebind +7200
> | RCV:  | X-- [Options]
> | RCV:  | | X-- IAADDR fd64:3e9f:b2b8:1::1:beef
> | RCV:  | | | X-- Preferred lifetime 604800.
> | RCV:  | | | X-- Max lifetime 2592000.
> | RCV:  X-- Server ID: 00:01:00:01:17:48:b1:a0:00:50:56:2f:d1:31
> | PRC: Bound to lease 00:01:00:01:17:48:b1:a0:00:50:56:2f:d1:31.
> | PRC: Renewal event scheduled in 3600 seconds, to run for 3600 seconds.
> | PRC: Depreference scheduled in 604800 seconds.
> | PRC: Expiration scheduled in 2592000 seconds.
> 
> However, attempts to request a prefix produce no results:
> 
> | % sudo /usr/local/sbin/dhclient -d -6 -P em1
> | Internet Systems Consortium DHCP Client 4.2.3-P1
> | Copyright 2004-2011 Internet Systems Consortium.
> | All rights reserved.
> | For info, please visit https://www.isc.org/software/dhcp/
> | 
> | Bound to *:546
> | Listening on Socket/em1
> | Sending on   Socket/em1
> | PRC: Confirming active lease (INIT-REBOOT).
> | XMT: Forming Rebind, 0 ms elapsed.
> | XMT: Rebind on em1, interval 940ms.
> | XMT: Forming Rebind, 940 ms elapsed.
> | XMT: Rebind on em1, interval 1850ms.
> | XMT: Forming Rebind, 2800 ms elapsed.
> | XMT: Rebind on em1, interval 3870ms.
> | XMT: Forming Rebind, 6680 ms elapsed.
> | XMT: Rebind on em1, interval 7190ms.
> | PRC: Depreference scheduled in 604716 seconds.
> | PRC: Expiration scheduled in 2591916 seconds.
> 
> Wireshark decodes the 4 messages that went out as follows:
> 
> | DHCPv6
> |   Message type: Rebind (6)
> |   Transaction-ID: 0x009f91ef
> |   Client Identifier
> |     option type: 1
> |     option length: 10
> |     DUID type: link-layer address (3)
> |     Hardware type: Ethernet (1)
> |     Link-layer address: 00:0c:29:14:e8:44
> |   Option Request
> |     option type: 6
> |     option length: 4
> |     Requested Option code: DNS recursive name server (23)
> |     Requested Option code: Domain Search List (24)
> |   Elapsed time
> |     option type: 8
> |     option length: 2
> |     elapsed-time: 0 ms
> 
> The dhclient makes no forward progress. It appears to be insisting that
> the server respond. 
> 
> I walked through the server code with gdb, and found that my client's
> Rebind messages are hitting this snippet of code:
> 
> | dhcpv6.c
> | 
> | 1379     /*
> | 1380      * Make no reply if we gave no resources and is not
> | 1381      * for Information-Request.
> | 1382      */
> | 1383     if ((reply.ia_count == 0) && (reply.pd_count == 0)) {
> | 1384         if (reply.packet->dhcpv6_msg_type !=
> | 1385                         DHCPV6_INFORMATION_REQUEST)
> | 1386             goto exit;
> | 1387
> 
> It looks like a stalemate to me.
> 
> I experimented with the dhclient.conf, though documentation (especially
> examples) seem to be incredibly sparse on this front; whether provided
> by ISC or a third party. Anyways, I came up with this file:
> 
> | interface "em1" {
> |     also request dhcp6.ia-pd;
> | }
> 
> This doesn't show any syntax errors, but it also doesn't make any
> difference on the results from dhclient.
> 
> After three late nights of experimentation, I came up with this
> workaround. Working from the syntax of other folks' lease file snippets
> online, I figured out how to trick dhclient into thinking it had an
> IA_PD by adding this into my lease6 block:
> 
> |  ia-pd 00:00:00:00 {
> |      iaprefix ::/48 {    
> |      } 
> |  } 
> 
> Now some exciting stuff starts to happen:
> 
> | % sudo /usr/local/sbin/dhclient -d -6 -P em1
> | Internet Systems Consortium DHCP Client 4.2.3-P1
> | Copyright 2004-2011 Internet Systems Consortium.
> | All rights reserved.
> | For info, please visit https://www.isc.org/software/dhcp/
> | 
> | Bound to *:546
> | Listening on Socket/em1
> | Sending on   Socket/em1
> | PRC: Soliciting for leases (INIT).
> | XMT: Forming Solicit, 0 ms elapsed.
> | XMT:  X-- IA_PD 29:14:e8:44
> | XMT:  | X-- Request renew in  +3600
> | XMT:  | X-- Request rebind in +5400
> | XMT: Solicit on em1, interval 1010ms.
> | RCV: Advertise message on em1 from fe80::250:56ff:fe2f:d131.
> | RCV:  X-- IA_PD 29:14:e8:44
> | RCV:  | X-- starts 1337326717
> | RCV:  | X-- t1 - renew  +3600
> | RCV:  | X-- t2 - rebind +7200
> | RCV:  | X-- [Options]
> | RCV:  | | X-- IAPREFIX fdd9:acf6:5002::/48
> | RCV:  | | | X-- Preferred lifetime 604800.
> | RCV:  | | | X-- Max lifetime 2592000.
> | RCV:  X-- Server ID: 00:01:00:01:17:48:b1:a0:00:50:56:2f:d1:31
> | RCV:  Advertisement recorded.
> | PRC: Selecting best advertised lease.
> | PRC: Considering best lease.
> | PRC:  X-- Initial candidate 00:01:00:01:17:48:b1:a0:00:50:56:2f:d1:31 (s: 155, p: 0).
> | XMT: Forming Request, 0 ms elapsed.
> | XMT:  X-- IA_PD 29:14:e8:44
> | XMT:  | X-- Requested renew  +3600
> | XMT:  | X-- Requested rebind +5400
> | XMT:  | | X-- IAPREFIX fdd9:acf6:5002::/48
> | XMT:  | | | X-- Preferred lifetime +7200
> | XMT:  | | | X-- Max lifetime +7500
> | XMT:  V IA_PD appended.
> | XMT: Request on em1, interval 1030ms.
> | RCV: Reply message on em1 from fe80::250:56ff:fe2f:d131.
> | RCV:  X-- IA_PD 29:14:e8:44
> | RCV:  | X-- starts 1337326718
> | RCV:  | X-- t1 - renew  +3600
> | RCV:  | X-- t2 - rebind +7200
> | RCV:  | X-- [Options]
> | RCV:  | | X-- IAPREFIX fdd9:acf6:5002::/48
> | RCV:  | | | X-- Preferred lifetime 604800.
> | RCV:  | | | X-- Max lifetime 2592000.
> | RCV:  X-- Server ID: 00:01:00:01:17:48:b1:a0:00:50:56:2f:d1:31
> | PRC: Bound to lease 00:01:00:01:17:48:b1:a0:00:50:56:2f:d1:31.
> | Prefix BOUND6 old=::/48 new=::/48
> | Prefix BOUND6 old= new=fdd9:acf6:5002::/48
> | PRC: Rebind event scheduled in -1337321318 seconds, to run for 1339913318 seconds.
> | PRC: Depreference scheduled in -1337326718 seconds.
> | PRC: Expiration scheduled in -1337326718 seconds.
> | PRC: Rebinding lease on em1.
> | XMT: Forming Rebind, 0 ms elapsed.
> | XMT:  X-- IA_PD 00:00:00:00
> | XMT:  | X-- Requested renew  +3600
> | XMT:  | X-- Requested rebind +5400
> | XMT:  | | X-- IAPREFIX ::/48
> | XMT:  | | | X-- Preferred lifetime +7200
> | XMT:  | | | X-- Max lifetime +7500
> | XMT:  V IA_PD appended.
> | XMT:  X-- IA_PD 29:14:e8:44
> | XMT:  | X-- Requested renew  +3600
> | XMT:  | X-- Requested rebind +5400
> | XMT:  | | X-- IAPREFIX fdd9:acf6:5002::/48
> | XMT:  | | | X-- Preferred lifetime +7200
> | XMT:  | | | X-- Max lifetime +7500
> | XMT:  V IA_PD appended.
> | XMT: Rebind on em1, interval 10760ms.
> | PRC: Prefix ::/48 depreferred.
> | PRC: Depreference scheduled in 603545 seconds.
> | PRC: Expiration scheduled in -1337326718 seconds.
> | Prefix EXPIRE6 old=::/48 new=
> | PRC: Prefix ::/48 expired.
> | PRC: Depreference scheduled in 603545 seconds.
> | PRC: Expiration scheduled in 2590745 seconds.
> | RCV: Reply message on em1 from fe80::250:56ff:fe2f:d131.
> | RCV:  X-- IA_PD 00:00:00:00
> | RCV:  | X-- starts 1337326718
> | RCV:  | X-- t1 - renew  +3600
> | RCV:  | X-- t2 - rebind +7200
> | RCV:  | X-- [Options]
> | RCV:  | | X-- IAPREFIX fdd9:acf6:5002::/48
> | RCV:  | | | X-- Preferred lifetime 604800.
> | RCV:  | | | X-- Max lifetime 2592000.
> | RCV:  X-- IA_PD 29:14:e8:44
> | RCV:  | X-- starts 1337326718
> | RCV:  | X-- t1 - renew  +3600
> | RCV:  | X-- t2 - rebind +7200
> | RCV:  | X-- [Options]
> | RCV:  | | X-- IAPREFIX fdd9:acf6:5002::/48
> | RCV:  | | | X-- Preferred lifetime 604800.
> | RCV:  | | | X-- Max lifetime 2592000.
> | RCV:  X-- Server ID: 00:01:00:01:17:48:b1:a0:00:50:56:2f:d1:31
> | PRC: Bound to lease 00:01:00:01:17:48:b1:a0:00:50:56:2f:d1:31.
> | Prefix REBIND6 old=::/48 new=::/48
> | Prefix REBIND6 old= new=fdd9:acf6:5002::/48
> | Prefix REBIND6 old=fdd9:acf6:5002::/48 new=fdd9:acf6:5002::/48
> | PRC: Renewal event scheduled in 2345 seconds, to run for 3600 seconds.
> | PRC: Depreference scheduled in 603545 seconds.
> | PRC: Expiration scheduled in 2590745 seconds.
> 
> Now that I have an ia-pd in the lease file, everything seems to work
> fine.
> 
> Could it just be that I'm missing some kind of hint to place in the
> dhclient.conf to encourage it to include the ia-pd option? It would seem
> like this behavior is a bug.
> 
> -- 
> Chris Cowart
>  http://www.timesinks.net/
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users



More information about the dhcp-users mailing list