# VRF WAN 1 to LTE Failover Not Working

**URL:** <https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577>\
**Category:** RouterOS\
**Created:** [October 5, 2026, 4:44am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577 "2026-10-05T04:44:22Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![nichky](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/nichky/32/1516_2.png) [@nichky](https://forum.mikrotik.com/u/nichky)\
**Post date:** [October 5, 2026, 4:44am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/1 "2026-10-05T04:44:22Z")

</div>

I have a VRF where WAN 1 is the primary connection and LTE is the backup.

I need both connections to be in the VRF. The issue is that the gateway check does not seem to work correctly in this setup.

When WAN 1 goes down, the router does not automatically switch to LTE. I have to manually change the route.

I know the same setup works fine in the main routing table, but it does not work properly when the routes are in a VRF.

> [CPE1] \> interface/ethernet/pr  
> ;;; LAN  
> 0 R ether1 1500 enabled switch1  
> ;;; WAN-1  
> 2 ether3 1500 enabled switch1
> 
> [CPE01] \> ip route/pr de where routing-table=vrf1  
> 0 _s dst-address=0.0.0.0/0 routing-table=vrf1 gateway=1.1.1.1 immediate-gw=1.1.1.1%lte1 check-gateway=ping distance=2 scope=30 target-scope=46_
> 
> 1 As dst-address=0.0.0.0/0 routing-table=vrf1 gateway=8.8.8.8 immediate-gw=8.8.8.8%lte1 check-gateway=ping distance=20 scope=30 target-scope=41
> 
> 2 As dst-address=1.1.1.1/32 routing-table=vrf1 gateway=lte1 immediate-gw=lte1 distance=1 scope=30 target-scope=10
> 
> 3 Is dst-address=8.8.8.8/32 routing-table=vrf1 gateway=1.2.3.4 immediate-gw="" distance=1 scope=30 target-scope=10

---

<div class="post-metadata">

**Author:** ![CGGXANNX](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/cggxannx/32/55490_2.png) [@CGGXANNX](https://forum.mikrotik.com/u/CGGXANNX)\
**Post date:** [October 5, 2026, 6:26am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/2 "2026-10-05T06:26:01Z")

</div>

You have two issues:

- When you write `gateway=x.y.z.w` with nothing else, the gateway is resolved in the `main` table, not `vrf1`. It's documented:

- Your `target-scope` are set very high (`46` and `41`), they should be set as low as possible so that the nexthop lookup do not accidentally uses other route (like default routes with `dst-address=0.0.0.0/0`) for the gateway lookup. See [Simple recursive failover for bears of little brain - RouterOS / Useful user articles - MikroTik community forum](https://forum.mikrotik.com/t/simple-recursive-failover-for-bears-of-little-brain/267190).

You should also post the `print` output of the `main` routing table. My guess is that currently in the `main` table, you have some route that can be used for `8.8.8.8` that actively resolves to `lte1` as gateway. Even when that route has a high scope (default is `30`), it will be picked up by this route entry:

> [@nichky](#):
>
> 1 As dst-address=0.0.0.0/0 routing-table=vrf1 gateway=8.8.8.8 immediate-gw=8.8.8.8%lte1 check-gateway=ping distance=20 scope=30 target-scope=41

for looking up the gateway `8.8.8.8`, because you did not specify `8.8.8.8@vrf1`, and because `target-scope=41`. As a result, you can see `immediate-gw=8.8.8.8%lte1` attached to that route.

---

<div class="post-metadata">

**Author:** ![nichky](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/nichky/32/1516_2.png) [@nichky](https://forum.mikrotik.com/u/nichky)\
**Post date:** [October 5, 2026, 10:02am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/3 "2026-10-05T10:02:12Z")

</div>

[CPE01] \> ip route/pr detail where dst-address=0.0.0.0/0  
DAm dst-address=0.0.0.0/0 routing-table=main gateway=lte1 immediate-gw=lte1  
distance=2 scope=30 target-scope=10

The main WAN interface is currently down, and everything has been switched over to LTE.

---

<div class="post-metadata">

**Author:** ![nichky](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/nichky/32/1516_2.png) [@nichky](https://forum.mikrotik.com/u/nichky)\
**Post date:** [October 5, 2026, 10:14am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/4 "2026-10-05T10:14:02Z")

</div>

if i add @vrf1 see what im getting:

> ip route/pr de where routing-table=vrf1
> 
> NS-CPE01] \> ip route/pr de where routing-table=vrf1
> 
> 0 Is dst-address=0.0.0.0/0 routing-table=vrf1 gateway=1.1.1.1@vrf1 immediate-gw="" check-gateway=ping distance=20 scope=30 target-scope=31
> 
> 1 Is dst-address=0.0.0.0/0 routing-table=vrf1 gateway=8.8.8.8@vrf1 immediate-gw="" check-gateway=ping distance=10 scope=30 target-scope=32
> 
> 5 Is dst-address=1.1.1.1/32 routing-table=vrf1 gateway=lte1@vrf1 immediate-gw="" distance=1 scope=30 target-scope=10
> 
> 6 Is dst-address=8.8.8.8/32 routing-table=vrfSTP gateway=1.2.3.4@vrf1 immediate-gw="" distance=1 scope=30 target-scope=10

---

<div class="post-metadata">

**Author:** ![nichky](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/nichky/32/1516_2.png) [@nichky](https://forum.mikrotik.com/u/nichky)\
**Post date:** [October 5, 2026, 10:45am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/5 "2026-10-05T10:45:30Z")

</div>

In my case, I don't need to specify `@vrf1`, as LTE is not in the VRF table. I just need to add `@main`.

The problem is that if I specify `check-gateway=ping`, the route becomes inactive after about 20 seconds. If I set `check-gateway=none`, it works fine.

note: onl LTE is runnign , WAN1 main is down atm

---

<div class="post-metadata">

**Author:** ![nichky](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/nichky/32/1516_2.png) [@nichky](https://forum.mikrotik.com/u/nichky)\
**Post date:** [October 5, 2026, 10:59am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/6 "2026-10-05T10:59:30Z")

</div>

I think this is only happening with LTE. I’m pretty sure the WAN was working fine, as I have several setups where this works without any issues. Something seems to be related to the LTE, but I can’t figure out what the issue is.

---

<div class="post-metadata">

**Author:** ![nichky](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/nichky/32/1516_2.png) [@nichky](https://forum.mikrotik.com/u/nichky)\
**Post date:** [October 5, 2026, 11:08am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/8 "2026-10-05T11:08:01Z")

</div>

Yes, `lte1` doesn't have a gateway IP address.

Regarding the `target-scope`, yes, I completely missed that. I’ve now implemented it as well.

---

<div class="post-metadata">

**Author:** ![fischerdouglas](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/fischerdouglas/32/2357_2.png) [@fischerdouglas](https://forum.mikrotik.com/u/fischerdouglas)\
**Post date:** [October 5, 2026, 11:11am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/9 "2026-10-05T11:11:01Z")

</div>

MikroTik need to severely improves its example of use of VRFs.

- Since a the example of home device running in VRF.
- Passing to a Simple scenario of default main + VRF for failover. (Like this topic).
- Until scenarios with usage of multidevice Layer3 with "VRF\_Management".

---

<div class="post-metadata">

**Author:** ![nichky](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/nichky/32/1516_2.png) [@nichky](https://forum.mikrotik.com/u/nichky)\
**Post date:** [October 5, 2026, 11:15am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/10 "2026-10-05T11:15:52Z")

</div>

I think the key issue is specifically with LTE, where there is no gateway IP. It works fine when `check-gateway=none` is specified.

When there is a gateway IP that you can specify, `check-gateway=ping` works fine. I have many setups where this works without any issues.

---

<div class="post-metadata">

**Author:** ![nichky](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/nichky/32/1516_2.png) [@nichky](https://forum.mikrotik.com/u/nichky)\
**Post date:** [October 12, 2026, 7:13am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/11 "2026-10-12T07:13:46Z")

</div>

@CGGXANNX

does that look ok to you:

> ip route/pr detail where routing-table=vrf1  
> Flags: A - ACTIVE; s - STATIC  
> 0 As dst-address=0.0.0.0/0 routing-table=vrf1 gateway=8.8.8.8 immediate-gw=10.0.1.1%e3vl99 distance=1 scope=10 target-scope=30
> 
> 1 As dst-address=8.8.8.8/32 routing-table=vrf1 gateway=10.0.1.1 immediate-gw=10.0.1.1%e3vl99 distance=1 scope=10 target-scope=11 **strong text**

---

<div class="post-metadata">

**Author:** ![CGGXANNX](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/cggxannx/32/55490_2.png) [@CGGXANNX](https://forum.mikrotik.com/u/CGGXANNX)\
**Post date:** [October 12, 2026, 7:31am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/12 "2026-10-12T07:31:24Z")

</div>

Hi @nichky.

About `scope` and `target-scope`:

- The 2nd route with `dst-address=8.8.8.8/32` should have the default `target-scope=10`, which then will cause `scope` to be at least `11`. `scope` must be greater than `target-scope`, internally, RouterOS will fix that for you so even if you write `scope=5` it will silently increase it to `11`, which is one more than the value of `target-scope=10`.

- As for the route with `dst-address=0.0.0.0/0`, you should give it the default value of `scope=30`. As for `target-scope`, if you want to use the 2nd route (the `dst-address=8.8.8.8/32` one) to look up the gateway, then `target-scope` must be at least `11` (which is the real `scope` value of the 2nd route). This `target-scope=11` also satisfy the condition that it is smaller than `scope` (which we set to `30`).

However, as I wrote above, we are in the `routing-table=vrf1`, but if you wrote

> [@nichky](#):
>
> gateway=8.8.8.8

Then the lookup for the nexthop for the gateway will not use the 2nd route! It will instead look up in the `main` table (will use the best active route in `main` that can satisfy the destination `8.8.8.8` and has `scope` small enough). The 2nd route you posted will not be consulted. If you are fine with that then remove that 2nd useless route. If you however really want to force the nexthop lookup to use that 2nd route, then the first route must have `gateway=8.8.8.8@vrf1`!

My guess for why you currently have `target-scope=30` on that 1st route: The best route in `main` that can resolve `8.8.8.8` is probably some `dst-address=0.0.0.0/0 scope=30` route, that's why this route can only work if you put `target-scope=30` and not with lower value.

If you correct it to `gateway=8.8.8.8@vrf1`, then the lookup can use the second route, and you can use `target-scope=11` without issue.

---

<div class="post-metadata">

**Author:** ![jaclaz](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/jaclaz/32/55652_2.png) [@jaclaz](https://forum.mikrotik.com/u/jaclaz)\
**Post date:** [October 12, 2026, 8:13am UTC](https://forum.mikrotik.com/t/vrf-wan-1-to-lte-failover-not-working/273577/13 "2026-10-12T08:13:57Z")

</div>

Just in case:  
[Simple recursive failover for bears of little brain](https://forum.mikrotik.com/t/topic/267190/1)
