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: santi...@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."
signature.asc
Description: Digital signature