I have multiple routes defined to the same target and metrics/cost is defined and different. My "other" commercial router will select cheaper route pretty much instantly when cheaper route appears, rerouting traffic there. OpenWRT only switch route if other route to the same target completely dies. If cheaper route come alive when more expensive still working - it never select new cheaper route as long as previously working route still takes traffic.
My "commercial" router and OpenWRT are both on the same host network with multiple gateways with dynamic routes and routes setup the same way with same metric/cost on both. I believe that new routes pushed to both at the same time.
Why would OpenWRT get stuck with the same route in described above case? Is there a way to make it switch automatically when cheaper route come alive?
And.... How do you expect that if you set a static route with metric or not is about going to change.... Static route....
I would guess your "commercial" (are they selling routers or not) router is using ospf? OpenWrt or Linux in general is able to run a dynamic routing daemons i.e. with ospf.
Other router is TP-Link TL-R600.
Protocol: I would think that routing table applied to any L3/IP protocol, unless other rules existed and applied at L3.
Both routers have all static routes with various metric.
I am sure both receiving route pushes, either through RIP or OSPF, as both are broadcasts, if one router is able to sense new routes available (by receiving pushes), then I expect the other also should.
Route being static: without touching static routes, OpenWRT will automatically use different static route to the same destination, if multiple entries existed, but only after first one no longer can take any packets. As long as there even a trickle of traffic - it will cling to earliest available working route out of multiple selection. Where TP-Link will nearly instantly switch to lowest metric route.
Another explanation of my use case: I got slow route to destination with high metric that is always available. Additionally I have intermittent higher speed and cheaper/lower metric link. TP-Link will track the change and dynamically route to cheaper and faster static route with lower metric. OpenWRT in this situation will stick to slow link, ignoring metric.
Maybe another relevant piece: both gateways IPs never disappear. It is not immediate next hop that cannot take traffic but another hop after that. Maybe RIP has boundary? Is there a way to force edge routers to pull more levels of routing from upstream router to watch and update and select own routes accordingly? Maybe TP-Link react because it is "load balancing" and making decision to use different route based on speed of traffic rather than RIP?
While TP-Link has dual WAN and is load balancing, I use only one WAN port, but may still have logic that helps with above.
I believe that "metric" meant to be used dynamically on routing tables, even static once. And in most of my observations on most equipment it does. Surprisingly however it is not in OpenWRT. It is highly probable that I just missing something.
Is there a way for OpenWRT to dynamically switch to lowest metric static route as it become alive? Even if two hops removed.
Sorry but I'm unable to pull any information out of that post.
Yes you can have a "static route", a statically configured route, and a routing daemon can i.e. watch that i.e. the outgoing interface is present. And if not that route is withdrawn.
But it is totally unclear for me if you use only static routes from the Kernel, static routes from a dynamic routing daemon, and if any then wich one, or if you use rip or ospf....
And as with every platform: each implementation can behave differently and most of the time it can be configured...
If you need support for ospf or rip than check out bird2. Bird can also check/watch interfaces for staticly configured routes.
Bernd,
Please pardon my long and messy writing. Trying to condense my problem without diving deeper:
I have two static routes to the same destination. One is slow but permanent, metric 10, and second one is fast but intermittent, metric 5.
Each route has its own gateway, a modem or tunnel, that always has valid and responsive IP.
My problem that OpenWRT does not automatically switch to lower metric route when it become live, but TP-Link does that nicely.
I've looked at bird2 and discovered whole range of packages that possibly can assist in solving my problem. Got to learn more about them and sort my option. Any advise is appreciated.
Any advise on Bird2 vs. Bird1? One also has LuCI, while 2 does not.
Luci does not make any sense for bird.
Bird1.6 is legacy since ages and current stable release is 2.16 or 2.17...
There is also bird3 in the making but the "only" change is multi threading which is not needed in this case.
With bird, I would set the static routes for each gateway and device and enable "check link" that way you get fast switch of the routes even without ospf or rip.
I guide you but I'm without a computer for a week and can not provide you with a ready to go config.
You need to protocol Kernel, device, direkt and static.
The bird user documentation should cover all that.
You should use more or less all the defaults and only turn the nobbs you understand.
Iirc on OpenWrt the bird package comes with a default config which is not usable. Google around and write your own small config. I can prove read but I can not test it...
The bird mailinglist is also a good place to ask and it's also pretty noob friendly if the list sees effort and concrete questions....
Ps. Quagga is dead. And frr is sadly a corporate corpse by now. Bird however is actively and openly developed.