Dhcp issue with ipv6 no default gateway for 2001 prefix

Hi, I have an issue not getting default router for 2001 prefix for my HE ipv4to6
I only get link local into routing table

On windows client

Active Routes:
If Metric Network Destination Gateway
9 281 ::/0 fe80::725a:

probably a quick fix but seems not to find the solution

Please provide your /etc/config/network file. Redact specific subnets, etc.

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdd1:****:***a::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'

config device
        option name 'lan1'
        option macaddr '**:**:**:**:**:**'

config device
        option name 'lan2'
        option macaddr '**:**:**:**:**:**'

config device
        option name 'lan3'
        option macaddr '**:**:**:**:**:**'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '10.*.*.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'internet'
        option macaddr '**:**:**:**:**:**'
        option ipv6 '0'

config interface 'wan'
        option device 'internet'
        option proto 'dhcp'

config interface 'wan6'
        option device 'internet'
        option proto 'dhcpv6'

config interface 'henet'
        option proto '6in4'
        option peeraddr '216.66.**.**'
        option ip6addr '2001:470:**:**::2/64'
        option tunnelid '4*****'
        option password '***********'
        option mtu '1480'
        list ip6prefix '2001:470:****::/48'

You set no default route and gateway on the henet interface. Your IPv6 upstream is configured statically and you do not state that a default route for IPv6 is present on that link.

So your clients can not use it. But check before you edit something that you really have no IPv6 default route.

1 Like

See https://openwrt.org/docs/guide-user/network/ipv6/ipv6_henet?do=#default_route

Yes you need to set it explicitly.
But please do me a personal flavor and do not run blindly run any script on these wiki pages.
Understand what they do and do it yourself manually.
Pay attention that on this guide the he connection is configured directly on wan6. That way for instance the default firewall rules will just work out of the box.
If you have questions don't hesitate to ask.

got the default route after a reboot of router and client thanks for your help

1 Like

Point to point interfaces like VPNs and tunnels do not need a gateway configured. The "gateway" is used to determine the MAC address (by ARP or ND) of the next router on shared media like Ethernet or WiFi. In a point to point situation, anything sent into the tunnel has only one place to go.

1 Like

But you still need one or more specific routes pointing to the device (where the tunnel or p2p interface is configured)

1 Like

I've had a henet tunnel/interface running for many years now without any explicit gateway or route defined. It shouldn't be necessary for correct operation of the tunnel.

1 Like

But the Kernel somehow gets a default route in the end? Maybe it's a default option for the protocol option? Or maybe because it's configured on wan6 and it inherited certain defaults like adding the default route?

https://openwrt.org/docs/guide-user/network/ipv6_ipv4_transitioning#dynamic_ipv6-in-ipv4_tunnel_henet_only
A little bit further down a route is added. :man_shrugging:
I have pppoe and dhcpv6 at home. I have no explicit experience with the 6in4 protocol.

Well I have IPv6 connectivity so it must have.

Not that, I have it configured as a separate interface.

I have to assume that was added to the wiki for some reason. No idea what though and it's not been necessary in my setup.

1 Like
config interface 'henet'
        option device '@wan'
        option proto '6in4'
        option mtu '1424'
        option ttl '64'
        option peeraddr '216.XXX'
        option ip6addr '2001:470:1XXX:XXXX::2/64'
        option ip6prefix '2001:470:4XXX::/48'
        option tunnelid 'XXX'
        option username 'XXX'
        option password 'XXX'
        option auto '1'

This worked for me in the past (can't test it any longer, as I'm behind cgNAT which makes 6in4 impossible).

2 Likes
config interface 'henet'
        option proto '6in4'
        option peeraddr '216..xxx.xxx.xxx'
        option mtu '1480'
        list ip6prefix '2001:470:xxxx::/48'
        option peerdns '0'
        option ip6addr '2001:470:xxxx:xxxx::2/64'

This works for me. I updated the tunnel with the HE DDNS service, so the credential stanza isn't there.

I then use ip6class to configure an interface to use HE for IPv6 Internet.