Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jan 2022 19:07:47 +0800
From:      PstreeM China <pstreem@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Configure FreeBSD as ipv6 router
Message-ID:  <CAPDFJPjyT1YYN=bU%2BP3Me0Q=EU_BzgdXLsxkx83ur%2B2upMPHzg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
hello expert:

Very thanks and hope I can get your help.
I Use FreeBSD 13.0, and want to set it up as my home router.  ipv4 is all
well running. The problem is about the ipv6 part.

Now, I can get the ipv6 prefix from my isp, the external interface and
internal interface of the router can autoconf ipv6 address, the router can
access the ipv6 internet.
But the client behind the router(freebsd) can not assign an ipv6 address.
Here is my configuration, It's great if you can give your comments about my
configuration.  I hope it's enough. Thanks very much.
igb0 is the external interface
igb2 is the internal interface.

*---rc.conf---*
ipv6_gateway_enable="YES"
ipv6_activate_all_interfaces="NO"
ipv6_network_interfaces="igb0 igb2"
ipv6_cpe_wanif="igb0"
ifconfig_igb0_ipv6="inet6 accept_rtadv up"
ifconfig_igb2_ipv6="inet6 -accept_rtadv auto_linklocal up"
rtsold_enable="YES"
rtsold_flags="-aF"

rtadvd_enable="YES"              # Set to YES to enable an IPv6 router
rtadvd_interfaces="igb2"            # Interfaces rtadvd sends RA packets.

dhcp6c_enable="YES"
dhcp6c_interfaces="igb0"
*---dhcp6c.conf---*
interface igb0 {
       send ia-na 1;
       send ia-pd 1;
       send rapid-commit;
       #send domain-name-servers;
};
id-assoc na 1 {
};
id-assoc pd 1 {
prefix ::/64 1800;
        prefix-interface igb2 {
                sla-len 0;
                sla-id 0;
        };
};
*--rtadvd.conf---*
igb2:\
    :prefixlex#64:\
*--pf.conf--*
pass in inet6 all
pass out inet6 all
*---information ---*
*root@home:/etc # ifconfig igb0*
igb0: flags=8963<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0
mtu 1500
options=4a500b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,NOMAP>
ether c4:83:4f:16:3b:94
inet 192.168.88.250 netmask 0xffffff00 broadcast 192.168.88.255
inet6 fe80::c683:4fff:fe16:3b94%igb0 prefixlen 64 scopeid 0x1
inet6 2408:xxxx:xxxx:1d23:c683:4fff:fe16:3b94 prefixlen 64 autoconf
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
*root@home:/etc # ifconfig igb2*
igb2: flags=8963<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0
mtu 1500
options=4a500b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,NOMAP>
ether c4:83:4f:16:3b:96
inet 192.168.100.250 netmask 0xffffff00 broadcast 192.168.100.255
inet6 fe80::c683:4fff:fe16:3b96%igb2 prefixlen 64 scopeid 0x3
inet6 2408:xxxx:xxxx:1d21:c683:4fff:fe16:3b96 prefixlen 64
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>

BR//Pst M

[-- Attachment #2 --]
<div dir="ltr">hello expert:<div><br></div><div>Very thanks and hope I can get your help.</div><div>I Use FreeBSD 13.0, and want to set it up as my home router.  ipv4 is all well running. The problem is about the ipv6 part. </div><div><br></div><div>Now, I can get the ipv6 prefix from my isp, the external interface and internal interface of the router can autoconf ipv6 address, the router can access the ipv6 internet.</div><div>But the client behind the router(freebsd) can not assign an ipv6 address. </div><div>Here is my configuration, It&#39;s great if you can give your comments about my configuration.  I hope it&#39;s enough. Thanks very much.</div><div>igb0 is the external interface</div><div>igb2 is the internal interface.</div><div><br></div><div><b>---rc.conf---</b></div><div>ipv6_gateway_enable=&quot;YES&quot;<br></div><div>ipv6_activate_all_interfaces=&quot;NO&quot;<br>ipv6_network_interfaces=&quot;igb0 igb2&quot;<br></div><div>ipv6_cpe_wanif=&quot;igb0&quot;<br>ifconfig_igb0_ipv6=&quot;inet6 accept_rtadv up&quot;<br>ifconfig_igb2_ipv6=&quot;inet6 -accept_rtadv auto_linklocal up&quot;<br>rtsold_enable=&quot;YES&quot;<br>rtsold_flags=&quot;-aF&quot;<br><br></div><div>rtadvd_enable=&quot;YES&quot;              # Set to YES to enable an IPv6 router<br>rtadvd_interfaces=&quot;igb2&quot;            # Interfaces rtadvd sends RA packets.<br><br>dhcp6c_enable=&quot;YES&quot;<br>dhcp6c_interfaces=&quot;igb0&quot;<br></div><div><b>---dhcp6c.conf---</b></div><div>interface igb0 {<br>       send ia-na 1;<br>       send ia-pd 1;<br>       send rapid-commit;<br>       #send domain-name-servers;<br>};<br>id-assoc na 1 {<br>};<br>id-assoc pd 1 {<br>	prefix ::/64 1800;<br>        prefix-interface igb2 {<br>                sla-len 0;<br>                sla-id 0;<br>        };<br>};<br></div><div><b>--rtadvd.conf---</b></div><div>igb2:\<br>    :prefixlex#64:\<br></div><div><b>--pf.conf--</b></div><div>pass in inet6 all</div><div>pass out inet6 all</div><div><b>---information ---</b></div><div><u>root@home:/etc # ifconfig igb0</u><br>igb0: flags=8963&lt;UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500<br>	options=4a500b9&lt;RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,NOMAP&gt;<br>	ether c4:83:4f:16:3b:94<br>	inet 192.168.88.250 netmask 0xffffff00 broadcast 192.168.88.255<br>	inet6 fe80::c683:4fff:fe16:3b94%igb0 prefixlen 64 scopeid 0x1<br>	inet6 2408:xxxx:xxxx:1d23:c683:4fff:fe16:3b94 prefixlen 64 autoconf<br>	media: Ethernet autoselect (1000baseT &lt;full-duplex&gt;)<br>	status: active<br>	nd6 options=23&lt;PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL&gt;<br><u>root@home:/etc # ifconfig igb2</u><br>igb2: flags=8963&lt;UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500<br>	options=4a500b9&lt;RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,NOMAP&gt;<br>	ether c4:83:4f:16:3b:96<br>	inet 192.168.100.250 netmask 0xffffff00 broadcast 192.168.100.255<br>	inet6 fe80::c683:4fff:fe16:3b96%igb2 prefixlen 64 scopeid 0x3<br>	inet6 2408:xxxx:xxxx:1d21:c683:4fff:fe16:3b96 prefixlen 64<br>	media: Ethernet autoselect (1000baseT &lt;full-duplex&gt;)<br>	status: active<br>	nd6 options=23&lt;PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL&gt;<br></div><div><br></div><div>BR//Pst M</div></div>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPDFJPjyT1YYN=bU%2BP3Me0Q=EU_BzgdXLsxkx83ur%2B2upMPHzg>