Routing
Highlighted
Routing

JUNOS equivalent of cisco's OSPF area filter-list?

[ Edited ]
‎08-29-2013 11:09 AM

Hello All

Is there any equivalent in JUNOS of Cisco's OSPF area filter-list? What I mean exactly is to e.g. filter certain prefix from being flooded to other areas.

For example, policy to block 10.0.0.0/30 to be sent to other areas (as area 333 below).
On Cisco it would be like that:

!
ip prefix-list test3 seq 5 deny 10.0.0.0/30
ip prefix-list test3 seq 10 permit 0.0.0.0/0 le 32
!
!
router ospf 1
 log-adjacency-changes
 area 0 filter-list prefix test3 out
 network 2.2.2.2 0.0.0.0 area 0
 network 4.4.4.4 0.0.0.0 area 333
 network 192.168.0.0 0.0.0.3 area 0
!

 


I know the network-summary-export command, but it's configured not in the originating area (like area 0 above), but under the destination area's configuration (333).

What is the best way to configure such filter (as filter-list on Cisco)?

Thanks in advance for help

6 REPLIES 6
Highlighted
Routing

Re: JUNOS equivalent of cisco's OSPF area filter-list?

‎08-29-2013 11:48 AM

Create a policy statement and then apply the filter in your OSPF settings 

 

set policy-options policy-statement stop-routes term term-1 from route-filter 10.0.0.0/30 exact
set policy-options policy-statement stop-routes term term-1 then reject
set policy-options policy-statement stop-routes term term-2 from route-filter 0.0.0.0/0 orlonger
set policy-options policy-statement stop-routes term term-2 then accept
set policy-options policy-statement stop-routes term deny-all then reject

 

 

Kevin Barker
JNCIP-SEC
JNCIS-ENT, FWV, SSL, WLAN
JNCIA-ER, EX, IDP, UAC, WX
Juniper Networks Certified Instructor
Juniper Networks Ambassador

Juniper Elite Reseller
J-Partner Service Specialist - Implementation

If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.
Highlighted
Routing

Re: JUNOS equivalent of cisco's OSPF area filter-list?

‎08-29-2013 12:29 PM

Sorry, I wasn't precise. I know that I need to configure such policy, but where/how exactly do I have to apply it to achieve same result as in the Cisco example?

 

And regarding the policy itself. The one below should do the same as yours, right?

 

set policy-options policy-statement stop-routes term term-1 from route-filter 10.0.0.0/30 exact
set policy-options policy-statement stop-routes term term-1 then reject
set policy-options policy-statement stop-routes term term-2 then accept

 

Highlighted
Routing

Re: JUNOS equivalent of cisco's OSPF area filter-list?

[ Edited ]
‎08-31-2013 06:22 AM

Could anyone advise?

Highlighted
Routing

Re: JUNOS equivalent of cisco's OSPF area filter-list?

‎09-02-2013 06:18 PM

Use:

 

set protocol ospf export stop-routes

set policy-options policy-statement stop-routes term term-1 from route-filter 10.0.0.0/30 exact
set policy-options policy-statement stop-routes term term-1 then reject
set policy-options policy-statement stop-routes term term-2 then accept

 

Highlighted
Routing

Re: JUNOS equivalent of cisco's OSPF area filter-list?

‎04-24-2017 02:22 AM

Hi guys its a old post but to help some beigginers i am posting this

use the command "network-summary-export" to filter inter area routes , also u have to note that this can be done
only in area border router ie the area which is connected to area 0 "
set protocols ospf area 0.0.0.0 network-summary-export ospf-filter
"this is for enabling ospf in the interface "
set protocols ospf area 0.0.0.0 interface ge-3/2/0

"this is the policy statement to deny 50.0.0.0/24 "
set policy-options policy-statement ospf-filter term 1 from route-filter 50.0.0.0/24 exact
set policy-options policy-statement ospf-filter term 1 then reject

"this is for allowing all other subnets "
set policy-options policy-statement ospf-filter term 2 then accept

Highlighted
Routing

Re: JUNOS equivalent of cisco's OSPF area filter-list?

‎04-25-2017 01:55 PM

How about using the area-range restrict commands?

The command is onfigured on the ABRs only, depending on the area type. Configure it for the originating area.

set protocols ospf area 3 nssa area-range 10.0.0.0/30 restrict <= restrict External routes (Type 5) from filtering into the backbone hence into other areas
set area 2 area-range 10.0.0.0/30 restrict <= restrict summary (Type 3) routes from filtering into the backbone hence into other areas

[KUDOS PLEASE! If you think I earned it!
If this solution worked for you please flag my post as an "Accepted Solution" so others can benefit..]
Feedback