DHCPv6 IA_PD, vendorclassid and waitip issues
Mike Kazantsev
Fri Jan 17 07:23:41 2014Hello,
I'm trying to setup dhcpcd 6.2.0 to get delegated IPv6 range from local
ISP via DHCPv6 IA_PD mechanism.
ISP explicitly claims to support getting IA_NA (address), IA_PD (prefix
delegation) after IA_NA, and IA_PD without (preceding?) IA_NA request.
And with dhcpcd it seem to be almost working, but with three quirks I
can't seem to figure out.
1. vendorclassid configuration parameter seem to be completely
ignored for DHCPv6, yet applied for IPv4 DHCP.
With configuration file like this:
duid
persistent
option rapid_commit, classless_static_routes
require dhcp_server_identifier
nohook lookup-hostname
noipv4ll
vendorclassid dhcpcd:Linux-3.X.X:x86_64
debug
And starting dhcpcd as "dhcpcd -f /etc/dhcpcd.myisp.conf ext1" (ext1 is
an interface name), it can be clearly seen in tcpdump that for IPv4,
sepcified vendor string gets sent, but for IPv6 it's:
dhcpcd-6.2.0:Linux-3.10.19-fg.mf_master:x86_64:GenuineIntel
Which corresponds to this machine ID, which I'd prefer to override, and
expected that aforementioned option will do that, same as for IPv4 DHCP.
See attached dump_vendorclassid_issue.pcap (passed through "dhcpv6 ||
bootp" wireshark filter) for the packets that get sent, demonstrating
that issue.
dhcpcd output doesn't seem to have anything unusual - e.g. config
errors or warnings - specific to this thing.
Do DHCPv6 have some separate vendor-class-id parameter (which should
maybe be mentioned somewhere)?
2. "waitip 4, 6" seem to wait for IPv4 only.
I've tried firewalling IPv6 UDP (so DHCPv6 would timeout) and that
option seem to not wait for it.
Just "wait 6" works (hangs until timeout), but I'd like for dhcpcd to
wait for both IP addresses.
Manpage suggests that it should be possible (without explaining how),
but using "wait 4" followed by "wait 6" on separate lines seem a bit
counter-intuitive - will the last line just override the first one or
will they merge?
Some simple example in doc would be helpful.
3. "ia_pd" seem to get more than one range, even though it doesn't
seem to correspond to captured traffic.
With configuration like this:
duid
persistent
option rapid_commit, classless_static_routes
require dhcp_server_identifier
nohook lookup-hostname
noipv4ll
vendorclassid dhcpcd:Linux-3.X.X:x86_64
noipv6rs
iaid b9:86:f4:39
ia_pd b9:86:f4:39 ext1/0/56
ipv6ra_own_default
debug
I expected to get ISP-delegated range passed to any dhcpcd hook when
address get assigned - so I can do something with passed range (start
radvd with it, for example).
But despite dhcpcd getting IPv6 range and assigning IPv6 to the
interface (with last bits generated from MAC, it appears):
3: ext1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2a02:17d0:3b0:a500:1ebd:b9ff:fe86:f439/56 scope global dynamic
No hooks seem to be ran when that happens, as confirmed by dhcpcd debug
log and custom test-hook that gets run for all events.
With ia_na option (default), hooks seem to be run with BIND6/REBOOT6
"reason" before dhcpcd goes into background mode.
Since ia_na and ia_pd can't seem to be used together (resulting in
"dhcpcd[4030]: cannot specify a different IA type" error), is there
any other way to pass ia_pd parameters from DHCPv6 to hook script on
address assignment?
There seem to be ROUTERADVERT events a bit later, but they come a bit
too late, and clearly dhcpcd has that address/range way before them.
Also, dhcpcd output shows two "delegated prefix" lines, for some reason:
dhcpcd[5044]: ext1: delegated prefix 2a02:17d0:3b0:a500::/56
dhcpcd[5044]: ext1: delegated prefix 2a02:17d0:3b0:a500:1ebd:b9ff:fe86:f439/56
dhcpcd[5044]: ext1: adding address 2a02:17d0:3b0:a500:1ebd:b9ff:fe86:f439/56
But looking at actual traffic, I can't seem to find that second prefix
anywhere, and it clearly corresponds to MAC, so I assume generated by
dhcpcd and not a bug?
Full debug dhcpcd output is in the attached dhcpcd_iapd_issue.log and
corresponding traffic dump in dump_iapd_issue.pcap.
Can file tickets in fossil if any of these things will be confirmed to
be unintentional.
Thanks in advance for any advice.
--
Mike Kazantsev // fraggod.net
Attachment:
dump_vendorclassid_issue.pcap
Description: application/vnd.tcpdump.pcap
Jan 17 12:24:31 damnation dhcpcd[5044]: version 6.2.0 starting Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: executing `/lib64/dhcpcd/dhcpcd-run-hooks' PREINIT Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: executing `/lib64/dhcpcd/dhcpcd-run-hooks' CARRIER Jan 17 12:24:31 damnation dhcpcd[5044]: DUID 00:01:00:01:1a:17:60:58:1c:bd:b9:86:f4:39 Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: IAID b9:86:f4:39 Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: soliciting an IPv6 router Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: sending Router Solicitation Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: reading lease `/var/lib/dhcpcd/dhcpcd-ext1.lease' Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: rebinding lease of 188.226.62.174 Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: sending REQUEST (xid 0x584ad186), next in 4.08 seconds Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: Router Advertisement from fe80::201:c9ff:fee5:6000 Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: adding default route via fe80::201:c9ff:fee5:6000 Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: waiting for Router Advertisement DAD to complete Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: reading lease `/var/lib/dhcpcd/dhcpcd-ext1.lease6' Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: confirming Prefix Delegation Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: delaying REBIND6 (xid 0x2dd0fc), next in 0.37 seconds Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: acknowledged 188.226.62.174 from 95.82.235.1 Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: checking for 188.226.62.174 Jan 17 12:24:31 damnation dhcpcd[5044]: ext1: sending ARP probe (1 of 3), next in 1.58 seconds Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: broadcasting REBIND6 (xid 0x2dd0fc), next in 1.06 seconds Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: REPLY6 received from fe80::201:c9ff:fee5:6000 Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: delegated prefix 2a02:17d0:3b0:a500::/56 Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: delegated prefix 2a02:17d0:3b0:a500:1ebd:b9ff:fe86:f439/56 Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: adding address 2a02:17d0:3b0:a500:1ebd:b9ff:fe86:f439/56 Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: vltime 86400 seconds, pltime 43200 seconds Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: adding address 2a02:17d0:3b0:a500:1ebd:b9ff:fe86:f439/56 Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: vltime 86400 seconds, pltime 43200 seconds Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: renew in 3600 seconds, rebind in 7200 seconds Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: writing lease `/var/lib/dhcpcd/dhcpcd-ext1.lease6' Jan 17 12:24:32 damnation dhcpcd[5044]: ext1: waiting for DHCPv6 DAD to complete Jan 17 12:24:33 damnation dhcpcd[5044]: ext1: sending ARP probe (2 of 3), next in 1.49 seconds Jan 17 12:24:34 damnation dhcpcd[5044]: ext1: sending ARP probe (3 of 3), next in 2.00 seconds Jan 17 12:24:36 damnation dhcpcd[5044]: ext1: leased 188.226.62.174 for 3600 seconds Jan 17 12:24:36 damnation dhcpcd[5044]: ext1: renew in 1800 seconds, rebind in 3150 seconds Jan 17 12:24:36 damnation dhcpcd[5044]: ext1: adding IP address 188.226.62.174/24 Jan 17 12:24:36 damnation dhcpcd[5044]: ext1: adding route to 188.226.62.0/24 Jan 17 12:24:36 damnation dhcpcd[5044]: ext1: adding default route via 188.226.62.1 Jan 17 12:24:36 damnation dhcpcd[5044]: ext1: writing lease `/var/lib/dhcpcd/dhcpcd-ext1.lease' Jan 17 12:24:36 damnation dhcpcd[5044]: ext1: executing `/lib64/dhcpcd/dhcpcd-run-hooks' BOUND Jan 17 12:24:36 damnation dhcpcd[5054]: ext1: sending ARP announce (1 of 2), next in 2.00 seconds Jan 17 12:24:38 damnation systemd[1]: Started Network interface: xtit. Jan 17 12:24:38 damnation dhcpcd[5054]: ext1: sending ARP announce (2 of 2)
Attachment:
dump_iapd_issue.pcap
Description: application/vnd.tcpdump.pcap
Attachment:
signature.asc
Description: PGP signature
| Re: DHCPv6 IA_PD, vendorclassid and waitip issues | Roy Marples |
| Re: DHCPv6 IA_PD, vendorclassid and waitip issues | Mike Kazantsev |