L2TP Client

I’m from China, so the description of the problem is not very detailed ! sorry


If I have many PPPoE links, can I specify which use PPPoE line for all data of L2TP client?

for example:
l2tp-out2 --》 pppoe-out1
l2tp-out4 --》 pppoe-out2
l2tp.png

use
default route distance 1 , 2, 3, 4, 5 etc

pppoe1 route distance=1
pppoe2 route distance=2
pppoe3 route distance=3
。。。。。。
l2tp-out1 route distance=1
l2tp-out2 route distance=2
l2tp-out3 route distance=3
Did you mean this?
I tested this way,it doesn’t work。

The function of Distance should be that when there is no Routing Table, data can be accessed according to the shortest route。

Could you write a configuration if it’s convenient ?
Thank you so much!

If the bandwidth of each pppoe is limited, when the VPN can only go out through the default route, I think it can only solve the problem I am encountering now through load balancing.

Finally, I hope that the official can achieve this functional requirement through a simpler way! For example, you can specify which vpn goes out from which pppoe。

How are these things related?


Not directly, you have to use policy routing (multiple routing tables chosen using different some criteria than dst-address). If the addresses assigned to the PPPoE client interfaces are static, you can tell the L2TP client interfaces to use these addresses; if not, you need to use auxiliary IP addresses as a linking element the following way:

Only necessary in RouterOS 7:
/routing table
add name=via-pppoe-out1 fib
add name=via-pppoe-out2 fib

/ip route
add gateway=pppoe-out1 routing-mark=via-pppoe-out1
add gateway=pppoe-out1 routing-mark=via-pppoe-out2

Only necessary if PPPoE client addresses are not static:
/interface bridge add name=br-aux
/ip address
add address=10.20.30.1/32 interface=br-aux
add address=10.20.30.2/32 interface=br-aux

Only necessary if PPPoE client addresses are not static and masquerade is not already present in some other form:
/interface list add name=all-pppoe
/ip firewall nat add chain=srcnat action=masquerade out-interface-list=all-pppoe

If PPPoE client addresses are static, use them instead of 10.20.30.x in the following:
/ip route rule
add src-address=10.20.30.1 action=lookup-only-in-table table=via-pppoe-out1
add src-address=10.20.30.2 action=lookup-only-in-table table=via-pppoe-out2
/interface l2tp
set l2tp-out2 src-address=10.20.30.1
set l2tp-out4 src-address=10.20.30.2

The suggestion with distances seems to come from a total misunderstanding of how distance works.

Good day. I think you should use the default distance of the route, it will be the correct solution (example - from 1 to 5).