Hi, I have an OSPF based network using bird for routing the core and it seems to work fine, however the network is geographically diverse and some of the routing is sub-optimal. Specifically, the default route is going shortest hops rather than lowest latency. What I would like to do is have the OSPF cost reflect the latency of the link, however I am having a problem coming up with a scalable/automated way of doing this. As far as I can tell there is no built in "latency to peer" I can reference? I could configure a manual entry for each peer in the config file, however that doesn't seem very manageable, even with some kind of script to generate the config file.
From what I can gather there is no way for a filter to reference an external file/database/script to adjust the routes on import. I even considered a convoluted approach of having a script inject the peers IP address in to a special kernel table and using the route metric to feed numbers in to bird, but couldn't find a way of storing the data and referencing it on a later route lookup.
Basically what I want is that when an OSPF peer comes up I ping it then set the cost for all routes received from that neighbour to the latency (with some basic sanity like a min and max). I don't expect the latency to vary much once a link is up, however I do need to auto-discover new peers appearing on the network. Any ideas? Thanks - Mike Jones
Hello Mike, There is no concept of latency by peer in any main stream routing protocol because latency can be influenced by traffic load, which would create a real mess trying to understand the traffic flow. If you know one link is always lower latency than the next you simply set the cost manually at startup. Cisco’s EIGRP protocol does have a load concept, but I believe Cisco pretty much says don’t use it (; If you really wanted to you could create a script that ran a manual test of the latency of each link, the script could then updated the cost value in bird and reconfigure it though. Cheers, Mike -- Michael McConnell WINK Streaming; email: michael@winkstreaming.com <mailto:michael@winkstreaming.com> phone: +1 312 281-5433 x 7400 cell: +506 8706-2389 skype: wink-michael web: http://winkstreaming.com <http://winkstreaming.com/>
On Dec 21, 2016, at 12:52 PM, Mike Jones <mike@mikejones.in> wrote:
Hi,
I have an OSPF based network using bird for routing the core and it seems to work fine, however the network is geographically diverse and some of the routing is sub-optimal. Specifically, the default route is going shortest hops rather than lowest latency.
What I would like to do is have the OSPF cost reflect the latency of the link, however I am having a problem coming up with a scalable/automated way of doing this. As far as I can tell there is no built in "latency to peer" I can reference? I could configure a manual entry for each peer in the config file, however that doesn't seem very manageable, even with some kind of script to generate the config file.
From what I can gather there is no way for a filter to reference an external file/database/script to adjust the routes on import. I even considered a convoluted approach of having a script inject the peers IP address in to a special kernel table and using the route metric to feed numbers in to bird, but couldn't find a way of storing the data and referencing it on a later route lookup.
Basically what I want is that when an OSPF peer comes up I ping it then set the cost for all routes received from that neighbour to the latency (with some basic sanity like a min and max). I don't expect the latency to vary much once a link is up, however I do need to auto-discover new peers appearing on the network.
Any ideas?
Thanks - Mike Jones
Michael McConnell <michael@winkstreaming.com> writes:
Hello Mike,
There is no concept of latency by peer in any main stream routing protocol because latency can be influenced by traffic load, which would create a real mess trying to understand the traffic flow. If you know one link is always lower latency than the next you simply set the cost manually at startup.
The Babel routing protocol does actually have such a concept; it's not currently implemented in Bird, however. See https://tools.ietf.org/html/draft-jonglez-babel-rtt-extension-01 for details. -Toke
Thanks for the link, one of these days I’ll have to give Babel a try. Reading section 2.3 Stability Issues sure does hurt my head imaging how wrong that could go (: -- Michael McConnell WINK Streaming; email: michael@winkstreaming.com <mailto:michael@winkstreaming.com> phone: +1 312 281-5433 x 7400 cell: +506 8706-2389 skype: wink-michael web: http://winkstreaming.com <http://winkstreaming.com/>
On Dec 21, 2016, at 2:16 PM, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
Michael McConnell <michael@winkstreaming.com> writes:
Hello Mike,
There is no concept of latency by peer in any main stream routing protocol because latency can be influenced by traffic load, which would create a real mess trying to understand the traffic flow. If you know one link is always lower latency than the next you simply set the cost manually at startup.
The Babel routing protocol does actually have such a concept; it's not currently implemented in Bird, however.
See https://tools.ietf.org/html/draft-jonglez-babel-rtt-extension-01 for details.
-Toke
Michael McConnell <michael@winkstreaming.com> writes:
Thanks for the link, one of these days I’ll have to give Babel a try. Reading section 2.3 Stability Issues sure does hurt my head imaging how wrong that could go (:
Right, well, depends on the timescales involved. Apparently works quite well for picking the right continent to route through. Also, fixing bufferbloat on the affected links helps a lot with avoiding too much oscillation :) -Toke
On Wed, Dec 21, 2016 at 11:09 AM, Michael McConnell < michael@winkstreaming.com> wrote:
Hello Mike,
There is no concept of latency by peer in any main stream routing protocol because latency can be influenced by traffic load, which would create a real mess trying to understand the traffic flow. If you know one link is always lower latency than the next you simply set the cost manually at startup.
IS-IS does have the concept of multidimensional SPF calculations, with one of them based on link delay (see section 9.7 of iso 10589). However I'm not aware of any modern implementation of the protocol using anything else besides the default metric. cheers, Evelio
On Wed, Dec 21, 2016 at 01:09:44PM -0600, Michael McConnell wrote:
Hello Mike,
There is no concept of latency by peer in any main stream routing protocol because latency can be influenced by traffic load, which would create a real mess trying to understand the traffic flow. If you know one link is always lower latency than the next you simply set the cost manually at startup.
Hello That is true for real traffic latency, but there is another metric - base latency (latency of link without any load). That is metric that makes perfect sense, is stable (at least for 'real' links) and could be reasonably estimated. You could use minimum of measured values as any measured latency would be higher than ideal value. OSPF and most other routing protocols do not have tools for latency estimation. I guess BFD echo packets or even ping could be used for that. But BIRD does not have any such features integrated.
Cisco’s EIGRP protocol does have a load concept, but I believe Cisco pretty much says don’t use it (;
If you really wanted to you could create a script that ran a manual test of the latency of each link, the script could then updated the cost value in bird and reconfigure it though.
There is one problem - Unless interfaces are PtP links, you would probably need different latencies to different neighbors. That could be generally done in OSPF with PtMP network type, but BIRD does not allow to specify that. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (5)
-
Evelio VILA -
Michael McConnell -
Mike Jones -
Ondrej Zajicek -
Toke Høiland-Jørgensen