BIRD export reject not working

Tim Weippert weiti at weiti.org
Tue Sep 19 11:27:58 CEST 2017


Hi, 

IIRC, bird added your local ASN before export filter, so 64515 is
neither first nor last in ASN Path, and it isn't exactly only 64515 in
the path.

I suggest to use something like:

if bgp_path ~ [= * 64515 * =] then reject;

This should reject any bgp_path contains AS 64515.

HTH, 
tim

On Tue, Sep 19, 2017 at 10:50:47AM +0200, Marek Królikowski wrote:
> Hello guys,
> I got strange problem with BGP i share data to Collector but i put to reject
> some bgp path....
> 
> This is how look configuration of BGP session of Collector:
> 
> protocol bgp Collector {
>    description "Collector";
>    local as MY-ASN;
>    source address IPv61;
>    neighbor IPV62 as SOMEONE-ASN;
>    multihop;
>    import none;
>    export filter {
>    if bgp_path.first = 64515 then reject;
>    if bgp_path = 64515 then reject;
>    if bgp_path.last = 64515 then reject;
>    include "export.conf";
> };
> }
> 
> But:
> root at pl-bgp:~# birdc6 show route export Collector all 2a0b:e206::/32
> BIRD 1.6.3 ready.
> 2a0b:e206::/32     via 2a06:1287:330e:16::2 on bgp-fr [France 2017-09-18] *
> (100) [AS21430i]
>        Type: BGP unicast univ
>        BGP.origin: IGP
>        BGP.as_path: MY-ASN 64515 20473 1299 21430
>        BGP.next_hop: 2a07:XXXX.XXXX.XXXX
>        BGP.local_pref: 100
>        BGP.community: (64515,44)
> 
> Like You see in BGP path there is 64515.
> How i export this to Collector if i put reject on export?
> What is wrong?
> 
> I use BIRD 1.6.3.
> 
> Best Regards
> Marek Krolikowski
> 
> 

-- 
Tim Weippert
http://weiti.org - weiti at weiti.org
GPG Fingerprint - E704 7303 6FF0 8393 ADB1  398E 67F2 94AE 5995 7DD8


More information about the Bird-users mailing list