<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">Thanks! I've never seen this spelled out so simply and concisely. Is it just me or is IPv6 client config needlessly complex on BSDs?</div><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><br></div>Tim<div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small;display:inline"></div></div></div>
<br><div class="gmail_quote">On Tue, Aug 29, 2017 at 1:28 AM, Aaron LI <span dir="ltr"><<a href="mailto:aly@aaronly.me" target="_blank">aly@aaronly.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello DFlyers,<br>
<br>
<br>
I have figured out the IPv6 configuration problem, here are the details,<br>
and hope it can help others.<br>
<br>
<br>
IPv6 Autoconfiguration<br>
----------------------<br>
Briefly, there are two kinds of IPv6 autoconfiguration method [1,2]:<br>
<br>
* stateless:<br>
No DHCP to assign addresses. IPv6 addresses are built by using<br>
autoconfiguration and by having routers announce the IP addresses of<br>
machines in the network. In this case, "rtsol" tool is needed to<br>
_solicitate_ that information from routers.<br>
<br>
* stateful:<br>
DHCP is used to assign addresses. An IPv6-compatible "dhclient" is<br>
needed, no autoconfiguration occurs, and "rtsol" is not needed.<br>
<br>
<br>
My Network<br>
----------<br>
My network uses the second "stateful" DHCPv6 method.<br>
<br>
<br>
DragonFly BSD<br>
-------------<br>
The "dhclient" shipped in the base system does NOT support IPv6, so my<br>
previous trials failed to obtain IPv6 address. (FreeBSD also has the<br>
same problem.)<br>
<br>
Consulting to this post [3], an additional IPv6-compatible DHCP client<br>
is required to get IPv6 address. The post's author has made the<br>
"net/dual-dhclient" port to help the settings.<br>
<br>
1. Install "net/dual-dhclient" package:<br>
# pkg install dual-dhclient<br>
<br>
2. Add these lines to "/etc/rc.conf":<br>
dhclient_program="/usr/local/<wbr>sbin/dual-dhclient"<br>
ipv6_enable="YES"<br>
ipv6_network_interfaces="em0"<br>
ipv6_ifconfig_em0="DHCP"<br>
<br>
3. Restart the network service:<br>
# service netif restart<br>
<br>
DONE!<br>
<br>
<br>
For example, my current interface status looks like:<br>
<br>
dfly> ifconfig em0<br>
em0: flags=8843<UP,BROADCAST,<wbr>RUNNING,SIMPLEX,MULTICAST> mtu 1500<br>
options=1b<RXCSUM,TXCSUM,VLAN_<wbr>MTU,VLAN_HWTAGGING><br>
inet6 fe80::21d:9ff:fe88:acd3%em0 prefixlen 64 scopeid 0x1 <br>
inet 192.168.1.235 netmask 0xffffff00 broadcast 192.168.1.255<br>
inet6 2001:da8:8000:6440::be76 prefixlen 64 <br>
ether 00:1d:09:88:ac:d3<br>
media: Ethernet autoselect <rxpause> (100baseTX <full-duplex,rxpause>)<br>
status: active<br>
<br>
(Besides the base "/sbin/dhclient" process for the IPv4 DHCP, there will<br>
be another "/usr/local/sbin/dhclient -6" process for the IPv6 DHCP.)<br>
<br>
<br>
[1] DHCPv6 - dhclient: <a href="https://forums.freebsd.org/threads/6098/#post-36953" rel="noreferrer" target="_blank">https://forums.freebsd.org/<wbr>threads/6098/#post-36953</a><br>
[2] IPv6 Network (auto) configuration: <a href="https://egustafson.github.io/ipv6-dhcpv6.html" rel="noreferrer" target="_blank">https://egustafson.github.io/<wbr>ipv6-dhcpv6.html</a><br>
[3] IPv6 on FreeBSD/EC2: <a href="http://www.daemonology.net/blog/2017-01-26-IPv6-on-FreeBSD-EC2.html" rel="noreferrer" target="_blank">http://www.daemonology.net/<wbr>blog/2017-01-26-IPv6-on-<wbr>FreeBSD-EC2.html</a><br>
<br>
<br>
Cheers,<br>
<span class="HOEnZb"><font color="#888888">--<br>
Aly</font></span></blockquote></div><br></div></div>