Native IPV6 with DCHP6
-
Update to this issue: i can now pull IP6 addresses with a windows machine and a CentOS machine, but pfsense still wont get an address.
-
There's some "no such file or directory" entries in your log.
One of them is related to "/usr/local/etc/dhcp6c.conf", the config file of the DHCP6 service. Well, being the config file, you can change DHCP6 configuration and save it? This way, a new config file can be created and the error is gone. Still need to correctly configure it, tough.
Another one is related to "/usr/local/etc/dhcp6cctlkey", probably some key file used by DHCP6. You can check the DHCP6 configuration about this key file. But, logically, if the DHCP6 configuration file is missing, so the correct path to the certificate will be missing too.
I don't know, maybe these clues help you. :)
-
Why not start with the exact same command line that pfSense would use and add the debug and just foreground flags to it?
/usr/local/sbin/dhcp6c -d -c /var/etc/dhcp6c_wan.conf -p /var/run/dhcp6c_re0.pid em1 -f -D
(Note the non-default location of the config file.)
-
Thanks for the reply.
I ran that command and get the following results:
May/10/2014 11:42:49: get_duid: extracted an existing DUID from /var/db/dhcp6c_duid: 00:01:00:01:1a:f4:7b:cf:00:50:56:92:cb:8c
May/10/2014 11:42:49: dhcp6_ctl_authinit: failed to open /usr/local/etc/dhcp6cctlkey: No such file or directory
May/10/2014 11:42:49: client6_init: failed initialize control message authentication
May/10/2014 11:42:49: client6_init: skip opening control port
May/10/2014 11:42:49: cfdebug_print: <3>[interface] (9)
May/10/2014 11:42:49: cfdebug_print: <5>[em1] (3)
May/10/2014 11:42:49: cfdebug_print: <3>begin of closure [{] (1)
May/10/2014 11:42:49: cfdebug_print: <3>[send] (4)
May/10/2014 11:42:49: cfdebug_print: <3>[ia-na] (5)
May/10/2014 11:42:49: cfdebug_print: <3>[0] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: cfdebug_print: <3>comment [# request stateful address] (26)
May/10/2014 11:42:49: cfdebug_print: <3>[send] (4)
May/10/2014 11:42:49: cfdebug_print: <3>[ia-pd] (5)
May/10/2014 11:42:49: cfdebug_print: <3>[0] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: cfdebug_print: <3>comment [# request prefix delegation] (27)
May/10/2014 11:42:49: cfdebug_print: <3>[request] (7)
May/10/2014 11:42:49: cfdebug_print: <3>[domain-name-servers] (19)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: cfdebug_print: <3>[request] (7)
May/10/2014 11:42:49: cfdebug_print: <3>[domain-name] (11)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: cfdebug_print: <3>[script] (6)
May/10/2014 11:42:49: cfdebug_print: <3>["/var/etc/dhcp6c_wan_script.sh"] (31)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: cfdebug_print: <3>comment [# we'd like some nameservers please] (35)
May/10/2014 11:42:49: cfdebug_print: <3>end of closure [}] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: cfdebug_print: <3>[id-assoc] (8)
May/10/2014 11:42:49: cfdebug_print: <13>[na] (2)
May/10/2014 11:42:49: cfdebug_print: <13>[0] (1)
May/10/2014 11:42:49: cfdebug_print: <13>begin of closure [{] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of closure [}] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: cfdebug_print: <3>[id-assoc] (8)
May/10/2014 11:42:49: cfdebug_print: <13>[pd] (2)
May/10/2014 11:42:49: cfdebug_print: <13>[0] (1)
May/10/2014 11:42:49: cfdebug_print: <13>begin of closure [{] (1)
May/10/2014 11:42:49: cfdebug_print: <3>[prefix-interface] (16)
May/10/2014 11:42:49: cfdebug_print: <5>[em2] (3)
May/10/2014 11:42:49: cfdebug_print: <3>begin of closure [{] (1)
May/10/2014 11:42:49: cfdebug_print: <3>[sla-id] (6)
May/10/2014 11:42:49: cfdebug_print: <3>[0] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: cfdebug_print: <3>[sla-len] (7)
May/10/2014 11:42:49: cfdebug_print: <3>[4] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of closure [}] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of closure [}] (1)
May/10/2014 11:42:49: cfdebug_print: <3>end of sentence [;] (1)
May/10/2014 11:42:49: configure_pool: called
May/10/2014 11:42:49: clear_poolconf: called
May/10/2014 11:42:49: dhcp6_reset_timer: reset a timer on em1, state=INIT, timeo=0, retrans=383
May/10/2014 11:42:49: client6_send: a new XID (f06c61) is generated
May/10/2014 11:42:49: copy_option: set client ID (len 14)
May/10/2014 11:42:49: copyout_option: set identity association
May/10/2014 11:42:49: copy_option: set elapsed time (len 2)
May/10/2014 11:42:49: copy_option: set option request (len 4)
May/10/2014 11:42:49: copyout_option: set IA_PD
May/10/2014 11:42:49: client6_send: send solicit to ff02::1:2%em1
May/10/2014 11:42:49: dhcp6_reset_timer: reset a timer on em1, state=SOLICIT, timeo=0, retrans=1088
May/10/2014 11:42:50: copy_option: set client ID (len 14)
May/10/2014 11:42:50: copyout_option: set identity association
May/10/2014 11:42:50: copy_option: set elapsed time (len 2)
May/10/2014 11:42:50: copy_option: set option request (len 4)
May/10/2014 11:42:50: copyout_option: set IA_PD
May/10/2014 11:42:50: client6_send: send solicit to ff02::1:2%em1
May/10/2014 11:42:50: dhcp6_reset_timer: reset a timer on em1, state=SOLICIT, timeo=1, retrans=2151Here is some additional details that might be of help that i got from an employee of Google Fiber:
The delegated prefix can be requested using standard DHCPv6 requests, for example the dhclient program supports this with the -P flag. The delegated prefix returned is currently a /56, which could change, but will always be at least a /64. Typically you would request both an IA (to program into the wan side) and a DP to be used for routing to your internal network, you can request both the IA and DP in a single DHCPv6 request; for example with dhclient you would pass both the -N and -P flags.
Next-hop/gateway can be attained from the Router Advertisements.
I also tried on a pfsense 2.2 snapshot, that seemed to have the same issue as pfsense 2.1.3
-
Try running a packet trace on the WAN interface. You'll want to look for ICMP6 traffic, as well as UDP6 on port 546 and 547.
-
Doesn't seem like i am getting anything on the packet capture.
-
Good news / bad news time.
The good news is, I have IPv6 support working.
The bad news is, I'm probably going to have to scrap my pfSense/Watchguard box. I'm still having way too many problems with the IPTV aspect of this, and now the box is having some weird crashing issues. (I've explained in a bit more detail down at the end of this post)
Per Google, they only allow one MAC address per subscriber to get a /56 IPv6 allocation. The timeout on this is about 1 hour. So you'll need to disconnect your GFNB if it's still hooked up. You can connect the pfSense box right away and just use the IPv4 connectivity until the IPv6 lease timeout passes.
The first thing I did was to edit /var/etc/dhcp6c_wan.conf. You need to enable the option for rapid-commit. This lets the client exchange DHCP info with only 2 packets instead of 4. I think this is the most critical thing that was missing. Here's my complete dhcp6c_wan.conf file:
interface em0 { send ia-na 0; # request stateful address send ia-pd 0; # request prefix delegation send rapid-commit; request domain-name-servers; request domain-name; script "/var/etc/dhcp6c_wan_script.sh"; # we'd like some nameservers please }; id-assoc na 0 { }; id-assoc pd 0 { prefix-interface em1 { sla-id 0; sla-len 8; }; };
The only line I had to add was 'send rapid-commit'.
Once the 1 hour timer was up, I ran this from the shell:
/usr/local/sbin/dhcp6c -d -c /var/etc/dhcp6c_wan.conf -p /var/run/dhcp6c_re0.pid -f -D em0
You should see debug output showing that your WAN interface (em0 in my case) received both an IA-NA (non-temporary IPv6 address for the WAN interface itself) and an IA-PD (the /56 prefix assigned by Google)
Now go into the GUI, and go to Interfaces > WAN. Under 'DHCP6 client configuration' set the 'prefix delegation size' dropdown to 56. Leave the other IPv6 boxes unchecked and apply your settings.
Next, go to Interfaces > LAN.
Under IPv6 config type, change it to 'track interface'. That'll enable some new IPv6 options further down the page. Set the 'track interface' dropdown to WAN, and set the 'IPv6 prefix ID' to 0. Apply the changes.
You should see something like the following in the GUI or shell output:
em0: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500 options=209b <rxcsum,txcsum,vlan_mtu,vlan_hwtagging,vlan_hwcsum,wol_magic>ether 00:90:7f:aa:bb:cc inet 23.228.aaa.bbb netmask 0xfffff000 broadcast 23.228.191.255 inet6 fe80::290:7fff:feaa:bbcc%em0 prefixlen 64 scopeid 0x1 inet6 2605:a601:fe04:xxxx::1 prefixlen 128 tentative nd6 options=3 <performnud,accept_rtadv>media: Ethernet autoselect (1000baseT <full-duplex>) status: active em1: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500 options=9b <rxcsum,txcsum,vlan_mtu,vlan_hwtagging,vlan_hwcsum>ether 00:90:7f:32:38:76 inet 172.16.zzz.254 netmask 0xffffff00 broadcast 172.16.zzz.255 inet6 2605:a601:43e:xxxx:yyyy:7fff:feaa:bbdd prefixlen 64 inet6 fe80::1:1%em1 prefixlen 64 scopeid 0x2 nd6 options=1 <performnud>media: Ethernet autoselect (1000baseT <full-duplex>) status: active</full-duplex></performnud></rxcsum,txcsum,vlan_mtu,vlan_hwtagging,vlan_hwcsum></up,broadcast,running,simplex,multicast></full-duplex></performnud,accept_rtadv></rxcsum,txcsum,vlan_mtu,vlan_hwtagging,vlan_hwcsum,wol_magic></up,broadcast,running,simplex,multicast>
Release and renew the interface on your PC and you should have routable IPv6 addresses. I tested against test-ipv6.com and got a score of 10/10.
I'd like to pass along one warning though. I originally started this with a stable IPv4 + IGMP setup. (Albeit with flaky IPTV). Once I started messing with the dhcp6c_wan.conf file, I started having 'fatal trap 12' crashes. To the point where the box would crash as soon as I brought up the LAN interface, while the WAN was unplugged. I started swapping RAM and testing hardware and everything came up clean. So I completely re-imaged the CF card with a fresh copy of 2.1.3-release.
From there, I rebuilt everything from scratch without any problems or crashes all the way up through the successful IPv6 compliance tests. However, IPTV does not work with IPv6 alone. Or at least I wasn't able to figure out how to make it work in my testing. Anyway, I went through Atlantisman's pfSense guide and rebuilt all of the IPv4 + IGMP stuff. Next time I rebooted my Storage Box, my pfSense box crashed again. By this time I'd had enough and just switched everything back to the Google hardware.
Between the IGMP problems and this new crashing issue, I think I'm done. I've got the crash console output if anyone wants to go down that road.
-
Yeah, for a while now i have had my IPTV service split off my main network and still using the Network Box, pfsense appears to be great at handling every besides the IPTV service.
I have tried doing what you said for the IP6 and get the following:
Jun/18/2014 14:18:50: cfdebug_print: <3>end of closure [}] (1)
Jun/18/2014 14:18:50: cfdebug_print: <3>end of sentence [;] (1)
Jun/18/2014 14:18:50: configure_pool: called
Jun/18/2014 14:18:50: clear_poolconf: called
Jun/18/2014 14:18:50: dhcp6_reset_timer: reset a timer on em1, state=INIT, timeo=0, retrans=383
Jun/18/2014 14:18:51: client6_send: a new XID (c4a4bd) is generated
Jun/18/2014 14:18:51: copy_option: set client ID (len 14)
Jun/18/2014 14:18:51: copyout_option: set identity association
Jun/18/2014 14:18:51: copy_option: set rapid commit (len 0)
Jun/18/2014 14:18:51: copy_option: set elapsed time (len 2)
Jun/18/2014 14:18:51: copy_option: set option request (len 4)
Jun/18/2014 14:18:51: copyout_option: set IA_PD
Jun/18/2014 14:18:51: client6_send: send solicit to ff02::1:2%em1
Jun/18/2014 14:18:51: dhcp6_reset_timer: reset a timer on em1, state=SOLICIT, timeo=0, retrans=1088
Jun/18/2014 14:18:51: client6_recv: receive reply from fe80::ea4:2ff:fea8:401%em1 on em1
Jun/18/2014 14:18:51: dhcp6_get_options: get DHCP option server ID, len 10
Jun/18/2014 14:18:51: DUID: 00:03:00:01:0c:a4:02:a8:04:01
Jun/18/2014 14:18:51: dhcp6_get_options: get DHCP option client ID, len 14
Jun/18/2014 14:18:51: DUID: 00:01:00:01:1a:f4:7b:cf:00:50:56:92:cb:8c
Jun/18/2014 14:18:51: dhcp6_get_options: get DHCP option rapid commit, len 0
Jun/18/2014 14:18:51: dhcp6_get_options: get DHCP option identity association, len 40
Jun/18/2014 14:18:51: IA_NA: ID=0, T1=900, T2=1200
Jun/18/2014 14:18:51: copyin_option: get DHCP option IA address, len 24
Jun/18/2014 14:18:51: copyin_option: IA_NA address: 2605:a601:fe06:xxxx::1 pltime=1800 vltime=3600
Jun/18/2014 14:18:51: dhcp6_get_options: get DHCP option IA_PD, len 41
Jun/18/2014 14:18:51: IA_PD: ID=0, T1=900, T2=1200
Jun/18/2014 14:18:51: copyin_option: get DHCP option IA_PD prefix, len 25
Jun/18/2014 14:18:51: copyin_option: IA_PD prefix: 2605:a601:606:xxxx::/56 pltime=1800 vltime=3600
Jun/18/2014 14:18:51: dhcp6_get_options: get DHCP option vendor specific info, len 39
Jun/18/2014 14:18:51: dhcp6_get_options: unknown or unexpected DHCP6 option vendor specific info, len 39
Jun/18/2014 14:18:51: client6_recvreply: executes /var/etc/dhcp6c_wan_script.sh
Jun/18/2014 14:18:51: client6_script: script "/var/etc/dhcp6c_wan_script.sh" terminated
Jun/18/2014 14:18:51: get_ia: make an IA: PD-0
Jun/18/2014 14:18:51: update_prefix: create a prefix 2605:a601:606:xxxx::/56 pltime=1800, vltime=3600
Jun/18/2014 14:18:51: ifaddrconf: failed to add an address on em0: Invalid argument
Jun/18/2014 14:18:51: get_ia: make an IA: NA-0
Jun/18/2014 14:18:51: update_address: create an address 2605:a601:fe06:xxx::1 pltime=1800, vltime=3600
Jun/18/2014 14:18:51: ifaddrconf: failed to add an address on em1: Invalid argument
Jun/18/2014 14:18:51: update_ia: failed to update an address 2605:a601:fe06:xxx::1
Jun/18/2014 14:18:51: dhcp6_remove_event: removing an event on em1, state=SOLICIT
Jun/18/2014 14:18:51: client6_recvreply: got an expected reply, sleeping.It gets an address, but is not able to assign it for some reason.
-
This doesn't make any sense. I've had this working on both my pfSense box and my Adtran router, and both had rapid-commit (solicit < reply) enabled. But some of my own pfSense debugs, and packet capture info from the GFNB, make it look like normal-commit (solicit < advertise > request < reply) is being used.
Here's my debug from the successful DHCP6 pull on my pfSense box. Hopefully it helps.
Jun/17/2014 16:19:03: cfdebug_print: <3>end of sentence [;] (1) Jun/17/2014 16:19:03: configure_pool: called Jun/17/2014 16:19:03: clear_poolconf: called Jun/17/2014 16:19:03: dhcp6_reset_timer: reset a timer on em0, state=INIT, timeo=0, retrans=383 Jun/17/2014 16:19:03: client6_send: a new XID (7f98bd) is generated Jun/17/2014 16:19:03: copy_option: set client ID (len 14) Jun/17/2014 16:19:03: copyout_option: set identity association Jun/17/2014 16:19:03: copy_option: set elapsed time (len 2) Jun/17/2014 16:19:03: copy_option: set option request (len 4) Jun/17/2014 16:19:03: copyout_option: set IA_PD Jun/17/2014 16:19:03: client6_send: send solicit to ff02::1:2%em0 Jun/17/2014 16:19:03: dhcp6_reset_timer: reset a timer on em0, state=SOLICIT, timeo=0, retrans=1088 Jun/17/2014 16:19:03: client6_recv: receive advertise from fe80::ea4:2ff:fea2:c01%em0 on em0 Jun/17/2014 16:19:03: dhcp6_get_options: get DHCP option server ID, len 10 Jun/17/2014 16:19:03: DUID: 00:03:00:01:0c:a4:02:a2:0c:01 Jun/17/2014 16:19:03: dhcp6_get_options: get DHCP option client ID, len 14 Jun/17/2014 16:19:03: DUID: 00:01:00:01:1b:33:6d:47:00:90:7f:aa:bb:cc Jun/17/2014 16:19:03: dhcp6_get_options: get DHCP option identity association, len 40 Jun/17/2014 16:19:03: IA_NA: ID=0, T1=900, T2=1200 Jun/17/2014 16:19:03: copyin_option: get DHCP option IA address, len 24 Jun/17/2014 16:19:03: copyin_option: IA_NA address: 2605:a601:fe04:zzzz::1 pltime=1800 vltime=3600 Jun/17/2014 16:19:03: dhcp6_get_options: get DHCP option IA_PD, len 41 Jun/17/2014 16:19:03: IA_PD: ID=0, T1=900, T2=1200 Jun/17/2014 16:19:03: copyin_option: get DHCP option IA_PD prefix, len 25 Jun/17/2014 16:19:03: copyin_option: IA_PD prefix: 2605:a601:43e:xxxx::/56 pltime=1800 vltime=3600 Jun/17/2014 16:19:03: dhcp6_get_options: get DHCP option vendor specific info, len 39 Jun/17/2014 16:19:03: dhcp6_get_options: unknown or unexpected DHCP6 option vendor specific info, len 39 Jun/17/2014 16:19:03: client6_recvadvert: server ID: 00:03:00:01:0c:a4:02:a2:0c:01, pref=-1 Jun/17/2014 16:19:03: client6_recvadvert: reset timer for em0 to 0.990653 Jun/17/2014 16:19:04: select_server: picked a server (ID: 00:03:00:01:0c:a4:02:a2:0c:01) Jun/17/2014 16:19:04: client6_send: a new XID (2f3e02) is generated Jun/17/2014 16:19:04: copy_option: set client ID (len 14) Jun/17/2014 16:19:04: copy_option: set server ID (len 10) Jun/17/2014 16:19:04: copyout_option: set IA address Jun/17/2014 16:19:04: copyout_option: set identity association Jun/17/2014 16:19:04: copy_option: set elapsed time (len 2) Jun/17/2014 16:19:04: copy_option: set option request (len 4) Jun/17/2014 16:19:04: copyout_option: set IA_PD prefix Jun/17/2014 16:19:04: copyout_option: set IA_PD Jun/17/2014 16:19:04: client6_send: send request to ff02::1:2%em0 Jun/17/2014 16:19:04: dhcp6_reset_timer: reset a timer on em0, state=REQUEST, timeo=0, retrans=977 Jun/17/2014 16:19:04: client6_recv: receive reply from fe80::ea4:2ff:fea2:c01%em0 on em0 Jun/17/2014 16:19:04: dhcp6_get_options: get DHCP option server ID, len 10 Jun/17/2014 16:19:04: DUID: 00:03:00:01:0c:a4:02:a2:0c:01 Jun/17/2014 16:19:04: dhcp6_get_options: get DHCP option client ID, len 14 Jun/17/2014 16:19:04: DUID: 00:01:00:01:1b:33:6d:47:00:90:7f:aa:bb:cc Jun/17/2014 16:19:04: dhcp6_get_options: get DHCP option identity association, len 40 Jun/17/2014 16:19:04: IA_NA: ID=0, T1=900, T2=1200 Jun/17/2014 16:19:04: copyin_option: get DHCP option IA address, len 24 Jun/17/2014 16:19:04: copyin_option: IA_NA address: 2605:a601:fe04:zzzz::1 pltime=1800 vltime=3600 Jun/17/2014 16:19:04: dhcp6_get_options: get DHCP option IA_PD, len 41 Jun/17/2014 16:19:04: IA_PD: ID=0, T1=900, T2=1200 Jun/17/2014 16:19:04: copyin_option: get DHCP option IA_PD prefix, len 25 Jun/17/2014 16:19:04: copyin_option: IA_PD prefix: 2605:a601:43e:xxxx::/56 pltime=1800 vltime=3600 Jun/17/2014 16:19:04: dhcp6_get_options: get DHCP option vendor specific info, len 39 Jun/17/2014 16:19:04: dhcp6_get_options: unknown or unexpected DHCP6 option vendor specific info, len 39 Jun/17/2014 16:19:04: get_ia: make an IA: PD-0 Jun/17/2014 16:19:04: update_prefix: create a prefix 2605:a601:43e:xxxx::/56 pltime=1800, vltime=3600 Jun/17/2014 16:19:04: get_ia: make an IA: NA-0 Jun/17/2014 16:19:04: update_address: create an address 2605:a601:fe04:zzzz::1 pltime=1800, vltime=3600 Jun/17/2014 16:19:04: ifaddrconf: add an address 2605:a601:fe04:zzzz::1/128 on em0 Jun/17/2014 16:19:04: client6_recvreply: executes /var/etc/dhcp6c_wan_script.sh Jun/17/2014 16:19:11: client6_script: script "/var/etc/dhcp6c_wan_script.sh" terminated Jun/17/2014 16:19:11: dhcp6_remove_event: removing an event on em0, state=REQUEST Jun/17/2014 16:19:11: dhcp6_remove_event: removing server (ID: 00:03:00:01:0c:a4:02:a2:0c:01) Jun/17/2014 16:19:11: client6_recvreply: got an expected reply, sleeping.
I noticed your box isn't calling /var/etc/dhcp6c_wan_script.sh. That's not something I've touched at all. It was included and called by default as part of my dhcp6c_wan.conf file.
-
So i was playing with MikroTik RotuerOS and it picks up and distributes ip6 address right away, only config needed is enabling ip6.
What is different about how RouterOS is requesting the address vs. pfsense?