Prefix hint to get persistent ipv6 from ISP PPPOE?

I've heard that those using ROS has the feature called prefix hint to acquire a certain prefix from their ISP, effectively getting static ipv6 addresses, I understand this is happening with ISPs that honor such ''hints", is there a way to do this in openwrt?

That is possible, IF your ISP does honor that hint. He does not have to and AFAIK most ISP do not honor it. They try to sell you business contracts instead, which are more expensive.

You can test it easily: login to Luci, go to interfaces and edit the wan6 interface. Click on the advanced tab. There is "IPv6 assignment hint". Voila.

It also depends on the length of the assigned prefix. Your ISP can honor the hint AND still alter a upper part of the prefix.

2 Likes

but there's no way to edit the wan_6 interface as it's a virtual dynamic interface, it only appears when the pppoe connection is established, and the edit button is greyed out.

Could you please share your configuration as it is in /etc/config/network and /etc/config/firewall? Remove all passwords before sharing.

You still might adopt it into a virtual device like this:

config interface 'wan'
    option ifname 'eth1'
    option proto 'pppoe'
    option username 'b1xxxxxx'
    option password 'xxxxxx'
    option ipv6 '1'

config interface 'wan6'
    option proto 'dhcpv6'
    option reqaddress 'try'
    option reqprefix '60'
    option ifname '@wan'
    option hint 'beef'

Hi man, thank you for the idea, here's my cat /etc/config/network results, I can give it a try later as you suggested, I tried some options last night on the @wan interface but it reported some error like no available interface, anyway here's the my config.

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 packet_steering '1'
        option ula_prefix 'fdd8:98bc:86f8::/48'

config interface 'lan'
        option proto 'static'
        option ip6assign '64'
        option device 'eth0'
        list ipaddr '192.168.1.10/24'
        list ip6class 'wan_6'
        option defaultroute '0'
        option ip6weight '4'
        option type 'bridge'

config interface 'LAN2'
        option proto 'static'
        list ipaddr '192.168.10.10/24'
        option defaultroute '0'
        option device 'eth0.10'
        option delegate '0'
        option ip6assign '64'
        list ip6class 'wan_6'

config interface 'wan'
        option proto 'pppoe'
        option device 'eth1'
        option username 'this_is_the_username'
        option password 'this_is_the_password'
        option ipv6 'auto'
        option pppd_options 'persist maxfail 0'

config route
        option interface 'lan'
        option target '10.8.0.0/24'
        option gateway '192.168.1.200'

config interface 'modem'
        option proto 'static'
        option device 'eth1'
        option force_link '0'
        option ipaddr '192.168.2.2'
        option netmask '255.255.255.0'
        option gateway '192.168.2.1'
        option defaultroute '0'
        option delegate '0'

config interface 'lan100'
        option proto 'static'
        option device 'tap_kb'
        option ipaddr '192.168.11.10'
        option netmask '255.255.255.0'
        option defaultroute '0'
        option ip6assign '64'
        list ip6class 'wan_6'
        option ip6weight '3'

config route
        option interface 'lan100'
        option target '192.168.60.0/24'
        option gateway '192.168.11.48'

Ok, try to add an interface wan6 like in the example. Do not forget to add it to the firewall wan zone.

1 Like

Also change list ip6class 'wan_6' to list ip6class 'wan6' in both lan and LAN2, as you should use option ipv6 '1'in wan. For more information see this.

PPP-based protocols - for example pppoe and pppoa - require that option ipv6 is specified in the parent config interface wan section. See WAN interface protocols. option ipv6 can take the value:

  • 0: disable IPv6 on the interface

  • 1: enable IPCP6 negotiation on the interface, but nothing else. If successful, the parent interface will be assigned a link-local address (prefix fe80::/10). All other IPv6 configuration is made in the wan6 interface which must be configured manually, as described below.

  • auto: (default) enable IPv6 on the interface. Spawn a virtual interface wan_6 (note the underscore) and start DHCPv6 client odhcp6c to manage prefix assignment. Ensure the lan interface has option ip6assign 64 (or a larger prefix size) set to redistribute the received prefix downstream.

Further configuration options, if required, can be given in the config interface wan6 section.

Note: In order to successfully receive DHCPv6 advertisement unicast messages from the dhcp6s to OpenWrt dhcp6c, you will need to have firewall rule for the WAN zone (already allowed in default)

That's a really good reminder, thank you!

I edited my response above with some more information about this change.

with option hint 'xxxx', should I hint the complete prefix I'm trying to get? for example, 2xxx:xxxx:xxxx:xxxx::/60? What would be the correct way to specify that, with or without the "::" and "/60?"

It is explained here in an example and the text below. Ignore, that the protocol is 'static', this is just for the example.

https://openwrt.org/docs/guide-user/network/ipv6/configuration#downstream_configuration_for_lan_interfaces

You can try some smaller hint (e.g. 2 or f) to test IF your ISP does honor it. After that you can move on and test bigger hints.