1

I use a linux host as an IPv4 router and looked into enabling IPv6 (it's the future, I'm told). I already use dhcpcd as a dhcpv4 client to get an address from my ISP, so I figured I'd use it for dhcpv6 as well.

Unfortunately, although I can see dhcpcd send a solicit message and I can see the dhcpv6 server respond with 2x dhcpv6 advertise messages, I don't see dhcpcd send a dhcpv6 request.

I see the following sequence of three messages repeat 3x times and then dhcpcd times out:

15:41:06.457440 IP6 (flowlabel 0x1e0d7, hlim 1, next-header UDP (17) payload length: 152) fe80::aaaa:aaaa:aaaa:aaaa.dhcpv6-client > ff02::1:2.dhcpv6-server: [udp sum ok] dhcp6 solicit (xid=bc3d12 (client-ID type 4) (elapsed-time 0) (vendor-class) (rapid-commit) (IA_NA IAID:403318227 T1:0 T2:0) (Client-FQDN) (reconfigure-accept) (option-request DNS-server DNS-search-list Client-FQDN opt_82 opt_83))

15:41:07.168805 IP6 (class 0x48, hlim 56, next-header UDP (17) payload length: 140) 2001:558:4082:7f::1.dhcpv6-server > fe80::aaaa:aaaa:aaaa:aaaa.dhcpv6-client: [udp sum ok] dhcp6 advertise (xid=bc3d12 (client-ID type 4) (server-ID hwaddr/time type 1 time 493924036 40a8f0347664) (IA_NA IAID:403318227 T1:1800 T2:2880 (IA_ADDR 2001:558:600a:7f:bbbb:bbbb:bbbb:bbbb pltime:3600 vltime:3600)) (reconfigure-accept) (DNS-server cdns01.comcast.net cdns02.comcast.net) (Client-FQDN))

15:41:07.168912 IP6 (class 0x48, hlim 56, next-header UDP (17) payload length: 140) 2001:558:4082:7f::1.dhcpv6-server > fe80::aaaa:aaaa:aaaa:aaaa.dhcpv6-client: [udp sum ok] dhcp6 advertise (xid=bc3d12 (client-ID type 4) (server-ID hwaddr/time type 1 time 493924036 40a8f0347664) (IA_NA IAID:403318227 T1:1800 T2:2880 (IA_ADDR 2001:558:600a:7f:bbbb:bbbb:bbbb:bbbb pltime:3600 vltime:3600)) (reconfigure-accept) (DNS-server cdns01.comcast.net cdns02.comcast.net) (Client-FQDN))

Mar 14 15:41:05 router dhcpcd[126860]: DUID ...
Mar 14 15:41:05 router dhcpcd[126860]: enp8s0: IAID 18:0a:25:d3
Mar 14 15:41:05 router dhcpcd[126860]: enp8s0: adding address fe80::aaaa:aaaa:aaaa:aaaa
Mar 14 15:41:05 router dhcpcd[126860]: enp8s0: soliciting an IPv6 router
Mar 14 15:41:06 router dhcpcd[126860]: enp8s0: Router Advertisement from fe80::2aa:bbff:fecc:102
Mar 14 15:41:06 router dhcpcd[126860]: enp8s0: no global addresses for default route
Mar 14 15:41:06 router dhcpcd[126860]: enp8s0: soliciting a DHCPv6 lease
Mar 14 15:41:35 router dhcpcd[126860]: timed out
Mar 14 15:41:35 router dhcpcd[126860]: dhcpcd exited
$ cat /proc/sys/net/ipv6/conf/enp8s0/autoconf
1
$ cat /proc/sys/net/ipv6/conf/enp8s0/accept_ra_pinfo
1
$ cat /proc/sys/net/ipv6/conf/enp8s0/forwarding 
0
$ cat /proc/sys/net/ipv6/conf/enp8s0/accept_ra
0

