[quagga-users 14855] Re: ospf route-map

Alexis Rosen <[email protected]> Wed, 1 Nov 2017 09:40:23 -0400
Newsgroups gmane.network.quagga.user
Message-ID <[email protected]>
On Nov 1, 2017, at 9:26 AM, Mark Coetser <mark-ajVlV48O6s/[email protected]> wrote:
> On 01/11/2017 15:16, William Herrin wrote:
>> On Wed, Nov 1, 2017 at 7:59 AM, Mark Coetser <mark-ajVlV48O6s/[email protected] <mailto:mark-ajVlV48O6s/[email protected]>> wrote:
>>    OK i have a working ospf setup between multiple routers including
>>    some mikrotiks. OSPF works fine but now I have been trying to create
>>    an access list to block a quagga router from advertising a ospf
>>    learned subnet and for some reason I cant seem to get this right....
>>    so I have router A with a local subnet of 192.168.60.0/24
>>    <http://192.168.60.0/24> that is connected to router B which in turn
>>    is connected to router C, I am trying to get router B to stop
>>    advertising 192.168.60.0/24 <http://192.168.60.0/24> to router C
>> Hi Mark,
>> If I understand what you're asking (I might not) then OSPF doesn't work that way. Filtering routes only works on the router first introducing ("redistributing") the route in to OSPF. That's router A in your example. Once in OSPF the route can't be conditionally removed somewhere else with any configuration.
>> You can filter the route if you redistribute it from OSPF to some other protocol such as BGP. But you can't filter it within OSPF.
> 
> OK that sort of makes sense, now I just need to figure out how to accomplish what I am trying to achieve......
> 
> The thing is router B still need to access the 192.168.60.0/24 network but router C shouldnt have that route and I need OSPF because there are multiple connections between each of the routers via different ISPs and I am running GRE tunnels across each of the different links.

Huh. I read your question very differently, but OK.

As Bill says, you can't remove it from OSPF (that would break SPF calculations), but you can prevent the route from getting from OSPF into your local FIB. (At least, you can on Ciscos. I think Quagga can too.)

If you're just dealing with this one route, that's probably the way to go, assuming it works. But if there are more routes or routers, it pays to architect things properly. Use OSPF areas, use BGP with fast timers (possibly a different BGP instance than the one you're using for external connectivity), use multiple OSPFs (on Ciscos, not on Quagga), use OSPF + IS-IS or OSPF + BGP, etc. The best solution will depend on details of your deployment.

/a