I use a gif tunnel to he.net to get ipv6 connectivity. I placed the tunnel setup commands from their guide into a rc script that runs at startup. It works fine, however when the host's modem reboots and dhclient refreshes the interface, ipv6 connectivity is lost. The reason is because something removes
The issue can be tested by pinging gif0's ipv6 gateway from gif0's v6 ip. It will report
I have done an experiment where I created a dummy lo1 interface with some ipv4 address, then created a gif1 interface that tunnels from lo1 to somewhere. Then I destroyed lo1.
Could you help me properly understand what's going on, and what would be the proper way to fix this behavior? It is possible that my configuration is incorrect or incomplete, and/or that there is builtin logic that I need to know about.
tunnel inet [wan ipv4] --> [he ipv4]
property from the gif0 interface. All other properties, such as the v6 ip, gateway, prefix and route, remain intact. This seems to be the same issue as https://forums.freebsd.org/threads/gif-4-tcp-ipv6-routing-after-service-netif-restart.84126/ from a year ago.The issue can be tested by pinging gif0's ipv6 gateway from gif0's v6 ip. It will report
ping6: bind: Can't assign requested address
. Trying to use the primary ipv6 address assigned by the tunnel broker results in ping6: UDP connect: No route to host
.I have done an experiment where I created a dummy lo1 interface with some ipv4 address, then created a gif1 interface that tunnels from lo1 to somewhere. Then I destroyed lo1.
ifconfig
showed that the tunnel was still configured on gif1, even though the ipv4 address, and even the interface it was configured on, were gone. This is what I was expecting to happen. Therefore, either dhclient
or some related rc script is deliberately cleaning the tunnel up. This is unhelpful, both because it is being done even if there's no change to the wan ip address (alternatively, it's not restoring the tunnel), and because a change of wan ip requires an account update on the other side, which is best left to an user script.Could you help me properly understand what's going on, and what would be the proper way to fix this behavior? It is possible that my configuration is incorrect or incomplete, and/or that there is builtin logic that I need to know about.