Hi, I made bird.conf based on examples http://wklej.org/id/1862384/ import: ARPNET - full BGP table EPIX - IX openpeerint EP_GLOBAL - full BGP table export: ARPNET full BGP table EPIX - only statc_bgp, ARPNET prefix EP_GLOBAL - only static, bgp, ARPNET prefix I want to export to other bgp session prefix from ARPNET only when path is direct function rt_export() { if proto = "static_bgp" then return true; if source != RTS_BGP then return false; if net_martian() then return false; if bgp_path.len > 64 then return false; #return bgp_next_hop ~ [ 193.151.48.18 ]; return (bgp_path.first ~ [ 51931, 51944 ]); #if bgp_path.first ~ [ 51931, 51944 ] then return true; } the last two line don't works. I'm looking for some hint to make it work as I want ;) TIA -- D.Wesolowski
On Fri, Dec 04, 2015 at 11:15:16PM +0100, D.Wesołowski wrote:
Hi,
...
the last two line don't works. I'm looking for some hint to make it work as I want ;)
You mean this ones?
return (bgp_path.first ~ [ 51931, 51944 ]); #if bgp_path.first ~ [ 51931, 51944 ] then return true;
I guess the problem is that export filters are executed not before BGP internal processing (including AS PATH update), but after that. Therefore, on EBGP session your ASN is prepened and is the first, ASN from whom you received the prefix is the second. This is confusing and a bit silly, but that is how it currently works. I would like to change the order in the future (to first apply filters and then internal protocol processing). You could do either matching based on the source protocol name (proto = "ARPNET"), ASN membership (51931 ~ bgp_path) or AS path pattern matching (bgp_path ~ [= 199943 51931 * =]). -- 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)
-
D.Wesołowski -
Ondrej Zajicek