Re: FreeBSD laptop not getting IPv6 configured with SLAAC

2023-12-25 Thread Kristian Stærk

On 12/14/23 12:25, list_free...@bluerosetech.com wrote:

On 2023-12-13 11:46, Kristian Stærk wrote:

I have also attached a tcpdump showing router solicitations going out
and router advertisements being received.


You're getting valid advertisements, but they have the "managed" and 
"other stateful" flags set.  This means your router expects you to use 
DHCPv6 to number its interface and get other configuration information 
(DNS, time, WINS, etc.).


You'll need to install net/dhcp6 and configure its dhcp6c to get an 
IPv6 assignment.  RC interface configuration has no DHCPv6 
integration, so you'll need to leave it at:


ifconfig_wlan0_ipv6="inet6 accept_rtadv"
dhcp6c_enable="YES"

after putting the relevant bits in /usr/local/etc/dhcp6c.conf.


Thanks. That seems to have done the trick.

I also had to specify dhcp6c_interfaces but otherwise nothing 
complicated was required.


Best regards
Kristian



Re: FreeBSD laptop not getting IPv6 configured with SLAAC

2023-12-14 Thread list_freebsd

On 2023-12-13 11:46, Kristian Stærk wrote:

I have also attached a tcpdump showing router solicitations going out
and router advertisements being received.


You're getting valid advertisements, but they have the "managed" and 
"other stateful" flags set.  This means your router expects you to use 
DHCPv6 to number its interface and get other configuration information 
(DNS, time, WINS, etc.).


You'll need to install net/dhcp6 and configure its dhcp6c to get an IPv6 
assignment.  RC interface configuration has no DHCPv6 integration, so 
you'll need to leave it at:


ifconfig_wlan0_ipv6="inet6 accept_rtadv"
dhcp6c_enable="YES"

after putting the relevant bits in /usr/local/etc/dhcp6c.conf.


My pf.conf should be open enough for this to work but for completeness I
have also tried with pf disabled with the same result.


With your current pf.conf, you may as well disable pf.


When running Ubuntu on the same laptop or even in a Virtualbox VM with
bridged networking, Ubuntu manages to configure IPv6 without problems.
Likewise with a Windows VM.


Windows will do DHCPv6 automatically.  Depending on the distro, Linux 
will either run an integrated DHCPv6 client or ignore the managed flag 
and SLAAC out of the highest priority /64 offered in the rtadv.





Re: FreeBSD laptop not getting IPv6 configured with SLAAC

2023-12-13 Thread Felix Reichenberger



> Hello,
>
> I am trying to get my laptop to receive an IPv6 address using SLAAC on my 
> local network. I suspect that the router provided by my ISP is doing 
> something slightly wrong or I may just have configured it wrong.
>
> I am running FreeBSD 14.0-RELEASE-p3.
>
> The network interface looks like this when queried with ifconfig.
>
> wlan0: flags=8843 metric 0 mtu 1500
>     options=0
>     ether 18:1d:ea:b1:f9:8b
>     inet 192.168.0.129 netmask 0xff00 broadcast 192.168.0.255
>     inet6 fe80::1a1d:eaff:feb1:f98b%wlan0 prefixlen 64 scopeid 0x2
>     groups: wlan
>     ssid ARRIS-8030 channel 6 (2437 MHz 11g) bssid e4:f7:5b:25:ff:da
>     regdomain FCC country US authmode WPA2/802.11i privacy ON
>     deftxkey UNDEF AES-CCM 2:128-bit txpower 30 bmiss 10 scanvalid 60
>     protmode CTS wme roaming MANUAL
>     parent interface: iwm0
>     media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
>     status: associated
>     nd6 options=23
>
> I have attached my rc.conf and pf.conf files to this mail.
>
> I have also attached a tcpdump showing router solicitations going out and 
> router advertisements being received.
>
> My pf.conf should be open enough for this to work but for completeness I have 
> also tried with pf disabled with the same result.
>
> When running Ubuntu on the same laptop or even in a Virtualbox VM with 
> bridged networking, Ubuntu manages to configure IPv6 without problems. 
> Likewise with a Windows VM.
>
> I appreciate if anyone here can spot what goes wrong and suggest if I need to 
> configure something differently or whether a code fix will be needed to 
> support this network. I can try patches if necessary.
>
> Thanks.
>
> Best regards
> Kristian
>

Hello Kristian,

I would recommend disabling your pf firewall during testing, and enabling it
after you get SLAAC working. Having multiple unknowns in the equation will
only make your life harder.

In your rc.conf, you could try adding the following line:

ifconfig_wlan0_ipv6="inet6 accept_rtadv"

After adding it, I would also recommend to restart your device.
I use this for all my jails and it works fine with no additional configuration.

Regards.