print BGP AGGREGATOR attribute?

Ondrej Zajicek santiago at crfreenet.org
Sun Jan 6 15:55:51 CET 2013


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: 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/20130106/dc0fe88e/attachment-0001.asc>


More information about the Bird-users mailing list