On Thu, Jan 03, 2013 at 07:29:18PM +0100, Job Snijders wrote:
> Dear all,
> 
> I want to inject information into syslog when certain magic prefixes are 
> announced or withdrawn. 
> 
> So far I have this snippet of configuration, but I'd also like to print the 
> BGP AGGREGATOR ip address, and the AGGREGATOR AS number. How can I do this? 

BIRD currently does not support reading BGP AGGREGATOR bgp attribute from 
filters.

> filter collector_in {                                                         
>                                                                               
>                 
>     if (net ~ [ 84.205.64.0/24, 84.205.65.0/24 ]) then {                      
>                                                                               
>                 
>         print "MAGIC PREFIX SIGNALLED: " , net, "' from AS", bgp_path.last, " 
> via AS", bgp_path.first, " [", proto, "]";                                    
>                 
>         accept;                                                               
>                                                                               
>                 
>     }                                                                         
>                                                                               
>                 
>     else accept;                                                              
>                                                                               
>                 
> } 
> 
> How can I get BIRD to print something when a prefix is withdrawn? 

Filters are not executed for withdraws.

You could probably do what you need by using logging features ('debug'
protocol option with 'routes' keyword), perhaps using a pipe and
a dedicated table for such magic prefixes - filters on a pipe for
selecting prefixes, logging option on a pipe to log accepted ones.
That would also log withdraws.

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: [email protected])
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."

Attachment: signature.asc
Description: Digital signature

Reply via email to