您的解决方案在mangle
设置中 - 使用以下行添加 mangle 操作:
/ip firewall mangle
add action=mark-connection chain=input comment=WAN1 in-interface=\
pppoe-Wan1 new-connection-mark=MWAN1
add action=mark-routing chain=output connection-mark=MWAN1 new-routing-mark=\
RWAN1 passthrough=no
add action=mark-connection chain=forward comment=WAN1PF connection-state=new \
in-interface=pppoe-Wan1 new-connection-mark=PFMWAN1
add action=mark-routing chain=prerouting connection-mark=PFMWAN1 \
in-interface=ehter3 new-routing-mark=RWAN1
add action=mark-connection chain=input comment=WAN2 in-interface=pppoe-WAN2 \
new-connection-mark=MWAN2
add action=mark-routing chain=output connection-mark=MWAN2 new-routing-mark=\
RWAN2 passthrough=no
add action=mark-connection chain=forward comment=WAN2PF connection-state=new \
in-interface=pppoe-WAN2 new-connection-mark=PFMWAN2
add action=mark-routing chain=prerouting connection-mark=PFMWAN2 \
in-interface=ehter3 new-routing-mark=RWAN2
然后在设置中添加此路由route
:
/ip route
add distance=1 gateway=pppoe-WAN2 routing-mark=RWAN2
add distance=1 gateway=pppoe-WAN1 routing-mark=RWAN1