Community discussions

 
ali777
just joined
Topic Author
Posts: 16
Joined: Mon Jun 27, 2016 2:44 pm

Static Route Metric Logic Problem (in case of using PPPOE and PPTP connection concurrently)

Wed Sep 13, 2017 12:02 pm

Hello,
maybe consider it crazy question, but actually it was strength for me, But here is my issue:
let's think that you have one router board that you connected it to internet using pppoe connection.
then you enable check-box for "Add Default Route" on the pppoe client.
So this rule is created on ip > route as bellow:
0.0.0.0   [Remote-PPPOE-Gateway]  Metric=0
This is fine and then you have access to internet. but after that you will setup a PPTP Vpn connection on this device too.
If the enable "add default route" in your pptp client too. maybe your access to internet is completely lost. because of the new route that I think have overlapped with the last one:
0.0.0.0   [Remote-PPTP-Gateway]  Metric=0
In fact it seems the PPPOE default 0.0.0.0 route change color to blue that it means it is disabled now.
also you can have both access to internet and your vpn, if you don't enable check-box for "add default route" (on pptp vpn client) in your router board device. and add the remote subnet as static route as the bellow: (consider 192.168.200.0/24 is subnet of remote lan and your lan subnet is 192.168.0.0/24)
192.168.200.0/24   [PPTP-VPN-Client-As-Gateway]  Metric=1
That's all. and all the things works fine. you also earn your result completely. when you trace route 4.2.2.4 you will see the packet goes out through PPPOE Gateway and when trace route 192.168.200.x you will see it goes trough PPTP Gateway. But the just thing that seems strengh issue is about Mikrotik route list logic.
in fact i think the "Metric" is considered as main criteria for setting priority of route list.
so now we have one general rule in route list for 0.0.0.0 taht guide eveything through your PPPOE gateway. but why the 192.168.200.0/24 does not included in really?
in fact you have two rule like bellow in your route list:
0.0.0.0                    [PPPOE-Gateway]                       Metric=0
192.168.200.0/24   [PPTP-VPN-Client-As-Gateway]                  Metric=1
it can be conclude that trace route of 192.168.200.0/24 with higher metric should be affected by the PPPOE Default route with lower metric. but actually it doesn't.
I was wondering if anybody can correct my issue or my thinking about this that why it happens such this.
Thanks in advance

Footnote: i know it can be possible to use mangle for this with routng-mark and separate routing table completely but instead of that, using just one main-routing-table with above configuration is much preferred with lower resource usage.
I'm Proud of my country. IRAN
 
User avatar
nickshore
Member
Member
Posts: 473
Joined: Thu Mar 03, 2005 4:14 pm
Location: Suffolk, UK.
Contact:

Re: Static Route Metric Logic Problem (in case of using PPPOE and PPTP connection concurrently)  [SOLVED]

Wed Sep 13, 2017 3:13 pm

The route selected is first decided based on the smallest subnet mask which matches.

Only if 2 identical routes are available is the metric used.

Nick
Nick Shore MTCNA MTCWE MTCRE MTCINE MTCTCE
LinITX.com - MultiThread Consultants
Get your MikroTik RBs and Training: http://linitx.com/brand/mikrotik
Official UK MikroTik Distributor
IRC chan: #routerboard on irc.z.je (IPv4 and IPv6)
 
ali777
just joined
Topic Author
Posts: 16
Joined: Mon Jun 27, 2016 2:44 pm

Re: Static Route Metric Logic Problem (in case of using PPPOE and PPTP connection concurrently)

Wed Sep 13, 2017 7:54 pm

The route selected is first decided based on the smallest subnet mask which matches.

Only if 2 identical routes are available is the metric used.

Nick
Nick, You are a herro! Thanks for letting my thought put on the right way. that was really deadly logic challenge if I can't find any answer. :)
Again Thanks for your reply and your answer. It seems to be completely reasonable.
I'm Proud of my country. IRAN

Who is online

Users browsing this forum: MSN [Bot] and 133 guests