My immediate goal is to get IPv6 working on this "router" host without doing prefix delegation or any actual IPv6 routing, so forwarding is set to 0 for now. After this host is working as a IPv6 client, then I'll tackle routing.

I've tried setting accept_ra to 2, but dhcpcd sets it back to 0.

I am invoking dhcpcd via netctl with the following very basic profile. The exact invocation is dhcpcd -6 -q -t 30 enp8s0:

$ cat /etc/netctl/enp8s0 
Interface=enp8s0
Connection=ethernet
IP=dhcp
DHCPClient=dhcpcd
IP6=dhcp
DHCP6Client=dhcpcd
$ dhcpcd --version
dhcpcd 8.1.6
Copyright (c) 2006-2019 Roy Marples
Compiled in features: INET ARP ARPing IPv4LL INET6 DHCPv6 AUTH
$ cat /etc/dhcpcd.conf  | egrep -v '^#'


hostname

duid

persistent

option rapid_commit

option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option interface_mtu


require dhcp_server_identifier

slaac private
noipv4ll
4
  • You already provided an answer, but be aware that unlike IPv4, IPv6 normally doesn't use DHCP, you use Stateless Address Autoconfiguration (SLAAC) and the Neighbour Discovery Protocol (NDP). So if you want to "future proof" your installation, install the router adertisement demon (radvd), pass on (or split up) the IPv6 prefix you hopefully receive from your ISP, and disable DHCPv6.
    – dirkt
    Mar 15, 2020 at 6:12
  • @dirkt Looks like Comcast is bunging that up too by not sending me any prefixes: unix.stackexchange.com/questions/572975/…
    – Huckle
    Mar 15, 2020 at 18:18
  • You are doing that on the home router device that's connected to Comcast's DSL (or fiber, or whatever), right? If not, then that's the device you need to configure to pass on (the option is usually called "prefixi delegation") whatever Comcast is giving you. If Comcast is not giving you a globally routed IPv6 prefix, then you don't get one, period.
    – dirkt
    Mar 15, 2020 at 18:48
  • @dirkt It is indeed on the device directly attached to the modem. Trying to explain the issue to Comcast's tech support was... fun. They say IPv6 should be available in my area.
    – Huckle
    Mar 15, 2020 at 19:29

1 Answer 1

0

It looks like Comcast is incorrectly truncating the client ID that it's sending in it's advertise messages. I manually invoked dhcpcd with the -d option:

Mar 14 16:22:35 router dhcpcd[127923]: enp8s0: broadcasting SOLICIT6 (xid 0xc32482), next in 0.9 seconds
Mar 14 16:22:35 router dhcpcd[127923]: enp8s0: incorrect client ID from 2001:558:4082:7f::1
Mar 14 16:22:35 router dhcpcd[127923]: enp8s0: incorrect client ID from 2001:558:4082:7f::1

And using wireshark I observed the client IDs:

11  5.308301    fe80::aaaa:aaaa:aaaa:aaaa   ff02::1:2   DHCPv6  208 Solicit XID: 0xc32482 CID: 000403000200040005000006000700080009 
12  5.360355    2001:558:4082:7f::1 fe80::aaaa:aaaa:aaaa:aaaa   DHCPv6  196 Advertise XID: 0xc32482 CID: 00040300020004000500 IAA: 2001:558:600a:7f:bbbb:bbbb:bbbb:bbbb 

A Type 4 client ID is a UUID-based DUID, which should be 128 bits (16 bytes) long. dhcpcd is sending the correct length, but comcast's response is too short (by 8 bytes).

I tried sending an explicit client-id via dhcpcd -I 00:04:03:00:02:00:04:00:05:00 ... to match what Comcast is truncating it to, but the tcpdump suggests that this option is not taking effect. I also tried changing it from type 4 (which is RFC-specified) to type 9 (which is not), just in case dhcpcd didn't like a type-4 client ID that was too short, but dhcpcd still did not use it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .