Secondary WAN on LAN4 port

Hi,

Using TOS 6.1.0 here.

This is my current situation:

  1. primary WAN configured on eth2, VLAN 835 using pppoe (FTTH connection 1)
  2. secondary WAN configured on eth3 using DHCP (LTE connection using cdc_ether driver)

I’ve setup mwan3 for failover and everything is working as expected.

Now I’ve got an additional FTTH connection (FTTH connection 2) and I’d like to use it as secondary WAN in place of the LTE connection. I’d like to ask for help in configuring LAN4 to connect with VLAN 100 using pppoe (let’s forget about the mwan3 for now).

My understanding from:

is that to use LAN4 as a WAN port I should assign it in the switch to use one of the native SOC ports, while leaving the ports LAN0-3 to use the other one.

How do I check the current switch configuration?
Is the default configuration still as in the diagram in this post (port4 to port 6, in other words lan4 to eth0)?

I’ve removed lan4 from the br-bridge as indicated here:

But it seems there is still something I’m missing as ip link shows:

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1024
    link/ether d8:58:d7:00:8e:d9 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1508 qdisc mq state UP mode DEFAULT group default qlen 1024
    link/ether d8:58:d7:00:8e:d7 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1024
    link/ether d8:58:d7:00:8e:d8 brd ff:ff:ff:ff:ff:ff
5: lan0@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
    link/ether d8:58:d7:00:8e:d7 brd ff:ff:ff:ff:ff:ff
6: lan1@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
    link/ether d8:58:d7:00:8e:d7 brd ff:ff:ff:ff:ff:ff
7: lan2@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
    link/ether d8:58:d7:00:8e:d7 brd ff:ff:ff:ff:ff:ff
8: lan3@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
    link/ether d8:58:d7:00:8e:d7 brd ff:ff:ff:ff:ff:ff
9: lan4@eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether d8:58:d7:00:8e:d7 brd ff:ff:ff:ff:ff:ff
10: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/tunnel6 :: brd :: permaddr f669:cabb:315e::
11: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
12: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/gre 0.0.0.0 brd 0.0.0.0
13: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
14: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
15: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 0c:5b:8f:27:9a:64 brd ff:ff:ff:ff:ff:ff
16: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 04:f0:21:32:40:e9 brd ff:ff:ff:ff:ff:ff
20: br-guest_turris: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 06:f0:21:31:8f:4e brd ff:ff:ff:ff:ff:ff
22: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether d8:58:d7:00:8e:d7 brd ff:ff:ff:ff:ff:ff
24: eth2.835@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether d8:58:d7:00:8e:d8 brd ff:ff:ff:ff:ff:ff
26: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
    link/ether 04:f0:21:31:8f:4e brd ff:ff:ff:ff:ff:ff
29: guest_turris_1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-guest_turris state UP mode DEFAULT group default qlen 1000
    link/ether 06:f0:21:31:8f:4e brd ff:ff:ff:ff:ff:ff permaddr 04:f0:21:31:8f:4e
30: pppoe-wan: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 3
    link/ppp 
34: tun_turris: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 500
    link/none

In particular, does the lan4@eth1 mean that the lan4 port is connected to eth1 (port 4 with port 5 of the switch)? How do I configure the switch to connect lan4 to eth0 (port 4 with port 6 of the switch)?

Thanks in advance.

P.S.: of course I’ve tried setting up a VLAN device eth1.100 and a new WANB interface with PPPoE, but that doesn’t work. To me, the issue is that LAN4 is connected to eth1 in the switch, along with the other LAN0-3 ports, while it should be connected to eth0.

2 Likes

Basically you are doing it wrong. You should not assing other ethX interfaces than eth2 as it is WAN. If you want to use some LAN port as another WAN interface then take it out of the br-lan in luci and use appropriate lanX interface because with introduction of DSA (Distributed Switch Architecture) your lan ports behave as separate interfaces.

So for example use lan4.100 as your second WAN but be sure to take it out of br-lan to not make a loop in the network.

Also your ip link command is correct. There is still problem with multi interface switches with DSA driver in OpenWRT and for now all lan ports use the same ethX interface untill its fixed. And no you cannot assing lan ports to some specific eth interface. For now they all use one eth1 interface.

1 Like

Thank a lot! That was what I was missing. It is working now!

For those with multiple wans: remember to set defaultroute '0' on secondary wan in order to avoid default route conflicts. The routes are setup by mwan3:
https://wiki.turris.cz/doc/en/howto/multiwan#setting_up_routing_and_firewall

Thanks for the additional insight!

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