Redistribution from BGP protocol to OSPF is not working
Hi, I have Three routers in my network like the below diagram. RTR01 has a BGP to RTR02 and RTR02 has an OSPF to RTR03. I wrote a filter to redistribute origin routes from BGP protocol to OSPF in RTR02 but it's not working. ┌───────┐ ┌───────┐ ┌─────┐ │ RTR01. ├──┤ RTR02 ├── ──┤ RTR03 │ └───────┘ └───────┘ └─────┘ 10.2.2.3 -BGP- 10.2.2.2 10.100.100.2 -OSPF- 10.100.100.3 RTR02 Bird config: protocol bgp bgp_to_rtr01{ local as 64513; neighbor 10.2.2.3 as 64512; source address 10.2.2.2; allow local as 64513; multihop; ipv4 { import all; export all; }; } protocol ospf my_ospf { rfc1583compat yes; tick 2; ecmp no; ipv4 { import where proto = "bgp_to_rtr01"; }; area 0.0.0.0 { stub no; interface "dummy0" { type ptp; }; interface "enp0s9" { type broadcast; }; }; } I did the same redistribution to OSPF to announce the default route via OSPF and it is working, but the same filter for redistribution BGP to OSPF is not. Best Regards, Keyvan
On Mon, Nov 01, 2021 at 09:12:38AM +0100, keyvan ghadimi wrote:
Hi,
I have Three routers in my network like the below diagram. RTR01 has a BGP to RTR02 and RTR02 has an OSPF to RTR03. I wrote a filter to redistribute origin routes from BGP protocol to OSPF in RTR02 but it's not working. ...
protocol ospf my_ospf { rfc1583compat yes; tick 2;
Do you need these two options?
ecmp no; ipv4 { import where proto = "bgp_to_rtr01";
export where ... ?
I did the same redistribution to OSPF to announce the default route via OSPF and it is working, but the same filter for redistribution BGP to OSPF is not.
-- 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."
I saw these two options in the bird example config, I just read about them, and seems we don't need them: rfc1583compat and tick 2; export where: we already have one BGP, and want to import its origin routes into our OSPF. so we still need to write another export policy? means we want to import routes from our existing BGP to our OSPF On Mon, Nov 1, 2021 at 1:58 PM Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Mon, Nov 01, 2021 at 09:12:38AM +0100, keyvan ghadimi wrote:
Hi,
I have Three routers in my network like the below diagram. RTR01 has a BGP to RTR02 and RTR02 has an OSPF to RTR03. I wrote a filter to redistribute origin routes from BGP protocol to OSPF in RTR02 but it's not working. ...
protocol ospf my_ospf { rfc1583compat yes; tick 2;
Do you need these two options?
ecmp no; ipv4 { import where proto = "bgp_to_rtr01";
export where ... ?
I did the same redistribution to OSPF to announce the default route via OSPF and it is working, but the same filter for redistribution BGP to OSPF is not.
-- 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."
On Mon, Nov 01, 2021 at 02:34:57PM +0100, keyvan ghadimi wrote:
export where: we already have one BGP, and want to import its origin routes into our OSPF. so we still need to write another export policy?
Import/export are per protocol/channel and from point-of-view of the routing table. Therefore you imported routes from thr BGP to the master routing table (using import statement in BGP) and then you want to export these routes from the master routing table to thr OSPF protocol (using export statement in OSPF). -- 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 (2)
-
keyvan ghadimi -
Ondrej Zajicek