Hello, So I am going to stick to the working solution by using /30 links between routers and then setting a lower metric for R3 -> R4, and R4 -> R2 which has the same effect as what I wanted to achieve. (Only disadvantage that it's more work to setup and maintain) Thank you! 2015-09-20 13:39 GMT+02:00 Ondrej Zajicek <santiago@crfreenet.org>:
On Sat, Sep 19, 2015 at 09:09:54PM +0200, LU wrote:
Hi,
I have 4 routers connected like this.
(10.4.4.1/24) (10.4.4.4.2/24) R1 R2 \ / \ / SWITCH / \ / \ R3 R4 (10.4.4.3/24) (10.4.4.4/24)
I export a default route (0.0.0.0/0) from R1 and R2 with an ospf_metric1 = 100..
At R3, in an import filter I set the ospf_metric1 of R1's default route to 10.
At R4, in an import filter I set the ospf_metric1 of R2's default route to 10.
What I expect is that R3's routing table is going to contain 0.0.0.0/0 via R1. and likewise R4's routing table is going to contain 0.0.0.0/0 via R2.
Unfortunately it doesn't happen and both R3's and R4's routing table has 0.0.0.0/0 via R2.
Hi
Unfortunately that is not how import from OSPF works in BIRD. The route is first selected inside OSPF (from possible OSPF paths) and then imported to the main table (where it is compared to routes from other protocols). Therefore setting ospf_metric1 in import filters have no relevance (unless you have multiple OSPF instances and compare routes from them in the main table).
Note that being able to import all possible OSPF routes to the main table would be a nice feature, but it is not currently implemented.
-- 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."