Re: dhcpcd6.11.0 Stateless dhcp support
Roy Marples
Wed Jul 19 10:07:41 2017
On 19/07/2017 10:40, Renu Bansal wrote:
> Hi Roy,
>
> If I remove ia_na from the configuration file, dhcpcd does not solicit any message. Even if M bit is enable.
>
> Regards
> Renu
Without the ia_na (or ia_pd or ia_ta) directives, dhcpcd is entirely at
the mercy of receiving RA messages to start DHCPv6 which is the behavior
you want.
If you add debug to your dhcpcd.conf then dhcpcd will be pretty verbose
about what it receives, including the RA message.
See here, for dhcpcd-6.11.5 code:
https://dev.marples.name/source/dhcpcd/browse/master/ipv6nd.c;69a91daff8a4defc6131522437af5645ddf8de18$1115
So with debug enabled, dhcpcd will either log that it's starting DHCPv6
solicitation or information request [*] or (if the RA is newly received)
that there is no DHCPv6 instruction in the RA.
IF you don't see any of that then there must have been an error
processing the RA (which you've not indicated) or dhcpcd didn't actually
receive the RA from the kernel.
Attached is an example log from dhcpcd-7 on my environment using the
stock config (ie no ia_na directive).
Roy
[*] There is a bug with dhcpcd where if it had a previous lease with
addresses, it will attempt to reconfirm them regardless of the RA not
having the M bit set.
I've created T130 to track fixing this.
https://dev.marples.name/T130
Jul 19 11:05:19 [3853]: dhcpcd-7.0.0-rc1 starting
Jul 19 11:05:19 [3853]: iwi0: executing `/libexec/dhcpcd-run-hooks' PREINIT
Jul 19 11:05:19 [3853]: iwi0: executing `/libexec/dhcpcd-run-hooks' CARRIER
Jul 19 11:05:19 [3853]: DUID 00:01:00:01:20:4a:9a:6c:00:13:ce:fc:e1:c0
Jul 19 11:05:19 [3853]: iwi0: IAID ce:fc:e1:c0
Jul 19 11:05:19 [3853]: iwi0: delaying IPv6 router solicitation for 0.8 seconds
Jul 19 11:05:19 [3853]: iwi0: delaying IPv4 for 0.4 seconds
Jul 19 11:05:19 [3853]: iwi0: soliciting a DHCP lease
Jul 19 11:05:19 [3853]: iwi0: sending DISCOVER (xid 0xc75c46b6), next in 3.4 seconds
Jul 19 11:05:19 [3853]: iwi0: offered 10.73.2.31 from 10.73.2.1 `gw.marples.name'
Jul 19 11:05:19 [3853]: iwi0: sending REQUEST (xid 0xc75c46b6), next in 4.3 seconds
Jul 19 11:05:19 [3853]: iwi0: acknowledged 10.73.2.31 from 10.73.2.1 `gw.marples.name'
Jul 19 11:05:19 [3853]: iwi0: adding IP address 10.73.2.31/24 broadcast 10.73.2.255
Jul 19 11:05:20 [3853]: iwi0: soliciting an IPv6 router
Jul 19 11:05:20 [3853]: iwi0: sending Router Solicitation
Jul 19 11:05:20 [3853]: iwi0: Router Advertisement from fe80::1
Jul 19 11:05:20 [3853]: iwi0: adding address fd73:7808:1015:0:5869:e3d:bd02:d3ce/64
Jul 19 11:05:20 [3853]: iwi0: pltime 120 seconds, vltime 180 seconds
Jul 19 11:05:20 [3853]: iwi0: adding route to fd73:7808:1015::/64
Jul 19 11:05:20 [3853]: iwi0: adding default route via fe80::1
Jul 19 11:05:20 [3853]: iwi0: executing `/libexec/dhcpcd-run-hooks' ROUTERADVERT
Jul 19 11:05:20 [3853]: iwi0: requesting DHCPv6 information
Jul 19 11:05:20 [3853]: iwi0: delaying INFORM6 (xid 0xe8e721), next in 0.2 seconds
Jul 19 11:05:20 [3853]: iwi0: broadcasting INFORM6 (xid 0xe8e721), next in 1.0 seconds
Jul 19 11:05:20 [3853]: iwi0: REPLY6 received from fe80::1
Jul 19 11:05:20 [3853]: iwi0: refresh in 86400 seconds
Jul 19 11:05:20 [3853]: iwi0: writing lease `/var/db/dhcpcd/iwi0-UberNET.lease6'
Jul 19 11:05:20 [3853]: iwi0: executing `/libexec/dhcpcd-run-hooks' INFORM6
Jul 19 11:05:24 [3853]: iwi0: DAD completed for 10.73.2.31
Jul 19 11:05:24 [3853]: iwi0: leased 10.73.2.31 for 3600 seconds
Jul 19 11:05:24 [3853]: iwi0: renew in 1800 seconds, rebind in 3150 seconds
Jul 19 11:05:24 [3853]: iwi0: writing lease `/var/db/dhcpcd/iwi0-UberNET.lease'
Jul 19 11:05:24 [3853]: iwi0: IP address 10.73.2.31/24 already exists
Jul 19 11:05:24 [3853]: iwi0: using Classless Static Routes
Jul 19 11:05:24 [3853]: iwi0: adding route to 10.73.2.0/24
Jul 19 11:05:24 [3853]: iwi0: adding default route via 10.73.2.1
Jul 19 11:05:24 [3853]: iwi0: executing `/libexec/dhcpcd-run-hooks' BOUND
Jul 19 11:05:40 [3853]: received SIGINT, stopping
Jul 19 11:05:40 [3853]: iwi0: removing interface
Jul 19 11:05:40 [3853]: iwi0: executing `/libexec/dhcpcd-run-hooks' STOPPED
Jul 19 11:05:40 [3853]: dhcpcd exited
Archive administrator: postmaster@marples.name