Different gateway for two PPPoE server instance

I want to use different gateways for my two instance of PPPoE server. I try many tutorials available in Internet but still all the traffic is going through first Gateway only. I am using 2 different /20 pools for those PPPoE servers.

I want to route traffic from PPPoE server 1 to interface 172.16.11.89/24 and PPPoE server 2 to interface 172.16.10.89/24

Any updates ? I am waiting for help from experts

You practically did not provide any detailed description, data, or export of the configuration, just for example

Nobody is interested in being a detective, with dozens of questions before being told anything useful.

No answer to your question? How to write posts

I want to route traffic from PPPoE server 1 to interface 172.16.11.89/24 and PPPoE server 2 to interface 172.16.10.89/24

Hope the image and the above description is enough understanding the question.

The problem is, whatever I do, all the traffic is going through the first interface (172.16.10.89/24). I can’t route the traffic through the second interface.

/export hide-sensitive file=anynameyouwish

The attachment have all the details. Waiting for expert advice.
file_config.rsc (1.82 KB)

You need to create a separate profile per PPPoE Server with a unique gateway in the “local address” field. After that PPPoE Client behind each PPPoE Server will get unique gateway and can talk to each other without going to layer 2.

Details here

Thankyou for your reply, But my requirement is something different.

I want to route two instances of PPPoE server into two upstream providers. At present, I can’t do it. All traffic are going through first upstream provider only. Hope the attached file help you further to understand my requirement.

Paste this on terminal and use this as start point. I hope I’ve wroted it correctly.
Each line is a failover for the other, if for some reason one of the two ISP go down.

/ip route
add check-gateway=ping distance=10 gateway=172.16.4.1 routing-mark=PPPoE1
add check-gateway=ping distance=20 gateway=172.16.4.9 routing-mark=PPPoE1
add check-gateway=ping distance=20 gateway=172.16.4.1 routing-mark=PPPoE2
add check-gateway=ping distance=10 gateway=172.16.4.9 routing-mark=PPPoE2
add check-gateway=ping distance=10 gateway=172.16.4.1
add check-gateway=ping distance=20 gateway=172.16.4.9
/ip route rule
add action=lookup-only-in-table src-address=100.64.64.0/21 table=PPPoE1
add action=lookup-only-in-table dst-address=100.64.64.0/21 table=PPPoE1
add action=lookup-only-in-table src-address=100.64.72.0/21 table=PPPoE2
add action=lookup-only-in-table dst-address=100.64.72.0/21 table=PPPoE2

I do not see any firewall rules, is a test or you are kidding?

Thanks for your reply. Can you do one more thing for me.

I do not want to failover. First upstream provider is fully loaded (1G). So I want to route second instance of PPPoE to another upstream provider. I do not want to failover.

I can’t set routing mark in mangle or it’s not properly working. Please post proper mangle rule also

I do not see any firewall rules, is a test or you are kidding?

It’s a heavily edited version. I delete all those lines I think unnecessary for public view.

The routing is routing and the mangling is mangling.
The “mangling” is moved on proper place, the routes rules

/ip route
add check-gateway=ping distance=10 gateway=172.16.4.1
add check-gateway=ping distance=10 gateway=172.16.4.1 routing-mark=PPPoE1
add check-gateway=ping distance=10 gateway=172.16.4.9 routing-mark=PPPoE2
/ip route rule
add action=lookup-only-in-table src-address=100.64.64.0/21 table=PPPoE1
add action=lookup-only-in-table dst-address=100.64.64.0/21 table=PPPoE1
add action=lookup-only-in-table src-address=100.64.72.0/21 table=PPPoE2
add action=lookup-only-in-table dst-address=100.64.72.0/21 table=PPPoE2

Without mangle how can I do Routing-Mark like here

/ip route
add check-gateway=ping distance=10 gateway=172.16.4.1 routing-mark=PPPoE1

??? is the same line on the script on previous post… ???

For simplicity, I configure another Mikrotik and not working. If I disable rule and remove it in route I can ping. Please help

/ip address> print
103.x.x.x/29    103.x.x.0     ether1                                                                       
103.y.y.y/29    103.y.y.0     ether2                                                                       
192.168.1.1/24  192.168.1.0   ether6
192.168.2.1/24  192.168.2.0   ether7

/ip firewall nat> print
chain=srcnat action=src-nat to-addresses=103.x.x.x src-address=192.168.1.0/24 out-interface=ether1 log=no log-prefix="" 
chain=srcnat action=src-nat to-addresses=103.y.y.y src-address=192.168.2.0/24 out-interface=ether2 log=no log-prefix=""

/ip route> print
dst-address=0.0.0.0/0 gateway=103.x.x.x gateway-status=103.x.x.x reachable via  ether1 distance=1 scope=30 target-scope=10 routing-mark=route1 
dst-address=0.0.0.0/0 gateway=103.y.y.y gateway-status=103.y.y.y reachable via  ether2 distance=1 scope=30 target-scope=10 routing-mark=route2 
dst-address=0.0.0.0/0 gateway=103.x.x.x gateway-status=103.x.x.x reachable via  ether1 distance=1 scope=30 target-scope=10 

/ip route rule> print detail
src-address=192.168.1.0/24 action=lookup-only-in-table table=route1 
src-address=192.168.2.0/24 action=lookup-only-in-table table=route2 
dst-address=192.168.1.0/24 action=lookup-only-in-table table=route1 
dst-address=192.168.2.0/24 action=lookup-only-in-table table=route2