Can I prevent OSPF from advertising a specific network on an interface

Is there a way to tell OSPF to not advertise a specific network on a spefic interface without stopping the adverts of other networks? Example Router has 5 interfaces F1 is a link to another router F2 is a link to another router F3 = netB F4 = netC F5 = netD

I need nets BCD to be advertised out F1 and F2 but not each other. Similarly I need nets learned on F1 and F2 to be advertised on F1, F2 and F3 only.

I've looked at the passive interface command but I don't think it will do what I want.

Thanks -Rob-

Reply to
ve7eje
Loading thread data ...

You need to use a distribute list on the interface.

Reply to
Thrill5

Sorry Thrill5, but I suspect that is not the whole story.

In a word - no. Due to the architecture of OSPF it is not possible to so restrict the advertisment of networks.

Under some circumstances it is possible to filter routes, e.g. when re-distributing between OSPF processes, perhaps between OSPF Areas?, however in general this is not possible.

OSPF works by every router sending out Link State Advertisments (LSA). These represent the network topology. All the routers in an area eventually receive all of the LSAs as sent by every router in the area. Each router then uses the LSAs to construct a topology database. The routing tables in each router are then calculated independently by each router from its own copy of the topology database.

The key thing is that every router in a area *must* have the same topology database. Well maybe ends up with the same topology database is more accurate:)

So if your "router" has knowledge of the topology it will send it to all of the other routers.

You can use EIGRP since it works by sending routes which you can of course effectively filter.

Perhaps you could find a solution with multiple OSPF processes and redistribution between them. You can apply filters to the redistribution process since they are simple routes. I may have a think about it later. Seems pretty likely at first glance.

Reply to
bod43

An outbound distribute list will not work with OSPF, however, I'm pretty sure an inbound list will be able to filter unwanted routes.

Reply to
John Agosta

as the other posters said - OSPF works by replicating the link state database to other OSPF routers within the area.

However - advertising the OSPF topology (or not) only matters if there is another router on net BCD.

so - dont run OSPF on those interfaces (or operate in passive). If this router doesnt have 2 way OSPF comms with another router it will not form an adjacency and cannot exchange routes.

it does sound like a different protocol may be the best way to do this

- BGP?

Reply to
Stephen

As to suggesting something to help with your scenario, and if you 'must' use OSPF, you can try running each interface under a different OSPF process, and control redistribution of your routing information between your processes with a distribute/prefix list.....

-ja

Reply to
John Agosta

In general, this is true. With a slightly modified architecture that is used by all ISPs that I know personally, you can still achieve the desired effect.

Short version: instead of e.g.

router ospf 1 network 217.29.32.0 0.0.15.255

(which happens to be my RIPE allocation, AS16188)

you use

router ospf 1 passive-interface default no passive-interface no passive-interface no passive-interface ... network 0.0.0.0 network 0.0.0.0 network 0.0.0.0 ... redistribute connected subnets route-map ospf-out redistribute static subnets route-map ospf-out

This way all prefixes routed to customers are distributed accross my entire backbone as AS external. With the route map in place you can prevent prefixes from being redistributed into OSPF at the originating (i.e. directly connected) router.

Best regards, HTH, Patrick

Reply to
Patrick M. Hausen

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.