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 I do: show route table master protocol R_AS1234x1 I can see only the routes that are allowed to pass (not filtered). If i do: show route protocol R_AS1234x1 I see all routes include routes that get filtered out of the master table. But if I do bird> show route table master filtered bird> show route table master filtered protocol R_AS1234x1 bird> show route filtered bird> show route filtered protocol R_AS1234x1 I get nothing.. Here is an snippet of config; ## ## Protocol Templates ## template bgp IXP { local as ixasn; start delay time 10; debug { states, events }; mrtdump all; #import all; import keep filtered; export all; rs client; } template pipe PIPES { table master; mode transparent; } ## AS1234 - Peer1 table T_AS1234; filter bgp_in_AS1234 prefix set allnet; int set allasn; { if !(avoid_martians()) then reject; if (bgp_path.first != 1234 ) then reject; allasn = [ 1234 ]; if !(bgp_path.last ~ allasn) then reject; accept; } protocol pipe P_AS1234 from PIPES { description "Pipe for AS1234 - Peer1"; peer table T_AS1234; import filter bgp_in_AS1234; export where bgp_out(1234, false); } protocol bgp R_AS1234x1 from IXP { description "RIB for AS1234 - Peer1"; debug { states, events }; neighbour 1.2.3.4 as 1234; route limit 500; table T_AS1234; } If my understanding of how the filtered option works is completely wrong please let me know! Any help/advise would be greatly appreciated. Cheers Joe
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@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."
participants (2)
-
Joe Wooller -
Ondrej Zajicek