Full MikroTik MTCRE - Recursive Routing (Easy Automatic failover)

Hello and welcome to another video! Today we will be looking at what Recursive routing is, what Route Scopes allow us to achieve and how to implement Recursive routing for failover purposes on a MikroTik device with multiple WAN connections.
Timestamps:
📕00:00 - Introduction
📕00:40 - Recursive Routing theory
📕04:40 - Routing Scopes
📕07:35 - Recursive Route Config
Support the Channel:
⭐Become a Patreon: / thenetworkberg
⭐Become a KZread Member: / @thenetworkberg
Social Media:
🌏 / thenetworkberg
🌏 / bergnetwork
🌏 / the-network-berg-39451...
MTCRE Playlist:
• Free MTCRE RoSv6
MTCNA Playlist:
• Free MTCNA RoSv6
Credits:
Intro Footage:
Cyberpunk 2077
Thumbnail: Created on Canva
Intro: Created on Canva
Intro & Outro Music by Alumo
Songs used:
Dioitic
Outland 85
Thanks again for watching

Пікірлер: 106

  • @TheNetworkBerg
    @TheNetworkBerg2 жыл бұрын

    Reference Material: wiki.mikrotik.com/wiki/Manual:IP/Route help.mikrotik.com/docs/pages/viewpage.action?pageId=26476608#:~:text=Recursive%20routing%20occurs%20when%20a,different%20values%20of%20routing%2Dmark.

  • @shalak001

    @shalak001

    Жыл бұрын

    Hi! Great wideo! However, I'm trying to understand two things - the official tutorial adds 4 default routes, you're only adding 2 - why? Also - the tutorial adds mangling and routing tables - what's up with that?

  • @crash939burn

    @crash939burn

    Ай бұрын

    hi,excellent video! ive done this before & it works great. But how do i create the exact same but with one issue being that the one isp router sends a dhcp ip and the 2nd isp router can be dhcp ip or static? Problem is that i cannot manual set isp 1 ip as it changes each time

  • @javiervaldeschavez4805
    @javiervaldeschavez48052 жыл бұрын

    Magic! Thanks a lot brother, I this helped me a lot. Great demonstration!

  • @mostafavii
    @mostafavii4 ай бұрын

    The best video on the internet for recursive routing details ;)

  • 2 жыл бұрын

    Fantastic explanation, thanks man.

  • @atroxes
    @atroxes2 жыл бұрын

    Great video and explanation!

  • @royalsingh
    @royalsingh Жыл бұрын

    Beautifully explained, loved it.

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    Thanks a lot 😊

  • @romanmikhalev3518
    @romanmikhalev35182 жыл бұрын

    You are the best! Thank you!

  • @nicoladellino8124
    @nicoladellino81242 жыл бұрын

    Very nice video, TNX.

  • @gammerhub5039
    @gammerhub50392 жыл бұрын

    Very informative. Thank you!

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    You're welcome!

  • @aaronglowacki5992
    @aaronglowacki59922 жыл бұрын

    This channel rocks!

  • @franciscopena1140
    @franciscopena1140 Жыл бұрын

    Thanks, it helped me a lot

  • @survivingnetworkingandit2084
    @survivingnetworkingandit20842 жыл бұрын

    Interesting. Thanks for this.

  • @Anavllama
    @Anavllama2 жыл бұрын

    In a failover scenario (vice load balancing) its more common to just do recursive on the first route. If the first one is not available then the second route will be used regardless. In this case often folks make two recursive routes for the primary in the case where we go one step further, what if one of the DNS services is down.

  • @jasonvanwyngaard4387
    @jasonvanwyngaard43872 жыл бұрын

    another great video, thank you.

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    Glad you enjoyed it

  • @adriano_saraiva
    @adriano_saraiva Жыл бұрын

    Thanks for share!

  • @wiebehageman3864
    @wiebehageman38642 жыл бұрын

    Thank you very much for all the good and nice video's. It is an excellent refresh of the MT courses (MTCRE,MCTINE). Not sure of it is in scope but could you do one with PIM SM together with ospf/bgp routing ? Very populair item with all IPTV setups knowadays. Thx !!!

  • @marjoni
    @marjoni Жыл бұрын

    MikroTik MTCRE - Recursive Routing (Easy Automatic failover even for directly connected networks!) interesting discussion that is kept true, have a nice day

  • @PinoyTechTutorials
    @PinoyTechTutorials2 жыл бұрын

    Freakin awesome! thanks alot sir!

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    You're welcome :D!

  • @comayo07
    @comayo07 Жыл бұрын

    thank you

  • @thefixitgal
    @thefixitgal2 жыл бұрын

    YES!!!!! Thank you

  • @itzizag2280
    @itzizag22802 жыл бұрын

    Thanks A LOT LOT LOT

  • @drumaddict89
    @drumaddict892 жыл бұрын

    thank you. so. much!

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    You're welcome!

  • @randominternet5586
    @randominternet55862 жыл бұрын

    Wahoo - this is exactly something I want to do. I'm on RoS 7.X (because the new device shipped with that).

  • @gilbertpinamang1650

    @gilbertpinamang1650

    Жыл бұрын

    If that is gonna be a headache for you it will be better if you downgrade to another version of routeros

  • @matthewmanuel1003
    @matthewmanuel10032 жыл бұрын

    I've been watching so much about your mikrotik lessons and i learned alot from it i wanna say thank you for the effort that you put in teaching these videos but can i ask if you could make a video about gaming prioritization?

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    Hi Matthew, thank you for watching the channel. What type of prioritization are you interested in? Would you like to know how to setup queues to dedicate bandwidth to certain games so that they take priority over all other traffic?

  • @matthewmanuel1003

    @matthewmanuel1003

    2 жыл бұрын

    @@TheNetworkBerg i wanna know more about fasttrack and simple queue setup or maybe separate gaming and browsing

  • @travelnengineer

    @travelnengineer

    2 жыл бұрын

    @@TheNetworkBerg i saw a lesson about these gaming priority in my language but its too vague on explaining things just a step by step, would like learn on how we separate bandwidths for gaming and streaming and achieve a steady ping when gaming tnx 👍👍👍

  • @ACannaos
    @ACannaos2 жыл бұрын

    Hi, can you adapt this tutorial using ROS 7 and also using lte as one of the connection ? By the way thank you for your remarkable work !

  • @roberttan9438
    @roberttan9438 Жыл бұрын

    Hi sir, Thanks for letting us know about this, its so help me a lot, hope you don't mind, i am applying this for Mikrotik CCR2116 but it coudn't run, hopeyou can help me. Thanks a lot

  • @talharafique8913
    @talharafique8913Ай бұрын

    great information and technique, well is there a way we can make logs when WAN1 goes down and goes Up ? so to check later on and to diagnose??

  • @gigatt3079
    @gigatt30792 жыл бұрын

    Hey Berg, nice video and explanation. Do you mind using RouterOS v7.x, in this newer versions, you need to change target scope also, in order for this to continue working. Otherwise, a horrible headache will appear.

  • @wyrddoke

    @wyrddoke

    Жыл бұрын

    Agreed, good video,. To add a bit more explanation - v7 requires scope to be less than (v6 allowed equal to as well) target scope in order to do the next hop lookup. So, when you want to resolve the recursive default route, you need to make sure your target scope is higher than the scope (default is 10 for connected routes) in order for the next hop interface to be used in that lookup. So, increasing the target scope to a value higher than 10 will make the recursive route possible. This will also result in more routes used as recursive routes. Decreasing the Scope value will also work and make the route more likely to be used as the recursive route. by the way Berg, stop with the American rout and pronounce it properly - root

  • @jamesugbojoide1229
    @jamesugbojoide12292 жыл бұрын

    Thanks, network berg for your immense contribution to networking. I have this error from my Mikrotik router port interface below. I have bought the original cable and changed from auto-negotiation to 100mbps speed. This effort did not resolve the issue, kindly advise. Thanks ether2- SECTOR2 RADIO fcs error on link

  • @muhamadkhalaf6556
    @muhamadkhalaf6556 Жыл бұрын

    Thank you so on this way no need i think to add dns because it already added on router for each ISP is it ok ? or i should add dns on ip/dns add dns

  • @latostime9849
    @latostime9849 Жыл бұрын

    But how to apply this if the ISP1 is just giving intermittent connection? The link is up, Internet is online, it just that intermittent with ping reply and timed out, not a total link failure. Can this also do the trick ? I understand that this setup is only for ISP1 with link / interface down or offline.

  • @krishnamurthynalli7047
    @krishnamurthynalli70472 жыл бұрын

    Hai, I am new to Mikrotik, my isp providing bandwidth by using RouterBOARD 3011UiAS as main server using port 4 and for failover connected ccr1009 to port 5(RouterBOARD 3011UiAS) when main server input goes down i have to manually change route to ccr1009, is their any way for auto failover, and i am using hotspot logins for 70 customers. I hope you understand my question. both lines from same isp

  • @javiermacias5299
    @javiermacias52992 жыл бұрын

    Thank you for the video, explanation is great. Is there a way to send a notification via email when one route is down? this is because it could be a remote site and this way you know one internet service is down. thanks again for the video.

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    Yeah you can setup a script or netwatch event to send you an email if one route goes down.

  • @SrikantaDas
    @SrikantaDas2 жыл бұрын

    make a video of this based on ros 7.x. thanks

  • @edwardkwadjokubi8182
    @edwardkwadjokubi81829 ай бұрын

    plz what topology are u using for the lab

  • @nielsvdeng6276
    @nielsvdeng62762 жыл бұрын

    This is very informative. I use this mechanism for a while now. In combination with netwatch it is even more powerfull. But.. with Ros 7.x it doesn't seem to work this way. Maybe you can make a video of this based on ros 7.x. thanx. I like your video's a lot.

  • @brandonprice9986

    @brandonprice9986

    2 жыл бұрын

    I second the request for a ROS 7.x update! Great video

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    I will see if I can also get a RoSv7 video in conjunction with this one. I want to do RoSv7 separately and when there is a long-term release out for it since MikroTik is still making MANY tuning changes with each stable release. This guide on the new help wiki is based off of v7 if you want to give it a read(Same reference I pasted in the pinned comment) help.mikrotik.com/docs/pages/viewpage.action?pageId=26476608#:~:text=Recursive%20routing%20occurs%20when%20a,different%20values%20of%20routing%2Dmark

  • @DimitriPappas

    @DimitriPappas

    2 жыл бұрын

    @@TheNetworkBerg Small favour, please show a traceroute not just a ping in the next video, just so we can see the path taken (whether the recursive gateway shows up in the traceroute or if it shows the actual gateway)

  • @Kiwel_Eduardo

    @Kiwel_Eduardo

    2 жыл бұрын

    For ros 7.x. just change Target Scope to "11" on each default route.

  • @safiullah5953
    @safiullah59539 ай бұрын

    Sir i want some infromation please make video in multiple recursive if WAN1 fail to shift WAN2 automatically if there is no internet also in WAN2 then all traffic should be move to WAN3 please make video on this setting thank you

  • @mukto2004
    @mukto20043 ай бұрын

    How can we do netwatch in this scenario? If primary down send notifications

  • @oscarcam9804
    @oscarcam9804 Жыл бұрын

    is posible use recursive routes with vrf?

  • @martinmcnamee4362
    @martinmcnamee43622 жыл бұрын

    This is awesome. Thank you. Just a question, how could you implement an email notification to advise ISP1 connection is down?

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    Yep, should be doable using a netwatch script to send out an email if the ISP1 connection drops.

  • @martinmcnamee4362

    @martinmcnamee4362

    2 жыл бұрын

    @@TheNetworkBerg That's what i was thinking although I think it wpuld rock if netwatch could monitor physical interfaces. Such as ether1 or 2. In this case would you just monitor the Quad 8? I guess if you main connection has a static ip you could monitor that....

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    Yeah Martin, I also very much wish you could monitor interface statuses with Netwatch. An alternative would be to just setup a script with the scheduler that you can run at X internvals to check the status of an interface and then use the email tool to send out a notification if an interface status is down. This requires a bit more tweaking and knowhow of the MikroTik scripting language, though I am sure a script like that exists already somewhere on the MikroTik forums. I am planning to someday go more into MikroTik scripting and add videos on it on the channel since I find it to be very useful.

  • @martinmcnamee4362

    @martinmcnamee4362

    2 жыл бұрын

    @@TheNetworkBerg Thats awesome! Will also have a look around for similar scripts - Your videos are amazing and your content is just what we need, reminds me of KZreadrs like NetworkChuck and David Bombal.... Keep it Going!!!

  • @shalak001

    @shalak001

    Жыл бұрын

    I would suggest setting up external syslog server and perform automation over there. That way you can do a lot more than a simple email.

  • @Wooldorf
    @Wooldorf Жыл бұрын

    not working with V 7.2.3 (mmips) - its that possible to recursive routing on V 7.2.3 (mmips) ?

  • @usmansaleem9569
    @usmansaleem95692 жыл бұрын

    Sir please Make a Video On Mikrotik Hotspot Social Login Facebook

  • @carlb641
    @carlb6412 жыл бұрын

    My recursive route does not seem to work , not sure what I am doing wrong lol. Immediate gateway just says unknown instead of recursive.

  • @jameshld1
    @jameshld1 Жыл бұрын

    Tested and fail over to backup link works perfect only once the primary link came back online, I have to ask clients to restart their routers.any hack for this?

  • @kirksteinklauber260
    @kirksteinklauber26010 ай бұрын

    Excellent video but I am having problems trying to replicate this configuration when the default route is given to me via DHCP server. My fear is if I force to put static route ignoring the DHCP Server's input the ISP changes the IP pool and default gateway my remote site will be isolated. I was thinking more to have the DHCP to assign the default gateway and increase the distance and apply this configuration but the routing table displays unknown immediate gateway

  • @TheNetworkBerg

    @TheNetworkBerg

    10 ай бұрын

    Are you using v7? If yes, recursive routes operate a lot differently, for dynamic connections that uses stuff like DHCP or PPPoE I would recommend rather implementing PCC (Mikrotik made a video on this recently) It's more used for load balance, but can function for failover as well. And works best with a dynamic solution where IPs may change.

  • @kirksteinklauber260

    @kirksteinklauber260

    10 ай бұрын

    @@TheNetworkBerg Yes v7 and will check your PCC video!

  • @hdmessias
    @hdmessias Жыл бұрын

    Hello Sir. I saw this video, excellent, congrats, however like others said in the comments, my ISPs are using DHCP, so my problem is to make the recursive using DHCP instead. So, have you tried implementing recursive routing using DHCP for the wan? And on my scenario, the secondary wan connection is an LTE. Thanks.

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    For your scenario you should look at PCC, it effectively works as loadbalancing, will try to make a video on it as well

  • @hdmessias

    @hdmessias

    Жыл бұрын

    @@TheNetworkBerg thanks, I will take a look at the PCC. However, if you could create a video for that it would be great. Cheers!

  • @gilbertpinamang1650

    @gilbertpinamang1650

    Жыл бұрын

    Doing recursive route with DHCP is possible all you have to do is go to DHCP client click on the + sign, choose the right interface for your WAN connection and at ADD DEFAULT ROUTE you choose NO. By default it is at YES. This will enable you to assign the route manually and help you change the scope.

  • @shalak001

    @shalak001

    Жыл бұрын

    @@gilbertpinamang1650 how about if we set the default route distance to e.g. 10 and configure gateways not as IP addresses, but as interface names? It seems to work correctly that way, but I'm wondering if I'm missing something.

  • @sushilshukla6636
    @sushilshukla6636Ай бұрын

    Once primary link comes up, router is not sending traffic on it. Link gets down, untill we remove cable of second ISP. Please suggest....

  • @ethanervin2816
    @ethanervin28162 жыл бұрын

    Is it possible to implement this with a dual dhcp wan setup that is doing load balancing? It would be nice to be able to monitor up status for both ISP's (and drop one if it is down) while still allowing for the load balancing to occur.

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    Hi Ethan, if your WAN connections are via DHCP then I would recommend rather implementing PCC. It incorporates firewall mangle rules with packet marking to achieve loadbalancing and failover. Unfortunately I do not have a video on the channel showing how to implement PCC, but following the MikroTik guide should also help you with setting this up. wiki.mikrotik.com/wiki/Manual:PCC

  • @ethanervin2816

    @ethanervin2816

    2 жыл бұрын

    I’ll do some reading and give it a go. Thanks for the advice and keep up the good work.

  • @ChrisNicholson

    @ChrisNicholson

    2 жыл бұрын

    @@TheNetworkBerg How about picking up the DHCP GATEWAY from the client. Then using a script in the DHCP-Client to update the route's gateway?

  • @hdmessias

    @hdmessias

    Жыл бұрын

    Hello Ethan, I have the same problem here, both ISPs are dhcp and one of then is LTE actually. Did you manage this problem? If yes, can you share the solution? Thanks.

  • @xuxamelo
    @xuxamelo Жыл бұрын

    That only works for v6, for v7+ target scope must be bigger than scope. Here is a Recusrive Routing + Failover very weel explained as well: kzread.info/dash/bejne/l4ih0qR6cbrFoLQ.html Nice work anyways, I love your channel! Awesome backgrounds :)

  • @mailsidney
    @mailsidneyАй бұрын

    Does this work on v7.11? I just tried this and doesn't seem to work.

  • @GabrielBascoJesseHugo
    @GabrielBascoJesseHugo Жыл бұрын

    It seems that the route to the IP check has to be done through an IP address, it cant be an PPPOE interface. Is it possible to use a PPPOE interface?

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    For PPPOE connections I would rather recommend PCC, I still need to make a video on this but there are other videos about it on KZread already and the MT docs does a good job explaining it as well

  • @GabrielBascoJesseHugo

    @GabrielBascoJesseHugo

    Жыл бұрын

    @@TheNetworkBerg Yep, I have used PCC before and I guess in cases of PPPOE interfaces is what I will use. But your video helps in other scenarios.

  • @hourashrezaei2660
    @hourashrezaei26609 ай бұрын

    I have been using the recursive routes for most of the mikrotik routers i have used in the last years but the recursive routing will not work on RB4011. Any suggestions?

  • @TheNetworkBerg

    @TheNetworkBerg

    9 ай бұрын

    Don't have an rb4011 to test with but should still work, which version of ros are you using?

  • @hourashrezaei2660

    @hourashrezaei2660

    9 ай бұрын

    Version 7.6

  • @vx9
    @vx92 жыл бұрын

    Mikrotik Policy Routing Based on Client IP Address on ROSv7. please

  • @nikolashuminosky6987
    @nikolashuminosky69872 жыл бұрын

    Hi Network Berg, im not sure why , but in v7 scope/target scope are calculated differently. If you do same thing in v7, that will not work

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    Will check out recursive routing in v7 and make a video about it too. Might also be one more of those features just do not work correctly currently in v7 which might be a good reason to wait for a long-term release before covering this or upgrading anything to v7.

  • @nikolashuminosky6987

    @nikolashuminosky6987

    2 жыл бұрын

    @@TheNetworkBerg there is new calculation **v7 - Target scope must be bigger than scope

  • @Kiwel_Eduardo

    @Kiwel_Eduardo

    2 жыл бұрын

    For ros 7.x. just change Target Scope to "11" on each default route.

  • @ameador01
    @ameador012 жыл бұрын

    I am getting so frustrated with this! I have tried to do this many times now, but it doesn't work. Both of my ISPs use DHCP. I try to use ports where you us IPs (other than the 8.8.8.8 and 1.1.1.1) - but my primary connection always fails. Secondary seems to work. I never get the status showing 'recursive by x' under the Gateway column under the Route List. The reference you gave for the link to Mikrotik's steps to setup recursive routing doesn't work - maybe an earlier ROS? I have ROS 6.48.6. Mine will not let me use cli to configure /routing/table (the second set of steps). Plus, the steps/method are very different than how you do it. Your way seems simpler and more modern approach. Does this not work with some ISP's? I am using Starlink in bypass mode as my primary and a cellular AT&T connection as my secondary. I cannot find anyone with any instructions how to setup this recursive routing where their ISPs are giving their internal router IPs via DHCP - which is the most common way it is done... Pulling my hair out :(

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    Hi Andrew, sorry to hear about the frustrations. The reference material I linked is actually for RoSv7 although there are more tweaks you need to do regarding the scope to get things working. If you don't mind could you upload your config to pastepin/google drive with sensitive information hashed out and send me a link on Discord? (Probably better than adding the URL here) You can join the discord server here: discord.gg/JZA7vFTF82

  • @bgut999
    @bgut999 Жыл бұрын

    everything is ok when you use ip addresses for gateways. but i had rule set not by ip addrress but by interface. and recursive routing is not working that way. why??? normal routing works ok when you use interfaces even simple fail over works but not recursive.

  • @michaelcadelina1786
    @michaelcadelina17862 жыл бұрын

    How bout if I have 3 ISPs or more sir?

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    You could just add a third publicly accessible route out and make that recursive. Just don't forget to update the scope

  • @user-xp6ix5ev9p

    @user-xp6ix5ev9p

    2 жыл бұрын

    Or do I understand this step, because I have more than 8 service providers

  • @madan817
    @madan8179 ай бұрын

    port forward not working the mathrd

  • @kresimirpecar4925
    @kresimirpecar49252 жыл бұрын

    What's next ?

  • @TheNetworkBerg

    @TheNetworkBerg

    2 жыл бұрын

    Most likely TTL & ECMP will be covered next in the series :)

  • @user-xp6ix5ev9p
    @user-xp6ix5ev9p2 жыл бұрын

    Or do I understand this step, because I have more than 8 service providers

  • @wleedalshawsh9838
    @wleedalshawsh9838 Жыл бұрын

    if your video translation to arabic. it would be beautiful

  • @valentinvalentin7602
    @valentinvalentin7602 Жыл бұрын

    HELP ME CONFIGURATION TEAMVIEW REMOTE ?

  • @Matt-ij4zb
    @Matt-ij4zb4 ай бұрын

    its easy to work with a script