Community discussions

MikroTik App
 
ViennaAustria
just joined
Topic Author
Posts: 4
Joined: Fri Jan 18, 2013 12:58 pm

VRFs to transport PPP tunnels

Wed May 29, 2019 1:05 am

I have two Internet uplinks. One through ADSL and one through 3G/4G/LTE. I want to create one PPP tunnel to an external router over ADSL and another tunnel over 3G ... to the same external router = the same target IP address - but with different pathes/uplinks. Regular targed based routing doesn't help here. I need source routing, of course. That is: VRFs.

With Cisco iOS that isn't a big deal. I create one VRF for ADSL ("ip vrf adsl") with a default route to the ADSL modem ("ip route vrf adsl 0.0.0.0 0.0.0.0 10.0.0.138"), another VRF for 3G with another default route, put each of the tunnels in one VRF ("tunnel vrf adsl"), the corresponding interfaces to the modems, too, ("ip vrf forwarding adsl") and up they go. One tunnel via ADSL, one via 3G.

I try to replicate that on RouterOS. It began promising with
/ip route
add distance=1 gateway=10.0.0.138 routing-mark=ADSL
add distance=1 gateway=192.168.1.1 routing-mark=3G
/ip route rule
add src-address=10.0.0.0/24 table=ADSL
add src-address=192.168.1.0/24 table=3G
/ip route vrf
add interfaces=ADSL route-distinguisher=64515:4 routing-mark=ADSL
add interfaces=3G route-distinguisher=64515:5 routing-mark=3G
That gave me two seperate routing tables fo each interface/uplink. I can login via both external IP addresses and can sucsessfully ping out through either one of the lines.
[admin@MikroTik] > ping 1.1.1.1 count=2 src-address=10.0.0.1   
  SEQ HOST                                     SIZE TTL TIME  STATUS                                                                                            
    0 1.1.1.1                                    56  59 8ms  
    1 1.1.1.1                                    56  59 7ms  
    sent=2 received=2 packet-loss=0% min-rtt=7ms avg-rtt=7ms max-rtt=8ms 

[admin@MikroTik] > ping 1.1.1.1 count=2 src-address=192.168.1.2
  SEQ HOST                                     SIZE TTL TIME  STATUS                                                                                            
    0 1.1.1.1                                    56  58 29ms 
    1 1.1.1.1                                    56  58 25ms 
    sent=2 received=2 packet-loss=0% min-rtt=16ms avg-rtt=23ms max-rtt=30ms 
The latency tells me, which one uses ADSL (7-8ms) and which one 3G (25-29ms). Perfect!

But now I struggle, how to put a tunnel (PPtP Client) into a VRF. I tried to mark the packets/connections with incoming-/outgoing-filter in the PPP profiles to put them into the corresponding VRF. But obvoiusly that only plays in the IP filter and not in the mangle table. I read something about connecting the forward chain to some "ppp" chain, but failed to grasp, what I should do.

Please help! How can I put a tunnel into some VRF in RouterOS?

In Cisco terms: how to define the "Outer VRF" / "Front Door VRF" / FVRF of a tunnel? How to translate iOS "tunnel vrf adsl" to RouterOS?

Thank you!
 
tangram
Member Candidate
Member Candidate
Posts: 132
Joined: Wed Nov 16, 2016 9:55 pm

Re: VRFs to transport PPP tunnels

Wed May 29, 2019 5:37 pm

You set a script on ppp user's profile to assign the interface to the vrf when it comes up and remove it on down.
 
ViennaAustria
just joined
Topic Author
Posts: 4
Joined: Fri Jan 18, 2013 12:58 pm

Re: VRFs to transport PPP tunnels

Tue Jun 18, 2019 11:19 am

Thank you for your answer, but that is no solution for my problem. The "VRF thing" has to be up & running TO CONNECT the PP*P Tunnel. Not after.

I don't want to put the content of the tunnel into a VRF (Cisco "ip vrf..."). I want to put the tunnel itself into a VRF (Cisco "tunnel vrf..."). All "outer" tunnel packets going from the Mikrotik network stack to my PP*P server have to be assigned to the VRF. The content of the tunnel, however, can be in any/no VRF.
 
amirdeadline2
just joined
Posts: 4
Joined: Thu Jun 24, 2021 9:07 pm

Re: VRFs to transport PPP tunnels

Thu Jun 24, 2021 9:09 pm

HI everyone,
did anybody resolve this issue? I have the same problem.

Who is online

Users browsing this forum: No registered users and 11 guests