show route filtered

Ondrej Zajicek santiago at crfreenet.org
Mon Jul 1 15:09:45 CEST 2013


On Mon, Jul 01, 2013 at 07:36:13PM +0800, Joe Wooller wrote:
> Hey All, 
> 
> I sent this to the euro-ix bird list, with little response. It was suggested that I send it here.
> 
> I am a little confused as to what show route filtered is meant to do. I was under the impression it would show filtered routes.
> 
> <SNIP>
> If BIRD is configured to keep filtered routes (see import keep filtered option), you can show them instead of routes by using filtered switch.
> </SNIP>
> 
> I have set;
> import keep filtered;
> in my template.
> 
> Unfortunately show route filtered delivers nothing. Am I missing something?

...

> If my understanding of how the filtered option works is completely wrong please let me know!
> Any help/advise would be greatly appreciated.

Hello

The option works as documented, but there is one implicit assumption -
the 'import keep filtered' option applies to the import filter in the
same protocol. In your example you have 'import keep filtered' in the
BGP protocol but the BGP protocol has (implicit) import all and have
import filter in the subsequent pipe protocol.

In your case you would have to move 'import keep filtered' from bgp
to pipe protocol, but this option is not supported for pipe protocols
(one reason that for pipes, the 'filtered' routes are already stored
in 'source' table, while if you do filtering in BGP import filter,
you don't store rejected routes anywhere).

In your case, you would need something like negation of 'show route
filter' or 'show route export', unfortunately we don't have option for
negating filters in show route command. Simple workaround is to convert
your filters to functions (like you have for export filters) and then
you could use 'show route where ! function_name()'.

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20130701/1804ca27/attachment-0001.asc>


More information about the Bird-users mailing list