Solved IPv6 gateway?

I thought the local-link address was strictly used to broadcast router solicitation and requests. Not to use for actual traffic.

Anyway, I tried using the suggested address, but no luck. I can't even ping it.

I also found this blog post. Apparently I need to run rtsold and dhcp6c, to get a valid router address. So I enabled rtsold and did a reboot. But still, no luck :(

Well, at least it did give my ego a little boost. That guy seems to know his stuff and still broke his teeth on native ipv6. So, at least I'm not the only one. And I'm no expert too ;)

I'm getting closer though. As far as I understand the whole deal, getting a proper router/gateway address from my ISP is the only missing link. Once I have that, it should work.
 
I think I finally managed to tackle that last issue. It turned out I needed the option ipv6_cpe_wanif="em0" in /etc/rc.conf.

This is what /etc/rc.conf looks like (the ipv6 part, anyway)

Code:
ipv6_gateway_enable="YES"
ipv6_cpe_wanif="em0"
ifconfig_em0_ipv6="inet6 2000:1000:beef:ab00::1 prefixlen 64"
ifconfig_msk0_ipv6="inet6 -accept_rtadv"
dhcp6c_enable="YES"
dhcp6c_interfaces="em0"
rtadvd_enable="YES"
rtadvd_interfaces="msk0"

  • Line 1 tells FreeBSD to act as a gateway for ipv6 traffic, coming from my LAN
  • Line 2 tells FreeBSD to accept router advertisement on my WAN interface. This is disable, because line 1 tells FreeBSD it is a router/gateway. This option turns it explicitly on and tells FreeBSD to accept router advertisement on em0, coming from my ISP.
  • Line 3 sets a static ipv6 address on the WAN interface. Because of some technical issues (line id's?) it's not given an ipv6 address bij the DHCP-server from my ISP. To get around that, I had to manually set an address from the first available subnet.
  • Line 4 Disables accept_rtadv on the LAN interface. Otherwise rtadvd can't broadcast ipv6 addresses on that interface.
  • Line 5 and 6 enable the dhcpv6 client on the WAN interface, so I can recieve ipv6 prefixes, routers, etc from my ISP.
  • Line 7 and 8 enables rtadvd on the LAN interface, so it can broadcast ipv6 addresses on my LAN

This is what /usr/local/etc/dhcp6c.conf looks like:

Code:
interface em0 {
        send ia-pd 1;
        send ia-na 1;
        send rapid-commit;
        request domain-name-servers;
};

id-assoc na 1 {
};

id-assoc pd 1 {
        prefix ::/56 infinity;

        prefix-interface msk0 {
                sla-id 1;
                sla-len 8;
        };
};

I haven't tested any hosts on my LAN yet, but I expect that will work fine.

Update: All my hosts can ping6 the internet. And they are pingable over ipv6 from the internet too. So everything seems to work. Finally! :):beer:
 
I think I finally managed to tackle that last issue. It turned out I needed the option ipv6_cpe_wanif="em0" in /etc/rc.conf.

This is what /etc/rc.conf looks like (the ipv6 part, anyway)

Code:
ipv6_gateway_enable="YES"
ipv6_cpe_wanif="em0"
ifconfig_em0_ipv6="inet6 2000:1000:beef:ab00::1 prefixlen 64"
ifconfig_msk0_ipv6="inet6 -accept_rtadv"
dhcp6c_enable="YES"
dhcp6c_interfaces="em0"
rtadvd_enable="YES"
rtadvd_interfaces="msk0"

  • Line 1 tells FreeBSD to act as a gateway for ipv6 traffic, coming from my LAN
  • Line 2 tells FreeBSD to accept router advertisement on my WAN interface. This is disable, because line 1 tells FreeBSD it is a router/gateway. This option turns it explicitly on and tells FreeBSD to accept router advertisement on em0, coming from my ISP.
  • Line 3 sets a static ipv6 address on the WAN interface. Because of some technical issues (line id's?) it's not given an ipv6 address bij the DHCP-server from my ISP. To get around that, I had to manually set an address from the first available subnet.
  • Line 4 Disables accept_rtadv on the LAN interface. Otherwise rtadvd can't broadcast ipv6 addresses on that interface.
  • Line 5 and 6 enable the dhcpv6 client on the WAN interface, so I can recieve ipv6 prefixes, routers, etc from my ISP.
  • Line 7 and 8 enables rtadvd on the LAN interface, so it can broadcast ipv6 addresses on my LAN
This is what /usr/local/etc/dhcp6c.conf looks like:

Code:
interface em0 {
        send ia-pd 1;
        send ia-na 1;
        send rapid-commit;
        request domain-name-servers;
};

id-assoc na 1 {
};

id-assoc pd 1 {
        prefix ::/56 infinity;

        prefix-interface msk0 {
                sla-id 1;
                sla-len 8;
        };
};

I haven't tested any hosts on my LAN yet, but I expect that will work fine.

Update: All my hosts can ping6 the internet. And they are pingable over ipv6 from the internet too. So everything seems to work. Finally! :):beer:

msk0 and em0 not found in my interface. Only there igb0, igb1 and lo0 how to apply ?
 
Hi Latwe,

Your answer is in my original post.

em0 is connected to my modem and msk0 is connected to my LAN.

Depending on your setup, one of your NIC's is connected to the internet and the other to your LAN. With that in mind, you can change rc.conf accordingly.
 
Back
Top