Full MikroTik MTCRE - Recursive Routing (Easy Automatic failover)

Sdílet
Vložit
  • čas přidán 26. 06. 2024
  • 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 CZcams 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

Komentáře • 106

  • @TheNetworkBerg
    @TheNetworkBerg  Před 2 lety +1

    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 Před rokem

      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 Před měsícem

      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
    @javiervaldeschavez4805 Před 2 lety +1

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

  • @royalsingh
    @royalsingh Před rokem +1

    Beautifully explained, loved it.

  • @mostafavii
    @mostafavii Před 4 měsíci

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

  •  Před 2 lety

    Fantastic explanation, thanks man.

  • @atroxes
    @atroxes Před 2 lety

    Great video and explanation!

  • @romanmikhalev3518
    @romanmikhalev3518 Před 2 lety +1

    You are the best! Thank you!

  • @nicoladellino8124
    @nicoladellino8124 Před 2 lety +1

    Very nice video, TNX.

  • @gammerhub5039
    @gammerhub5039 Před 2 lety +1

    Very informative. Thank you!

  • @aaronglowacki5992
    @aaronglowacki5992 Před 2 lety +1

    This channel rocks!

  • @survivingnetworkingandit2084

    Interesting. Thanks for this.

  • @franciscopena1140
    @franciscopena1140 Před rokem

    Thanks, it helped me a lot

  • @PinoyTechTutorials
    @PinoyTechTutorials Před 2 lety +1

    Freakin awesome! thanks alot sir!

  • @jasonvanwyngaard4387
    @jasonvanwyngaard4387 Před 2 lety +1

    another great video, thank you.

  • @adriano_saraiva
    @adriano_saraiva Před rokem

    Thanks for share!

  • @wiebehageman3864
    @wiebehageman3864 Před 2 lety +3

    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 Před rokem

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

  • @thefixitgal
    @thefixitgal Před 2 lety

    YES!!!!! Thank you

  • @Anavllama
    @Anavllama Před 2 lety +5

    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.

  • @itzizag2280
    @itzizag2280 Před 2 lety +1

    Thanks A LOT LOT LOT

  • @drumaddict89
    @drumaddict89 Před 2 lety +1

    thank you. so. much!

  • @comayo07
    @comayo07 Před rokem

    thank you

  • @matthewmanuel1003
    @matthewmanuel1003 Před 2 lety

    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  Před 2 lety

      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 Před 2 lety

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

    • @travelnengineer
      @travelnengineer Před 2 lety

      @@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
    @ACannaos Před 2 lety +6

    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 !

  • @randominternet5586
    @randominternet5586 Před 2 lety

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

    • @gilbertpinamang1650
      @gilbertpinamang1650 Před rokem

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

  • @gigatt3079
    @gigatt3079 Před 2 lety +4

    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 Před rokem +1

      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

  • @talharafique8913
    @talharafique8913 Před měsícem

    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??

  • @roberttan9438
    @roberttan9438 Před rokem

    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

  • @jamesugbojoide1229
    @jamesugbojoide1229 Před 2 lety

    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 Před rokem

    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

  • @SrikantaDas
    @SrikantaDas Před 2 lety +1

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

  • @edwardkwadjokubi8182
    @edwardkwadjokubi8182 Před 8 měsíci

    plz what topology are u using for the lab

  • @latostime9849
    @latostime9849 Před rokem +2

    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

    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
    @javiermacias5299 Před 2 lety

    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  Před 2 lety

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

  • @safiullah5953
    @safiullah5953 Před 9 měsíci

    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
    @mukto2004 Před 3 měsíci

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

  • @oscarcam9804
    @oscarcam9804 Před rokem

    is posible use recursive routes with vrf?

  • @nielsvdeng6276
    @nielsvdeng6276 Před 2 lety +4

    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 Před 2 lety

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

    • @TheNetworkBerg
      @TheNetworkBerg  Před 2 lety +1

      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 Před 2 lety +1

      @@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)

    • @K1w3l_01
      @K1w3l_01 Před 2 lety +1

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

  • @Wooldorf
    @Wooldorf Před rokem

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

  • @jameshld1
    @jameshld1 Před rokem

    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?

  • @carlb641
    @carlb641 Před 2 lety +1

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

  • @martinmcnamee4362
    @martinmcnamee4362 Před rokem

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

    • @TheNetworkBerg
      @TheNetworkBerg  Před rokem +1

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

    • @martinmcnamee4362
      @martinmcnamee4362 Před rokem

      @@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  Před rokem +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 Před rokem

      @@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 CZcamsrs like NetworkChuck and David Bombal.... Keep it Going!!!

    • @shalak001
      @shalak001 Před rokem

      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.

  • @usmansaleem9569
    @usmansaleem9569 Před 2 lety

    Sir please Make a Video On Mikrotik Hotspot Social Login Facebook

  • @sushilshukla6636
    @sushilshukla6636 Před 27 dny

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

  • @kirksteinklauber260
    @kirksteinklauber260 Před 9 měsíci +1

    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  Před 9 měsíci +1

      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 Před 9 měsíci

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

  • @ethanervin2816
    @ethanervin2816 Před 2 lety

    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  Před 2 lety +1

      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 Před 2 lety

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

    • @ChrisNicholson
      @ChrisNicholson Před 2 lety

      @@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 Před rokem

      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.

  • @mailsidney
    @mailsidney Před měsícem

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

  • @vx9
    @vx9 Před 2 lety

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

  • @hdmessias
    @hdmessias Před rokem

    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  Před rokem

      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 Před rokem

      @@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 Před rokem

      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 Před rokem

      @@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.

  • @GabrielBascoJesseHugo
    @GabrielBascoJesseHugo Před rokem +1

    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  Před rokem +1

      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 CZcams already and the MT docs does a good job explaining it as well

    • @GabrielBascoJesseHugo
      @GabrielBascoJesseHugo Před rokem

      @@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
    @hourashrezaei2660 Před 8 měsíci

    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  Před 8 měsíci

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

    • @hourashrezaei2660
      @hourashrezaei2660 Před 8 měsíci

      Version 7.6

  • @xuxamelo
    @xuxamelo Před rokem +5

    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:
    czcams.com/video/eTmpBAAW_pQ/video.html
    Nice work anyways, I love your channel!
    Awesome backgrounds :)

  • @bgut999
    @bgut999 Před rokem

    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.

  • @nikolashuminosky6987
    @nikolashuminosky6987 Před 2 lety

    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  Před 2 lety

      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 Před 2 lety +1

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

    • @K1w3l_01
      @K1w3l_01 Před 2 lety

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

  • @ameador01
    @ameador01 Před 2 lety

    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  Před 2 lety

      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

  • @michaelcadelina1786
    @michaelcadelina1786 Před 2 lety

    How bout if I have 3 ISPs or more sir?

    • @TheNetworkBerg
      @TheNetworkBerg  Před 2 lety

      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 Před rokem

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

  • @madan817
    @madan817 Před 8 měsíci

    port forward not working the mathrd

  • @kresimirpecar4925
    @kresimirpecar4925 Před 2 lety

    What's next ?

    • @TheNetworkBerg
      @TheNetworkBerg  Před 2 lety

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

  • @user-xp6ix5ev9p
    @user-xp6ix5ev9p Před rokem

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

  • @wleedalshawsh9838
    @wleedalshawsh9838 Před rokem

    if your video translation to arabic. it would be beautiful

  • @Matt-ij4zb
    @Matt-ij4zb Před 3 měsíci

    its easy to work with a script

  • @valentinvalentin7602
    @valentinvalentin7602 Před rokem

    HELP ME CONFIGURATION TEAMVIEW REMOTE ?