IPv6 works on the router but doesn’t work on LAN devices

My network looks like this: ISP - modem - Openwrt router - LAN devices

Before I switched to openwrt, I used tp-link which worked flawlessly. After switching to openwrt I can't use IPv6.

I tried many things to make it work. I've set relay mode on WAN6 and LAN. After doing that, my devices get ipv6 addresses but I can't use them.

If I ping the IPv6 address from the router it goes ok.
When i test if IPV6 on https://test-ipv6.com/ it's says I'm not using the protocol.

My ISP is Claro Dominican Republic. Modem provided works fine

The first step is to find out what type of IPv6 service you have. Using a default configuration where wan6 is only proto dhcpv6 with no options will usually discover this. You need to know if the ISP offers a prefix and what size it is.

Also make sure your modem is operating in "bridge" or "passthrough" mode instead of as a "gateway" The gateway mode does routing inside the modem and it may limit the LAN side to /128s as would be expected if it were only endpoints and not routers.

This is the info i have on LuCi

Yes your ISP device issued only a /128, so you cannot route it further. This is not good. If this is all that you can get that means you'll have to NAT6 the LAN into it the same as you would with a single IPv4.

Believe me, I've been through this for so many hours. The reason this doesn't work because the default gateway is not being distributed through the lan clients. If you go to network places and view the ethernet or wifi adaptor ip address, you'll notice the missing gateway.

I feel like something is wrong with how routes are set in relay mode.

You can try this in the mean time, it's actually suggested by someone and it fixed the issue for me.

Edit /etc/config/network file and put this under wan6 interface.
option ip6prefix 'aaa:bbb:ccc:ddd::/64'

Where aaa:bbb:ccc:ddd is your first 64bits wan6 address.

In your case it is 2001:1308:a599:bc00

So put this line.
option ip6prefix '2001:1308:a599:bc00::/64'

I maybe wrong about the prefix 64 as all this is kind of new to me.

Lan all to relay mode and wan6 also all to relay mode.
After adding the above line , be sure to restart interface. And hopefully it would work.

Relay mode requires a /64 routed to the WAN interface. The upstream's assignment of a 128 means the OP does not have that. The ISP box is treating the OpenWrt router as a single endpoint.

Hi

well, it will be good to know what IPv6 addresses tp-link served to your PC
do you have some notes from your old setup? maybe you remember test-ipv6.com result ?

main question is
did tp-link magically grabbed some PD from WAN ?
or tp-link hide whole LAN behind one /128 and serving ULAs to your LAN ?


This the modem data on ipv6, if that helps

This did not work

More testing on the wifi provided by the modem, i get a different IP on every device.

Ok. I disabled "prefix delegate type" option on the ISP modem, added the DNS server 3 and for some reason everything is working

Something is not right? Clearly his isp router is set to receive /56, how come he's only getting 128.

share output of ifstatus wan6.

or

share output of all. This will help the community better understand.

> uci export network; uci export dhcp; uci export firewall; \
> head -n -0 /etc/firewall.user; \
> ip -6 addr ; ip -6 ro li tab all ; ip -6 ru; \
> ls -l  /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; ifstatus wan6

You may hide mac addresses.

ifstatus WAN6
{
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 31799,
"l3_device": "eth0.2",
"proto": "dhcpv6",
"device": "eth0.2",
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [

],
"ipv6-address": [
	{
		"address": "2001:1308:a599:bc00:ea48:b8ff:fe4d:a77a",
		"mask": 64,
		"preferred": 56222,
		"valid": 56222
	}
],
"ipv6-prefix": [
	{
		"address": "2001:1308:a599:bc00::",
		"mask": 64,
		"class": "WAN6",
		"assigned": {
			
		}
	}
],
"ipv6-prefix-assignment": [
	
],
"route": [
	{
		"target": "2001:1308:a599:bc00::",
		"mask": 64,
		"nexthop": "::",
		"metric": 256,
		"valid": 56222,
		"source": "::/0"
	},
	{
		"target": "::",
		"mask": 0,
		"nexthop": "fe80::1",
		"metric": 512,
		"valid": 1777,
		"source": "2001:1308:a599:bc00:ea48:b8ff:fe4d:a77a/64"
	}
],
"dns-server": [
	"2606:4700:4700::1111",
	"2606:4700:4700::1001",
	"2001:4860:4860::8888",
	"fe80::1"
],
"dns-search": [
	
],
"neighbors": [
	
],
"inactive": {
	"ipv4-address": [
		
	],
	"ipv6-address": [
		
	],
	"route": [
		
	],
	"dns-server": [
		
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	]
},
"data": {
	"passthru": "00170030260647004700000000000000000011112606470047000000000000000000100120014860486000000000000000008888"
}

}

So ... You can try now without my fix. See if you're getting PD now. Remove the line i told you to add in network file then restart interface. If you're still able to access internet over ipv6 then good otherwise re-add the line.

Atleast we will know how it works.

Its working well with your line added. Will test removing it later

Because some ISP will provide only a prefix, for example my ISP is exactly doing the same as OP, which gives /56 prefix without address, so in this case WAN6 doesn't need an address, the most important thing: /56 prefix already there, and the /128 WAN address is just a by-product of using DHCPv6. In fact OP doesn't really need to add "ip6prefix" line in this case due to the presence of RA.