Community discussions

MikroTik App
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

VRF Route Leaking between VRF network and Main

Tue Mar 26, 2024 5:23 am

In Ros v7.14.1 Route leaking between VRF is so easy I just follow the Simple VRF Setup in the mikrotik documents and it works like a charm, however the docs never mentioned or give a snippet config on how to leak between the VRF network with the Main routing table on the Provider Router

https://help.mikrotik.com/docs/pages/vi ... uteleaking

I have 2 question I hope someone can chime and and shed some light on this please

a.) can route leaking between main and VRF network is possible?
b.) can this be done using plain routing rules without using mangle?

I've seen similar topic but it was an open ended discussion viewtopic.php?t=181982 and it's OLD the VRF implementation on v7.14.1 is much cleaner, thanks in advance
You do not have the required permissions to view the files attached to this post.
Last edited by loloski on Tue Mar 26, 2024 6:34 am, edited 1 time in total.
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main

Tue Mar 26, 2024 5:43 am

1.png
2.png
This is how far I go from R1 192.168.50.1 using this routing rules above I was able to reach 192.168.0.1 and 192.168.1.1 but not the whole subnet
I know I'm missing a routing entries for 192.168.50.0/24 subnet in both vrf_cusotmer_a and vrf_customer_b routing table to make this work I just don't know what I'm going to put in there, definitely i won't be able to reach 192.168.50.0/24 subnet on each VRF default gateway (192.168.114.2)
You do not have the required permissions to view the files attached to this post.
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main

Tue Mar 26, 2024 6:31 am

I now add a routing entries to each VRF that I think might solve the issue but still is not working, the C2 router can reach internet and VRF_CUSTOMER-A and VRF_CUSTOMER-B but not 192.168.50.0/24 subnet in the main routing table of the Provider Router
1.png
2.png
3.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main

Tue Mar 26, 2024 8:17 am

Hooraahh... i made it to work the routing entries for subnet 192.168.50.0/24 the gateway should be the ether4@main :)
1.png
You do not have the required permissions to view the files attached to this post.
 
vovan700i
newbie
Posts: 33
Joined: Wed Jun 06, 2012 8:34 am

Re: VRF Route Leaking between VRF network and Main

Tue Mar 26, 2024 4:49 pm

In Ros v7.14.1 Route leaking between VRF is so easy I just follow the Simple VRF Setup in the mikrotik documents and it works like a charm, however the docs never mentioned or give a snippet config on how to leak between the VRF network with the Main routing table on the Provider Router
I submitted a ticket and asked about leaking to/from main routing table (SUP-147161). Got a reply from Māris:
Currently it will not work, linux kernel does not allow to leak to main table directly.
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main

Tue Mar 26, 2024 6:18 pm

I don't think that's the case look carefully the VRF and the routing table of main evidently 192.168.50.0/24 on ether4 is on main routing table and it's working properly
1.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main

Tue Mar 26, 2024 7:01 pm

I slightly modify the topology and have a loopback address 10.0.0.1/32 on R1 so in theory I should be able to reach 192.168.50.1 and 10.0.0.1/32 from C1 and C2 if this this route leaking feature was really working as advertise
1.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main

Wed Mar 27, 2024 2:58 am

It seems the limitation is real you can't reach a subnet subnet if the flag is not "DAC" / directly connected even though it is reachable in Main Routing Table.
What a bummer, in other platform this is well supported I hope this limitation has a fix in sight :(, This is really unfortunate this will defeat the whole purpose of VRF at least in our use case
2.png
1.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main  [SOLVED]

Wed Mar 27, 2024 7:07 pm

I found a way through trial and error and I don't think i know enough how VRF works in MT in low level because there's no documentation at all just config snippets
1.png
You do not have the required permissions to view the files attached to this post.
 
wispmikrotik
Member Candidate
Member Candidate
Posts: 138
Joined: Tue Apr 25, 2017 10:43 am

Re: VRF Route Leaking between VRF network and Main

Thu Mar 28, 2024 9:38 am

Hi,

How do I solve it? Can you add the configuration you are working on?

Regards,
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main

Thu Mar 28, 2024 1:35 pm

I attach the config from "P - Router" to wrap your head around on it. a friendly tip read the routing table entries per VRF for you to grasp the concept, feel free to ask if you have question
You do not have the required permissions to view the files attached to this post.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: VRF Route Leaking between VRF network and Main

Thu Mar 28, 2024 3:26 pm

That setup may work for your needs, but it has its own limitations as described here:
https://help.mikrotik.com/docs/pages/vi ... uteleaking

It is not possible to leak "main" connected routes and be able to reach local addresses.
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main

Thu Mar 28, 2024 5:24 pm


It is not possible to leak "main" connected routes and be able to reach local addresses.
May i ask if it is fixable in the future or it is what it is?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: VRF Route Leaking between VRF network and Main

Fri Mar 29, 2024 12:21 pm

THere are possible workarounds that might be implemented in the future, but currently it is as it is.
 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main

Fri Mar 29, 2024 12:59 pm

Thanks I hope the workaround is soon to be implemented
 
emunt6
Member Candidate
Member Candidate
Posts: 103
Joined: Fri Feb 02, 2018 7:00 pm

Re: VRF Route Leaking between VRF network and Main

Fri Mar 29, 2024 4:25 pm

Workaround maybe using the MACVLAN interface (mode bridge), this will be the transit between in VRFs ( this solution is working under LINUX ).
MACVLAN interfaces (mode bridge) is directly connected in L2, so in L3 routes needed only.

Example:

/interface bridge
add name=brtransit protocol-mode=none


/interface macvlan
add interface=brtransit name=cust1tr1
add interface=brtransit name=cust1tr2
add interface=brtransit name=cust1tr3
/interface macvlan
add interface=brtransit name=cust2tr1
add interface=brtransit name=cust2tr2
add interface=brtransit name=cust2tr3
/interface macvlan
add interface=brtransit name=cust3tr1
add interface=brtransit name=cust3tr2
add interface=brtransit name=cust3tr3
...

/ip vrf
add name=cust1vrf interface=cust1tr1
/ip vrf
add name=cust2vrf interface=cust2tr1
/ip vrf
add name=cust3vrf interface=cust3tr1
...

 
User avatar
loloski
Member
Member
Topic Author
Posts: 351
Joined: Mon Mar 15, 2021 9:10 pm

Re: VRF Route Leaking between VRF network and Main

Sat Mar 30, 2024 3:55 pm

Will try that in the future

Who is online

Users browsing this forum: No registered users and 3 guests