On Fri, Jun 06, 2014 at 04:40:46PM +0200, Frederik Kriewitz wrote:
Hello,
I noticed that the preferred route counter seems to be incremented for each time the route is exported by another protocol. E.g. I've a static protocol with 25 routes which are exported by two other protocols, this results in the following statistics:
I don't really understand your description. Routes for the same network imported from different protocols are considered separate and these stats should not depend on whether the route is exported to another protocols.
25 imported, 0 exported, 50 preferred
I'm wondering if that's the intended behavior?
The intended behavior is that preferred counter counts the number of routes which are considered 'best' summed over all routing tables. I.e., if you have a protocol that propagates 25 routes to one table and these are then repropagated to a pipe to another three tables, and all these routes are best in all these tables, you get 100 preferred. If you have just one table, then preferred <= imported should be true.
So far I expected that preferred means number of routes which are considered "best" in the corresponding routing table (so preferred would be always <= imported).
It is questionable whether directly attached table should be considered 'special' for this purpose. I don't see much reasons for this. It is possible that some routes are non-best in directly attached table but they are best in some other table. IMHO the most intuitive notion for 'preferred' would be to count the number of routes which are 'best' in any routing table, but that can't be easily computed with current internal structures. -- 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."