12-10-2008 01:55 AM - edited 03-04-2019 12:39 AM
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 ?
Solved! Go to Solution.
12-10-2008 09:42 AM
Hello Mickey,
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
see
http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_osp1.html#wp1011184
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
Giuseppe
12-10-2008 02:14 AM
hi Mickey,
Are you runing all routers in one area? You can exclude 172.16.10.0/24 from the network statement within an ospf process. If you are asking for "filtering" then you can use "distribution-list in" on Router2 to filter a particular route.
Note: Assuming that you're runing all routers in one area. They have to know the same picture of the area. So what you can do is filter routes to be installed in RIB at Router2
Toshi
12-10-2008 09:42 AM
Hello Mickey,
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
see
http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_osp1.html#wp1011184
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
Giuseppe
12-10-2008 12:17 PM
Another option is using redistribution in router 1 instead of the network statement.
R1:
router ospf 1
network [common subnet between R1 and R2] area 0
redistribute connected subnets route-map CONNECTED
route-map CONNECTED
match ip address CONNECTED
ip access-list standard CONNECTED
permit 10.10.0.0 0.0.255.255
HTH,
__
Edison.
12-29-2008 03:58 AM
Thx all
I find the solution whit this config :)
router ospf 1
log-adjacency-changes
area 0 filter-list prefix import0 in
area 1 range 10.30.0.0 255.255.0.0
network 10.0.10.0 0.0.0.255 area 0
network 10.0.20.0 0.0.0.255 area 1
ip prefix-list import0 seq 10 permit 10.30.0.0/16
ip prefix-list import0 seq 15 permit 10.100.10.0/24
ip prefix-list import0 seq 20 permit 10.0.20.0/24
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: