OWRT have global ipv6 on wan6 but lan haven't

Have router 1 without opwrt that connected to ipv6 internet, and give it to owrt router 2 and other clients.
1 router have prefix from ppoe connection 2a02:ad8:49e2:xxxx::/56
2 router is OpenWrt 23 (openwrt-23.05.4-ramips-mt7621-xiaomi_mi-router-4a-gigabit-squashfs-sysupgrade.bin)
OpenWrt wan6 have ipv6 that can ping from it

:root@OpenWrt:~# ping6 -c 4 ipv6.google.com
PING ipv6.google.com (2a00:1450:4010:xxx::64): 56 data bytes
64 bytes from 2a00:1450:4010:xxx::64: seq=0 ttl=110 time=68.426 ms

But Lan interface give only ipv4 and local ULA IPv6: fdef:4dae:da5e::1/60 that have not access to global ipv6 internet (so clients haven't it too).

For some reason I thought that the default settings of openwrt should successfully accept and distribute ipv6 Internet, but unfortunately in my case it only accepts, but doesn't distribute to clients ipv6 internet.

I've tried to get help from AI chats with different configs, but it wasn't successive, so i want to start from the beginning.

And what is router 1, make model and build?

Router 1 has to hand out a prefix of 62 or lower to router 2

1 Like

Router1: Sagemcom F@st 2804, v7 rev.3
However, maybe there is some kind of ssh command set to make ipv6 work on the lan interface?
I do not understand the essence of the problem, why clients connected directly, including openwrt itself, can use ipv6 Internet access, but openwrt cannot transmit it to clients connected to it, in the same way as the ipv4 Internet transmits.

So problem that openwrt connected with too big prefix?
openwrt wan6 IPv6: 2a02:ad8:49e2:xxxx::1/128

may be it can be fixed on openwrt side with some configs?
If router 1 have o and m DHCPv6 flags.

Can you please post the /etc/config/network of both routers?
The 2nd is connected with its WAN port to a LAN port of the 1st router, right?

Just stop and do not try. Really. Given that most answers on the net given by humans (on the topic) are utterly bullshit, therefore the training set of the LLM is more then crap.

1 Like

Yes 2nd wan connected to lan of 1st
And i already reversed configs to defaults, only make lan interface ipv4 address 192.168.2.2 (default 1.1 same problem) so i can connect to 1st router 192.168.1.1 web.

root@OpenWrt:~# vi /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 'fdef:4dae:da5e::/48'
        option packet_steering '1'

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

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.2.2'
        option netmask '255.255.255.0'
        option ip6assign '60'

Cant connect to 1st router with ssh, so can change configs with web gui (now it almost defaults, excluding i activated m flag of DHCPv6 and RA of DNS:

Unable to negotiate with 192.168.1.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

Yes I missed the part that the 1st one is not running OpenWrt.

But you have access to its vendor firmware web interface? Try to find something called "Prefix Delegation" on its IPv6 settings.

And your network config of the 2nd router seams incomplete as the stanzas for wan and wan6 are missing.... (Use cat /etc/network/config to print the whole file...)

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 'fdef:4dae:da5e::/48'
	option packet_steering '1'

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

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.2.2'
	option netmask '255.255.255.0'
	option ip6assign '60'

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

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'

On the 1st routers, the option "Prefix Mode", what values can you choose of?
And try if something chances if you set on the 2nd router the option reqprefix explixit to 60.

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix '60'

What you want and need is that the 1st router delegates a part of the /56 prefix downstream to the 2nd router. And the 2nd routers can then delegate/assign individual /64 to its LAN interfaces.
(Feel free to ask for clarifications and such.)

Edit / PS: What options/values can you choose of on the DHCPv6 Options (on the 1st router)?

After apply and reboot wan6 still
IPv6: 2a02:ad8:49e2:xxxx::1/128

On 1st router IPv6 Static Route also avaible:

Enable:	
Destination:	
Subnet Mask:	
Next Hop:	
Metric:	
1
Interface:	

lan ipv6 tab
Ra manual settings:

Prefix Address:	
Prefix Length:	
64
 [16 - 64]
Preferred Time:	
-1
 [600 - 2147483647 S] or [-1 S]
Valid Time:	
-1
 [600 - 2147483647 S] or [-1 S]

DHCPv6 manual Mode:

Address Mode:	
Prefix Mode (or pool mode also)
IPv6 Address Pool:	
Prefix Length:	
64
Preferred Time:	
120
 Secs
Valid Time:	
120
 Secs

As an alternative configuration option, is it possible to set ipv6 forwarding to 1st router? Or it is only option if 1st router configs cannot be changed (just in case)?

Ok, now what i have to put in 1st router to configure it delegate/56 prefix to OpenWRT (to other clients as usual)?

Start with / Try to set the "Prefix Length" to 60 on the DHCPv6 Options, and as I said before, set on the 2nd router option reqprefix '60' explicit.

I would suggest to power cycle the 2nd router OR at least unplug the cable from its WAN port, wait 3 sec, and plugin again... I keep the fingers crossed.

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.2.2'
	option netmask '255.255.255.0'
	option ip6assign '60'

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

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix '60'

Already done on openwrt (2nd), right?
power off 3 sec also no effect.

Now need to do something with 1st router? static route may be?

Yes, as I have said:

And no. No static routing necessary here.

You want that the first router hands out more then a /64 prefix to clients who ask for it.

1st router need also |IPv6 Address Pool:||
to set
|Prefix Length:|

So what pool need to put?
If i have on 1st router this:

pppoe2	0/35	LLC	INTERNET
IPv6 Address	2a02:ad8:201:74ee:0:11e6:0:xxxx/64
Prefix	2a02:ad8:49e2:xxxx::/56
Gateway	fe80::6aab:9ff:fe7d:xxxx

I can only partially you assist with your vendor firmware...
You see a /56 has 256 /64 prefixes. A /60 has 16 /64.
You have to try it out and/or have a look at the vendor documentation.
It still stands: What you want to have is dhcpv6 prefix delegation. With more then a single /64 on the downstream aka LAN interface (of the 1st router).

i set to1st router manual DHCPv6 Mode:

IPv6 Address Pool:	
2a02:ad8:49e2:xxxx::1
Prefix Length:	
60

and RA same
restart both routers
As result, openWRT wan6 now have address:
IPv6: 2a02:ad8:49e2:xxxx:9e9d:7eff:fe11:80ce/128
and something new, now i cannot ping from openWRT ipv6:

ping6 -c 4 ipv6.google.com
PING ipv6.google.com (2a00:1450:4010:c0b::66): 56 data bytes

--- ipv6.google.com ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss

Well, which means, probably i need to start studying ipv6 network basics)

If i back 1st router to auto DHCPv6, but change IPv6 Address Suffix Pool: set from ::60 to ::60
2nd router wan6 take IPv6: 2a02:ad8:443b:xxxx::60/128
And i can ping ipv6 from wan6 again. (still no global ipv6 on lan interface)

Ok basic crash course in a nutshell...

Your 2nd router should have/need either

  • an address by SLAAC with a prefix of /64, or
  • an address by SLAAC with a prefix of /64 AND an address with a prefix of /128 via DHCPv6, or
  • just a single address with a prefix of /128 via DHCPv6

on its wan interface, to begin with. Without that you do not even should try to proceed.

After that we can talk about prefix delegation. This is also a subset of DHCPv6 but its not intended to hand our address by rather an entire prefix. So to speak an unused /64 or even larger like /60.

Please try to get a copy of a manual of your 1st routers vendor firmware and check if it even supports prefix delegation.
Or evaluate if it is possible to get rid of that box and replace it with OpenWrt. Because this is already builtin standard feature and even enabled by default!

An "address pool" usually talks about how much addresses or what range of addresses are handed out by an dhcp/dhcpv6 server. But in the ipv6 world this is rather stupid, because a network/vlan/link should have always an entire /64. Sure you can narrow down the address space (range), like: "I want to use only the first 10.000 addresses", but then it would be still out of an /64.

But a router has to handout also entire prefixes to clients which ask for it, like a down stream router.

Example:
You have an /56. And now you could have like 3 client networks (adults, kids, iot) each a /64, and now you connect 2 more routers. Each router could not only request an address, but also a /60, so it can provide up to 16 networks on its own!
This "distribution" is called "prefix delegation". It has nothing to do with addresses (the suffix / the last 64 bit of an 128 bit ipv6 address), but with the prefix, that's why its called prefix delegation.

Was it helpful?

1 Like

On the OpenWRT device, what's the output of ifstatus wan6?


root@OpenWrt:~# ifstatus wan6
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 2841,
        "l3_device": "wan",
        "proto": "dhcpv6",
        "device": "wan",
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [

        ],
        "ipv6-address": [
                {
                        "address": "2a02:ad8:443b:xxxx::60",
                        "mask": 128,
                        "preferred": 2559,
                        "valid": 85359
                }
        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fe80::1",
                        "metric": 512,
                        "valid": 1518,
                        "source": "2a02:ad8:443b:xxxx::60/128"
                }
        ],
        "dns-server": [
                "fe80::1"
        ],
        "dns-search": [

        ],
        "neighbors": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {
                "passthru": "00170010xxx00000000000000000000000000001"
        }
}

Thanks, i get that i need check if router 1 can delegate prefix.

Solution 1 if router 1 have no Prefix Delegation (PD):
Bridge mode on wan router1, so router 2 with openwrt can make ipv6 connection to ppoe itself.
Solution 2: NAT ipv6 for router 2
trying to find how to make it work...

Other ideas is:
DHCP redirect router 2 to router 1.
Or
6in4 Tunnel Broker IPv6