I've been using ifstated and dhcpleased for quite some time, and last
week I figured it was time to try IPv6 as well. I'm a newbie when it
comes to IPv6 so please bear with my ignorance if I'm using the wrong
wording.

The setup is quite simple. Two routers running current (as of now I'm
on the snapshot from 19th oct) - one primary and one secondary. The
ifstated.conf I have works perfectly for IPv4, but not for IPv6. On
the secondary I almost(!) never get a IPv6 lease from my ISP. It has
happened once or twice, but I've never understood why it happens. In
99% of the time the secondary takes over, I never get IPv6 PD. When
the master takes over again, I sometimes needs to restart dhcp6leased
(just doing a "dhcp6leasectl igc2" does not get the job done) - but
not always.
igc2 on both do share the same mac address ( I spoof it on the slave)
- if not my ISP won't give me a lease (IPv4) for about 30 seconds.
igc0 is $int_if, while igc2 is $ext_if. pf.conf is the same on both machines.

Here is my ifstated.conf:

carp_up = "carp0.link.up"
carp_down = "!carp0.link.up"

init-state auto

state auto {
        if ($carp_up)
                set-state fw_master
        if ($carp_down)
                set-state fw_slave
}

state fw_master {
        init {
                run "route -qn flush"
                run "ifconfig igc2 inet autoconf"
                run "ifconfig igc2 inet6 autoconf -temporary"
                run "ifconfig igc0 inet6 autoconf -temporary"
                run "pfctl -f /etc/pf.conf"
                run "rcctl -f restart rad"
                run "dhcp6leasectl igc2"
        }

        if ($carp_down)
                set-state fw_slave
}

state fw_slave {
        init {
                run "ifconfig igc2 -inet -inet6"
                run "ifconfig igc0 -inet6"
                run "rcctl stop rad"
                run "route -qn flush"
                run "route add default 192.168.0.3"
        }

        if ($carp_up)
                set-state fw_master
}

and /etc/dhcp6leased.conf

request rapid commit
request prefix delegation on igc2 for igc0

Reply via email to