Create second WAN port using vLAN on Openwrt 22.03 IPQ40XX using DSA

Hello,
I'm trying to convert a LAN port to WAN one on Asus RT AC 58U

I already can
1.Remove Port 4 from lan bridge
2. Create vlan4.2 on Lan 4
3. Creat second WAN using vlan4.2
But still no connection.

config device
        option type '8021q'
        option ifname 'lan4'
        option vid '2'
        option name 'lan4.2'

config interface 'WAN2'
        option proto 'pppoe'
        option device 'lan4.2'
        option username 'dhiwhrv'
        option password '123456'
        option ipv6 '0'
        option peerdns '0'
        list dns '8.8.8.8'
        option metric '20'
        option auto '0''

Please help!

Thank you

Messing around abit I could change the config like below and it worked for few hours only. devices connected to LAN ports lost internet but wifi connected devices worked fine.

config device
        option type 'bridge'
        option name 'Br-wan2'
        list ports 'eth0'
        list ports 'lan4'
        option macaddr '10:7B:44:57:14:4D'

config bridge-vlan
        option device 'Br-wan2'
        option vlan '1'
        list ports 'eth0:t'
        list ports 'lan4'

config device
        option type 'bridge'
        option name 'Br-lan1'
        list ports 'eth0'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        option macaddr '10:7B:44:57:14:4C'
        option mtu '1500'

config bridge-vlan
        option device 'Br-lan1'
        option vlan '2'
        list ports 'eth0:t'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'

Hello
Which device ?

Don't use eth0 in bridge
Why don't you simply assign lan1/2/3 to bridge and lan4 to WAN ? Without any use of vlan.

You are doing things randomly and incorrectly. You are working with DSA, and the available interfaces are lan1, lan2, lan3, lan4, and wan. They are virtual interfaces created on top of eth0. Work with them and leave eth0 be.

Simply remove list ports 'lan4' from the default br-lan, and use it directly:

config interface 'WAN2'
        option proto 'pppoe'
        option device 'lan4.2'
        option username 'dhiwhrv'
        option password '123456'
        option ipv6 '0'
        option peerdns '0'
        list dns '8.8.8.8'
        option metric '20'

Your configurations did not work because of a redundant apostrophe.

Thanks for replying

I did try this way as also mentioned in mwan3's instruction. It didnot work. The apostrope was a t ypo mistake when I tried to post here.
I could not understand why I got the WAN connection with the bridge of eth0 and lan4 and vlan filtering. But after awhile, devices connected through lan 1, lan2, and lan 3 lost internet but all wifi connected devices were not.

The router is ASUS RT-AC1300UHP( AC58U with 256 MB of RAM)

Thanks for replying
the device is ASUS RT-AC58U.
I did try both options which were through Vlan on lan 4 and direct lan 4 but no connection.

config the same on WRT-1900AC I have the same problem. Lan ports dont have internet while wi-fi have. Below is the config

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

config device
	option type '8021q'
	option ifname 'lan1'
	option vid '1'
	option name 'lan1.1'
config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.100.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan1'
	option device 'wan'
	option proto 'pppoe'
	option username 'xxxxx'
	option password '123456'
	option ipv6 '0'
	option peerdns '0'
	list dns '8.8.8.8'
	option metric '10'

config interface 'WAN2'
	option proto 'pppoe'
	option device 'lan1'
	option username 'xxxxx'
	option password '123456'
	option ipv6 '0'
	option peerdns '0'
	list dns '8.8.8.8'
	option metric '20'
	option auto '0'

Thanks