Thank you - unfortunately the gateway is assigned by DHCP from the PPPoE and after speaking to the provider, the gateway changes periodically, so reluctant to hard code.
Maybe the only option is to have two MikroTik routers, each with a single PPPoE connection and default gateway. Then create an additional default route from the first router to the second with a higher “distance”?
Thank you, I will try this in the next maintenance window. So I replace “test2” with “pppoe-out1”, what is “test3” referencing?
I have included some more information below, when both WANs are PPPoE with the same provider and connect and obtain their static IP and routing information.
If both are enabled, only the primary interface appears functional, input or dst-nat to the secondary WAN does not work. Ping from the router itself to 8.8.8.8 works only IF the src-address is set to the secondary interface IP.
I do not need load balancing, only dst-nat to function inbound for both IPs, so I can spread inbound services across the two connections. Also if the connections could failover based on their distance - that would be great too, but I think that part works already - as I set the distance on the pppoe connection.
/interface print
Flags: D - dynamic, X - disabled, R - running, S - slave
# NAME TYPE ACTUAL-MTU L2MTU MAX-L2MTU MAC-ADDRESS
0 R ;;; WAN1
ether1 ether 1500 1598 8156
1 R ;;; WAN2
ether2 ether 1500 1598 8156
2 R ;;; LAN Trunk
ether3 ether 1500 1598 8156
3 ether4 ether 1500 1598 8156
4 ;;; Config
ether5 ether 1500 1598 8156
5 ether6 ether 1500 1598 8156
6 ether7 ether 1500 1598 8156
7 ether8 ether 1500 1598 8156
8 ether9 ether 1500 1598 8156
9 ether10 ether 1500 1598 8156
10 sfp1 ether 1500 1600 8158
11 R ;;; WAN1
pppoe-out1 pppoe-out 1492
12 R ;;; WAN2
pppoe-out2 pppoe-out 1492
13 R ;;; Main
vlan2 vlan 1500 1594
14 R ;;; Staff
vlan3 vlan 1500 1594
15 R ;;; Guest
vlan4 vlan 1500 1594
16 R ;;; Hosted
vlan5 vlan 1500 1594
/ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADS 0.0.0.0/0 62.3.80.17 1
1 DS 0.0.0.0/0 62.3.80.17 2
2 ADC 62.3.80.17/32 88.xxx.xxx.151 pppoe-out1 0
3 ADC 62.3.80.17/32 88.xxx.xxx.182 pppoe-out2 0
4 ADC 192.168.1.0/24 192.168.1.1 vlan3 0
5 ADC 192.168.2.0/24 192.168.2.1 vlan4 0
6 ADC 192.168.50.0/24 192.168.50.1 vlan2 0
7 ADC 192.168.70.0/24 192.168.70.1 vlan5 0
8 A S 192.168.71.0/24 192.168.70.10 1
9 DC 192.168.88.0/24 192.168.88.1 ether5 255
“test2” and “test3” are my interfaces. Unfortunately, this is most likely wrong. I still think that something can be done using route filters, but I’ll have to do few experiments to see if I can come up with working solution.
You can help by sharing your PPPoE config, specifically I’m looking for any hint why you have two routes for 62.3.80.17/32, but I get only one with two interfaces (I’m a little new to PPPoE):
Hi again, you caught me out that time, correct - when they match it shows as one line, I however doctored the “route print” to show with the same gateway, sometimes it comes up with different gateways for each, but often they are the same - just not that day.
If the gateways are the same or different it still will not work - despite all the mangles I have tried.
I don’t see a way how to do what I wanted to with route filters (it doesn’t necessarily mean that there isn’t one, I might have overlooked something). But if I understand it correctly, PPPoE should not care about gateways very much and should work with routes that have interface as gateway. I tried it with connections to router and it works:
I’ve already done this 100 times over, just to get a PING to the router from outside, it works only when one interface is enabled. I even forced all ICMP traffic to reply through the interface I was pinging, but when using the TORCH I could see it was replying out of the other interface. The only way I could get it to stick to the interface was make a route rule based on destination address.
It may be time to post your config (routes, firewall rules, …), because marking routing is something that usually works without any problem. You may have some tiny mistake somewhere…
And if you add what I wrote (routes and mangle rules), then what exactly happens? When you ping the router from internet (both addresses), do you see increasing counters on those rules?
Incoming connection from pppoe-outX gets marked with connection mark wanX
Outgoing packets with connection mark wanX get routing mark wanX
The only route from routing table wanX gets used
What could go wrong there? You can easily verify first two steps. There are counters and if you have doubts, you can enable logging for rules and make sure they really catch the right packets. And once the packet gets routing mark, it can’t choose wrong route, because there’s only one in given routing table, which points to right interface. I don’t have any explanation, except perhaps a typo in routing table name.
I know exactly what you mean, I have tried from scratch several times (by reverting to clean backup) but still no dice, I will try again soon when I am onsite - it is infuriating, and your help is greatly appreciated. Thank you
Try a different test, ping both public addresses from outside. Because when you initiate connection from router to internet, it won’t get marked, because first packet coming back won’t match connection-state=new.