MWAN3 over a VLAN?

Hi,

I wish to use MWAN3 to load balance two WAN connections, this seems fairly easy to achieve. The problem is the cable runs in my house; I only have one ethernet cable. The location of the providers supplied router/modems and the WRT1900ACS are distant with only the one cable between them(this is from the days when I only had the one WAN connection).

My investigation has led me to believe(possibly wrongly) that with a router by the modems I should be able to make use of VLAN's to make this work but cant work out how to achieve this. Any pointers?

Thanks Mat.

  • Several things stop me running another cable including solid walls, plastering, redecorating and my partner.
  • I'm currently using a TP-Link TL-R470T+ v6 but as all traffic comes from one router I cant do anything smart.
  • I've had some luck in "accessing" the TP-Link and as its OpenWRT underneath I have made it more suitable for my needs, I could move the DHCP server to it and have the WRT1900ACS become an access point, but I would rather the WRT be the main device.

With OpenWrt it is easy to have multiple wan interfaces over the same cable with the help of vlans. And since mwan3 will use the uci name of the interface, it will be totally transparent.
The problem is on the other side. Modems with stock firmware rarely support vlans. The best solution is to buy an inexpensive managed switch to separate the wan trunk into 2 access ports, each for every modem.

Thanks Trendy, This is were I'm stuck, probably as I don't fully understand VLAN's. So:

  1. On switch by modems, I put both WAN ports in separate VLAN's and a third port(connected to the OpenWRT device) in both VLAN's? All data travels via the one cable but with VLAN ID's.
  2. I'm not sure what to do on the OpenWRT device. I assume I need to do something with the VLAN's to split these back into seperate VLAN's, I assume I use the same VLAN's ID's from the switch and put the one LAN in both?

If someone could provide a basic example I could, hopefully, work it out.

Thanks.

Yes, the correct terms are access (or untagged belongin to one vlan) ports towards the modems and trunk (tagged with both vlans), but you got the idea.

If the physical wan interface is eth1, then you can create vlans 10 and 20 by declaring the physical interface of wan as eth1.10 and wan2 as eth1.20 .

So:

I set the sending side setup putting the two modems ports into seperate VLAN's(10 & 20) and a third port(going to the OpenWRT device) in both VLANS's 10 & 20.

In OpenWRT* I add 2 new VLAN's(10 & 20) but not sure on the port setup. I should have all ports but the one from the other switch set to off, and on this other port both ports set to tagged(as I wont let me have them as untagged). I have two CPU's in the OpenWRT device my assumption is that as long as they are tagged in one of them it makes no difference as long as I use the correct one when I create the new interface.

Thanks again.

*LinkySys WRT1900ACS running 19.07.3

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have

uci export network

Sorry for the delay. My first attempt at this "broke the internet" which I now understand to be a cardinal sin, well according to my teenage children. After finding some time when I would not be a "sinner" I have found that only one of the VLAN's works at a time. The one that works is the one that I specify the PVID, on the switch near the modems, for the port that is connecting the two routers(trunk?). To me this means that either

  • The main router running OpenWRT is not correctly tagging the outgoing messages OR
  • The switch near the modems does not understand tagged packets and I must set a PVID.

The current setup is:

  • Port 4 on the switch(by modems ) port 4 is connected to the OpenWRT device.
  • Modem 1(BT) - Connected to switch(by modems) port 2 on VLAN 30. (Works if PVID of port 4 set to 30)
  • Modem 2(VF) - Connected to switch(by modems) port 3 on VLAN 55. (Works if PVID of port 4 set to 55)
  • If PVID of port 4 of switch(by modems) is set to nothing then nothing works.

Hopefully, I have a setting wrong and not a rubbish switch. Setting follow in the next 2 messages.

These are the settings from the OpenWRT device(Linksys WRT1900ACS)

package network

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 'fd78:ae13:ac11::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth1.2'
        option proto 'dhcp'
        option metric '10'

config interface 'wan6'
        option ifname 'eth1.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '5t 2 1 0'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '6t 4'
        option vid '2'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '55'
        option ports '5t 6t 3t'

config switch_vlan
        option device 'switch0'
        option vlan '4'
        option vid '30'
        option ports '5t 6t 3t'

