Community discussions

MikroTik App
 
anishpsla
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Mon Aug 25, 2014 9:16 am

Different gateway for two PPPoE server instance

Sat Jul 17, 2021 5:55 pm

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.

Image

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
 
anishpsla
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Mon Aug 25, 2014 9:16 am

Re: Different gateway for two PPPoE server instance

Tue Jul 20, 2021 5:37 pm

Any updates ? I am waiting for help from experts
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Different gateway for two PPPoE server instance

Tue Jul 20, 2021 5:51 pm

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
 
anishpsla
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Mon Aug 25, 2014 9:16 am

Re: Different gateway for two PPPoE server instance

Tue Jul 20, 2021 9:33 pm

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.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Different gateway for two PPPoE server instance

Tue Jul 20, 2021 10:33 pm

/export hide-sensitive file=anynameyouwish
 
anishpsla
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Mon Aug 25, 2014 9:16 am

Re: Different gateway for two PPPoE server instance

Sat Jul 24, 2021 4:03 pm

The attachment have all the details. Waiting for expert advice.
You do not have the required permissions to view the files attached to this post.
 
DarkNate
Forum Veteran
Forum Veteran
Posts: 997
Joined: Fri Jun 26, 2020 4:37 pm

Re: Different gateway for two PPPoE server instance

Sat Jul 24, 2021 4:46 pm

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
 
anishpsla
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Mon Aug 25, 2014 9:16 am

Re: Different gateway for two PPPoE server instance

Sun Jul 25, 2021 7:44 am

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.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Different gateway for two PPPoE server instance

Sun Jul 25, 2021 10:05 am

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?
 
anishpsla
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Mon Aug 25, 2014 9:16 am

Re: Different gateway for two PPPoE server instance

Mon Jul 26, 2021 7:36 pm

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.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Different gateway for two PPPoE server instance

Mon Jul 26, 2021 7:49 pm

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
 
anishpsla
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Mon Aug 25, 2014 9:16 am

Re: Different gateway for two PPPoE server instance

Mon Jul 26, 2021 8:12 pm

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
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Different gateway for two PPPoE server instance

Mon Jul 26, 2021 8:21 pm

??? is the same line on the script on previous post... ???
 
anishpsla
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Mon Aug 25, 2014 9:16 am

Re: Different gateway for two PPPoE server instance

Tue Sep 21, 2021 5:25 pm

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

Who is online

Users browsing this forum: johnson73, miks and 80 guests