How to obtain WAN_6 virtual dynamic interface IPv6-PD

Open the WAN interface to obtain the IPv6 function. After PPPoE dialing, a WAN_6 virtual dynamic interface (DHCPv6 client) will be generated. Ifconfig -a cannot see the interface, how can uci or shell obtain the IPv6-PD parameters of the interface?

on /etc/config/network's config interface wan, option ipv6 'auto' will make wan_6 automatically be created. Or use '1' to set wan6 manually.

More details on

1 Like

Now it’s not the problem of interface settings, but how to get the WAN_6 interface automatically generate the future IPv6-PD parameter values through commands or scripts

Ah got it, sorry.

By default it will receive PD and attribute IPv6 addresses to devices on the LAN.

reqprefix allows for the router to "hint" the prefix size to upstream router, but this doesn't force it to follow this hint. Unless there's something wrong or that u wanna make different, no config is needed.

Thank you for your reply. The DDNS service on the router can only submit its own interface such as WAN LAN or a script to submit the public network IPv6 to the DDNS server. But the service I want to publish is on other machines, so I want to combine this IPv6 through a script, such as: IPv6- PD + *** So I need to know IPv6-PD. It is also a good way to get the IPv6 of br-lan, but is there a better way? Does the router provide direct access like uci get?

I don't understand it. If u wanna use DDNS service, u don't need PD, u need the IPv6 address.

To get PD, use ifstatus <IPv6 interface>, it will print in json format some info regarding that interface. "ipv6-address" has its address info and "ipv6-prefix" has the PD.


The ifstatus wan_6 command will produce a JSON dump of all interface parameters, IPv6-PD ones among them. You can then use jshn, jsonfilter, /lib/functions/ or grep/sed/awk to extract the desired information.


Thanks, ifstatus this command is exactly what I need

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.