I have a testlab with 2 routers, for testing some OSPF routning.
(Router 1 is connected to router 2)
Router 1 has the network 10.10.0.0/16 and 172.16.10.0/24
Router 2 has the network 10.100.100.0/24
Is it possible to have af filter on router 1, that only allow the network 10.10.0.0/16 to be routed til router 2 ?
as Toshi has observed OSPF filtering can occur only on area borders:
if router 1 is ABR connected to area 0 and area 1.
And router 2 is in area 1 there is a chance to use the command
area x filter-list
that invokes a prefix-list
so that you can permit only the 10.10/16
area 1 filter-list onlynet10 in
ip prefix-list onlynet10 permit 10.10.0.0/16
other solutions like distribute-list are not technically ospf filters but filters on the IP routing table mantainer process: if a third router is downstream R2 it still receive the OSPF LSA describing net 172.16.10./24.
Hope to help