IPv6 for secondary OpenWrt router?

My home network includes two routers:

  • ISP router with PPPoE as primary. It has IPv6. Its IPv4 network is 192.168.100.1/24.
  • OpenWrt router as secondary, connecting to the first one via WAN. Trying to make IPv6 working but not successful.

Here is the IPv6-related config of the primary router:

The secondary successfully got IPv6 in its WAN6, but not LAN:

7: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 20:76:03:50:3b:09 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.43/24 brd 192.168.100.255 scope global wan
       valid_lft forever preferred_lft forever
    inet6 fd00:db80::2276:3ff:fe50:3b09/64 scope global dynamic noprefixroute 
       valid_lft 17956sec preferred_lft 17956sec
    inet6 2405:xxxx:c76d:d730:2276:3ff:fe50:3b09/64 scope global dynamic noprefixroute 
       valid_lft 11569sec preferred_lft 11569sec
    inet6 fd00:db80::2/128 scope global dynamic noprefixroute 
       valid_lft 11562sec preferred_lft 11562sec
    inet6 2405:xxxx:c76d:d730::2/128 scope global dynamic noprefixroute 
       valid_lft 11562sec preferred_lft 11562sec
    inet6 fddc:7b3b:fc6:1::1/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::2276:3ff:fe50:3b09/64 scope link 
       valid_lft forever preferred_lft forever
10: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 20:76:03:50:3b:07 brd ff:ff:ff:ff:ff:ff
    inet 192.168.17.1/24 brd 192.168.17.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fddc:7b3b:fc6::1/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::2276:3ff:fe50:3b07/64 scope link 
       valid_lft forever preferred_lft forever

Other PC connecting to the secondary router don’t get IPv6. If connecting directly to the primary one, I can get IPv6.

Secondary router’s output of uci export network:

package 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 packet_steering '1'
option ula_prefix 'fddc:7b3b:0fc6::/48'

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

config interface 'lan'
option device 'br-lan'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.17.1'
option ip6assign '64'

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

config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
option reqaddress 'try'
option ip6assign '64'
option sourcefilter '0'
option reqprefix 'auto'

Please guide me how to configure the secondary router to get IPv6 working.

Is your OpenWrt an actual router or just a dump access point?
Because either you need to follow different config steps.

It is actual router:

Remove that on the wan6 interface reboot and show:

ifstatus wan6

That should show if you have got a Prefix delegated by the primary router, if not you have to use relayd

1 Like

Hi, I deleted the two options, rebooted. Here is the output of ifstatus:

{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 65,
	"l3_device": "wan",
	"proto": "dhcpv6",
	"device": "wan",
	"updated": [
		"addresses",
		"routes",
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [

	],
	"ipv6-address": [
		{
			"address": "2405:xxxx:c76d:d730::2",
			"mask": 128,
			"preferred": 14754,
			"valid": 14754
		},
		{
			"address": "fd00:db80::2",
			"mask": 128,
			"preferred": 14754,
			"valid": 17925
		},
		{
			"address": "2405:xxxx:c76d:d730:2276:3ff:fe50:3b09",
			"mask": 64,
			"preferred": 14754,
			"valid": 14754
		},
		{
			"address": "fd00:db80::2276:3ff:fe50:3b09",
			"mask": 64,
			"preferred": 17923,
			"valid": 17923
		}
	],
	"ipv6-prefix": [

	],
	"ipv6-prefix-assignment": [

	],
	"route": [
		{
			"target": "2405:xxxx:c76d:d730::",
			"mask": 64,
			"nexthop": "::",
			"metric": 256,
			"valid": 14754,
			"source": "::/0"
		},
		{
			"target": "fd00:db80::",
			"mask": 64,
			"nexthop": "::",
			"metric": 256,
			"valid": 17923,
			"source": "::/0"
		},
		{
			"target": "2405:xxxx:c76d:d730::",
			"mask": 60,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "2405:xxxx:c76d:d730:2276:3ff:fe50:3b09/64"
		},
		{
			"target": "2405:xxxx:c76d:d730::",
			"mask": 60,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "fd00:db80::2276:3ff:fe50:3b09/64"
		},
		{
			"target": "2405:xxxx:c76d:d730::",
			"mask": 60,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "2405:xxxx:c76d:d730::2/128"
		},
		{
			"target": "2405:xxxx:c76d:d730::",
			"mask": 60,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "fd00:db80::2/128"
		},
		{
			"target": "fd00:db80::",
			"mask": 48,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "2405:xxxx:c76d:d730:2276:3ff:fe50:3b09/64"
		},
		{
			"target": "fd00:db80::",
			"mask": 48,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "fd00:db80::2276:3ff:fe50:3b09/64"
		},
		{
			"target": "fd00:db80::",
			"mask": 48,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "2405:xxxx:c76d:d730::2/128"
		},
		{
			"target": "fd00:db80::",
			"mask": 48,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "fd00:db80::2/128"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "2405:xxxx:c76d:d730:2276:3ff:fe50:3b09/64"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "fd00:db80::2276:3ff:fe50:3b09/64"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "2405:xxxx:c76d:d730::2/128"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::5e18:ddff:fe13:e090",
			"metric": 512,
			"valid": 833,
			"source": "fd00:db80::2/128"
		}
	],
	"dns-server": [
		"fd00:db80::1"
	],
	"dns-search": [

	],
	"neighbors": [

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

		],
		"ipv6-address": [

		],
		"route": [

		],
		"dns-server": [

		],
		"dns-search": [

		],
		"neighbors": [

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

What does WAN show?

Here is the primary router WAN config:

What options are under "IPv6 Address Mode"?

Also "IPv6 PD Mode"?

Usually you need DHCPv6 for Prefix Delegation.

Hi, other values:

You must use DHCPv6 to receive a Prefix Delegation (needed for public prefixes to be distributed downstream automatically via the OpenWrt).

1 Like

Hi, I changed the primary router WAN to DHCPv6:

The PC in secondary router's LAN still don't get IPv6 yet.

Please help.

You did not get PD from the provider. Only a single 64.

Go to the wan6 config and set the requested prefix size. Test with 56 and 60. In that order...