dhcpcd-discuss

Re: Re: Using --dumplease with DHCPv6

Roy Marples

Tue Feb 02 09:24:49 2016

Hi

On 01/02/2016 18:51, Nicholas Williams wrote:
> One more update and then I'll shut up and wait for some input. :-)

Heh. Here is some input :)

--dumplease in older versions as you rightly point out only dumps DHCP.

In newer versions it will spit out DHCPv6 as well.
Unless you restrict it to a family, it will emit both.
For the record here is from one of my test machines:

$ dhcpcd -U6 iwn0
dhcp6_client_id=<censored>
dhcp6_domain_search=marples.name
dhcp6_fqdn_flags=NS
dhcp6_ia_na1_ia_addr1=<censored>
dhcp6_ia_na1_ia_addr1_pltime=3625
dhcp6_ia_na1_ia_addr1_vltime=5800
dhcp6_ia_na1_iaid=<censored>
dhcp6_ia_na1_t1=0
dhcp6_ia_na1_t2=0
dhcp6_ia_pd1_iaid=00000001
dhcp6_ia_pd1_prefix1=<censored>
dhcp6_ia_pd1_prefix1_length=62
dhcp6_ia_pd1_prefix1_pltime=3625
dhcp6_ia_pd1_prefix1_vltime=5800
dhcp6_ia_pd1_t1=0
dhcp6_ia_pd1_t2=0
dhcp6_name_servers=<censored>
dhcp6_reconfigure_accept=1
dhcp6_server_id=<censored>

> I thought maybe the interface was using stateless configuration, and
> that's why `--dumplease` had no address, so I tried the "ia_na" option.
> I get an IPv6 address and can ping, but the lease dump got worse and now
> has an error in it:
> 
> $ sudo dhcpcd --dumplease eth2
> eth2: dhcp6_dump: No such file or directory

Means you don't have a DHCPv6 lease

>     I needed to test something else, so I downloaded 6.10.1 and compiled
>     it. It's improved (there is _some_ DHCPv6 information in the lease
>     dump), but the IPv6 address still does not appear:
> 
>     $ dhcpcd --version
>     dhcpcd 6.10.1
>     Copyright (c) 2006-2016 Roy Marples
> 
>     $ sudo dhcpcd --dumplease eth2
>     broadcast_address='172.20.10.15'
>     dhcp_lease_time='85536'
>     dhcp_message_type='5'
>     dhcp_server_identifier='172.20.10.1'
>     domain_name_servers='172.20.10.1'
>     ip_address='172.20.10.6'
>     network_number='172.20.10.0'
>     routers='172.20.10.1'
>     server_name='[censored]'
>     subnet_cidr='28'
>     subnet_mask='255.255.255.240'
>     dhcp6_client_id='000100011e41112b08002798dcaa'
>     dhcp6_name_servers='fe80::c8d:ac2c:1b71:14c3%eth2'
>     dhcp6_reconfigure_accept='1'
>     dhcp6_server_id='000100011e4261f26e72e753d864'
> 
>     The interface clearly has an IPv6 address, and I can ping IPv6
>     addresses.
>     $ ifconfig eth2
>     eth2      Link encap:Ethernet  HWaddr 08:00:27:21:d4:16  
>               inet addr:172.20.10.6  Bcast:172.20.10.15
>      Mask:255.255.255.240
>               inet6 addr: 2600:1004:b068:ce9e:4098:3e5d:5218:3838/64
>     Scope:Global
>               inet6 addr: 2600:1004:b068:ce9e:8085:92b6:5eea:de8b/64
>     Scope:Global
>               inet6 addr: fe80::a00:27ff:fe21:d416/64 Scope:Link
>               inet6 addr: 2600:1004:b068:ce9e:a00:27ff:fe21:d416/64
>     Scope:Global
> 
>     Thoughts?

There is no IA_NA option in the DHCPv6 lease.
dhcpcd, by default, request a IA_NA unless any other type is specified.
So if you request IA_PD, you'll need to request IA_NA as well. Like this

interface eth0
ia_na
ia_pd 1 tap0 # etc

Roy

Follow-Ups:
Re: Re: Using --dumplease with DHCPv6Nicholas Williams
References:
Using --dumplease with DHCPv6Nicholas Williams
Re: Using --dumplease with DHCPv6Nicholas Williams
Re: Using --dumplease with DHCPv6Nicholas Williams
Archive administrator: postmaster@marples.name