config interface 'BT'
        option proto 'dhcp'
        option ifname 'eth1.30'
        option metric '30'

config interface 'VodaFone'
        option ifname 'eth1.55'
        option proto 'dhcp'
        option metric '40'

The settings from the switch by the router(TP-Link TL-R470T+). This device uses OpenWRT although hidden well in the web interface they've made no such effort in SSH. It is running Barrier Breaker 14.07, although I'm sure it has some customisation's.

package network

config interface_mode 'global'
option switch_enable '1'
option singlewan '0'
option lan_device 'eth0'
option wan_device 'eth0'
option wan_ifname 'eth0.336|eth0.2988|eth0.1988|eth0.2445'
option lan_ifname 'eth0.436|eth0.436|eth0.436|eth0.436'
option wanmode '1'

config t_has_switch 'switch'
option lan_ports_value '2 3 4 5|3 4 5|4 5|5'
option wan_ports_value '1|1 2|1 2 3|1 2 3 4'
option lan_cpu_port '6'
option wan_cpu_port '6'
option wan_vlan_id '336|2988|1988|2445'
option lan_vlan_id '436|436|436|436'

config interface 'wan1_eth'
option t_type 'physical'
option t_name 'wan1_eth'
option t_issys '1'
option t_reference '0'
option proto 'dhcp'
option dbroadcast '1'
option reqopts '33 121 249'
option uplink '100000'
option downlink '100000'
option macaddr 'B0:95:75:7D:EB:00'
option t_factory_mac 'B0:95:75:7D:EB:00'
option ifname 'eth0.336'

config interface 'pseudo_wan1_eth'
option proto 'none'
option parent 'wan1_eth'
option ipaddr '168.254.83.253'
option netmask '255.255.255.255'

config interface 'wan1_poe'
option t_bindif 'eth0'
option metric '0'
option t_name 'wan1_poe'
option lcpechofailure '5'
option auto '0'
option peerdns '1'
option t_linktype 'auto'
option t_reference '0'
option mru '1492'
option t_type 'pppoe'
option lcpechointerval '10'
option t_issys '0'
option t_poe_enable '0'
option parent 'wan1_eth'
option uplink '100000'
option downlink '100000'

config interface 'wan2_eth'
option t_type 'physical'
option t_name 'wan2_eth'
option t_issys '1'
option t_reference '0'
option dbroadcast '1'
option reqopts '33 121 249'
option uplink '100000'
option downlink '100000'
option macaddr 'B0:95:75:7D:EB:01'
option t_factory_mac 'B0:95:75:7D:EB:01'
option proto 'none'

config interface 'pseudo_wan2_eth'
option proto 'none'
option parent 'wan2_eth'
option ipaddr '168.254.83.253'
option netmask '255.255.255.255'

config interface 'wan2_poe'
option t_bindif 'eth0'
option metric '0'
option t_name 'wan2_poe'
option lcpechofailure '5'
option auto '0'
option peerdns '1'
option t_linktype 'auto'
option t_reference '0'
option mru '1492'
option t_type 'pppoe'
option lcpechointerval '10'
option t_issys '0'
option t_poe_enable '0'
option parent 'wan2_eth'
option uplink '100000'
option downlink '100000'

config interface 'wan3_eth'
option t_type 'physical'
option t_name 'wan3_eth'
option t_issys '1'
option t_reference '0'
option proto 'none'
option dbroadcast '1'
option reqopts '33 121 249'
option uplink '100000'
option downlink '100000'
option macaddr 'B0:95:75:7D:EB:02'
option t_factory_mac 'B0:95:75:7D:EB:02'

config interface 'pseudo_wan3_eth'
option proto 'none'
option parent 'wan3_eth'
option ipaddr '168.254.83.253'
option netmask '255.255.255.255'

config interface 'wan3_poe'
option t_bindif 'eth0'
option metric '0'
option t_name 'wan3_poe'
option lcpechofailure '5'
option auto '0'
option peerdns '1'
option t_linktype 'auto'
option t_reference '0'
option mru '1492'
option t_type 'pppoe'
option lcpechointerval '10'
option t_issys '0'
option t_poe_enable '0'
option parent 'wan3_eth'
option uplink '100000'
option downlink '100000'

