Proper way to filter announced BGP routes

Hi,

I’m trying to figure out the proper way to filter my announced routes so only my routes are announced. The way I’m doing it now is I have a filter that accepts my prefix and then another filter that discards 0.0.0.0/0. Now this seems to work, but when I go to advertised it says there are too many routes to be displayed, so I click the show all, and it takes it’s good old time and then it just shows the 3 routes it’s suppose to be advertising, then jumps back to the too many routes screen… I’m quite confused by this and I’m thinking I have the filters miss-configured.. Should I have taken the other approach and inverted the filter so everything but my prefixes were discarded?

So in plain layout I have:
1 prefix accept
2 prefix accept
3 0.0.0.0/0 discard
4 discard Also threw in a blank one to make sure all was discarded because once it seemed it wasn’t working.

your 3rd rule discards only default route. to discard all the rest, remove ‘prefix’ parameter (like in rule 4) or add ‘prefix-length=0-32’

Thanks Chupaka that makes sense about rule 4.
Is this the best way to do this? It seams like the clearest way.

I’m wondering why it’s so slow when I go to show advertised routes, it takes 10+ seconds to show the 3 routes I’m advertising, is it doing the filtering each time I go there? Because it says “There are too many advertisments to show them all. Please specify more specific Prefix filter. Or click here to see them all.”. After clicking there it takes ten seconds and then shows the 3 routes.