how to access into 2 isp services seperately using one ether ?

hi every one
please need your help with very very thankful to you
suppose you have routerboard mikrotik with 3 ethers
the ether 1 connected with isp internet service called skynet
the ether 2 connected with isp internet service called sparknet
the ether 3 workes as pppoe server …til now the idea is very clear
if i log in with pppoe server by using account lets say = abc@skynet ( with ip pool = 10.10.10.x ). .then the internet comes from skynet completely separated from sparknet
if i log in with pppoe server by using account lets say= abc@sparknet ( with ip pool = 20.20.20.x ) ..then the internet comes from sparknet completely separated from skynet
which settings i have to do in/
ip firewall nat
ip firewall mangle
ip routes
anyone can help me with very very thankful

note / see down the image explain my idea

Search here for explanation of policy routing, one article is this one, many others exist.

But for this simple case it is enough to use /ip route rule and as a bonus you won’t lose fasttrack capability which doesn’t make friends with mangling.

/ip route
add address=0.0.0.0/0 gateway=pppoe-out-skynet routing-mark=skynet
add address=0.0.0.0/0 gateway=pppoe-out-sparknet routing-mark=sparknet

/ip route rule
add src-address=10.10.10.0/24 action=lookup-only-in-table table=skynet
add src-address=20.20.20.0/24 action=lookup-only-in-table table=sparknet

/ip firewall nat
add action=masquerade out-interface=pppoe-out-skynet
add action=masquerade out-interface=pppoe-out-sparknet

If you want to provide DNS or NTP service to the clients on that very Mikrotik, place one more /ip route rule before the two above:

add dst-address=your.tik.address.which.you.set.as.remote.in.ppp.profile action=lookup-only-in-table table=main

thank you very very much :smiley: :smiley: