cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
639
Views
8
Helpful
7
Replies

OSPF route filtering

mbuillon
Level 1
Level 1

Hello,

In the same OSPF process, within the same area 0, i want to filter subnet advertised by a router.

Exemple:

Router A,B and C are in Area 0. They all have a i address in the subnet 10.1.1.0

But router A advertise routes from other enterprise. Then only 2 route interest me. Then i want to filter routes advertised by router A to put in the ospf database only the subnet i want.

Is it possible ?

thanks for reply

7 Replies 7

Edison Ortiz
Hall of Fame
Hall of Fame

No, it's not possible. You are only allowed to filter LSAs when going from one OSPF area to another OSPF area, you can't filter LSAs within the same area.

__

Edison.

marikakis
Level 7
Level 7

Hello,

What do you mean when saying "But router A advertise routes from other enterprise." ? How does this advertisement happen? If it is done via redistribution, then filtering of resulting external routes at the originating ASBR (distribute-list out) might be an option (depends on the reason for those advertisements, whether they are needed elsewhere in the network or not). Filtering of the externals in the out direction can only be done at the originating ASBR.

Kind Regards,

M.

Hello,

I mean that router A advertise some route i do not want in my network. But some of them intereste me.

Then routers B and C must filter incoming LSA form Router A.

How does router A become aware of the routes of the other enterprise in the first place? Is router A running OSPF with one of the other enterprise routers? Or some other routing protocol?

Incoming LSA filtering (distribute-list in) on routers B, C will only cause routes not to be put in their routing tables (the LSAs will still be propagated). Incoming LSA filtering is not a recommended configuration:

http://www.cisco.com/en/US/tech/tk365/technologies_q_and_a_item09186a0080094704.shtml#q12

Kind Regards,

M.

Hi MAXIME,

What's going on when the OSPF database is not consistent within the same area. How do we know that the routing is using an optimal path and see the same picture in that area.Let LSAs are advertised through the area. You can filter routes in the ospf database from being installed in the routing table by using a command.

Hopes this helps

Thot

mbuillon
Level 1
Level 1

thanks all for your reply.

Then i have considered another configuration

Router A is not in the OSPF and i use static route. My goal is to have only one active route to subnet 10.2 and 10.3. With this configuration in router B and C, all my router in OSPF know subnet 10.2 and 10.3 from 2 routers but add route from B only.

Config router B:

Ip route 10.2.0.0 255.255.0.0 10.250.254.254 10

Ip route 10.3.0.0 255.255.0.0 10.250.254.254 10

Access-list 13 permit 10.2.0.0 255.255.0.0

Access-list 13 permit 10.2.0.0 255.255.0.0

Route map FromRouterA permit 10

Match ip address 13

Set metric-type type-1

Router ospf 200

redistribute static subnets route-map FromRouterA

Config router C:

Ip route 10.2.0.0 255.255.0.0 10.250.254.254 50

Ip route 10.3.0.0 255.255.0.0 10.250.254.254 50

Access-list 13 permit 10.2.0.0 255.255.0.0

Access-list 13 permit 10.2.0.0 255.255.0.0

Route map FromRouterA permit 10

Match ip address 13

Set metric-type type-1

Router ospf 200

redistribute static subnets route-map FromRouterA

That's a very odd approach but I believe it should accomplish your needs.

Instead of using the weighted static route on B and C, I recommend using the metric option during the redistribution so OSPF speaking routers will choose Router B over C.

I also recommend using the default metric-type type-2 as you may find some devices choosing Router C over B because their cost is lower to C than B.

HTH,

__

Edison.

Getting Started

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:

Review Cisco Networking products for a $25 gift card