Routing
Highlighted
Routing

Redistribution of MP-BGP Routes into OSPF

[ Edited ]
‎02-23-2020 06:17 PM

HI Team,

 

i'm running ospf as PE(Juniper)-CE(Cisco)  protocol and trying to import routes learned from MP-BGP into ospf but it is not working .


routing-instances {
A {
instance-type vrf;
interface em2.0;
route-distinguisher 100:1;
vrf-import import_to_A;
vrf-export export_to_PE4;
vrf-table-label;
protocols {
ospf {
inactive: traceoptions {
file ospf_A size 10k files 3;
flag hello;
flag event;
flag error detail;
flag packets detail;
}
import adv_to_ce;
area 0.0.0.0 {
interface em2.0 {
interface-type p2p;
}
}
}
}
}
}

 

 

root@R1> show configuration policy-options policy-statement adv_to_ce
term a {
from {
family inet-vpn;
protocol bgp;
}
then accept;
}

root@R1>

 

 

root@R1> show route table A.inet.0

A.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

6.6.6.6/32 *[OSPF/10] 00:13:05, metric 2
> to 61.0.0.6 via em2.0
61.0.0.0/24 *[Direct/0] 00:13:18
> via em2.0
61.0.0.1/32 *[Local/0] 00:13:20
Local via em2.0
77.77.77.77/32 *[BGP/170] 00:12:55, MED 1010, localpref 100, from 4.4.4.4
AS path: ?
> to 12.0.0.2 via em1.0, Push 407, Push 202(top)
224.0.0.5/32 *[OSPF/10] 00:13:22, metric 1
MultiRecv

root@R1>

 

root@R1> show ospf database instance A

OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Router 6.6.6.6 6.6.6.6 0x80000003 930 0x22 0xc234 60
Router *61.0.0.1 61.0.0.1 0x80000003 176 0x22 0x1ef1 48

root@R1>

 

 

 

Sunil Kumar

 

 

1 REPLY 1
Highlighted
Routing
Solution
Accepted by topic author Sunil_Sandhu
‎02-23-2020 07:50 PM

Re: Redistribution of MP-BGP Routes into OSPF

‎02-23-2020 06:38 PM

Hi Sunil,

 

Please use OSPF export statemnet instead of import statement.

 

set policy-options policy-statement redistribute-routes from protocol bgp

set policy-options policy-statement redistribute-routes then accept

 

https://www.juniper.net/documentation/en_US/junos/topics/topic-map/configuring-ospf-routing-policy.h...

 

In the import statement, you list the name of the routing policy used to filter OSPF external routes from being installed into the routing tables of OSPF neighbors. You can filter the routes, but not link-state address (LSA) flooding. An external route is a route that is outside the OSPF Autonomous System (AS). The import policy does not impact the OSPF database. This means that the import policy has no impact on the link-state advertisements.

 

In the export statement, you list the name of the routing policy to be evaluated when routes are being exported from the routing table into OSPF.

 

By default, if a routing device has multiple OSPF areas, learned routes from other areas are automatically installed into area 0 of the routing table.

Feedback