config interface 'wan4_eth'
option t_type 'physical'
option t_name 'wan4_eth'
option t_issys '1'
option t_reference '0'
option proto 'none'
option dbroadcast '1'
option reqopts '33 121 249'
option uplink '100000'
option downlink '100000'
option macaddr 'B0:95:75:7D:EB:03'
option t_factory_mac 'B0:95:75:7D:EB:03'

config interface 'pseudo_wan4_eth'
option proto 'none'
option parent 'wan4_eth'
option ipaddr '168.254.83.253'
option netmask '255.255.255.255'

config interface 'wan4_poe'
option t_bindif 'eth0'
option metric '0'
option t_name 'wan4_poe'
option lcpechofailure '5'
option auto '0'
option peerdns '1'
option t_linktype 'auto'
option t_reference '0'
option mru '1492'
option t_type 'pppoe'
option lcpechointerval '10'
option t_issys '0'
option t_poe_enable '0'
option parent 'wan4_eth'
option uplink '100000'
option downlink '100000'

config interface 'lan'
option t_type 'physical'
option t_name 'lan'
option t_issys '1'
option t_reference '0'
option proto 'static'
option type 'bridge'
option netmask '255.255.255.0'
option macaddr 'B0:95:75:7D:EA:FF'
option t_factory_mac 'B0:95:75:7D:EA:FF'
option ipaddr '192.168.10.1'
option igmp_snooping '0'
option ifname 'eth0.436'
option manage_vid '436'

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

The configuration of the 1900 looks correct to me. On the 470 I don't see any vlans 30 or 55. So I am not sure it works as trunk properly.

A quick look shows the VLAN configuration is in a different file /etc/config/vlan. Following is the output of "uci export vlan"

package vlan

config switch 'switch0'
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'
	option port_map '6 0 1 2 3 4'

config switch_port 'port0'
	option port '0'
	option device 'switch0'
	option type 'general'
	option logical '1'
	option pvid '336'
	option tag '1'

config switch_port 'port1'
	option port '1'
	option device 'switch0'
	option type 'general'
	option logical '2'
	option pvid '30'
	option tag '1'

config switch_port 'port2'
	option port '2'
	option device 'switch0'
	option type 'general'
	option logical '3'
	option tag '1'
	option pvid '55'

config switch_port 'port3'
	option port '3'
	option device 'switch0'
	option type 'general'
	option logical '4'
	option tag '1'
	option pvid '30'

config switch_port 'port4'
	option port '4'
	option device 'switch0'
	option type 'general'
	option logical '5'
	option pvid '436'
	option tag '1'

config switch_port 'port6'
	option port '6'
	option device 'switch0'
	option type 'trunk'
	option tag 't'
	option pvid '436'

config switch_vlan 'vlan0'
	option vlan '0'
	option name 'vlan0'
	option users 'system'

config switch_vlan 'vlan436'
	option device 'switch0'
	option vlan '436'
	option mod 'iptv'
	option users 'lan'
	option ports '4 6t'
	option name 'LAN Access'

config switch_vlan 'vlan336'
	option device 'switch0'
	option vlan '336'
	option ports '0 6t'
	option users 'wan'
	option name 'Unused'
	option desc 'Unusable Port 1 as WAN only'

config switch_vlan 'vlan30'
	option device 'switch0'
	option vlan '30'
	option name 'BT'
	option users 'web'
	option ports '1 3t 6t'

config switch_vlan 'vlan55'
	option device 'switch0'
	option vlan '55'
	option name 'VodaFone'
	option users 'web'
	option ports '2 3t 6t'

Thanks.

TL-R470T is a load balancer by design. I am not sure if what you are trying to do does indeed work, nor am I aware of the different options found in the configuration above.
Since it is not official OpenWrt it is out of scope for this forum. You'll have better chances asking in TP-Link support.

Thanks Trendy. I had started to come to that conclusion myself. I've ordered a Netgear GS305E which states that it supports IEEE 802.1Q VLAN Tagging. I'm hopeful this will work? Or do I need port trunking capability?

Thanks Again.

That is more appropriate. Trunking is to pass multiple vlan tagged frames over the same port. Port trunking in the data sheet of the switch is the link aggregation, which is not necessary in your case.

1 Like