How to implement dual-stack (PPPoE IPv4/IPv6) on openwrt

hey guys,I want to implement ipv4 dhcp & ipv6 pppoe on my openwrt,How can I modify /etc/config/network.Which option is more in line with the standards, the first one or the second one.Thanks for your reply!!!

root@OpenWrt:~# cat /etc/config/network

config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'

config interface 'wan6'
option proto 'pppoe'
option ifname 'eth0.2'
option keepalive '0'
option ipv6 '1'
option username 'qwert12345'
option password 'qwert12345'

config interface 'pppwan6'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option ifname 'eth0.2'

root@OpenWrt:~# cat /etc/config/network

config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'

config interface 'wan6'
option proto 'pppoe'
option ifname 'eth0.2'
option keepalive '0'
option ipv6 '1'
option username 'qwert12345'
option password 'qwert12345'

config interface 'pppwan6'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option ifname '@wan6'

config interface 'wan'
option ifname 'eth0.2'
option proto 'pppoe'
option ipv6 '1'
option username 'qwert12345'
option password 'qwert12345'

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

Option ipv6 1 will cause the ppp script to instantate and configure a wan_6 interface of proto dhcpv6 inside the tunnel (if the ISP advertises v6 support during ppp negotiation). This works with most ISPs. In that case, do not configure a wan6 separately.

Substantial gain in performance is possible if you can configure your modem / ONT to terminate ppp inside the modem and send IP to the router. There is no hardware ppp acceleration in OpenWrt and running ppp in the kernel uses quite a bit of CPU time.

Thanks. It was late and edited on mobil....

Yea then option IPv6 1 should be removed

I use explicit wan6 to configure prefix size an such.

Is pppoe still a hardware issue ?!

Even my archer c7 was able to easily do it for 100 Mbit. Nowadays I use x86 so I have no clue about hardware limitations...

I run an mt7621 (dual core 880mhz) based router. It copes just fine with PPPoE on my 900Mb fibre connection. It does need hardware flow offloading enabled to handle the WAN-LAN throughput though.