Re: Re: Using --dumplease with DHCPv6
Nicholas Williams
Tue Feb 02 15:58:49 2016
Okay, so here's where I'm not following. As shown below, I can configure
the interface with dhcpcd, get an IPv6 address, and use it, but my DHCPv6
lease info is empty:
$ ifconfig eth2
eth2 Link encap:Ethernet HWaddr 08:00:27:21:d4:16
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2351 (2.3 KB) TX bytes:4360 (4.3 KB)
$ sudo dhcpcd eth2
eth2: adding address fe80::a00:27ff:fe21:d416
eth2: waiting for carrier
eth2: carrier acquired
DUID 00:01:00:01:1e:43:88:3a:08:00:27:21:d4:16
eth2: IAID 27:21:d4:16
eth2: soliciting an IPv6 router
eth2: rebinding lease of 172.20.10.6
eth2: probing address 172.20.10.6/28
eth2: Router Advertisement from fe80::87:17f5:6412:6666
eth2: adding address 2600:1004:b140:f81a:a00:27ff:fe21:d416/64
eth2: requesting DHCPv6 information
forked to background, child pid 3295
$ 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:b140:f81a:ac07:d36c:5c5a:4d56/64
Scope:Global
inet6 addr: fe80::a00:27ff:fe21:d416/64 Scope:Link
inet6 addr: 2600:1004:b140:f81a:a00:27ff:fe21:d416/64 Scope:Global
$ ping6 2a03:b0c0:1:d0::2da:c001
PING 2a03:b0c0:1:d0::2da:c001(2a03:b0c0:1:d0::2da:c001) 56 data bytes
64 bytes from 2a03:b0c0:1:d0::2da:c001: icmp_seq=1 ttl=52 time=153 ms
$ sudo dhcpcd -U6 eth2
dhcp6_client_id='000100011e43883a08002721d416'
dhcp6_name_servers='fe80::87:17f5:6412:6666%eth2'
dhcp6_reconfigure_accept='1'
dhcp6_server_id='000100011e438ac66e72e753d864'
That's it. There's no more information in my lease. I don't
have dhcp6_ia_na1_ia_addr1, name_servers, domain_search, or any other of
the information you have in your lease in my lease. What am I missing /
misunderstanding?
Thanks,
Nick
On Tue, Feb 2, 2016 at 3:24 AM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> 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
>
Archive administrator: postmaster@marples.name