subscribe to our Youtube


14455 questions

17168 answers


0 members

We are migrating to our new platform at Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
780 views 2 comments
by anonymous

I have an issue with manipulating the default route in Teltonika RUT950. I am currently setting up an environment for testing DMVPN connectivity. I'm using a Teltonika route as a Spoke connected through WAN to an ISP router (DHCP address and default route), and the ISP router is connected to the Hub also through a public link. DMVPN between Teltonika and the Hub works, IPSec works, LANs get exchanged through BGP successfully. Teltonika has internet connectivity using the default route towards the ISP router.

My issue is wanting to distribute the default route through BGP from the Hub to the Spoke (Hub has a default route to the ISP router). The default route gets distributed to the Spoke, and I can see it in the routing table, but with a metric of 20. Spoke uses a primary default route through the WAN interface towards the ISP router with a metric of 0. Since it prefers the 0 metric it will not use the BGP-learned default route. I want to make it primarily use the BGP default route through the DMVPN tunnel towards the Hub (security purposes), and as a failover use the DHCP-learned default route from the ISP.

How to achieve this?

2 Answers

0 votes
by anonymous


The thing to try in your case would be to add a so called floating route with a higher metric, for example 200, and without a gateway address, only the outbound interface configured.

First, you would need to disable default route generation for your WAN interface (Use default gateway setting in Network -> Interfaces section, Advanced settings tab in WAN interface configuration window).

Then you would need to create a static route in the WebUI Network -> Routing -> Static routes.

Since FRR package used for dynamic routing reads Linux metric as a 4 byte binary, it takes first byte as Administrative Distance and remaining bytes as metric, which for kernel results in a rather large decimal number. The required metric value is 16777416, which translates to 0001 00000000 00000000 11001000. There, 0001 is administrative distance, for static routes equaling to 1, and 11001000 is the metric 200.

Now, the WebUI validates metric value only up to 255, so to enter 16777416, it would require you to interface with the CLI, and edit /etc/config/network configuration file.

Best regards,    

by anonymous


I tried unchecking the Use default gateway option under WAN advanced configuration and created a static route with a high metric but it still keeps the same default route with a metric of 0 towards the ISP router as before. Routing table looks like this:
1. Default route through WAN towards ISP - metric 0
2. BGP-learned default route through the tunnel - metric 20
3. My static default route with a high metric - metric 40 (tried 200 as well)

I tried several other things:

1. Keeping the default gateway default route (checking the Use default gateway box) but manually assigning the metric to a high number - no help. I just get duplicate default route entries with the primary one still being the 0 metric WAN route.

2. Creating a static route for the WAN routing table only (as opposed to MAIN) - no good, 0 metric default route is still in the MAIN table and the router prefers it.

3. Changing the WAN wired connection to secondary while assigning primary to ex. Mobile (even though there is no SIM card) assuming that the router makes a default route on its own towards the primary WAN connection - still no difference.

4. Rebooting the ISP device which is the one assigning the default route through DHCP.

The 0 metric default route stays no matter what. I don't know what else to do.

I tried making wired WAN my secondary WAN connection and I connected to a WiFi as my primary WAN. The 0 metric route towards the ISP vanished but a new one towards the WAP got created. It looks like somewhere Teltonika creates an automatic default route out the primary WAN interface, and it needs to be turned off or removed somehow. Help is appreciated.

0 votes
by anonymous
No answers or solutions?
by anonymous


Seems odd. Are you using the latest firmware version? Unchecking Use default gateway removes the default route. Tried with a similar setup with DMVPN and BGP. Adding a floating route enabled the device to have a backup default route. 

Have you tried to restore the device to factory settings? There might be something 'stuck' in the configuration. Might even consider reinstalling firmware via bootloader (instructions HERE). This fixes software issues quite often.

Also, since you have BGP configured, you can use the command 'vtysh' to enter a cisco-like command line interface. This will allow you to execute commands such as 'show ip route' which shows routes learned from BGP, directly connected, kernel routes etc. Check the administrative distance and metric of your floating route.

You can also add a troubleshoot file, but based on your description, it seems that your configuration is likely correct. 

Kind Regards,