Convert LAN to WAN port for mwan3

I just picked up another internet connection at home, I was wondering if I could load-balance the two using gl-ar300m router. It has one WAN port and one LAN port. Both my WAN connections use PPPoE authentication.
My initial search led me to mwan3 package which does the same, however I’m having hard time on how to configure it, more specifically how to configure LAN port as another WAN. Openwrt guide on mwan3 mentions a switch option under network in openwrt which I’m not seeing here.

Is there any beginner friendly guide or tutorials available on how can I configure it? Any helpful pointers appreciated :slight_smile:

I am not sure if this is advisable because you will lose access to your device in case of a configuration mismatch or if there's no WiFi.

1 Like

Have a look at vlan configuration.

As @ahmar16 mentioned, if you convert your only LAN to WAN you would risk locking yourself out of something happens to the WiFi.

A work around world be to use a switch to increase the number of ports you have, but that would make your setup a lot more complicated.

A simpler solution would be to use a USB to Ethernet adapter as a second WAN.

How fast are your Internet connections?

1 Like

Then you can configure the lan interface as pppoe and secondary as static for emergency login.

I am not sure about the ar300m, but it could either have one eth interface split with switch in two physical ports or two eth interfaces each for one physical port.
What is the output of uci export network ?

here is the uci export network output

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd5a:35a1:9a77::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option hostname 'GL-AR300M-5ad'
	option ipaddr '192.168.8.1'

config device 'lan_dev'
	option name 'eth1'
	option macaddr 'e4:95:6e:44:85:ad'

config interface 'wan'
	option ifname 'eth0'
	option hostname 'GL-AR300M-5ad'
	option metric '10'
	option proto 'pppoe'
	option disabled '0'
	option peerdns '1'
	option username '1010649053'
	option password '8447099966'

config interface 'wan6'
	option ifname 'eth0'
	option proto 'dhcpv6'
	option disabled '1'

config interface 'guest'
	option ifname 'guest'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.9.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wwan'
	option proto 'dhcp'
	option metric '20'
	option auto '0'

Yeah, i guess you guys are correct when you I can get locked out if something goes wrong with wireless but I'm not too worried about it, its just home connection and with me constantly around (thx to corona), I can just hard reset the router in such a case. Router has only 1 usb port which i need for a usb stick, so usb2ethernet is no go. Connections are 50mbps and 25mbps.

Usbhub

Keep the SSID to lan interface, add a rule to accept incoming ssh from failover interface, configure wan2 and use mwan3.

@trendy hey i configured the /etc/config/network like you suggested as below:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd5a:35a1:9a77::/48'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option force_link '1'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option hostname 'GL-AR300M-5ad'
	option ipaddr '192.168.8.1'

config interface 'wan'
	option ifname 'eth0'
	option hostname 'GL-AR300M-5ad'
	option metric '10'
	option proto 'pppoe'
	option disabled '0'
	option peerdns '1'
	option username '1010649053'
	option password '8447099966'

config interface 'wan2'
	option ifname 'eth1'
	option proto 'pppoe'
	option hostname 'GL-AR300M-5ad'
	option metric '20'
	option peerdns '1'
	option disabled '0'
	option macaddr 'C8:3A:35:0B:2E:01'
	option username 'r7f_407'
	option password '123456'

config interface 'wan6'
	option ifname 'eth0'
	option proto 'dhcpv6'
	option disabled '1'

config interface 'guest'
	option ifname 'guest'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.9.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

```
config interface 'failover'
	option ifname 'eth1'
	option proto 'static'
	option netmask '255.255.255.0'
	option hostname 'GL-AR300M-5ad'
	option ipaddr '192.168.80.1'

config interface 'wwan'
	option proto 'dhcp'
	option metric '20'
	option auto '0'

I added the newly created wan2 interface in mwan3 and added it in members and policy as well. It shows both wan online in mwan3 status. However, it still only uses wan for connecting to internet. Also to troubleshoot, I tried disabling then first wan interface, then i'm unable to connect to internet. Although i can do ping openwrt.org via diagnostics. Not sure what I'm doing wrong. Also I added a line in config to override the mac as my old router mac as mac binding is done by ISP.

Edit your post above and remove the username/pass from the pppoe, in case you have not altered them.

Second, have you added wan2 in wan firewall zone? Otherwise traffic will not be allowed from lan to wan2 interface, nor will be NATed.

1 Like

Thanks so much, it finally works.

1 Like

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