dynamic export filter based on interface/peering partner

Ondrej Zajicek santiago at crfreenet.org
Thu Mar 10 10:37:25 CET 2011


On Tue, Mar 08, 2011 at 10:00:42AM +0100, Arjan Filius wrote:
> Hello bird users,
>
> i'd like to do some traffic engineering incoming traffic perferred in a  
> central function/filter  like the "filter bgp_out {} " i'm using
> On every peering partner i'd like to have that same export bgp_out 
> filter, and basically i tried some things, but it didn't work out.
>
> What i tried is:
>
> filter bgp_out {
>  <snip>
>  if ( ( proto = "JointTransit_IPv4_177_NIKHEF" ) || ( proto = "JointTransit_IPv4_178_Telecity2" ) ) then
>    {
>     bgp_path.prepend(OURAS);
>    }
>  <snip>
> }
>
> extra prepend based on proto didn't work (for me). Selection on neighbor  
> AS isn't the most suitable for me as at least one neighbor AS comes 
> trough an "expensive" bgp proto and a "cheap" one.
>
> How does one do this, or how would i do this?

Probably the simplest way is to replace the filter by a function (with
a parameter), replace reject / accept with return true / false in the body,
and instead of 'export bgp_out' use 'export where bgp_out(param)'.

-- 
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/20110310/9907d620/attachment-0001.asc>


More information about the Bird-users mailing list